--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java Wed Apr 16 19:21:59 2014 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java Thu Apr 17 12:17:02 2014 -0400
@@ -2148,18 +2148,12 @@
for (Attribute.TypeCompound ta : lv.sym.getRawTypeAttributes()) {
TypeAnnotationPosition p = ta.position;
- // At this point p.type_index contains the catch type index.
- // Use that index to determine the exception table index.
- // We can afterwards discard the type_index.
- // A TA position is shared for all type annotations in the
- // same location; updating one is enough.
- // Use -666 as a marker that the exception_index was already updated.
- Assert.check(p.type_index != Integer.MIN_VALUE,
- "type_index of exception parameter type annotation " +
- ta + " was not set correctly");
- if (p.type_index != -666) {
- p.exception_index = findExceptionIndex(p.type_index);
- p.type_index = -666;
+ if (p.hasCatchType()) {
+ final int idx = findExceptionIndex(p.getCatchType());
+ if (idx == -1)
+ Assert.error("Could not find exception index for type annotation " +
+ ta + " on exception parameter");
+ p.setExceptionIndex(idx);
}
}
}