8032980: Silent failure in Attr.annotateType

Turn silent discard of annotations in Attr.annotateType if conversion to TypeCompound fails into an assertion failure.

Reviewed-by: jjg
This commit is contained in:
Eric McCorkle 2014-01-28 17:51:28 -05:00
parent 552e338377
commit 07998a6335

View File

@ -4078,11 +4078,9 @@ public class Attr extends JCTree.Visitor {
@Override @Override
public void run() { public void run() {
List<Attribute.TypeCompound> compounds = fromAnnotations(annotations); List<Attribute.TypeCompound> compounds = fromAnnotations(annotations);
if (annotations.size() == compounds.size()) { Assert.check(annotations.size() == compounds.size());
// All annotations were successfully converted into compounds
tree.type = tree.type.unannotatedType().annotatedType(compounds); tree.type = tree.type.unannotatedType().annotatedType(compounds);
} }
}
}); });
} }