Issue #15 new

NPE in AnnotationHolder.java

Ernie Rael
created an issue

This may be a NB issue; I'll start here for triage. This is intermittent, though frequent. I added the following to a POJ project's META-INF/upgrade {{{ <? import static com.raelity.jvi.core.Util.vim_strchr; ?>

'vim_strchr found': vim_strchr($str, $chr) != null => vim_strchr($str, 0, $chr) >= 0 ;;

'vim_strchr not found': vim_strchr($str, $chr) == null => vim_strchr($str, 0, $chr) < 0 ;; }}} And the hint 'light-bulb' shows up and works as expected. (copying it in with the shell in a running NB and it showed up (I restarted NB with it in place to insure that wasn't related))

But given {{{ public boolean testme() { return vim_strchr("abcde", 'b') != null; }

}}} editting the 'vim_strchr' line often produce NPE. This can be several kinds of edit. When it doesn't fail, moving around the file, coming back... may trigger the problem.

The exceptions occur in both {{{ AnnotationHolder.removeUpdate(AnnotationHolder.java:434) AnnotationHolder.insertUpdate(AnnotationHolder.java:329) }}} It looks like "errors2Lines.remove(ed)" is returning a null. Attaching typical backtraces.

Comments (0)

  1. Log in to comment