8037420: Silent failures in Annotate.actualEnterTypeAnnotations

Remove two silent failures

Reviewed-by: jjg
This commit is contained in:
Eric McCorkle 2014-03-14 15:35:13 -04:00
parent 2564e82ad1
commit 53e3990b7c

View File

@ -808,9 +808,7 @@ public class Annotate {
Attribute.TypeCompound tc = Attribute.TypeCompound tc =
enterTypeAnnotation(a, syms.annotationType, env); enterTypeAnnotation(a, syms.annotationType, env);
if (tc == null) { Assert.checkNonNull(tc, "Failed to create type annotation");
continue;
}
if (annotated.containsKey(a.type.tsym)) { if (annotated.containsKey(a.type.tsym)) {
if (!allowRepeatedAnnos) { if (!allowRepeatedAnnos) {
@ -827,10 +825,9 @@ public class Annotate {
} }
} }
if (s != null) { Assert.checkNonNull(s, "Symbol argument to actualEnterTypeAnnotations is null");
s.appendTypeAttributesWithCompletion( s.appendTypeAttributesWithCompletion(
new AnnotateRepeatedContext<>(env, annotated, pos, log, true)); new AnnotateRepeatedContext<>(env, annotated, pos, log, true));
}
} finally { } finally {
if (prevLintPos != null) if (prevLintPos != null)
deferredLintHandler.setPos(prevLintPos); deferredLintHandler.setPos(prevLintPos);