android10 / frodo

Android Library for Logging RxJava Observables and Subscribers.
1.48k stars 101 forks source link

NPE when enabling proguard optimization #19

Closed simplysoft closed 8 years ago

simplysoft commented 8 years ago

We get the following exception when we have proguard optimization turned on

Caused by: java.lang.NullPointerException
         at com.fernandocejas.frodo.joinpoint.FrodoJoinPoint.getGenericReturnTypes(FrodoJoinPoint.java:124)
         at com.fernandocejas.frodo.aspect.LogObservable.weaveAroundJoinPoint(LogObservable.java:5022)

We have a rather special setup (debug built type & minify configuration similar to release), so this kind of problems we are not really unexpected, but would be good to make the code more resilient to just fall back to do nothing.

android10 commented 8 years ago

It is clear that you have to apply a rule there. I'm not gonna cover any obfuscation since the library was meant for debug build variants and I could not find any use case where proguard is enabled on debug build types.

In that case, if you are interested in that, you can send a PR and I review it.

Thanks.