Community
Participate
Working Groups
Build F2 On following incorrect unit p/Test.java: [package p; public class Test { void () { InputStream i= null; while(true) ; } } ] Activate organize imports, doesn't work, following trace is dumped in the log. Unhandled exception caught in event loop. Reason: !ENTRY org.eclipse.ui 4 0 Jun 03, 2002 15:57:45.366 !MESSAGE java.lang.IllegalArgumentException !STACK 0 java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.setSourceRange(ASTNode.java:1452) at org.eclipse.jdt.core.dom.ASTConverter.checkAndAddMultipleFieldDeclaration (ASTConverter.java:233) at org.eclipse.jdt.core.dom.ASTConverter.buildBodyDeclarations (ASTConverter.java:211) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:157) at org.eclipse.jdt.core.dom.ASTConverter.convert(ASTConverter.java:62) at org.eclipse.jdt.core.dom.AST.parseCompilationUnit(AST.java:227) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.findTy peReferences(OrganizeImportsOperation.java:569) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.run (OrganizeImportsOperation.java:516) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1361) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:32) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.inter nalRun(BusyIndicatorRunnableContext.java:107) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext$BusyRunnable.run (BusyIndicatorRunnableContext.java:74) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext.run (BusyIndicatorRunnableContext.java:120) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.runOnSingle (OrganizeImportsAction.java:280) at org.eclipse.jdt.ui.actions.OrganizeImportsAction.run (OrganizeImportsAction.java:164) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:180) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:156) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:75) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1527) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1289) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1177) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:244) at org.eclipse.core.launcher.Main.run(Main.java:693) at org.eclipse.core.launcher.Main.main(Main.java:526) java.lang.IllegalArgumentException
Such an internal failure should not occur since the API wasn't directly invoked from the outside.
Initializer recovery may have left #sourceEnd set to 0 (instead of defaulting to #declarationSourceEnd). Fixed
I got a dialog saying that the compilation unit has some syntax errors and no changes has been applied. Verified.
*** Bug 19851 has been marked as a duplicate of this bug. ***
Verified.