src/share/classes/com/sun/tools/javac/comp/Check.java

Print this page

        

@@ -2678,11 +2678,11 @@
         if (types.lowerBound(type).tsym == syms.classType.tsym) return;
         if (types.isArray(type) && !types.isArray(types.elemtype(type))) {
             validateAnnotationType(pos, types.elemtype(type));
             return;
         }
-        log.error(pos, "invalid.annotation.member.type");
+        log.error(pos, "annotation.invalid.element.type");
     }
 
     /**
      * "It is also a compile-time error if any method declared in an
      * annotation type has a signature that is override-equivalent to

@@ -3093,11 +3093,11 @@
             JCAssign assign = (JCAssign) arg;
             Symbol m = TreeInfo.symbol(assign.lhs);
             if (m == null || m.type.isErroneous()) continue;
             if (!members.remove(m)) {
                 isValid = false;
-                log.error(assign.lhs.pos(), "duplicate.annotation.member.value",
+                log.error(assign.lhs.pos(), "annotation.duplicate.element",
                           m.name, a.type);
             }
         }
 
         // all the remaining ones better have default values

@@ -3418,11 +3418,11 @@
             if ((isClassDecl || sym != e.sym) &&
                 sym.kind == e.sym.kind &&
                 sym.name != names.error &&
                 (!staticImport || !e.isStaticallyImported())) {
                 if (!e.sym.type.isErroneous()) {
-                    String what = e.sym.toString();
+                    String what = e.sym.getSimpleName().toString();
                     if (!isClassDecl) {
                         if (staticImport)
                             log.error(pos, "already.defined.static.single.import", what);
                         else
                         log.error(pos, "already.defined.single.import", what);