Bug #73474 Invalid empty line in MANIFEST.MF
Submitted: 5 Aug 2014 15:57 Modified: 11 Sep 2014 21:40
Reporter: Jorge Jordao Email Updates:
Status: Closed Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:5.1.31 OS:Any
Assigned to: Alexander Soklakov CPU Architecture:Any

[5 Aug 2014 15:57] Jorge Jordao
The MANIFEST.MF file includes an empty line between attributes Import-Package and Name.

According to the JAR File Specification, empty lines mark end of sections. So this line is incorrectly interpreted as separating the main section (Manifest-Version to Import-Package) from an individual section (Name to Implementation-Vendor).

How to repeat:
With the invalid line, the following prints "null". After fixing, it will print "MySQL Connector Java". 

JarFile jar = new JarFile("/path/to/mysql-connector-java-5.1.31-bin.jar");

Suggested fix:
Remove empty line between Import-Package and Name.
[5 Aug 2014 16:54] Filipe Silva
Hi Jorge,

Thank you for this bug report.
Verified by code review.
[11 Sep 2014 21:40] Daniel So
Added the following entry to the Connector/J 5.1.33 changelog:

"The MANIFEST.MF file for the JAR package of Connector/J included an empty line between the attributes Import-Package and Name, which was interpreted as a mark for the end of the main section of the manifest file. This fix removes the empty line."