Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 409250
Collapse All | Expand All

(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java (+13 lines)
Lines 15-20 Link Here
15
 *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
15
 *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
16
 *								bug 331649 - [compiler][null] consider null annotations for fields
16
 *								bug 331649 - [compiler][null] consider null annotations for fields
17
 *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
17
 *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
18
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
19
 *								Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
18
 *******************************************************************************/
20
 *******************************************************************************/
19
package org.eclipse.jdt.internal.compiler.ast;
21
package org.eclipse.jdt.internal.compiler.ast;
20
22
Lines 225-230 public void resolve(MethodScope initializationScope) { Link Here
225
		initializationScope.lastVisibleFieldID = this.binding.id;
227
		initializationScope.lastVisibleFieldID = this.binding.id;
226
228
227
		resolveAnnotations(initializationScope, this.annotations, this.binding);
229
		resolveAnnotations(initializationScope, this.annotations, this.binding);
230
		// Check if this declaration should now have the type annotations bit set
231
		if (this.annotations != null) {
232
			for (int i = 0, max = this.annotations.length; i < max; i++) {
233
				TypeBinding resolvedAnnotationType = this.annotations[i].resolvedType;
234
				if (resolvedAnnotationType != null && (resolvedAnnotationType.getAnnotationTagBits() & TagBits.AnnotationForTypeUse) != 0) {
235
					this.bits |= ASTNode.HasTypeAnnotations;
236
					break;
237
				}
238
			}
239
		}
240
		
228
		// check @Deprecated annotation presence
241
		// check @Deprecated annotation presence
229
		if ((this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
242
		if ((this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
230
				&& (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
243
				&& (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java (+12 lines)
Lines 27-32 Link Here
27
 *							bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
27
 *							bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
28
 *     Jesper S Moller - Contributions for
28
 *     Jesper S Moller - Contributions for
29
 *							Bug 378674 - "The method can be declared as static" is wrong
29
 *							Bug 378674 - "The method can be declared as static" is wrong
30
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
31
 *							Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
30
 *******************************************************************************/
32
 *******************************************************************************/
31
package org.eclipse.jdt.internal.compiler.ast;
33
package org.eclipse.jdt.internal.compiler.ast;
32
34
Lines 279-284 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, Fl Link Here
279
		}
281
		}
280
		// only resolve annotation at the end, for constant to be positioned before (96991)
282
		// only resolve annotation at the end, for constant to be positioned before (96991)
281
		resolveAnnotations(scope, this.annotations, this.binding);
283
		resolveAnnotations(scope, this.annotations, this.binding);
284
		// Check if this declaration should now have the type annotations bit set
285
		if (this.annotations != null) {
286
			for (int i = 0, max = this.annotations.length; i < max; i++) {
287
				TypeBinding resolvedAnnotationType = this.annotations[i].resolvedType;
288
				if (resolvedAnnotationType != null && (resolvedAnnotationType.getAnnotationTagBits() & TagBits.AnnotationForTypeUse) != 0) {
289
					this.bits |= ASTNode.HasTypeAnnotations;
290
					break;
291
				}
292
			}
293
		}
282
		scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
294
		scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
283
	}
295
	}
284
296
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java (-3 / +4 lines)
Lines 27-32 Link Here
27
 *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
27
 *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
28
 *        Andy Clement - Contributions for
28
 *        Andy Clement - Contributions for
29
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
29
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
30
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
30
 *******************************************************************************/
31
 *******************************************************************************/
31
package org.eclipse.jdt.internal.compiler.ast;
32
package org.eclipse.jdt.internal.compiler.ast;
32
33
Lines 301-307 public void generateArguments(MethodBinding binding, Expression[] arguments, Blo Link Here
301
			// called with (argLength - lastIndex) elements : foo(1, 2) or foo(1, 2, 3, 4)
302
			// called with (argLength - lastIndex) elements : foo(1, 2) or foo(1, 2, 3, 4)
302
			// need to gen elements into an array, then gen each remaining element into created array
303
			// need to gen elements into an array, then gen each remaining element into created array
303
			codeStream.generateInlinedValue(argLength - varArgIndex);
304
			codeStream.generateInlinedValue(argLength - varArgIndex);
304
			codeStream.newArray(null, codeGenVarArgsType); // create a mono-dimensional array
305
			codeStream.newArray(codeGenVarArgsType); // create a mono-dimensional array
305
			for (int i = varArgIndex; i < argLength; i++) {
306
			for (int i = varArgIndex; i < argLength; i++) {
306
				codeStream.dup();
307
				codeStream.dup();
307
				codeStream.generateInlinedValue(i - varArgIndex);
308
				codeStream.generateInlinedValue(i - varArgIndex);
Lines 320-326 public void generateArguments(MethodBinding binding, Expression[] arguments, Blo Link Here
320
				// right number but not directly compatible or too many arguments - wrap extra into array
321
				// right number but not directly compatible or too many arguments - wrap extra into array
321
				// need to gen elements into an array, then gen each remaining element into created array
322
				// need to gen elements into an array, then gen each remaining element into created array
322
				codeStream.generateInlinedValue(1);
323
				codeStream.generateInlinedValue(1);
323
				codeStream.newArray(null, codeGenVarArgsType); // create a mono-dimensional array
324
				codeStream.newArray(codeGenVarArgsType); // create a mono-dimensional array
324
				codeStream.dup();
325
				codeStream.dup();
325
				codeStream.generateInlinedValue(0);
326
				codeStream.generateInlinedValue(0);
326
				arguments[varArgIndex].generateCode(currentScope, codeStream, true);
327
				arguments[varArgIndex].generateCode(currentScope, codeStream, true);
Lines 330-336 public void generateArguments(MethodBinding binding, Expression[] arguments, Blo Link Here
330
			// scenario: foo(1) --> foo(1, new int[0])
331
			// scenario: foo(1) --> foo(1, new int[0])
331
			// generate code for an empty array of parameterType
332
			// generate code for an empty array of parameterType
332
			codeStream.generateInlinedValue(0);
333
			codeStream.generateInlinedValue(0);
333
			codeStream.newArray(null, codeGenVarArgsType); // create a mono-dimensional array
334
			codeStream.newArray(codeGenVarArgsType); // create a mono-dimensional array
334
		}
335
		}
335
	} else if (arguments != null) { // standard generation for method arguments
336
	} else if (arguments != null) { // standard generation for method arguments
336
		for (int i = 0, max = arguments.length; i < max; i++)
337
		for (int i = 0, max = arguments.length; i < max; i++)
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java (-7 / +4 lines)
Lines 20-25 Link Here
20
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
20
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
21
 *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
21
 *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
22
 *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
22
 *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
23
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
23
 *******************************************************************************/
24
 *******************************************************************************/
24
package org.eclipse.jdt.internal.compiler.codegen;
25
package org.eclipse.jdt.internal.compiler.codegen;
25
26
Lines 1874-1880 public void generateEmulationForConstructor(Scope scope, MethodBinding methodBin Link Here
1874
	invokeClassForName();
1875
	invokeClassForName();
1875
	int paramLength = methodBinding.parameters.length;
1876
	int paramLength = methodBinding.parameters.length;
1876
	this.generateInlinedValue(paramLength);
1877
	this.generateInlinedValue(paramLength);
1877
	newArray(null, scope.createArrayType(scope.getType(TypeConstants.JAVA_LANG_CLASS, 3), 1));
1878
	newArray(scope.createArrayType(scope.getType(TypeConstants.JAVA_LANG_CLASS, 3), 1));
1878
	if (paramLength > 0) {
1879
	if (paramLength > 0) {
1879
		dup();
1880
		dup();
1880
		for (int i = 0; i < paramLength; i++) {
1881
		for (int i = 0; i < paramLength; i++) {
Lines 1930-1936 public void generateEmulationForMethod(Scope scope, MethodBinding methodBinding) Link Here
1930
	this.ldc(String.valueOf(methodBinding.selector));
1931
	this.ldc(String.valueOf(methodBinding.selector));
1931
	int paramLength = methodBinding.parameters.length;
1932
	int paramLength = methodBinding.parameters.length;
1932
	this.generateInlinedValue(paramLength);
1933
	this.generateInlinedValue(paramLength);
1933
	newArray(null, scope.createArrayType(scope.getType(TypeConstants.JAVA_LANG_CLASS, 3), 1));
1934
	newArray(scope.createArrayType(scope.getType(TypeConstants.JAVA_LANG_CLASS, 3), 1));
1934
	if (paramLength > 0) {
1935
	if (paramLength > 0) {
1935
		dup();
1936
		dup();
1936
		for (int i = 0; i < paramLength; i++) {
1937
		for (int i = 0; i < paramLength; i++) {
Lines 2530-2536 public void generateSyntheticBodyForEnumValues(SyntheticMethodBinding methodBind Link Here
2530
	arraylength();
2531
	arraylength();
2531
	dup();
2532
	dup();
2532
	istore_1();
2533
	istore_1();
2533
	newArray(null, (ArrayBinding) enumArray);
2534
	newArray((ArrayBinding) enumArray);
2534
	dup();
2535
	dup();
2535
	astore_2();
2536
	astore_2();
2536
	iconst_0();
2537
	iconst_0();
Lines 5756-5765 public void newarray(int array_Type) { Link Here
5756
}
5757
}
5757
5758
5758
public void newArray(ArrayBinding arrayBinding) {
5759
public void newArray(ArrayBinding arrayBinding) {
5759
	this.newArray(null, arrayBinding);
5760
}
5761
5762
public void newArray(TypeReference typeReference, ArrayBinding arrayBinding) {
5763
	this.newArray(null, null, arrayBinding);
5760
	this.newArray(null, null, arrayBinding);
5764
}
5761
}
5765
5762
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java (-1 / +2 lines)
Lines 15-20 Link Here
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
16
 *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
16
 *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
17
 *                          Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
17
 *                          Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
18
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
18
 *******************************************************************************/
19
 *******************************************************************************/
19
package org.eclipse.jdt.internal.compiler.codegen;
20
package org.eclipse.jdt.internal.compiler.codegen;
20
21
Lines 98-104 public class TypeAnnotationCodeStream extends StackMapFrameCodeStream { Link Here
98
					: AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT;
99
					: AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT;
99
			for (int i = 0, max = typeArguments.length; i < max; i++) {
100
			for (int i = 0, max = typeArguments.length; i < max; i++) {
100
				TypeReference typeArgument = typeArguments[i];
101
				TypeReference typeArgument = typeArguments[i];
101
				if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) { // TODO can check this at a higher level?
102
				if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) {
102
					addAnnotationContext(typeArgument, this.position, i, targetType);
103
					addAnnotationContext(typeArgument, this.position, i, targetType);
103
				}
104
				}
104
			}
105
			}
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-4 / +2 lines)
Lines 26-31 Link Here
26
 *									bug 393192 - Incomplete type hierarchy with > 10 annotations
26
 *									bug 393192 - Incomplete type hierarchy with > 10 annotations
27
 *        Andy Clement - Contributions for
27
 *        Andy Clement - Contributions for
28
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
28
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
29
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
29
 *******************************************************************************/
30
 *******************************************************************************/
30
package org.eclipse.jdt.internal.compiler.parser;
31
package org.eclipse.jdt.internal.compiler.parser;
31
32
Lines 3522-3528 protected void consumeEnterVariable() { Link Here
3522
					declaration.annotations = new Annotation[length],
3523
					declaration.annotations = new Annotation[length],
3523
					0,
3524
					0,
3524
					length);
3525
					length);
3525
				declaration.bits |= ASTNode.HasTypeAnnotations;
3526
			}
3526
			}
3527
			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
3527
			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
3528
			if (declaration.declarationSourceStart == -1) {
3528
			if (declaration.declarationSourceStart == -1) {
Lines 3544-3550 protected void consumeEnterVariable() { Link Here
3544
					declaration.annotations = new Annotation[length],
3544
					declaration.annotations = new Annotation[length],
3545
					0,
3545
					0,
3546
					length);
3546
					length);
3547
				declaration.bits |= ASTNode.HasTypeAnnotations;
3548
			}
3547
			}
3549
			// Store javadoc only on first declaration as it is the same for all ones
3548
			// Store javadoc only on first declaration as it is the same for all ones
3550
			FieldDeclaration fieldDeclaration = (FieldDeclaration) declaration;
3549
			FieldDeclaration fieldDeclaration = (FieldDeclaration) declaration;
Lines 3562-3568 protected void consumeEnterVariable() { Link Here
3562
		if (annotations != null) {
3561
		if (annotations != null) {
3563
			final int annotationsLength = annotations.length;
3562
			final int annotationsLength = annotations.length;
3564
			System.arraycopy(annotations, 0, declaration.annotations = new Annotation[annotationsLength], 0, annotationsLength);
3563
			System.arraycopy(annotations, 0, declaration.annotations = new Annotation[annotationsLength], 0, annotationsLength);
3565
			declaration.bits |= ASTNode.HasTypeAnnotations;
3566
		}
3564
		}
3567
	}
3565
	}
3568
3566
Lines 3575-3581 protected void consumeEnterVariable() { Link Here
3575
		Annotation[][] annotationsOnDimensions = type.getAnnotationsOnDimensions();
3573
		Annotation[][] annotationsOnDimensions = type.getAnnotationsOnDimensions();
3576
		if (annotationsOnDimensions != null || annotationsOnExtendedDimensions != null) {
3574
		if (annotationsOnDimensions != null || annotationsOnExtendedDimensions != null) {
3577
			annotationsOnAllDimensions = getMergedAnnotationsOnDimensions(typeDim, annotationsOnDimensions, extendedDimension, annotationsOnExtendedDimensions); 
3575
			annotationsOnAllDimensions = getMergedAnnotationsOnDimensions(typeDim, annotationsOnDimensions, extendedDimension, annotationsOnExtendedDimensions); 
3578
			declaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
3576
//			declaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
3579
		}
3577
		}
3580
		declaration.type = copyDims(type, dimension, annotationsOnAllDimensions);
3578
		declaration.type = copyDims(type, dimension, annotationsOnAllDimensions);
3581
	}
3579
	}
(-)a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java (-2 / +3 lines)
Lines 14-19 Link Here
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
16
 *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
16
 *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
17
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
17
 *******************************************************************************/
18
 *******************************************************************************/
18
package org.eclipse.jdt.internal.eval;
19
package org.eclipse.jdt.internal.eval;
19
20
Lines 92-98 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolea Link Here
92
		if (this.arguments != null) {
93
		if (this.arguments != null) {
93
			int argsLength = this.arguments.length;
94
			int argsLength = this.arguments.length;
94
			codeStream.generateInlinedValue(argsLength);
95
			codeStream.generateInlinedValue(argsLength);
95
			codeStream.newArray(null, currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
96
			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
96
			codeStream.dup();
97
			codeStream.dup();
97
			for (int i = 0; i < argsLength; i++) {
98
			for (int i = 0; i < argsLength; i++) {
98
				codeStream.generateInlinedValue(i);
99
				codeStream.generateInlinedValue(i);
Lines 108-114 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolea Link Here
108
			}
109
			}
109
		} else {
110
		} else {
110
			codeStream.generateInlinedValue(0);
111
			codeStream.generateInlinedValue(0);
111
			codeStream.newArray(null, currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
112
			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
112
		}
113
		}
113
		codeStream.invokeJavaLangReflectConstructorNewInstance();
114
		codeStream.invokeJavaLangReflectConstructorNewInstance();
114
		codeStream.checkcast(allocatedType);
115
		codeStream.checkcast(allocatedType);
(-)a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java (-2 / +3 lines)
Lines 13-18 Link Here
13
 *     IBM Corporation - initial API and implementation
13
 *     IBM Corporation - initial API and implementation
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
15
 *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
15
 *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
16
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.jdt.internal.eval;
18
package org.eclipse.jdt.internal.eval;
18
19
Lines 117-123 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean Link Here
117
		if (this.arguments != null) {
118
		if (this.arguments != null) {
118
			int argsLength = this.arguments.length;
119
			int argsLength = this.arguments.length;
119
			codeStream.generateInlinedValue(argsLength);
120
			codeStream.generateInlinedValue(argsLength);
120
			codeStream.newArray(null, currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
121
			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
121
			codeStream.dup();
122
			codeStream.dup();
122
			for (int i = 0; i < argsLength; i++) {
123
			for (int i = 0; i < argsLength; i++) {
123
				codeStream.generateInlinedValue(i);
124
				codeStream.generateInlinedValue(i);
Lines 133-139 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean Link Here
133
			}
134
			}
134
		} else {
135
		} else {
135
			codeStream.generateInlinedValue(0);
136
			codeStream.generateInlinedValue(0);
136
			codeStream.newArray(null, currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
137
			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
137
		}
138
		}
138
		codeStream.invokeJavaLangReflectMethodInvoke();
139
		codeStream.invokeJavaLangReflectMethodInvoke();
139
140
(-)a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotation.java (-2 / +3 lines)
Lines 13-18 Link Here
13
 *     IBM Corporation - initial API and implementation
13
 *     IBM Corporation - initial API and implementation
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
16
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
16
 *******************************************************************************/
17
 *******************************************************************************/
17
package org.eclipse.jdt.core.util;
18
package org.eclipse.jdt.core.util;
18
19
Lines 73-79 public interface IExtendedAnnotation extends IAnnotation { Link Here
73
	 * Answer back the local variable reference info table length of this entry as specified in
74
	 * Answer back the local variable reference info table length of this entry as specified in
74
	 * the JVM specifications.
75
	 * the JVM specifications.
75
	 * 
76
	 * 
76
	 * <p>This is defined only for annotations related a local variable.</p>
77
	 * <p>This is defined only for annotations related to a local variable.</p>
77
	 *
78
	 *
78
	 * @return the local variable reference info table length of this entry as specified in
79
	 * @return the local variable reference info table length of this entry as specified in
79
	 * the JVM specifications
80
	 * the JVM specifications
Lines 84-90 public interface IExtendedAnnotation extends IAnnotation { Link Here
84
	 * Answer back the local variable reference info table of this entry as specified in
85
	 * Answer back the local variable reference info table of this entry as specified in
85
	 * the JVM specifications. Answer an empty array if none.
86
	 * the JVM specifications. Answer an empty array if none.
86
	 * 
87
	 * 
87
	 * <p>This is defined only for annotations related a local variable.</p>
88
	 * <p>This is defined only for annotations related to a local variable.</p>
88
	 *
89
	 *
89
	 * @return the local variable reference info table of this entry as specified in
90
	 * @return the local variable reference info table of this entry as specified in
90
	 * the JVM specifications. Answer an empty array if none
91
	 * the JVM specifications. Answer an empty array if none
(-)a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ExtendedAnnotation.java (-3 / +4 lines)
Lines 14-19 Link Here
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
14
 *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
15
 *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
16
 *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
16
 *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
17
 *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
17
 *******************************************************************************/
18
 *******************************************************************************/
18
package org.eclipse.jdt.internal.core.util;
19
package org.eclipse.jdt.internal.core.util;
19
20
Lines 59-64 public class ExtendedAnnotation extends ClassFileStruct implements IExtendedAnno Link Here
59
60
60
	private static final IAnnotationComponent[] NO_ENTRIES = new IAnnotationComponent[0];
61
	private static final IAnnotationComponent[] NO_ENTRIES = new IAnnotationComponent[0];
61
	private final static int[][] NO_TYPEPATH = new int[0][0];
62
	private final static int[][] NO_TYPEPATH = new int[0][0];
63
	private final static ILocalVariableReferenceInfo[] NO_LOCAL_VARIABLE_TABLE_ENTRIES = new ILocalVariableReferenceInfo[0];
62
64
63
	private int targetType;
65
	private int targetType;
64
	private int annotationTypeIndex;
66
	private int annotationTypeIndex;
Lines 74-80 public class ExtendedAnnotation extends ClassFileStruct implements IExtendedAnno Link Here
74
	private int typeParameterBoundIndex;
76
	private int typeParameterBoundIndex;
75
	private int parameterIndex;
77
	private int parameterIndex;
76
	private int exceptionTableIndex;
78
	private int exceptionTableIndex;
77
	private ILocalVariableReferenceInfo[] localVariableTable;
79
	private ILocalVariableReferenceInfo[] localVariableTable = NO_LOCAL_VARIABLE_TABLE_ENTRIES;
78
	
80
	
79
	/**
81
	/**
80
	 * Constructor for ExtendedAnnotation, builds an annotation from the supplied bytestream.
82
	 * Constructor for ExtendedAnnotation, builds an annotation from the supplied bytestream.
Lines 271-277 public class ExtendedAnnotation extends ClassFileStruct implements IExtendedAnno Link Here
271
	}
273
	}
272
274
273
	public int getLocalVariableRefenceInfoLength() {
275
	public int getLocalVariableRefenceInfoLength() {
274
		return this.localVariableTable != null ? this.localVariableTable.length : 0;
276
		return this.localVariableTable.length;
275
	}
277
	}
276
278
277
	public ILocalVariableReferenceInfo[] getLocalVariableTable() {
279
	public ILocalVariableReferenceInfo[] getLocalVariableTable() {
278
- 

Return to bug 409250