File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/main/java/org/utplsql/api Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11package org .utplsql .api ;
22
3+ import java .io .BufferedReader ;
34import java .io .IOException ;
45import java .io .InputStream ;
56import java .io .InputStreamReader ;
@@ -23,12 +24,15 @@ private JavaApiVersionInfo() { }
2324
2425 static {
2526 try {
26- MAVEN_PROJECT_VERSION = Files .readAllLines (
27- Paths .get (JavaApiVersionInfo .class .getClassLoader ().getResource ("utplsql-api.version" ).toURI ())
28- , Charset .defaultCharset ())
29- .get (0 );
27+
28+ try ( InputStream in = JavaApiVersionInfo .class .getClassLoader ().getResourceAsStream ("utplsql-api.version" )) {
29+ BufferedReader reader = new BufferedReader (new InputStreamReader (in ));
30+ MAVEN_PROJECT_VERSION = reader .readLine ();
31+
32+ reader .close ();
33+ }
3034 }
31- catch ( IOException | URISyntaxException e ) {
35+ catch ( IOException e ) {
3236 System .out .println ("WARNING: Could not get Version information!" );
3337 }
3438 }
You can’t perform that action at this time.
0 commit comments