Inspection Gagets Exception (I think)

I think IG caused the following stack trace. Also, I've been plaing around with the negate option (if X != Y else -> if X == Y else )

I like it a lot. But it would be useful if there was an option for not counting the following construct as an error:

if (X != null) else

usually B is some kind of debug print statement, so I am not interested in making that the focus of attention.

Thanks,
Mike





java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:138)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:5)
at com.intellij.openapi.application.LaterInvocator.leaveModal(LaterInvoc
ator.java:17)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:21)
at com.intellij.ui.ListPopup$1.mouseClicked(ListPopup.java:1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
2)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.Component.processMouseEvent(Component.java:5103)
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:3207)

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.q.b(q.java:0)
at com.intellij.ide.q.a(q.java:44)
at com.intellij.ide.q.dispatchEvent(q.java:24)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.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)
ERROR - api.application.LaterInvocator - Assertion failed
ERROR - api.application.LaterInvocator - IntelliJ IDEA 4.0 Build #1
165
ERROR - api.application.LaterInvocator - JDK: 1.4.2_03
ERROR - api.application.LaterInvocator - VM: Java HotSpot(TM) Client
VM
ERROR - api.application.LaterInvocator - Vendor: Sun Microsystems In
c.
ERROR - api.application.LaterInvocator - OS: Windows 2000
ERROR - api.application.LaterInvocator - Last Action: $Undo
ERROR - api.application.LaterInvocator - Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:138)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:5)
at com.intellij.openapi.application.LaterInvocator.leaveModal(LaterInvoc
ator.java:17)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:21)
at com.intellij.ui.ListPopup$1.mouseClicked(ListPopup.java:1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
2)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.Component.processMouseEvent(Component.java:5103)
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:3207)

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.q.b(q.java:0)
at com.intellij.ide.q.a(q.java:44)
at com.intellij.ide.q.dispatchEvent(q.java:24)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.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)
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:138)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:5)
at com.intellij.openapi.application.LaterInvocator.leaveModal(LaterInvoc
ator.java:17)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:21)
at com.intellij.ui.ListPopup$1.mouseClicked(ListPopup.java:1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
2)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.Component.processMouseEvent(Component.java:5103)
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:3207)

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.q.b(q.java:0)
at com.intellij.ide.q.a(q.java:44)
at com.intellij.ide.q.dispatchEvent(q.java:24)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.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)
ERROR - api.application.LaterInvocator - Assertion failed
ERROR - api.application.LaterInvocator - IntelliJ IDEA 4.0 Build #1
165
ERROR - api.application.LaterInvocator - JDK: 1.4.2_03
ERROR - api.application.LaterInvocator - VM: Java HotSpot(TM) Client
VM
ERROR - api.application.LaterInvocator - Vendor: Sun Microsystems In
c.
ERROR - api.application.LaterInvocator - OS: Windows 2000
ERROR - api.application.LaterInvocator - Last Action: $Undo
ERROR - api.application.LaterInvocator - Assertion failed
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:138)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:5)
at com.intellij.openapi.application.LaterInvocator.leaveModal(LaterInvoc
ator.java:17)
at com.intellij.ui.ListPopup.closePopup(ListPopup.java:21)
at com.intellij.ui.ListPopup$1.mouseClicked(ListPopup.java:1)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
2)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:21
1)
at java.awt.Component.processMouseEvent(Component.java:5103)
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:3207)

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.q.b(q.java:0)
at com.intellij.ide.q.a(q.java:44)
at com.intellij.ide.q.dispatchEvent(q.java:24)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.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)

2 comments

As for the stack trace, I can't really tell if it's IG (or IPP) or not. Were you bringing up an IG intention? If so, it would help a lot if I knew which one.


As for the filter on negative conditions, I like the idea (having seen the same issues myself) and just implemented it flag. It'll be available in 0.0.11, sometime in the next month.

0

Actually, I'm not sure which one it was from. I had an expression:

if (X != null)
A;
else
B;


It gave me a couple of choices, and one of them was flipping the expression

If (!(X != null))
A;
else
B;

I didn't think that was right (Not even sure why it was asking me to do this), so I did it again, to get it back, and then chose the one I wanted.

if (X == null)
B;
else
A;

But when I selected it, I got nothing. Then I tried again, still got nothing, but this time the popup menu wouldn't go away.

Mike


0

Please sign in to leave a comment.