8032980: Silent failure in Attr.annotateType
Summary: Turn silent discard of annotations in Attr.annotateType if conversion to TypeCompound fails into an assertion failure.
Reviewed-by: jjg
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue Jan 28 14:31:29 2014 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue Jan 28 17:51:28 2014 -0500
@@ -4078,11 +4078,9 @@
@Override
public void run() {
List<Attribute.TypeCompound> compounds = fromAnnotations(annotations);
- if (annotations.size() == compounds.size()) {
- // All annotations were successfully converted into compounds
+ Assert.check(annotations.size() == compounds.size());
tree.type = tree.type.unannotatedType().annotatedType(compounds);
}
- }
});
}