Bug 85945 Test failure in N-build in JavaElementLabelsTest.testTypeLabelAnonymousInAnonymous
N20050221-0010 I corrected the bug in JavaElementLabels 1.4 -> 1.5. Please verify the fix. Content not as expected: is org.test.new Object() {...}.xoo().new Serializable() {...} Differs at pos 9: .test.^new Ob expected: org.test.Outer.foo(...).new Object() {...}.xoo().new Serializable() {...} expected:<...Outer.foo(...)....> but was:<......> junit.framework.ComparisonFailure: Content not as expected: is org.test.new Object() {...}.xoo().new Serializable() {...} Differs at pos 9: .test.^new Ob expected: org.test.Outer.foo(...).new Object() {...}.xoo().new Serializable() {...} expected:<...Outer.foo(...)....> but was:<......> at org.eclipse.jdt.testplugin.StringAsserts.assertEqualString(StringAsserts.java:72) at org.eclipse.jdt.ui.tests.core.CoreTests.assertEqualString(CoreTests.java:55) at org.eclipse.jdt.ui.tests.core.JavaElementLabelsTest.testTypeLabelAnonymousInAnonymous(JavaElementLabelsTest.java:223) ...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/JavaElementLabels.java
public final static String COMMA_STRING= JavaUIMessages.getString("JavaElementLabels.comma_string"); 
	/**
	 * User-readable string for separating the return type (e.g. " : ").
	 */
	public final static String DECL_STRING= JavaUIMessages.getString("JavaElementLabels.declseparator_string"); 
	/**
	 * User-readable string for ellipsis ("...").
	 */
	public final static String ELLIPSIS_STRING= "..."; 
	/**
	 * User-readable string for the default package name (e.g. "(default package)").
	 */
	public final static String DEFAULT_PACKAGE= JavaUIMessages.getString("JavaElementLabels.default_package"); 
	
	
	private final static long QUALIFIER_FLAGS= P_COMPRESSED | USE_RESOLVED;
	
	/*
	 * Package name compression
	 */
	private static String fgPkgNamePattern= ""; 
	private static String fgPkgNamePrefix;
	private static String fgPkgNamePostfix;
	private static int fgPkgNameChars;
	private static int fgPkgNameLength= -1;
	private JavaElementLabels() {
	}
	private static final boolean getFlag(long flags, long flag) {
		return (flags & flag) != 0;
	}