Bug 109605 - [formatter] Code formatting fails inside empty html 'pre' block
Summary: [formatter] Code formatting fails inside empty html 'pre' block
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0.1   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-15 08:21 EDT by Darren Pearce CLA
Modified: 2007-02-05 11:44 EST (History)
0 users

See Also:


Attachments
Test case showing empty pre-block. (132 bytes, text/plain)
2005-09-22 13:46 EDT, Darren Pearce CLA
no flags Details
Proposed fix (720 bytes, patch)
2005-10-13 09:42 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Pearce CLA 2005-09-15 08:21:19 EDT
If I have an html 'pre' block inside a Javadoc comment that consists of just 
white space (including at least one new line), then code formatting produces 
an ArrayIndexOutOfBoundsException. This is on Eclipse SDK Version: 3.1.0 Build 
id: I20050627-1435.

The same bug existed in 3.0.1 except it didn't say it was an 
ArrayIndexOutOfBoundsException.

This *only* seems to a problem if I use CTRL-Shift-F. If I go through the menu 
system, it doesn't happen.
Comment 1 Olivier Thomann CLA 2005-09-16 11:37:21 EDT
I cannot reproduce in 3.1.
Could you please try with 3.1?
Thanks.
Comment 2 Olivier Thomann CLA 2005-09-16 11:39:38 EDT
Forget my comment. I could not reproduce with latest head stream.
I am investigating.
Would you have a test case that fails with 3.1.0?
Comment 3 Darren Pearce CLA 2005-09-22 13:46:17 EDT
Created attachment 27402 [details]
Test case showing empty pre-block.
Comment 4 Olivier Thomann CLA 2005-10-13 09:42:36 EDT
Created attachment 28233 [details]
Proposed fix
Comment 5 Olivier Thomann CLA 2007-02-01 12:11:15 EST
This is fixed in HEAD.
Closing as WORKSFORME.
Added regression test in org.eclipse.jdt.core.tests.formatter.comment.JavaDocTestCase#test109605()