changeset 3180:5bcf670f2662

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
author emc
date Tue, 28 Jan 2014 17:51:28 -0500
parents 36425408327f
children 35db68019aff
files src/share/classes/com/sun/tools/javac/comp/Attr.java
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Jan 28 14:31:29 2014 -0800
+++ b/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);
                 }
-            }
         });
     }