File tree 1 file changed +2
-25
lines changed
src/main/java/com/rabbitmq/client/impl
1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change 15
15
16
16
package com .rabbitmq .client .impl ;
17
17
18
- import java .io .IOException ;
19
- import java .io .InputStream ;
20
- import java .util .Properties ;
21
-
22
18
/**
23
19
* Publicly available Client Version information
24
20
*/
25
21
public class ClientVersion {
26
22
/** Full version string */
27
- private static final Properties version ;
28
- public static final String VERSION ;
29
-
30
- static {
31
- version = new Properties ();
32
- InputStream inputStream = ClientVersion .class .getClassLoader ()
33
- .getResourceAsStream ("version.properties" );
34
- try {
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
- }
23
+ public static final String VERSION = ClientVersion .class .getPackage ().getImplementationVersion () == null ?
24
+ "0.0.0" : ClientVersion .class .getPackage ().getImplementationVersion ();
45
25
46
- VERSION = version .getProperty ("com.rabbitmq.client.version" ,
47
- ClientVersion .class .getPackage ().getImplementationVersion ());
48
- }
49
26
}
You can’t perform that action at this time.
0 commit comments