Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when #endif is missing #16

Closed
grzegorz8 opened this issue Mar 21, 2014 · 2 comments
Closed

NullPointerException when #endif is missing #16

grzegorz8 opened this issue Mar 21, 2014 · 2 comments

Comments

@grzegorz8
Copy link

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
Copy link
Owner

shevek commented Sep 1, 2014

Thank you. I will fix this. (Lazy Shevek asks:) Do you have a junit case?

@shevek
Copy link
Owner

shevek commented Sep 9, 2014

Didn't have findbugs back in the day. Slowly adding JSR305 annotations in the hope of rattling out this kind of bug.

@shevek shevek closed this as completed in b6a44c3 Sep 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants