Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@Pref not processed on project->clean #450

Copy link
Copy link
@KoljaTM

Description

@KoljaTM
Issue body actions

I am using a @SharedPref, that I am referencing as a @PREF in other classes. It gets generated correctly on incremental builds, i.e. when I save the enclosing file. But on project->clean it is missing.
I have debugged a bit and found (I hope) the most likely culprit for my problem. When the annotations are processed, in the "clean-case", the @SharedPrefs class doesn't exist yet. This case is guarded against by this statement:
com.googlecode.androidannotations.helper.ValidatorHelper.isSharedPreference(Element, AnnotationElements, IsValid):Line 637

        if (type instanceof ErrorType) {

However this doesn't seem to work correctly (at least not in my eclipse version). Adding

        if (type instanceof ErrorType || type.getKind() == TypeKind.ERROR) {

and the same in com.googlecode.androidannotations.processing.PrefProcessor.process(Element, JCodeModel, EBeanHolder)
however did work. I would think that checking the Kind that is explicitly returned would be better than checking a class, but I don't know the details here very well.
Will you investigate this further on your own or do you want me to create a pull request?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.