search

Home  >  Q&A  >  body text

android - Are there any special techniques for debugging third-party libraries?

I want to use debug to see which method Schedulers.single() is.

Then I found something strange

The f here is obviously null but it is not directly return defaultScheduler?;
Why does it go to return apply(f,deaultScheduler) ;Is there something wrong with my source code? Or is there something wrong with the debug method?

Please give me some advice, I don’t understand this at all.

阿神阿神2729 days ago797

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-05-31 10:41:32

    I think it is a debugging problem, Function f = onSingleHandler f is a Function type and has been assigned a non-null value onSingleHandler, so f != null
    You can see that onSingleHandler is annotated as @Nullable’s

    @Nullable
    static volatile Function<? super Scheduler, ? extends Scheduler> onSingleHandler;

    reply
    0
  • Cancelreply