Skip to content

Conversation

@guanjianzhe
Copy link

我们在fabric后台见到了约700次崩溃,目前版本约覆盖100万用户。只做了简单处理,因为:

  1. isFromResumed,isFirstConnect标志并没有真正使用,所有不知道作用是什么;
  2. 不想通过保证下载接口的调用时机修复。不应该依赖下载接口的调用时机,保证无空指针。

model.onInfoValid(info) will not be invoked when info is null. Then
model.isFromResumed hasn't been initialized.

log:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
at com.liulishuo.okdownload.core.listener.assist.Listener1Assist.connectEnd(Listener1Assist.java:88)
at com.liulishuo.okdownload.core.listener.DownloadListener1.connectEnd(DownloadListener1.java:91)

    model.onInfoValid(info) will not be invoked when info is null. Then
    model.isFromResumed hasn't been initialized.

log:
    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
       at com.liulishuo.okdownload.core.listener.assist.Listener1Assist.connectEnd(Listener1Assist.java:88)
       at com.liulishuo.okdownload.core.listener.DownloadListener1.connectEnd(DownloadListener1.java:91)
@codecov-io
Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #230 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #230   +/-   ##
=======================================
  Coverage   83.33%   83.33%           
=======================================
  Files          64       64           
  Lines        3828     3828           
  Branches      619      619           
=======================================
  Hits         3190     3190           
  Misses        369      369           
  Partials      269      269
Impacted Files Coverage Δ
...download/core/listener/assist/Listener1Assist.java 86.88% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58be761...b565aec. Read the comment docs.

@rantianhua
Copy link
Collaborator

@guanjianzhe Please refine unit test to ensure the test coverage of your changes is > 83%.

@BarretWu
Copy link

BarretWu commented Jun 8, 2020

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
at com.liulishuo.okdownload.g.j.d.a.a(Listener1Assist.java:88)
at com.liulishuo.okdownload.g.j.a.a(DownloadListener1.java:91)
at com.liulishuo.okdownload.g.j.c.a(DownloadListenerBunch.java:87)
at com.liulishuo.okdownload.g.f.a$b$i.run(CallbackDispatcher.java:297)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7383)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants