Home | History | Annotate | Download | only in tests
      1 package annotator.tests;
      2 
      3 // This test ensures that no annotation is re-inserted, if it already
      4 // existed in the original source code.
      5 public class DuplicateAnnotation {
      6 
      7   @SuppressWarnings("A")
      8   void m1() { }
      9 
     10   @java.lang.SuppressWarnings("B")
     11   void m2() { }
     12 
     13   /*@SuppressWarnings("C")*/
     14   void m3() { }
     15 
     16   /*@java.lang.SuppressWarnings("D")*/
     17   void m4() { }
     18 
     19   void m5() { }
     20 
     21   void m6() {
     22     @SuppressWarnings("F")
     23     Object o = new Object();
     24   }
     25 
     26   int /*@annotator.tests.TA*/ [] i;
     27 }
     28 
     29 @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE_USE})
     30 @interface TA {}
     31