JDK-4639129 : Manifest spec is prone to error due to not interpreting EOF like NL or CR
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-02-17
  • Updated: 2002-03-21
  • Resolved: 2002-03-21
Description

Name: gm110360			Date: 02/16/2002


FULL PRODUCT VERSION :
java version "1.3.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3
Java HotSpot(TM) Client VM (build 1.3.1_02-b02, mixed mode)

FULL OPERATING SYSTEM VERSION :Microsoft Windows 2000
[Version 5.00.2195]


A DESCRIPTION OF THE PROBLEM :
The specification of the manifest file does not allow the
interpretation of end-of-file as it could (should!): an end
for an instruction, as with line-feed and carriage-returns.
Therefore, it is prone to frustrating errors, which are
invisible to the programmer, requiring the use of an editor
showing the control chars.
Moreover, the Jar tool even in verbose mode (jar -cvfm) do
not report problems in the interpretation of the manifest.
It should print in the console the ignored lines, or at
least print the final manifest.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Just omit the last end-of-line in the manifest, maybe
writing the manifest and saving the file with the cursor in
the end of the last instruction line
2.
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
I would expect the spec of manifest files to to see that EOF
as any other terminator for instruction lines, along wih LF
and CR.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Thats the worst: no messages to assist the programmer.

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Main-Class: yellow.Yellow
---------- END SOURCE ----------

CUSTOMER WORKAROUND :
Just be patient and keep reading every little detail and
comply with it.
(Review ID: 139586) 
======================================================================

Comments
EVALUATION We can not change Manifest spec at this point, it is too late. It would lead to incompatibilities with existing Manifest parsers.
11-06-2004

PUBLIC COMMENTS We can not change Manifest spec at this point, it is too late. It would lead to incompatibilities with existing Manifest parsers.
10-06-2004