Choose By Name exception

I provide custom choose-by-name provider. Now when I press Ctrl+N all I
see is exception:

java.lang.NullPointerException
at org.apache.oro.text.regex.Perl5Matcher.matches(Unknown Source)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase.a(ChooseByNameBase.java:225)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase.access$1400(ChooseByNameBase.java:220)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.a(ChooseByNameBase.java:42)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.access$1800(ChooseByNameBase.java:9)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread$1.run(ChooseByNameBase.java:2)
at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:153)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.run(ChooseByNameBase.java:1)

I can assure that these are not null:
- getNames return value
- array elements of getNames return value
- getItemsByName return value
- array elements of getItemsByName return value
- NavigationItem.getName return value

Am I doing something else wrong?

1 comment

I figured it out, it was a null in choosebyname from another plugin.

Keith Lea wrote:

I provide custom choose-by-name provider. Now when I press Ctrl+N all I
see is exception:

java.lang.NullPointerException
at org.apache.oro.text.regex.Perl5Matcher.matches(Unknown Source)
at
com.intellij.ide.util.gotoByName.ChooseByNameBase.a(ChooseByNameBase.java:225)

at
com.intellij.ide.util.gotoByName.ChooseByNameBase.access$1400(ChooseByNameBase.java:220)

at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.a(ChooseByNameBase.java:42)

at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.access$1800(ChooseByNameBase.java:9)

at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread$1.run(ChooseByNameBase.java:2)

at
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:153)

at
com.intellij.ide.util.gotoByName.ChooseByNameBase$CalcElementsThread.run(ChooseByNameBase.java:1)


I can assure that these are not null:
- getNames return value
- array elements of getNames return value
- getItemsByName return value
- array elements of getItemsByName return value
- NavigationItem.getName return value

Am I doing something else wrong?

0

Please sign in to leave a comment.