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 1616package com .rabbitmq .client .impl ;
1717
1818import java .io .IOException ;
19+ import java .io .InputStream ;
1920import java .util .Properties ;
2021
2122/**
@@ -28,10 +29,18 @@ public class ClientVersion {
2829
2930 static {
3031 version = new Properties ();
32+ InputStream inputStream = ClientVersion .class .getClassLoader ()
33+ .getResourceAsStream ("version.properties" );
3134 try {
32- version .load (ClientVersion .class .getClassLoader ()
33- .getResourceAsStream ("version.properties" ));
35+ version .load (inputStream );
3436 } catch (IOException e ) {
37+ } finally {
38+ try {
39+ if (inputStream != null ) {
40+ inputStream .close ();
41+ }
42+ } catch (IOException e ) {
43+ }
3544 }
3645
3746 VERSION = version .getProperty ("com.rabbitmq.client.version" ,
You can’t perform that action at this time.
0 commit comments