### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/core/util/KeyToSignature.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/KeyToSignature.java,v retrieving revision 1.32 diff -u -r1.32 KeyToSignature.java --- model/org/eclipse/jdt/internal/core/util/KeyToSignature.java 7 May 2009 15:25:07 -0000 1.32 +++ model/org/eclipse/jdt/internal/core/util/KeyToSignature.java 6 Jan 2011 16:14:56 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -234,8 +234,15 @@ public void consumeSecondaryType(char[] simpleTypeName) { this.signature.append('~'); this.mainTypeStart = this.signature.lastIndexOf(".") + 1; //$NON-NLS-1$ - if (this.mainTypeStart == 0) - this.mainTypeStart = 1; // default package + if (this.mainTypeStart == 0) { + this.mainTypeStart = 1; // default package for the 'L' + int i = 0; + // we need to preserve the array and the 'L' if needed + while (this.signature.charAt(i) == Signature.C_ARRAY) { + this.mainTypeStart ++; + i++; + } + } this.mainTypeEnd = this.signature.length(); this.signature.append(simpleTypeName); } #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/BindingKeyTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/BindingKeyTests.java,v retrieving revision 1.43 diff -u -r1.43 BindingKeyTests.java --- src/org/eclipse/jdt/core/tests/model/BindingKeyTests.java 18 Mar 2010 16:18:57 -0000 1.43 +++ src/org/eclipse/jdt/core/tests/model/BindingKeyTests.java 6 Jan 2011 16:14:57 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,6 +20,7 @@ static { // TESTS_PREFIX = "testInvalidCompilerOptions"; // TESTS_NAMES = new String[] { "test028"}; +// TESTS_NUMBERS = new int[] { 56 }; } public BindingKeyTests(String name) { @@ -628,4 +629,14 @@ public void test055() { assertFalse("Should not be a raw type", new BindingKey("Ltest/ZZ;").isRawType()); } + + /* + * Ensures that the type arguments for a parameterized type binding key are correct for secondary type + */ + public void test056() { + assertBindingKeyTypeArgumentsEqual( + "[LOuter.Inner;\n", + "LNullBinding~One<[LNullBinding~Outer.Inner;>;" + ); + } }