Skip to content

Commit 8b99995

Browse files
committed
update UserAgent
1 parent 49ad4ee commit 8b99995

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/com/aliyun/openservices/ots/utils/VersionInfoUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
public class VersionInfoUtils {
1010
private static final String VERSION_INFO_FILE = "versioninfo.properties";
11+
private static final String USER_AGENT_PREFIX = "aliyun-tablestore-sdk-java";
1112

1213
private static Log log = LogFactory.getLog(VersionInfoUtils.class);
1314

@@ -25,7 +26,9 @@ public static String getVersion() {
2526

2627
public static String getDefaultUserAgent() {
2728
if (defaultUserAgent == null) {
28-
defaultUserAgent = "aliyun-sdk-java" + "/" + getVersion();
29+
defaultUserAgent = USER_AGENT_PREFIX + "/" + getVersion() + "(" +
30+
System.getProperty("os.name") + "/" + System.getProperty("os.version") + "/" +
31+
System.getProperty("os.arch") + ";" + System.getProperty("java.version") + ")";
2932
}
3033
return defaultUserAgent;
3134
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version=OTS-2.0.4
1+
version=2.2.4

0 commit comments

Comments
 (0)