src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
Print this page
*** 64,73 ****
--- 64,74 ----
*/
final static boolean checkClash = true;
private final Names names;
private final Enter enter;
+ private final Source source;
private final Log log;
private final Check chk;
private final Attr attr;
private final Symtab syms;
private final TreeMaker make;
*** 90,99 ****
--- 91,101 ----
protected MemberEnter(Context context) {
context.put(memberEnterKey, this);
names = Names.instance(context);
enter = Enter.instance(context);
+ source = Source.instance(context);
log = Log.instance(context);
chk = Check.instance(context);
attr = Attr.instance(context);
syms = Symtab.instance(context);
make = TreeMaker.instance(context);
*** 800,812 ****
target.name);
}
// Pull the flag through for better diagnostics, even on a bad target.
s.flags_field |= Flags.POLYMORPHIC_SIGNATURE;
}
! if (!annotated.add(a.type.tsym))
log.error(a.pos, "duplicate.annotation");
}
s.attributes_field = buf.toList();
}
/** Queue processing of an attribute default value. */
void annotateDefaultValueLater(final JCExpression defaultValue,
--- 802,819 ----
target.name);
}
// Pull the flag through for better diagnostics, even on a bad target.
s.flags_field |= Flags.POLYMORPHIC_SIGNATURE;
}
! if (!annotated.add(a.type.tsym)) {
! if (source.allowRepeatedAnnotations()) {
! // Does the annotation being added have a valid container?
! ;
! } else
log.error(a.pos, "duplicate.annotation");
}
+ }
s.attributes_field = buf.toList();
}
/** Queue processing of an attribute default value. */
void annotateDefaultValueLater(final JCExpression defaultValue,