Skip to content
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.

repeated annotations are not supported #1262

Description

@krischik

Since the last update I got this:

/**
 * We use @SuppressWarning here because our java code
 * generator doesn't know that there is no need
 * to import OnXXXListeners from View as we already
 * are in a View.
 * 
 */
@java.lang.SuppressWarnings({
    "ClassNamePrefixedWithPackageName"
})
@TargetApi(15)
@java.lang.SuppressWarnings("unused")
public final class Calculator_Button_5_

Looks like you copied the annotation form the main class to the generated class without checking if they are already there.

Activity

  1. WonderCsabo commented on Dec 2, 2014

    @WonderCsabo
    Member

    Can you post the annotated class?

  2. krischik commented on Dec 5, 2014

    @krischik
    Author

    Sure I can:

    http://sourceforge.net/p/uiq3/code/HEAD/tree//trunk/Java/Calculator/Droid/src/main/java/net/sourceforge/uiq3/calculator/Calculator_Button_5.java

    It is not very difficult to guess that class contains a:

    @SuppressWarnings ("ClassNamePrefixedWithPackageName")
    

    And you can't compile the class without the rest of the system.

  3. WonderCsabo commented on Dec 5, 2014

    @WonderCsabo
    Member

    Thanks for posting your class. Yes, i was also suspecting the problem, i asked you to post that to be sure.

    However, i do not really understand your tone here. How we exactly wasted your time? Or do you think we wasted our time by not fixing this? Did you wait for this issue to be fixed? Is this a blocker problem? I hope not, because you can safely remove your @SuppressWarnings as that will only yield some warnings. We are sorry for your troubles, but even if it is a blocker, please note all core AA collaborators/contributors work on this project in their free time. You cannot expect us to fix all bugs at a glance. Also as the project is open source, you can always improve it by sending us pull requests.

    The real problem is that we copy all annotations to the generated class first. Next in case of EViews and EViewGroups we add a @SuppressWarnings. At that point we should check whether the annotation exists already on the class, and in that case we should only add a new member: unused. Or if unused is already in the annotation params, we have to skip. Otherwise we should just add the annotation as before.

    I think i have a fix, but i can only push something tomorrow.

  4. self-assigned this
    on Dec 5, 2014
  5. WonderCsabo commented on Dec 6, 2014

    @WonderCsabo
    Member

    @krischik this is fixed. You can try it out by using the latest SNAPSHOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions