File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/main/java/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 16
16
package com .rabbitmq .client .impl ;
17
17
18
18
import java .io .IOException ;
19
+ import java .io .InputStream ;
19
20
import java .util .Properties ;
20
21
21
22
/**
@@ -28,10 +29,18 @@ public class ClientVersion {
28
29
29
30
static {
30
31
version = new Properties ();
32
+ InputStream inputStream = ClientVersion .class .getClassLoader ()
33
+ .getResourceAsStream ("version.properties" );
31
34
try {
32
- version .load (ClientVersion .class .getClassLoader ()
33
- .getResourceAsStream ("version.properties" ));
35
+ version .load (inputStream );
34
36
} catch (IOException e ) {
37
+ } finally {
38
+ try {
39
+ if (inputStream !=null ) {
40
+ inputStream .close ();
41
+ }
42
+ } catch (IOException e ) {
43
+ }
35
44
}
36
45
37
46
VERSION = version .getProperty ("com.rabbitmq.client.version" ,
You can’t perform that action at this time.
0 commit comments