@Override public void warn(LintCategory lint) { boolean warned = this.warned; super.warn(lint); if (warned) return; // suppress redundant diagnostics switch (lint) { case UNCHECKED: Check.this.warnUnchecked(pos(), "prob.found.req", diags.fragment(uncheckedKey), found, expected); break; case VARARGS: if (method != null && method.attribute(syms.trustMeType.tsym) != null && isTrustMeAllowedOnMethod(method) && !types.isReifiable(method.type.getParameterTypes().last())) { Check.this.warnUnsafeVararg(pos(), "varargs.unsafe.use.varargs.param", method.params.last()); } break; default: throw new AssertionError("Unexpected lint: " + lint); } } }
@Override public void warn(LintCategory lint) { boolean warned = this.warned; super.warn(lint); if (warned) return; // suppress redundant diagnostics switch (lint) { case UNCHECKED: Check.this.warnUnchecked(pos(), "prob.found.req", diags.fragment(uncheckedKey), found, expected); break; case VARARGS: if (method != null && method.attribute(syms.trustMeType.tsym) != null && isTrustMeAllowedOnMethod(method) && !types.isReifiable(method.type.getParameterTypes().last())) { Check.this.warnUnsafeVararg(pos(), "varargs.unsafe.use.varargs.param", method.params.last()); } break; default: throw new AssertionError("Unexpected lint: " + lint); } } }
public Warner convertWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.assign", found, expected); }
public Warner castWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.cast.to.type", found, expected); }
public Warner castWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.cast.to.type", found, expected); }
public Warner convertWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.assign", found, expected); }
public Warner castWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.cast.to.type", found, expected); }
public Warner castWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.cast.to.type", found, expected); }
public Warner convertWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.assign", found, expected); } }
public void warnUnchecked() { boolean warned = this.warned; super.warnUnchecked(); if (warned) return; // suppress redundant diagnostics Object problem = JCDiagnostic.fragment(key); Check.this.warnUnchecked(pos(), "prob.found.req", problem, found, expected); } }
public Warner convertWarner(DiagnosticPosition pos, Type found, Type expected) { return new ConversionWarner(pos, "unchecked.assign", found, expected); } }
public void warnUnchecked() { boolean warned = this.warned; super.warnUnchecked(); if (warned) return; // suppress redundant diagnostics Object problem = JCDiagnostic.fragment(key); Check.this.warnUnchecked(pos(), "prob.found.req", problem, found, expected); } }