CamouflagePlugin 0.9 exception

It crashes with incomplete/incorrect code like the following.
Copy/paste this code and place the caret inside 'test':

public class Test {
void test()
}

Exception:
java.lang.NullPointerException
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.regionAround(FlattenizeMethodIntention.java:51)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isNotFlattenized(FlattenizeMethodIntention.java:26)
at
ravet.intellij.plugins.camouflagePlugin.intentions.FlattenizeMethodIntention.isAvailableFor(FlattenizeMethodIntention.java:21)
at ravet.intellij.plugins.camouflagePlugin.intentions.AbstractIntention.isAvailable(AbstractIntention.java:30)
at com.intellij.codeInsight.a.a.bd.c(bd.java:35)
at com.intellij.codeInsight.a.a.bd.b(bd.java:39)
at com.intellij.codeInsight.a.a.bj$2.run(bj$2.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.s.a(s.java:41)
at com.intellij.ide.s.dispatchEvent(s.java:62)
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)


Sascha



1 comment

Sascha Weinreuter wrote:

>It crashes with incomplete/incorrect code like the following.
>Copy/paste this code and place the caret inside 'test':
>
>public class Test {

void test()

>}
>

>

Thanks for the report.
I'll publish a new version today, where this bug is fixed, and new
features added (automated folding/camouflagin mode, ..)

Alain

0

Please sign in to leave a comment.