Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Exception in P6Util.loadProperties() #89

Closed
quintonm opened this Issue · 0 comments

1 participant

@quintonm
Owner

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

@typekpb typekpb closed this in 5380560
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.