You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to fillter the the list using the method:
filterItems(@nonnull List unfilteredItems, @IntRange(from = 0) long delay)
however, after the delay has passed, and the user still editing his text, I got the following exception:
FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at eu.davidea.flexibleadapter.FlexibleAdapter.executeNotifications(FlexibleAdapter.java:3481)
at eu.davidea.flexibleadapter.FlexibleAdapter.access$2200(FlexibleAdapter.java:94)
at eu.davidea.flexibleadapter.FlexibleAdapter$FilterAsyncTask.onPostExecute(FlexibleAdapter.java:4365)
at eu.davidea.flexibleadapter.FlexibleAdapter$FilterAsyncTask.onPostExecute(FlexibleAdapter.java:4323)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I think that the problem is the following line:
notifications = null;
at the end of the method:
private synchronized void executeNotifications();
I believes that changing this line to:
notifications = new ArrayList<>();
will solve the problem.
I would like to hear your opinion.
Thanks.
The text was updated successfully, but these errors were encountered:
@golomb1, I already fixed this bug, a couple of weeks ago, see issue #191, please use the Snapshot version, which contains also more fixes. Read the bottom of the issue 39 for the changelog.
The question is about version 5.0.0-b8.
I tried to fillter the the list using the method:
filterItems(@nonnull List unfilteredItems, @IntRange(from = 0) long delay)
however, after the delay has passed, and the user still editing his text, I got the following exception:
FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at eu.davidea.flexibleadapter.FlexibleAdapter.executeNotifications(FlexibleAdapter.java:3481)
at eu.davidea.flexibleadapter.FlexibleAdapter.access$2200(FlexibleAdapter.java:94)
at eu.davidea.flexibleadapter.FlexibleAdapter$FilterAsyncTask.onPostExecute(FlexibleAdapter.java:4365)
at eu.davidea.flexibleadapter.FlexibleAdapter$FilterAsyncTask.onPostExecute(FlexibleAdapter.java:4323)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I think that the problem is the following line:
notifications = null;
at the end of the method:
private synchronized void executeNotifications();
I believes that changing this line to:
notifications = new ArrayList<>();
will solve the problem.
I would like to hear your opinion.
Thanks.
The text was updated successfully, but these errors were encountered: