Bug 368287 - additional line feeds would make the generated manifest more readable
Summary: additional line feeds would make the generated manifest more readable
Status: NEW
Alias: None
Product: Virgo
Classification: RT
Component: bundlor (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 398624 (view as bug list)
Depends on:
Blocks: 368782
  Show dependency tree
 
Reported: 2012-01-10 13:38 EST by Timothy Redmond CLA
Modified: 2016-09-27 05:01 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Redmond CLA 2012-01-10 13:38:30 EST
Build Identifier: Bundlor Version: 1.1.0 Build id: M03

	
This is very minor and I would not be upset if you dropped it because it is too trivial. But I think that it can be useful - I will explain after I describe the issue.

I believe that you don't need to wait for character 72 to use a newline and a space in a manifest. If this is correct then I think it would be useful if this was added in the manifest after each exported or imported package. I admit that the manifest is a generated file but sometimes when debugging the the manifest it would be nice to be able to read it a bit more easily.

So I have a use case (and I have others like this). Eclipse is now claiming that a certain package from a bundlor generated manifest is not visible to other bundles. I think that eclipse is wrong because the bundles run fine inside equinox and felix (e.g. outside the eclipse ide environment) and this would not be the first time that the eclipse ide has been confused. (But it wouldn't be the first time that I was the one who was confused.) It would be nice if it was easy to scan the manifest to see the package in question and verify that it is exported. When I hand generated the manifests I was able to do this.

Reproducible: Always

Steps to Reproduce:
1.run bundlor to create a manifest
2.try to examine the resulting manifest
Comment 1 Nobody - feel free to take it CLA 2012-01-11 04:38:26 EST
Thanks for raising this. Seems like a reasonable requirement. Flagging as "help wanted" because it's a relatively self-contained change and I want to encourage potential contributors to have a crack at developing a patch.
Comment 2 daniel marthaler CLA 2016-09-26 11:33:32 EDT
*** Bug 398624 has been marked as a duplicate of this bug. ***
Comment 3 daniel marthaler CLA 2016-09-27 05:01:02 EDT
Quick look at the code reveals that writing of the manifest is initiated by "org.eclipse.virgo.util.osgi.manifest.internal.StandardBundleManifest" which in turn delegates the writing further to an instance of "java.util.jar.Manifest". The "\r\n" after 72 characters is actually implemented in [1] respectively in [2].

For the described enhancement we need to amend "org.eclipse.virgo.util.osgi.manifest.internal.StandardBundleManifest.write(Writer writer)" by using some kind of extended "java.util.jar.Manifest" implementation which allows to insert line breaks other than each 72 characters.

[1] http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/jar/Manifest.java#Manifest.write%28java.io.OutputStream%29
[2] http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/jar/Manifest.java#Manifest.make72Safe%28java.lang.StringBuffer%29