diff options
| author | Andrew Clement | 2013-08-07 10:11:25 +0000 |
|---|---|---|
| committer | Jayaprakash Arthanareeswaran | 2013-08-07 10:11:25 +0000 |
| commit | 8444b8c64dbb6b525eac8faf90c22961ce196392 (patch) | |
| tree | 3bb3bd95af14d5394c0388ddbda9f891b9d69a63 | |
| parent | baa4a9e4edb300fb0af04795d1bd24822786128a (diff) | |
| download | eclipse.jdt.core-8444b8c64dbb6b525eac8faf90c22961ce196392.tar.gz eclipse.jdt.core-8444b8c64dbb6b525eac8faf90c22961ce196392.tar.xz eclipse.jdt.core-8444b8c64dbb6b525eac8faf90c22961ce196392.zip | |
Fix for Bug 409245 - [1.8][compiler] Type annotations dropped when call
is routed through a synthetic bridge method
Signed-off-by: Andrew Clement <aclement@gopivotal.com>
6 files changed, 21 insertions, 13 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java index 2067bb6213..dbc58e6454 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java @@ -24,8 +24,9 @@ * bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking * Jesper S Moller <jesper@selskabet.org> - Contributions for * bug 378674 - "The method can be declared as static" is wrong - * Andy Clement - Contributions for + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for * Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work) + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method *******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; @@ -184,7 +185,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean i++) { codeStream.aconst_null(); } - codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */); + codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments); } if (valueRequired) { codeStream.generateImplicitConversion(this.implicitConversion); diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java index 89b0e42a54..99b9f00b1a 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java @@ -18,6 +18,8 @@ * bug 370639 - [compiler][resource] restore the default for resource leak warnings * bug 388996 - [compiler][resource] Incorrect 'potential resource leak' * bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method *******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; @@ -171,7 +173,7 @@ public class ExplicitConstructorCall extends Statement implements InvocationSite i++) { codeStream.aconst_null(); } - codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */); + codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments); } else { codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments); } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java index b379cf51ed..25d7cd1805 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java @@ -35,8 +35,9 @@ * bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking * Jesper S Moller - Contributions for * Bug 378674 - "The method can be declared as static" is wrong - * Andy Clement - Contributions for + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for * Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work) + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method *******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; @@ -411,7 +412,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments); } } else { - codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessor, null /* default declaringClass */); + codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments); } // required cast must occur even if no value is required if (this.valueCast != null) codeStream.checkcast(this.valueCast); diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java index ec3a54fbd8..2ebc7fc76f 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java @@ -23,8 +23,9 @@ * bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking * Jesper S Moller <jesper@selskabet.org> - Contributions for * bug 378674 - "The method can be declared as static" is wrong - * Andy Clement - Contributions for + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for * Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work) + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method ******************************************************************************/ package org.eclipse.jdt.internal.compiler.ast; @@ -201,7 +202,7 @@ public class QualifiedAllocationExpression extends AllocationExpression { i++) { codeStream.aconst_null(); } - codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */); + codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments); } if (valueRequired) { codeStream.generateImplicitConversion(this.implicitConversion); diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java index b638a707cc..bce4744895 100644 --- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java +++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java @@ -11,8 +11,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - * Andy Clement - Contributions for + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for * Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work) + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method *******************************************************************************/ package org.eclipse.jdt.internal.eval; @@ -83,7 +84,7 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolea this); } // invoke constructor - codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */); + codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments); } else { // private emulation using reflect codeStream.generateEmulationForConstructor(currentScope, codegenBinding); diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java index 3f68c3895a..97075622b1 100644 --- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java +++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java @@ -11,6 +11,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for + * Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method *******************************************************************************/ package org.eclipse.jdt.internal.eval; @@ -82,14 +84,14 @@ public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean // actual message invocation TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis()); if (isStatic) { - codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass); + codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments); } else if( (this.receiver.isSuper()) || codegenBinding.isPrivate()){ - codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass); + codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments); } else { if (constantPoolDeclaringClass.isInterface()) { // interface or annotation type - codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass); + codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments); } else { - codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass); + codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments); } } } else { |
