Skip to content

@PreferenceFunction annotation doesn't work with objects #20

@thiagoms83

Description

@thiagoms83
  • Library Version: 1.2.0
  • Affected Device(s): Within the code

Add a clear description about the problem.

@PreferenceFunction annotation doesn't work with target that is an object marked with @TypeConverter. Example:

@TypeConverter(BaseGsonConverter.class)
    protected AccessToken accessToken;

@PreferenceFunction("AccessToken")
    public AccessToken putAccessTokenFunction(AccessToken accessToken) {
        accessToken.update();
        return accessToken;
    }  

The code above generate a error code in the corresponding Preference_ file:

preference.edit().putString("AccessToken", super.putAccessTokenFunction(value.convertObject(accesstoken))).apply();

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions