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:
parent
552e338377
commit
07998a6335
@ -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);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user