Bug 249954

Summary: [Patch] "Create Patch" creates invalid file if a new file ends with no newline
Product: [Eclipse Project] Platform Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CVSAssignee: Pawel Pogorzelski <pawel.pogorzelski1>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: tomasz.zarna
Version: 3.1   
Target Milestone: 3.5 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard: hasPatch
Attachments:
Description Flags
Patch_v01 pawel.pogorzelski1: iplog+

Description Jerome Lanneluc CLA 2008-10-07 09:51:01 EDT
I20080930-0921

1. Check out v_916 of:
  org.eclipse.jdt.core
  org.eclipse.jdt.core.tests.compiler
  org.eclipse.jdt.core.tests.model
2. Apply the non obsolete patch from bug 198572
3. Edit /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/ManifestAnalyzer.java and remove the last cariage return
4. In the Synchronize view, select the 3 project and create a patch
5. Replace the3 projects with v_916
6. Attempt to apply the patch 
Observe: It tries to apply the modification in org.eclipse.jdt.core.tests.model to org.eclipse.jdt.core
Comment 1 Pawel Pogorzelski CLA 2008-10-10 05:33:21 EDT
Created attachment 114769 [details]
Patch_v01

The problem shows up when the patch being generated contains a new file (not existing in CVS) with no line delimiter in the last line.

This bug was introduced with the fix for bug 116023.
Comment 2 Tomasz Zarna CLA 2008-10-10 05:54:38 EDT
Released to HEAD. Thanks Pawel!