AutoBoxingPlugin 0.5.3 NPE

Code:

if (_type == Types.INTEGER
|| (_type == Types.DECIMAL && length > 4 && _decimals == 0)
) {

There was an undefined symbol (legnth instead of _length) in the if.


ERROR - ing.ArrayToCollectionIntention -
ERROR - ing.ArrayToCollectionIntention - IntelliJ IDEA (Aurora)
Build #816
ERROR - ing.ArrayToCollectionIntention - JDK: 1.4.1_02
ERROR - ing.ArrayToCollectionIntention - VM: Java HotSpot(TM)
Client VM
ERROR - ing.ArrayToCollectionIntention - Vendor: Sun Microsystems
Inc.
ERROR - ing.ArrayToCollectionIntention - OS: Windows 2000
ERROR - ing.ArrayToCollectionIntention - Last Action: EditorLeft
ERROR - ing.ArrayToCollectionIntention -
java.lang.NullPointerException
at com.intellij.psi.impl.source.e.a.bj.getType(bj.java:108)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:45)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:15)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:45)
at com.intellij.psi.impl.source.e.a.bg.getType(bg.java:7)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:15)
at
org.intellij.autoboxing.PsiUtil.findPsiTypeOfExpression(PsiUtil.java:144)
at
org.intellij.autoboxing.BaseIntention.isAvailable(BaseIntention.java:46)
at
org.intellij.autoboxing.BaseIntention.isAvailable(BaseIntention.java:34)
at com.intellij.codeInsight.k.a.ce.c(ce.java:44)
at com.intellij.codeInsight.k.a.ce.b(ce.java:96)
at com.intellij.codeInsight.k.a.cn.run(cn.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.t.a(t.java:116)
at com.intellij.ide.t.dispatchEvent(t.java:16)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


1 comment
Comment actions Permalink

It turned out this is not really plugin's fault. When a PsiExpression
has undefined symbol in it, by calling getType() method NPE is being
thrown. The plugin logged this exception as an error. I've changed the
log level to debug and it fixes this problem.

You can get a new build from the plugin web page.
Sorry for inconvenience.

/kesh

Carlos Costa e Silva wrote:

Code:

if (_type == Types.INTEGER
|| (_type == Types.DECIMAL && length > 4 && _decimals == 0)
) {

There was an undefined symbol (legnth instead of _length) in the if.


ERROR - ing.ArrayToCollectionIntention -
ERROR - ing.ArrayToCollectionIntention - IntelliJ IDEA (Aurora)
Build #816
ERROR - ing.ArrayToCollectionIntention - JDK: 1.4.1_02
ERROR - ing.ArrayToCollectionIntention - VM: Java HotSpot(TM)
Client VM
ERROR - ing.ArrayToCollectionIntention - Vendor: Sun Microsystems
Inc.
ERROR - ing.ArrayToCollectionIntention - OS: Windows 2000
ERROR - ing.ArrayToCollectionIntention - Last Action: EditorLeft
ERROR - ing.ArrayToCollectionIntention -
java.lang.NullPointerException
at com.intellij.psi.impl.source.e.a.bj.getType(bj.java:108)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:45)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:15)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:45)
at com.intellij.psi.impl.source.e.a.bg.getType(bg.java:7)
at com.intellij.psi.impl.source.e.a.h.getType(h.java:15)
at
org.intellij.autoboxing.PsiUtil.findPsiTypeOfExpression(PsiUtil.java:144)
at
org.intellij.autoboxing.BaseIntention.isAvailable(BaseIntention.java:46)
at
org.intellij.autoboxing.BaseIntention.isAvailable(BaseIntention.java:34)
at com.intellij.codeInsight.k.a.ce.c(ce.java:44)
at com.intellij.codeInsight.k.a.ce.b(ce.java:96)
at com.intellij.codeInsight.k.a.cn.run(cn.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.t.a(t.java:116)
at com.intellij.ide.t.dispatchEvent(t.java:16)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


0

Please sign in to leave a comment.