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