View | Details | Raw Unified | Return to bug 333669
Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/util/KeyToSignature.java (-3 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 234-241 Link Here
234
	public void consumeSecondaryType(char[] simpleTypeName) {
234
	public void consumeSecondaryType(char[] simpleTypeName) {
235
		this.signature.append('~');
235
		this.signature.append('~');
236
		this.mainTypeStart = this.signature.lastIndexOf(".") + 1; //$NON-NLS-1$
236
		this.mainTypeStart = this.signature.lastIndexOf(".") + 1; //$NON-NLS-1$
237
		if (this.mainTypeStart == 0)
237
		if (this.mainTypeStart == 0) {
238
			this.mainTypeStart = 1; // default package
238
			this.mainTypeStart = 1; // default package for the 'L'
239
			int i = 0;
240
			// we need to preserve the array and the 'L' if needed
241
			while (this.signature.charAt(i) == Signature.C_ARRAY) {
242
				this.mainTypeStart ++;
243
				i++;
244
			}
245
		}
239
		this.mainTypeEnd = this.signature.length();
246
		this.mainTypeEnd = this.signature.length();
240
		this.signature.append(simpleTypeName);
247
		this.signature.append(simpleTypeName);
241
	}
248
	}
(-)src/org/eclipse/jdt/core/tests/model/BindingKeyTests.java (-1 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 20-25 Link Here
20
	static {
20
	static {
21
//		TESTS_PREFIX = "testInvalidCompilerOptions";
21
//		TESTS_PREFIX = "testInvalidCompilerOptions";
22
//		TESTS_NAMES = new String[] { "test028"};
22
//		TESTS_NAMES = new String[] { "test028"};
23
//		TESTS_NUMBERS = new int[] { 56 };
23
	}
24
	}
24
25
25
	public BindingKeyTests(String name) {
26
	public BindingKeyTests(String name) {
Lines 628-631 Link Here
628
	public void test055() {
629
	public void test055() {
629
		assertFalse("Should not be a raw type", new BindingKey("Ltest/ZZ<Ljava/lang/Object>;").isRawType());
630
		assertFalse("Should not be a raw type", new BindingKey("Ltest/ZZ<Ljava/lang/Object>;").isRawType());
630
	}
631
	}
632
633
	/*
634
	 * Ensures that the type arguments for a parameterized type binding key are correct for secondary type
635
	 */
636
	public void test056() {
637
		assertBindingKeyTypeArgumentsEqual(
638
			"[LOuter<Ljava.lang.Integer;>.Inner<Ljava.lang.Double;>;\n",
639
			"LNullBinding~One<[LNullBinding~Outer<Ljava/lang/Integer;>.Inner<Ljava/lang/Double;>;>;"
640
		);
641
	}
631
}
642
}

Return to bug 333669