1.1 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java Tue Feb 12 19:25:09 2013 +0000 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java Tue Feb 12 17:15:29 2013 -0800 1.3 @@ -126,7 +126,8 @@ 1.4 // Tree position. 1.5 public int pos = -1; 1.6 1.7 - // For typecasts, type tests, new (and locals, as start_pc). 1.8 + // For type casts, type tests, new, locals (as start_pc), 1.9 + // and method and constructor reference type arguments. 1.10 public boolean isValidOffset = false; 1.11 public int offset = -1; 1.12 1.13 @@ -156,12 +157,13 @@ 1.14 sb.append(type); 1.15 1.16 switch (type) { 1.17 - // type cast 1.18 - case CAST: 1.19 // instanceof 1.20 case INSTANCEOF: 1.21 // new expression 1.22 case NEW: 1.23 + // constructor/method reference receiver 1.24 + case CONSTRUCTOR_REFERENCE: 1.25 + case METHOD_REFERENCE: 1.26 sb.append(", offset = "); 1.27 sb.append(offset); 1.28 break; 1.29 @@ -223,9 +225,12 @@ 1.30 sb.append(", param_index = "); 1.31 sb.append(parameter_index); 1.32 break; 1.33 + // type cast 1.34 + case CAST: 1.35 // method/constructor/reference type argument 1.36 case CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT: 1.37 case METHOD_INVOCATION_TYPE_ARGUMENT: 1.38 + case CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT: 1.39 case METHOD_REFERENCE_TYPE_ARGUMENT: 1.40 sb.append(", offset = "); 1.41 sb.append(offset); 1.42 @@ -236,12 +241,6 @@ 1.43 case METHOD_RETURN: 1.44 case FIELD: 1.45 break; 1.46 - // lambda formal parameter 1.47 - case LAMBDA_FORMAL_PARAMETER: 1.48 - // TODO: also needs an offset? 1.49 - sb.append(", param_index = "); 1.50 - sb.append(parameter_index); 1.51 - break; 1.52 case UNKNOWN: 1.53 sb.append(", position UNKNOWN!"); 1.54 break;