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
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Simple @SharedPref with APPLICATION_DEFAULT scope creates unused field #1030
With the following simple preferences interface, there is an unused "private Context context_" in the generated class that the compiler generates a warning for:
@SharedPref(value = Scope.APPLICATION_DEFAULT)
public interface Prefs {
String a();
This is normal. If you would use the keyRes parameter that field would be utilized. For simplicity, we always generate that field. Generally you should ignore warnings in generated classes.
Activity
WonderCsabo commentedon Jun 5, 2014
This is normal. If you would use the
keyResparameter that field would be utilized. For simplicity, we always generate that field. Generally you should ignore warnings in generated classes.WonderCsabo commentedon Jun 5, 2014
By the way, it is easy to lazily generate that field. I'll create a PR soon to resolve this issue.
WonderCsabo commentedon Aug 22, 2014
Fixed.