Bug 350756 - [patch] 'Header must be terminated by a line break' quick fix
Summary: [patch] 'Header must be terminated by a line break' quick fix
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.8 M2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2011-06-29 19:12 EDT by Ben Cox CLA
Modified: 2011-09-14 06:00 EDT (History)
3 users (show)

See Also:


Attachments
Patch to add quick fix (10.62 KB, patch)
2011-06-29 19:18 EDT, Ben Cox CLA
curtis.windatt.public: iplog+
Details | Diff
Improved patch (15.73 KB, patch)
2011-08-10 17:16 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Cox CLA 2011-06-29 19:12:50 EDT
Build Identifier: I20110613-1736

The JAR specification dictates that a manifest must end with a line break, and the PDE builder enforces this with the 'Header must be terminated by a line break' marker.

I recently helped a colleague trying to understand why a manifest was invalid. Initially it didn't end with a line break, so following the message, he pressed Enter. However, the previous line was a continuation, so the new line actually contained a single (inconspicuous) space, resulting in the same message, and much confusion as to whether the builder had broken. :)

This patch adds a quick fix resolution to the marker. If the manifest ends with a content line, it adds a newline. If it ends with a line containing only whitespace, it deletes the whitespace, leaving just the newline.



Reproducible: Always
Comment 1 Benjamin Cabé CLA 2011-06-29 19:18:21 EDT
You haven't attached the patch :)
Comment 2 Ben Cox CLA 2011-06-29 19:18:49 EDT
Created attachment 198869 [details]
Patch to add quick fix

I've attached the patch to the bug report.
Comment 3 Ben Cox CLA 2011-06-29 19:20:52 EDT
Hi Benjamin - oops! I wasn't such a quick response though! :D
Comment 4 Curtis Windatt CLA 2011-06-30 12:44:52 EDT
Patch looks promising.  I will give it a proper review in early 3.8.
Comment 5 Curtis Windatt CLA 2011-06-30 12:47:36 EDT
FYI Benjamin, we've started using the [patch] tag for bugzillas with patches waiting for review.  Helps clarify how much work is actually pending for a given set of bugs (There are already 59 bugs for 3.8, but a good number have fixes waiting for review).
Comment 6 Curtis Windatt CLA 2011-08-10 17:16:59 EDT
Created attachment 201279 [details]
Improved patch

Fixes copyrights, replaces string attributes with constants, improves wording of the resolutions.
Comment 7 Curtis Windatt CLA 2011-08-10 17:17:37 EDT
Fixed in HEAD.
Comment 8 Ankur Sharma CLA 2011-09-14 06:00:16 EDT
Verified in I20110913-0200