Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 57011 - [formatting] AIOOBE when formatting Javadoc
Summary: [formatting] AIOOBE when formatting Javadoc
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 major (vote)
Target Milestone: 3.0 RC2   Edit
Assignee: Christof Marti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 58136 62526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-01 03:26 EST by Channing Walton CLA
Modified: 2004-06-10 11:29 EDT (History)
4 users (show)

See Also:


Attachments
Offending File (3.57 KB, text/plain)
2004-04-01 04:24 EST, Channing Walton CLA
no flags Details
Format profile (18.26 KB, text/plain)
2004-04-01 04:25 EST, Channing Walton CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Channing Walton CLA 2004-04-01 03:26:02 EST
Eclipse: 20040330
Platform: OS X 10.3.3

Using Option+Shift+f to format my code produced the following:

java.lang.ArrayIndexOutOfBoundsException: 0
	at java.util.ArrayList.get(ArrayList.java:326)
	at org.eclipse.jdt.internal.ui.text.comment.JavaDocRegion.formatRegion(JavaDocRegion.java:133)
	at org.eclipse.jdt.internal.ui.text.comment.CommentRegion.format(CommentRegion.java:219)
	at 
org.eclipse.jdt.internal.ui.text.comment.CommentFormattingStrategy.format(CommentFormattingStrate
gy.java:123)
	at 
org.eclipse.jface.text.formatter.MultiPassContentFormatter.formatSlave(MultiPassContentFormatter.java:
217)
	at 
org.eclipse.jface.text.formatter.MultiPassContentFormatter.formatSlaves(MultiPassContentFormatter.jav
a:264)
	at 
org.eclipse.jface.text.formatter.MultiPassContentFormatter.format(MultiPassContentFormatter.java:140)
	at org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:705)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.doOperation(JavaSourceViewer.java:124)
	at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(Compilat
ionUnitEditor.java:194)
	at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:122)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84)
	at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:120)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
	at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:77)
	at org.eclipse.ui.internal.commands.Command.execute(Command.java:173)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:
463)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:855)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:896)
	at 
org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:
522)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$2(WorkbenchKeyboard.java:488)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java:261)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:811)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1194)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1219)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1204)
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1941)
	at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1936)
	at org.eclipse.swt.widgets.Control.kEventTextInputUnicodeForKeyEvent(Control.java:1474)
	at org.eclipse.swt.widgets.Composite.kEventTextInputUnicodeForKeyEvent(Composite.java:392)
	at org.eclipse.swt.widgets.Widget.textInputProc(Widget.java:1604)
	at org.eclipse.swt.widgets.Display.textInputProc(Display.java:2774)
	at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2029)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1558)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1532)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:257)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:90)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:277)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:241)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:117)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:267)
	at org.eclipse.core.launcher.Main.run(Main.java:692)
	at org.eclipse.core.launcher.Main.main(Main.java:676)
Comment 1 Dani Megert CLA 2004-04-01 04:06:13 EST
Can you provide the file (or a similar one that causes the problem)?
Can you attach your formatting profile?
Comment 2 Channing Walton CLA 2004-04-01 04:24:02 EST
Created attachment 9086 [details]
Offending File

I noticed that I didn't close the 'pre' element, when I did the formatter
worked. However, copying this JavaDoc to another file didn't result in the bug.


Channing
Comment 3 Channing Walton CLA 2004-04-01 04:25:11 EST
Created attachment 9087 [details]
Format profile
Comment 4 Channing Walton CLA 2004-04-01 04:26:37 EST
Actually, was I not using the formatter properly by including XML elements?
Comment 5 Dani Megert CLA 2004-04-12 14:55:42 EDT
*** Bug 58136 has been marked as a duplicate of this bug. ***
Comment 6 Dani Megert CLA 2004-04-12 14:56:07 EDT
Increased severity.
Comment 7 Dani Megert CLA 2004-05-18 03:19:39 EDT
*** Bug 62526 has been marked as a duplicate of this bug. ***
Comment 8 Dani Megert CLA 2004-05-27 13:55:14 EDT
*** Bug 63836 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2004-05-28 09:21:29 EDT
*** Bug 64162 has been marked as a duplicate of this bug. ***
Comment 10 Christof Marti CLA 2004-06-03 09:47:05 EDT
Fixed in builds >=I200406031200
Comment 11 Markus Keller CLA 2004-06-10 11:15:42 EDT
Start verifying ...
Comment 12 Markus Keller CLA 2004-06-10 11:29:25 EDT
Verified that formatting the offending file and examples from duplicates works
fine in 200406092000 (as opposed to RC1).