dkunzler / esperandro

Easy SharedPreference Engine foR ANDROid
Other
180 stars 14 forks source link

warnings for each preference after upgrading to 2.5.2 - 3.0.0 #61

Closed rguthor2 closed 5 years ago

rguthor2 commented 5 years ago

After upgrading to version 2.5.2 or higher, gradle build produces a warning for each preference, e.g. warning: [unchecked] unchecked cast return (V) (Integer) registrationStatus(); ^ required: V found: Integer where V is a type-variable: V extends Object declared in method <V>getValue(Context,int)

The declaration is as follows: @SharedPreferences public interface DefaultPrefs extends SharedPreferenceActions { ... int registrationStatus(); void registrationStatus(int registrationStatus);

Probably I'm doing something wrong? How can these warnings be avoided.

regards Rainer

dkunzler commented 5 years ago

Hi Rainer,

nice to hear from you! (and nice to hear that esperandro is still in use)

You didn't do anything wrong. The generated code has indeed some warnings. I fixed it with the respective suppress annotation.

I just release version 3.0.1 to fix it. It should be available in a few hours on central. For now refer to the changelog.md for information about the 3.0.x update while I'm writing a proper Migration guide.

Regards, David

rguthor2 commented 5 years ago

Hi David, thanks for the super fast response. I upgraded to the new version. The warnings have disappeared and everything seems to be running well.

regarnds, Rainer