JDK-6274276 : java.lang.instrument JAR manifest processing does not remove spaces from class names
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-05-23
  • Updated: 2012-10-01
  • Resolved: 2011-03-08
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.
JDK 7
7 b26Fixed
Related Reports
Relates :  
Relates :  
Description
Manifest:

  Manifest-Version: 1.0
  Premain-Class:  agent

Will fail saying that agent can't be found.  I pounded my head against my screen for an hour trying to figure out what was wrong.  Turns out it was looking for a class named " agent".  The white-space processing for other JAR attributes should also be checked.

###@###.### 2005-05-23 01:30:24 GMT
The following new test will fail without the fix for this
bug in a promoted JDK:

    java/lang/instrument/ManifestTest.sh

Comments
SUGGESTED FIX In code review round 0, a question came up about a NoClassDefFoundError exception that was detected. In order to make the intent of the test more clear, a new comment was added and context diffs are below: ------- ManifestTestApp.java ------- *** /tmp/sccs.zzaO0P Wed Mar 26 10:06:49 2008 --- test/java/lang/instrument/ManifestTestApp.java Fri Mar 21 14:42:59 2008*************** *** 42,47 **** --- 42,52 ---- System.exit(1); } } catch (NoClassDefFoundError ncdfe) { + // This message just lets ManifestTest.sh know whether or + // not ExampleForBootClassPath was loaded. Depending on + // the current test case, that will be either a PASSing + // condition or a FAILing condition as determined by + // ManifestTest.sh. System.out.println("ExampleForBootClassPath was not loaded."); } }
26-03-2008

SUGGESTED FIX See the attached 6274276-webrev-cr0 file for the proposed fix. Updated the proposed fix to include a better version of the test that covers the Boot-Class-Path attribute. Reattached as the same name since these bits haven't gone out to code review yet.
21-02-2008

EVALUATION Ignoring leading whitespace and trailing whitespace for the "value" part of the manifest entries is the safest change to make. Embedded whitespace will be left as is.
21-02-2008

EVALUATION Given that it is a long existing bug and may have deeper tenticals, better to fix it right in dolphin.
12-01-2006

EVALUATION Yes, an annoying bug. ###@###.### 2005-05-23 08:17:40 GMT
23-05-2005