--- old/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java 2014-05-09 16:27:51.790197205 -0400 +++ new/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java 2014-05-09 16:27:51.690192965 -0400 @@ -259,9 +259,6 @@ case METHOD_RETURN: case FIELD: break; - case UNKNOWN: - sb.append(", position UNKNOWN!"); - break; default: Assert.error("Unknown target type: " + type); } @@ -428,7 +425,7 @@ } /** - * Create a {@code TypeAnnotationPosition} for a method receiver. + * Create a {@code TypeAnnotationPosition} for a method receiver parameter. * * @param location The type path. * @param onLambda The lambda for this parameter. @@ -445,7 +442,7 @@ } /** - * Create a {@code TypeAnnotationPosition} for a method receiver. + * Create a {@code TypeAnnotationPosition} for a method receiver parameter. * * @param location The type path. */ @@ -455,7 +452,7 @@ } /** - * Create a {@code TypeAnnotationPosition} for a method receiver. + * Create a {@code TypeAnnotationPosition} for a method receiver parameter. * * @param pos The position from the associated tree node. */ @@ -464,7 +461,8 @@ } /** - * Create a {@code TypeAnnotationPosition} for a method formal parameter. + * Create a {@code TypeAnnotationPosition} for a method formal + * parameter parameter. * * @param location The type path. * @param onLambda The lambda for this parameter. @@ -664,10 +662,11 @@ public static TypeAnnotationPosition exceptionParameter(final List location, final JCLambda onLambda, + final int type_index, final int pos) { return new TypeAnnotationPosition(TargetType.EXCEPTION_PARAMETER, pos, Integer.MIN_VALUE, onLambda, - Integer.MIN_VALUE, Integer.MIN_VALUE, + type_index, Integer.MIN_VALUE, location); } @@ -680,7 +679,7 @@ public static TypeAnnotationPosition exceptionParameter(final JCLambda onLambda, final int pos) { - return exceptionParameter(emptyPath, onLambda, pos); + return exceptionParameter(emptyPath, onLambda, Integer.MIN_VALUE, pos); } /** @@ -690,7 +689,7 @@ */ public static TypeAnnotationPosition exceptionParameter(final List location) { - return exceptionParameter(location, null, -1); + return exceptionParameter(location, null, Integer.MIN_VALUE, -1); } @@ -1204,12 +1203,4 @@ return methodTypeParameterBound(location, null, parameter_index, bound_index, -1); } - - // Consider this deprecated on arrival. We eventually want to get - // rid of this value altogether. Do not use it for anything new. - public static final TypeAnnotationPosition unknown = - new TypeAnnotationPosition(TargetType.UNKNOWN, -1, - Integer.MIN_VALUE, null, - Integer.MIN_VALUE, Integer.MIN_VALUE, - emptyPath); }