Bug 234336 - [formatter] JavaDocTestCase.testMultiLineCommentIndent* tests fail in I20080527-2000 build
Summary: [formatter] JavaDocTestCase.testMultiLineCommentIndent* tests fail in I200805...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 RC3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-28 07:02 EDT by Frederic Fusier CLA
Modified: 2008-05-30 10:51 EDT (History)
4 users (show)

See Also:
jerome_lanneluc: review+
eric_jodet: review+
philippe_mulet: review+


Attachments
Proposed patch (4.57 KB, patch)
2008-05-28 10:45 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2008-05-28 07:02:59 EDT
Build I20080527-2000.

JavaDocTestCase following tests are failing in this build tests results:
 - testMultiLineCommentIndentTabs1
 - testMultiLineCommentIndentSpaces1-4
Comment 1 Frederic Fusier CLA 2008-05-28 07:06:36 EDT
It looks like the method Scribe.isAdaptableRegions does return false when tests are run on Windows but true on Linux boxes... As this method was not changed by the fix for bug 232768 released yesterday, it seems that we had this difference for a little while suddenly exhibits by that last change.

I'm still investigating...
Comment 2 Frederic Fusier CLA 2008-05-28 07:07:22 EDT
Only happens on Linux or Mac-OS test boxes...
Comment 3 Frederic Fusier CLA 2008-05-28 10:45:29 EDT
Created attachment 102387 [details]
Proposed patch

This patch just revert in Scribe the scannerEndPosition initialisation in printComment(int,String,int,int,int) method to avoid the undesirable side effect in isAdaptableRegion(int,int) and adaptRegions() where this field is used.

However, note that this just show that algorithm in these methods are not correct as they behaves differently for same sources with different line separators.

I will open another bug for this issue.
Comment 4 Frederic Fusier CLA 2008-05-28 10:47:34 EDT
Jerome, Philippe, Eric, could you please review?
Thanks
Comment 5 Eric Jodet CLA 2008-05-28 11:08:33 EDT
Patch looks good: +1
Comment 6 Philipe Mulet CLA 2008-05-28 11:58:12 EDT
+1 for RC3. Offending code had been introduced yesterday by mistake.
Comment 7 Jerome Lanneluc CLA 2008-05-29 05:04:48 EDT
Agreed this regression must be fixed for RC3. Patch is simple: +1
Comment 8 Frederic Fusier CLA 2008-05-29 05:29:26 EDT
Released for 3.4RC3 in HEAD stream.
Comment 9 David Audel CLA 2008-05-30 10:51:38 EDT
Verified for 3.4RC4