We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 965a6a5 + 67626d9 commit c1f069bCopy full SHA for c1f069b
1 file changed
src/main/java/com/rabbitmq/client/impl/ClientVersion.java
@@ -16,6 +16,7 @@
16
package com.rabbitmq.client.impl;
17
18
import java.io.IOException;
19
+import java.io.InputStream;
20
import java.util.Properties;
21
22
/**
@@ -28,10 +29,18 @@ public class ClientVersion {
28
29
30
static {
31
version = new Properties();
32
+ InputStream inputStream = ClientVersion.class.getClassLoader()
33
+ .getResourceAsStream("version.properties");
34
try {
- version.load(ClientVersion.class.getClassLoader()
- .getResourceAsStream("version.properties"));
35
+ version.load(inputStream);
36
} catch (IOException e) {
37
+ } finally {
38
+ try {
39
+ if(inputStream != null) {
40
+ inputStream.close();
41
+ }
42
+ } catch (IOException e) {
43
44
}
45
46
VERSION = version.getProperty("com.rabbitmq.client.version",
0 commit comments