Project: JDT
Bug 181157 [organize import] NPE on cancel multi organize import
Reported: 2007-04-05 05:22:32 | Status: resolved fixed

I20070327-0800 Running organize import and then pressing cancel resulted in: Caused by: java.lang.IllegalArgumentException: AST must not be null at org.eclipse.jdt.core.dom.rewrite.ImportRewrite.create(ImportRewrite.java:185) at org.eclipse.jdt.ui.CodeStyleConfiguration.createImportRewrite(CodeStyleConfiguration.java:64) at org.eclipse.jdt.internal.corext.codemanipulation.StubUtility.createImportRewrite(StubUtility.java:1502) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.createTextEdit(OrganizeImportsOperation.java:420) at org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation.run(OrganizeImportsOperation.java:393) at org.eclipse.jdt.ui.actions.OrganizeImportsAction$3.run(OrganizeImportsAction.java:438) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:155) at org.eclipse.ui.internal.UISynchronizer$2.run(UISynchronizer.java:125) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) ... 44 more

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java