Project: JDT
Bug 57011 [formatting] AIOOBE when formatting Javadoc
Reported: 2004-04-01 03:26:02 | Status: verified fixed

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)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/comment/JavaDocRegion.java