Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335938

Summary: ERROR [0002] : java.util.MissingFormatArgumentException
Product: z_Archived Reporter: Julian Ruhe <jruhe>
Component: BuckminsterAssignee: buckminster.core-inbox <buckminster.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: thomas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Julian Ruhe CLA 2011-02-01 04:28:00 EST
Build Identifier: 

In class ExtensionAwareHandler method logAttributeValueDeprecation() a MissingFormatArgumentException is generated, when locator.getSystemId() returns a URL that conatains the percent character e.g 

file:/G:/Projekte/Mapping%20Services/runtime-New_configuration(1)/com.axway.ms.releng.feature/MapStudio-Buch.rmap

The resulting error is
!MESSAGE ERROR   [0002] : java.util.MissingFormatArgumentException: Format specifier '20S'

This is due to a redundant zero parmeter call of String.format(String format, Object ... args) (see below: String.format(bind()) )

Removing the call to String.format() fixes the bug without side effects because String.format(mystring).equals(mystring).
 


protected void logAttributeValueDeprecation(String elementName, String attrName, String oldValue, String useInstead) {
		Locator locator = this.getDocumentLocator();
		warningOnce(String.format(NLS.bind(Messages.Use_of_deprecated_value_for_attribute_0_1_Was_2_should_be_3_4_line_5, new Object[] { elementName,
				attrName, oldValue, useInstead, locator.getSystemId(), new Integer(locator.getLineNumber()) })));
	}

Reproducible: Always

Steps to Reproduce:
Not necessary.
Comment 1 Thomas Hallgren CLA 2011-03-31 12:22:50 EDT
Seems those format calls were left in there when we switch to NLS.bind. They should have been removed at that time. Anyway, thanks for catching this. They are removed now and the fix was checked in to trunk, rev 11765.