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
Test.java contains a simultaneous declaration of fields a and b:
Object a,b;
Test1.jaif annotates a and b with SuppressWarnings(...)
Test2.jaif annotates a with @NonNull, b with @Nullable
What steps will reproduce the problem?
1. javac Test.java
2. insert-annotations-to-source Test1.jaif Test.java
3. javacheck annotated/Test.java
4. insert-annotations-to-source Test2.jaif Test.java
What is the expected output? What do you see instead?
Output from step 3:
annotated/Test.java:5: error: duplicate annotation, the declaration of
SuppressWarnings does not have a valid Repeatable annotation
@SuppressWarnings({"nonnull","rawness","nullness"})
^
1 error
Output from step 4:
Found class Test, but unable to insert @checkers.nullness.quals.Nullable:
@checkers.nullness.quals.Nullable (nl=true) @ [GenericArrayLocationCriterion at outermost type, FieldCriterion: b, In class 'Test' (exactly), In class 'Test' (exactly)]
Ideally, the simultaneous declaration should be expanded to one declaration per
field.
What version of the product are you using? On what operating system?
hg head on linux.
Please provide any additional information below.
Original issue reported on code.google.com by mattsbr...@g.ucla.edu on 7 May 2013 at 8:44
This refactor could work as a pre-processor before doing annotation insertion on a project. However, since I developed it in a catch-the-DDL way, the code is a bit unordered and not good for maintenance. It should be just a temporary workaround, and hopefully later on some mature & professional refactor tools could solve this problem wonderfully.
Original issue reported on code.google.com by
mattsbr...@g.ucla.edu
on 7 May 2013 at 8:44Attachments:
The text was updated successfully, but these errors were encountered: