NullPointerException when #endif is missing
Closed this issue · 2 comments
grzegorz8 commented
NullPointerException
is thrown for source.setActive(true)
in Preprocessor._token()
when #endif
is missing and #ifdef
is satisfied.
Here is a simple test case:
#define D
#ifdef D
int a = 1;
#else
int a = 2;
<EOF>
Similarly for:
#ifndef D
int a = 1;
#else
int a = 2;
<EOF>
shevek commented
Thank you. I will fix this. (Lazy Shevek asks:) Do you have a junit case?
shevek commented
Didn't have findbugs back in the day. Slowly adding JSR305 annotations in the hope of rattling out this kind of bug.