SmartIntroduce: NullPointerException (Irida #3273)

Hi,

I encountered the following error when introducing a parameter for a
value which was a constant (public static final int) defined in an
interface implemented by the current class. Initially, the constant was
unqualified but when I added the interface qualifier, the refactoring
worked.

Stacktrace:

2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl -
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - IntelliJ IDEA (Irida) #3273 Build #3273
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - JDK: 1.4.2_06
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - VM: Java HotSpot(TM) Client VM
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - Vendor: Sun Microsystems Inc.
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - OS: Windows 2000
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - Last Action: IntroduceParameter
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl - Current Command: Introducing parameter
to getTimeBrowserTableMetricSources(NodeKey, int) of class
SemanticEngineImpl
2005-03-29 14:59:47,832 ERROR -
mand.impl.CommandProcessorImpl -
java.lang.NullPointerException
at
com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl.isAccessible(PsiResolveHelperImpl.java:190)
at
com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl.isAccessible(PsiResolveHelperImpl.java:10)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterProcessor$OldReferencesResolver.a(IntroduceParameterProcessor.java:77)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterProcessor$OldReferencesResolver.resolve(IntroduceParameterProcessor.java:62)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterProcessor.a(IntroduceParameterProcessor.java:52)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterProcessor.performRefactoring(IntroduceParameterProcessor.java:130)
at
com.intellij.refactoring.BaseRefactoringProcessor$11.run(BaseRefactoringProcessor.java:9)
at
com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:3)
at
com.intellij.refactoring.BaseRefactoringProcessor.a(BaseRefactoringProcessor.java:8)
at
com.intellij.refactoring.BaseRefactoringProcessor.access$400(BaseRefactoringProcessor.java:33)
at
com.intellij.refactoring.BaseRefactoringProcessor$5.run(BaseRefactoringProcessor.java)
at
com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:3)
at
com.intellij.refactoring.BaseRefactoringProcessor$4.run(BaseRefactoringProcessor.java:3)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:89)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:121)
at
com.intellij.refactoring.BaseRefactoringProcessor.execute(BaseRefactoringProcessor.java:5)
at
com.intellij.refactoring.BaseRefactoringProcessor.run(BaseRefactoringProcessor.java:61)
at
com.intellij.refactoring.ui.RefactoringDialog.invokeRefactoring(RefactoringDialog.java:12)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterDialog.doAction(IntroduceParameterDialog.java:111)
at
com.intellij.refactoring.ui.RefactoringDialog.doRefactorAction(RefactoringDialog.java:11)
at
com.intellij.refactoring.ui.RefactoringDialog$RefactorAction.actionPerformed(RefactoringDialog.java)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:104)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:23)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:111)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:141)
at java.awt.Dialog$1.run(Dialog.java:540)
at java.awt.Dialog.show(Dialog.java:561)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:2)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:82)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:734)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterHandler.a(IntroduceParameterHandler.java:0)
at
com.intellij.refactoring.introduceParameter.IntroduceParameterHandler.invoke(IntroduceParameterHandler.java:78)
at
com.intellij.refactoring.actions.BaseRefactoringAction.actionPerformed(BaseRefactoringAction.java:1)
at
org.intellij.plugins.smartIntroduce.utils.CompoundCommand.run(CompoundCommand.java:42)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:89)
at
com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:121)
at
org.intellij.plugins.smartIntroduce.SmartIntroduceAction.runCommand(SmartIntroduceAction.java:125)
at
org.intellij.plugins.smartIntroduce.SmartIntroduceAction.customExecute(SmartIntroduceAction.java:109)
at
org.intellij.plugins.smartIntroduce.SmartIntroduceAction.actionPerformed(SmartIntroduceAction.java:59)
at
com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:6)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at
com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:6)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:174)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:69)
at
com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:4)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at
com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:104)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:23)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:111)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

2 comments
Comment actions Permalink

Gordon Tyler wrote:

Hi,

I encountered the following error when introducing a parameter for a
value which was a constant (public static final int) defined in an
interface implemented by the current class. Initially, the constant was
unqualified but when I added the interface qualifier, the refactoring
worked.


Gordon,

I tried to reproduce it using your description but was not able to.
My 99.9% guess is that this is not the fault of the plugin. The plugin's
code in the stacktrace is about half a mile down the page and IDEA just
assumes it is the plugin because it is /present/ in the stacktrace.

I'd recommend to turn the plugin off from the Tools menu and try the action
again. If you get the crash again, you should be able to submit it with the
integrated error reporter.

Sascha

0
Comment actions Permalink

Sascha Weinreuter wrote:

I tried to reproduce it using your description but was not able to.
My 99.9% guess is that this is not the fault of the plugin. The plugin's
code in the stacktrace is about half a mile down the page and IDEA just
assumes it is the plugin because it is /present/ in the stacktrace.

I'd recommend to turn the plugin off from the Tools menu and try the action
again. If you get the crash again, you should be able to submit it with the
integrated error reporter.


Indeed! Thanks for the tip.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0

Please sign in to leave a comment.