bluelinelabs / bluelinelabs/LoganSquare
ParameterizedType proguard runtime error
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 303
- PR merge metrics
- No merged PRs in 30d
Description
My code works in debug mode (not proguard)
My code
```
public static ResponseServer generateJSON(String json, Class dataClass){
ResponseServer responseServer = null;
if (dataClass == JUnidade.class)
responseServer = (ResponseServer)LoganSquare.parse(json, new ParameterizedType>() { });
....
```
my rules of proguard-rules.pro
```
-keep class com.mypackage.myapp.WebService.Models.ResponseServer.**
-keep class * extends com.bluelinelabs.logansquare.ParameterizedType.**
-keepclassmembers class com.mypackage.myapp.WebService.Models.** {*;}
-keep public class com.mypackage.myapp.WebService.Models.** {
public static ;
}
```
Decompiled in debug mode (not run proguard) It's Work

Decompiled in release mode (run proguard) don't work

any suggestion?
My question in [stackoverflow](http://stackoverflow.com/questions/38920279/runtime-error-in-generic-method-with-proguard)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the generateJSON method and the rules in proguard-rules.pro, then compare the debug and ProGuard release behavior described in the issue. Reproduce the runtime failure in a release build and verify that the ParameterizedType-based LoganSquare parsing works there without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100