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

Print this page

        

*** 2678,2688 **** 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"); } /** * "It is also a compile-time error if any method declared in an * annotation type has a signature that is override-equivalent to --- 2678,2688 ---- 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, "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,3103 **** 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", m.name, a.type); } } // all the remaining ones better have default values --- 3093,3103 ---- 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(), "annotation.duplicate.element", m.name, a.type); } } // all the remaining ones better have default values
*** 3418,3428 **** 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(); if (!isClassDecl) { if (staticImport) log.error(pos, "already.defined.static.single.import", what); else log.error(pos, "already.defined.single.import", what); --- 3418,3428 ---- 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.getSimpleName().toString(); if (!isClassDecl) { if (staticImport) log.error(pos, "already.defined.static.single.import", what); else log.error(pos, "already.defined.single.import", what);