equal
deleted
inserted
replaced
79 private final DeferredAttr deferredAttr; |
79 private final DeferredAttr deferredAttr; |
80 private final Infer infer; |
80 private final Infer infer; |
81 private final Types types; |
81 private final Types types; |
82 private final TypeAnnotations typeAnnotations; |
82 private final TypeAnnotations typeAnnotations; |
83 private final JCDiagnostic.Factory diags; |
83 private final JCDiagnostic.Factory diags; |
84 private boolean warnOnSyntheticConflicts; |
|
85 private boolean suppressAbortOnBadClassFile; |
|
86 private final JavaFileManager fileManager; |
84 private final JavaFileManager fileManager; |
87 private final Source source; |
85 private final Source source; |
88 private final Profile profile; |
86 private final Profile profile; |
89 private final boolean warnOnAccessToSensitiveMembers; |
87 private final boolean warnOnAccessToSensitiveMembers; |
90 |
88 |
128 allowSimplifiedVarargs = source.allowSimplifiedVarargs(); |
126 allowSimplifiedVarargs = source.allowSimplifiedVarargs(); |
129 allowDefaultMethods = source.allowDefaultMethods(); |
127 allowDefaultMethods = source.allowDefaultMethods(); |
130 allowStrictMethodClashCheck = source.allowStrictMethodClashCheck(); |
128 allowStrictMethodClashCheck = source.allowStrictMethodClashCheck(); |
131 allowPrivateSafeVarargs = source.allowPrivateSafeVarargs(); |
129 allowPrivateSafeVarargs = source.allowPrivateSafeVarargs(); |
132 allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation(); |
130 allowDiamondWithAnonymousClassCreation = source.allowDiamondWithAnonymousClassCreation(); |
133 warnOnSyntheticConflicts = options.isSet("warnOnSyntheticConflicts"); |
|
134 suppressAbortOnBadClassFile = options.isSet("suppressAbortOnBadClassFile"); |
|
135 warnOnAccessToSensitiveMembers = options.isSet("warnOnAccessToSensitiveMembers"); |
131 warnOnAccessToSensitiveMembers = options.isSet("warnOnAccessToSensitiveMembers"); |
136 |
132 |
137 Target target = Target.instance(context); |
133 Target target = Target.instance(context); |
138 syntheticNameChar = target.syntheticNameChar(); |
134 syntheticNameChar = target.syntheticNameChar(); |
139 |
135 |
267 * @param pos Position to be used for error reporting. |
263 * @param pos Position to be used for error reporting. |
268 * @param ex The failure to report. |
264 * @param ex The failure to report. |
269 */ |
265 */ |
270 public Type completionError(DiagnosticPosition pos, CompletionFailure ex) { |
266 public Type completionError(DiagnosticPosition pos, CompletionFailure ex) { |
271 log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, "cant.access", ex.sym, ex.getDetailValue()); |
267 log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, "cant.access", ex.sym, ex.getDetailValue()); |
272 if (ex instanceof ClassFinder.BadClassFile |
268 if (ex instanceof ClassFinder.BadClassFile) throw new Abort(); |
273 && !suppressAbortOnBadClassFile) throw new Abort(); |
|
274 else return syms.errType; |
269 else return syms.errType; |
275 } |
270 } |
276 |
271 |
277 /** Report an error that wrong type tag was found. |
272 /** Report an error that wrong type tag was found. |
278 * @param pos Position to be used for error reporting. |
273 * @param pos Position to be used for error reporting. |
2630 |
2625 |
2631 /** Report a conflict between a user symbol and a synthetic symbol. |
2626 /** Report a conflict between a user symbol and a synthetic symbol. |
2632 */ |
2627 */ |
2633 private void syntheticError(DiagnosticPosition pos, Symbol sym) { |
2628 private void syntheticError(DiagnosticPosition pos, Symbol sym) { |
2634 if (!sym.type.isErroneous()) { |
2629 if (!sym.type.isErroneous()) { |
2635 if (warnOnSyntheticConflicts) { |
2630 log.error(pos, "synthetic.name.conflict", sym, sym.location()); |
2636 log.warning(pos, "synthetic.name.conflict", sym, sym.location()); |
|
2637 } |
|
2638 else { |
|
2639 log.error(pos, "synthetic.name.conflict", sym, sym.location()); |
|
2640 } |
|
2641 } |
2631 } |
2642 } |
2632 } |
2643 |
2633 |
2644 /** Check that class c does not implement directly or indirectly |
2634 /** Check that class c does not implement directly or indirectly |
2645 * the same parameterized interface with two different argument lists. |
2635 * the same parameterized interface with two different argument lists. |