From 5a0a7cfb12c08d727f36e57428ff988a41735f2d Mon Sep 17 00:00:00 2001 From: Shallwewu <15781956@qq.com> Date: Fri, 8 Mar 2019 17:08:23 +0800 Subject: [PATCH] version --- pom.xml | 2 +- src/main/java/com/aliyun/oss/OSSClient.java | 2 +- src/main/resources/versioninfo.properties | 2 +- src/test/java/com/aliyun/oss/common/utils/VersionUtilTest.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 59fe5d5a..b42a97fe 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.aliyun.oss aliyun-sdk-oss - 3.4.1 + 3.4.2 jar Aliyun OSS SDK for Java The Aliyun OSS SDK for Java used for accessing Aliyun Object Storage Service diff --git a/src/main/java/com/aliyun/oss/OSSClient.java b/src/main/java/com/aliyun/oss/OSSClient.java index f8a4c8a4..c667de5f 100644 --- a/src/main/java/com/aliyun/oss/OSSClient.java +++ b/src/main/java/com/aliyun/oss/OSSClient.java @@ -257,7 +257,7 @@ private boolean isIpOrLocalhost(URI uri) { return false; } - if (ia.getHostName().equals(ia.getHostAddress())) { + if (uri.getHost().equals(ia.getHostAddress())) { return true; } diff --git a/src/main/resources/versioninfo.properties b/src/main/resources/versioninfo.properties index 1e95b09f..7ca723a7 100644 --- a/src/main/resources/versioninfo.properties +++ b/src/main/resources/versioninfo.properties @@ -1 +1 @@ -version=3.4.1 +version=3.4.2 diff --git a/src/test/java/com/aliyun/oss/common/utils/VersionUtilTest.java b/src/test/java/com/aliyun/oss/common/utils/VersionUtilTest.java index 72a7b5ea..2e58e7e8 100644 --- a/src/test/java/com/aliyun/oss/common/utils/VersionUtilTest.java +++ b/src/test/java/com/aliyun/oss/common/utils/VersionUtilTest.java @@ -28,7 +28,7 @@ public class VersionUtilTest { @Test public void testGetDefaultUserAgent() { String userAgent = VersionInfoUtils.getDefaultUserAgent(); - assertTrue(userAgent.startsWith("aliyun-sdk-java/3.4.1(")); + assertTrue(userAgent.startsWith("aliyun-sdk-java/3.4.2(")); assertEquals(userAgent.split("/").length, 4); assertEquals(userAgent.split(";").length, 2); assertEquals(userAgent.split("\\(").length, 2);