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
public class A
{
private final ThreadLocal<DateFormat> format = new ThreadLocal<DateFormat>() {
@Override
protected DateFormat initialValue() {
return new SimpleDateFormat("yyyy-MM-dd");
}
};
}
In the above code, I need to keep initialValue method, How to write in proguard.cfg file?
I write the configuration like below
-keepclassmembers class A { *; }
but, it obfuscated as below
private final ThreadLocal<DateFormat> format = new ThreadLocal<DateFormat>(this) {
protected DateFormat f() {
return new SimpleDateFormat("yyyy-MM-dd");
}
};
it results in format.get() is null.
The text was updated successfully, but these errors were encountered:
The overridden "iniitalValue" method is actually in an anonymous class called A$1. The ProGuard Playground is useful for questions like these, since you can see visually which keep rules match the entities in your app.
Hi!
In the above code, I need to keep initialValue method, How to write in proguard.cfg file?
I write the configuration like below
but, it obfuscated as below
it results in format.get() is null.
The text was updated successfully, but these errors were encountered: