Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335938 - ERROR [0002] : java.util.MissingFormatArgumentException
Summary: ERROR [0002] : java.util.MissingFormatArgumentException
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Buckminster (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: buckminster.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 04:28 EST by Julian Ruhe CLA
Modified: 2019-02-25 14:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.