File tree 1 file changed +9
-5
lines changed
src/main/java/org/utplsql/api
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
package org .utplsql .api ;
2
2
3
+ import java .io .BufferedReader ;
3
4
import java .io .IOException ;
4
5
import java .io .InputStream ;
5
6
import java .io .InputStreamReader ;
@@ -23,12 +24,15 @@ private JavaApiVersionInfo() { }
23
24
24
25
static {
25
26
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
+ }
30
34
}
31
- catch ( IOException | URISyntaxException e ) {
35
+ catch ( IOException e ) {
32
36
System .out .println ("WARNING: Could not get Version information!" );
33
37
}
34
38
}
You can’t perform that action at this time.
0 commit comments