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

Exception in P6Util.loadProperties() #89

Closed
quintonm opened this issue Oct 12, 2013 · 0 comments
Closed

Exception in P6Util.loadProperties() #89

quintonm opened this issue Oct 12, 2013 · 0 comments

Comments

@quintonm
Copy link
Member

Migrated from sourceforge: https://sourceforge.net/p/p6spy/bugs/2/

When spy.properties is not found, I receive the
following message (version 1.0 beta):
Warning: Can't find spy.properties, java.class.path
= <...my class path...>
Exception in thread "main"
java.lang.ExceptionInInitializerError:
java.lang.NullPointerException
at
com.p6spy.engine.common.P6Util.loadProperties
(P6Util.java:238)
at
com.p6spy.engine.common.P6SpyOptions.setValues
(P6SpyOptions.java:489)
etc...
At line 212 of P6Util.java, BufferedReader reader is
initialized to null.
Then at line 238, there's reader.close() and that
throws a NullPointerException !!
You have to test (lines 238 and 239):
if (reader != null) reader.close();
if (in != null) in.close();
or catch Exception instead of only IOException.
Best regards,
Adriano Labate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant