JDK-6328467 : encoding bug (6317399): sun/security/util/ManifestDigester.java
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 5.0u4
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-24
  • Updated: 2010-04-03
  • Resolved: 2006-08-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u10 b01Fixed 6Fixed
Related Reports
Relates :  
Relates :  
Description
Please first read Comments section here and in 6317399.

In sun/security/util/ManifestDigester.java (5.0u4):

// wrong line 152
			entries.put(new String(name.getBytes(), "UTF8"),
// correction:
			entries.put(name,
// wrong lines 242-247
	try {
	    // key is a UTF-8 string
	    e = (Entry) entries.get(new String(name.getBytes(), "UTF8"));
	} catch (java.io.UnsupportedEncodingException uee) {
	    throw new IllegalStateException("UTF8 not available on platform");
	}
// correction:
	    e = (Entry) entries.get(name);

Comments
EVALUATION The code referenced in the description was introduced in order to fix an encoding bug 4924188 which caused jar file entries with international characters to be verified incorrectly. So it is important not to reintroduce that bug. I have reworked and tested that fix such that it does not invoke String.getBytes() which is the cause of this customer's issue on platforms where the native encoding is EBCDIC.
02-03-2006

SUGGESTED FIX See Description.
24-09-2005