I get the following NPE when using the Generate...Getter/Setter option. The culprit is the following line of code:
private boolean isNull = false; When I comment the above line and try the menu option, there is no NPE. [codeInsight] IntelliJ IDEA 2.5.1 build #545 [codeInsight] JDK: 1.3.1_01 [codeInsight] VM: Java HotSpot(TM) Client VM [codeInsight] Vendor: Sun Microsystems Inc. [codeInsight] OS: Windows 2000 [codeInsight] com.intellij.util.o: "null" is not an identifier. [codeInsight] at com.intellij.psi.impl.f.a(f.java:24) [codeInsight] at com.intellij.psi.impl.k.c(k.java:21) [codeInsight] at com.intellij.codeInsight.bf.b(bf.java:22) [codeInsight] at com.intellij.codeInsight.generation.GenerateSetterHandler.a(G enerateSetterHandler.java:4) [codeInsight] at com.intellij.codeInsight.generation.GenerateGetterAndSetterHa ndler.a(GenerateGetterAndSetterHandler.java:4) [codeInsight] at com.intellij.codeInsight.generation.p.b(p.java:3) [codeInsight] at com.intellij.codeInsight.generation.o.a(o.java:58) [codeInsight] at com.intellij.codeInsight.generation.o.invoke(o.java:66) [codeInsight] at com.intellij.codeInsight.generation.GenerateActionHandler$Edi torActionHandlerWrapper.invoke(GenerateActionHandler.java:8) [codeInsight] at com.intellij.codeInsight.actions.a.run(a.java:2) [codeInsight] at com.intellij.psi.impl.r.a(r.java:69) [codeInsight] at com.intellij.codeInsight.actions.b.run(b.java:1) [codeInsight] at com.intellij.command.a.c.a(c.java:61) [codeInsight] at com.intellij.codeInsight.actions.u.actionPerformed(u.java:10) [codeInsight] at com.intellij.codeInsight.actions.GenericCreateElementAction.b (GenericCreateElementAction.java:42) [codeInsight] at com.intellij.codeInsight.actions.d.run(d.java:2) [codeInsight] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java: 154) [codeInsight] at java.awt.EventQueue.dispatchEvent(EventQueue.java:337) [codeInsight] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi spatchThread.java:131) [codeInsight] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp atchThread.java:98) [codeInsight] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j ava:93) [codeInsight] at java.awt.EventDispatchThread.run(EventDispatchThread.java:85) [command] IntelliJ IDEA 2.5.1 build #545 [command] JDK: 1.3.1_01 [command] VM: Java HotSpot(TM) Client VM [command] Vendor: Sun Microsystems Inc. [command] OS: Windows 2000 [command] java.lang.NullPointerException [command] at com.intellij.psi.dh.a(dh.java:247) [command] at com.intellij.psi.dh.a(dh.java:125) [command] at com.intellij.psi.dh.a(dh.java:53) [command] at com.intellij.codeInsight.generation.GenerateSetterHandler.a(G enerateSetterHandler.java:10) [command] at com.intellij.codeInsight.generation.GenerateGetterAndSetterHa ndler.a(GenerateGetterAndSetterHandler.java:4) [command] at com.intellij.codeInsight.generation.p.b(p.java:3) [command] at com.intellij.codeInsight.generation.o.a(o.java:58) [command] at com.intellij.codeInsight.generation.o.invoke(o.java:66) [command] at com.intellij.codeInsight.generation.GenerateActionHandler$Edi torActionHandlerWrapper.invoke(GenerateActionHandler.java:8) [command] at com.intellij.codeInsight.actions.a.run(a.java:2) [command] at com.intellij.psi.impl.r.a(r.java:69) [command] at com.intellij.codeInsight.actions.b.run(b.java:1) [command] at com.intellij.command.a.c.a(c.java:61) [command] at com.intellij.codeInsight.actions.u.actionPerformed(u.java:10) [command] at com.intellij.codeInsight.actions.GenericCreateElementAction.b (GenericCreateElementAction.java:42) [command] at com.intellij.codeInsight.actions.d.run(d.java:2) [command] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java: 154) [command] at java.awt.EventQueue.dispatchEvent(EventQueue.java:337) [command] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi spatchThread.java:131) [command] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp atchThread.java:98) [command] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j ava:93) [command] at java.awt.EventDispatchThread.run(EventDispatchThread.java:85) >Reply-To: "Eugene Zhuravlev" <[EMAIL PROTECTED]> >From: "Eugene Zhuravlev" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: Re: [Eap-list] Generate Getter and Setter >Date: Wed, 23 Jan 2002 22:32:00 +0300 >Organization: IntelliJ Labs >charset="iso-8859-1" >Reply-To: [EMAIL PROTECTED] > >Hi Jeffrey, > >Please try the latest build (#545). Is the problem still there? > >Best regards, >Eugene Zhuravlev >IntelliJ Software, http://www.intellij.com/ >"Develop with pleasure!" > >----- Original Message ----- >From: "Jeffrey Inns" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: 23 January, 2002 6:24 PM >Subject: [Eap-list] Generate Getter and Setter> > > > I receive the following NPE while using the right-click Generate.../Getter > and Setter menu option. I have not been able to identify when it gives an > NPE and when it does not. It works sometimes and other times does not. The > class for which I am attempting this menu option already has getters and > setters in it. I added another class member and attempted to use the menu > option to generate the getter and setter for it. I may have previously used > the menu option for other class variables, but I don't see that as having > caused this behavior. > > [command] IntelliJ IDEA 2.5.1 build #539 > [command] JDK: 1.3.1_01 > [command] VM: Java HotSpot(TM) Client VM > [command] Vendor: Sun Microsystems Inc. > [command] OS: Windows 2000 > [command] java.lang.NullPointerException > [command] at com.intellij.psi.dh.a(dh.java:373) > [command] at com.intellij.psi.dh.a(dh.java:8) > [command] at com.intellij.psi.dh.a(dh.java:166) > [command] at > com.intellij.codeInsight.generation.GenerateSetterHandler.a(G > enerateSetterHandler.java:1) > [command] at > com.intellij.codeInsight.generation.GenerateGetterAndSetterHa > ndler.a(GenerateGetterAndSetterHandler.java:9) > [command] at com.intellij.codeInsight.generation.p.b(p.java:4) > [command] at com.intellij.codeInsight.generation.o.a(o.java:10) > [command] at com.intellij.codeInsight.generation.o.invoke(o.java:62) > [command] at > com.intellij.codeInsight.generation.GenerateActionHandler$Edi > torActionHandlerWrapper.invoke(GenerateActionHandler.java:3) > [command] at com.intellij.codeInsight.actions.a.run(a.java:1) > [command] at com.intellij.psi.impl.r.a(r.java:190) > [command] at com.intellij.codeInsight.actions.b.run(b.java:0) > [command] at com.intellij.command.a.c.a(c.java:69) > [command] at > com.intellij.codeInsight.actions.u.actionPerformed(u.java:21) > > [command] at > com.intellij.codeInsight.actions.GenericCreateElementAction.b > (GenericCreateElementAction.java:39) > [command] at com.intellij.codeInsight.actions.d.run(d.java:4) > [command] at > java.awt.event.InvocationEvent.dispatch(InvocationEvent.java: > 154) > [command] at java.awt.EventQueue.dispatchEvent(EventQueue.java:337) > [command] at > java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi > spatchThread.java:131) > [command] at > java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp > atchThread.java:98) > [command] at > java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j > ava:93) > [command] at > java.awt.EventDispatchThread.run(EventDispatchThread.java:85) Jeffrey Inns EXTOL INTERNATIONAL, INC. Voice: (570) 628-5500 Fax: (570) 628-6983 [EMAIL PROTECTED] www.extol.com _______________________________________________ Eap-list mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-list
