diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java index ce9e6cf..ed924e0 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java @@ -8830,4 +8830,35 @@ }, "SUCCESS"); } + public void test558844() { + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " \n" + + " public static void main( String[] args ) {\n" + + " System.out.println(new X().getText());\n" + + " }\n" + + "\n" + + " public String getText() {\n" + + " Long lValue1 = getValue1();\n" + + " Long lValue2 = getValue2();\n" + + " return ( isValue1() ? \"\" : ( lValue1 == null ? \"\" : lValue1.toString() ) + \"-\" ) + ( lValue2 == null ? \"\" : lValue2.toString() );\n" + + " }\n" + + "\n" + + " private Long getValue1() {\n" + + " return Long.valueOf( 1 );\n" + + " }\n" + + "\n" + + " private Long getValue2() {\n" + + " return Long.valueOf( 1 );\n" + + " }\n" + + "\n" + + " private boolean isValue1() {\n" + + " return false;\n" + + " }\n" + + "}", + }, + "1-1"); + } } diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java index 803240d..42b9d26 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java @@ -6059,12 +6059,12 @@ this.bCodeStream[this.classFileOffset++] = (byte) dimensions; } -// We didn't call it new, because there is a conflit with the new keyword +// We didn't call it new, because there is a conflict with the new keyword public void new_(TypeBinding typeBinding) { this.new_(null, typeBinding); } -// We didn't call it new, because there is a conflit with the new keyword +// We didn't call it new, because there is a conflict with the new keyword public void new_(TypeReference typeReference, TypeBinding typeBinding) { this.countLabels = 0; this.stackDepth++; diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java index d3afd5b..bc2c8ee 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/VerificationTypeInfo.java @@ -195,7 +195,8 @@ public boolean equals(Object obj) { if (obj instanceof VerificationTypeInfo) { VerificationTypeInfo info1 = (VerificationTypeInfo) obj; - return info1.tag == this.tag && CharOperation.equals(info1.constantPoolName(), constantPoolName()); + return info1.tag == this.tag && CharOperation.equals(info1.constantPoolName(), constantPoolName()) + && info1.offset == this.offset; } return false; }