File tree Expand file tree Collapse file tree 3 files changed +2
-27
lines changed
java/com/aliyun/openservices/log/util Expand file tree Collapse file tree 3 files changed +2
-27
lines changed Original file line number Diff line number Diff line change 1111
1212 <groupId >com.aliyun.openservices</groupId >
1313 <artifactId >aliyun-log</artifactId >
14- <version >0.6.133 </version >
14+ <version >0.6.134 </version >
1515 <packaging >jar</packaging >
1616
1717 <name >Aliyun LOG Java SDK</name >
Original file line number Diff line number Diff line change 77 * Unit test for VersionInfo.
88 */
99public class VersionInfoUtils {
10- private static final String VERSION_INFO_FILE = "versioninfo.properties" ;
1110 private static final String USER_AGENT_PREFIX = "aliyun-log-sdk-java" ;
1211
13- private static String version = null ;
14-
1512 private static String defaultUserAgent = null ;
1613
17- public static String getVersion () {
18- if (version == null ) {
19- initializeVersion ();
20- }
21- return version ;
22- }
23-
2414 public static String getDefaultUserAgent () {
2515 if (defaultUserAgent == null ) {
2616 String version = null ;
@@ -30,25 +20,11 @@ public static String getDefaultUserAgent() {
3020 version = pkg .getImplementationVersion ();
3121 }
3222 if (version == null ) {
33- version = getVersion () ;
23+ version = "unknown-version" ;
3424 }
3525 defaultUserAgent = USER_AGENT_PREFIX + "-" + version + "/" + System .getProperty ("java.version" );
3626 }
3727 return defaultUserAgent ;
3828 }
3929
40- private static void initializeVersion () {
41- InputStream inputStream = VersionInfoUtils .class .getClassLoader ().getResourceAsStream (VERSION_INFO_FILE );
42- Properties versionInfoProperties = new Properties ();
43- try {
44- if (inputStream == null ) {
45- throw new IllegalArgumentException (VERSION_INFO_FILE + " not found on classpath" );
46- }
47-
48- versionInfoProperties .load (inputStream );
49- version = versionInfoProperties .getProperty ("version" );
50- } catch (Exception e ) {
51- version = "unknown-version" ;
52- }
53- }
5430}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments