diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java index 6ff06b6b04ea..41fc0c3bbeb8 100644 --- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java +++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/StorageImpl.java @@ -541,10 +541,10 @@ public URL signUrl(BlobInfo blobInfo, long duration, TimeUnit unit, SignUrlOptio credentials.sign(signatureInfo.constructUnsignedPayload().getBytes(UTF_8)); StringBuilder stBuilder = new StringBuilder(); if (optionMap.get(SignUrlOption.Option.HOST_NAME) == null) { - stBuilder.append(STORAGE_XML_HOST_NAME).append(path); + stBuilder.append(STORAGE_XML_HOST_NAME).append(path); } else { - stBuilder.append(optionMap.get(SignUrlOption.Option.HOST_NAME)).append(path); + stBuilder.append(optionMap.get(SignUrlOption.Option.HOST_NAME)).append(path); } String signature = diff --git a/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java b/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java index cea262cfce35..18621928434d 100644 --- a/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java +++ b/google-cloud-clients/google-cloud-storage/src/test/java/com/google/cloud/storage/StorageImplTest.java @@ -56,7 +56,6 @@ import com.google.common.collect.Iterables; import com.google.common.io.BaseEncoding; import com.google.common.net.UrlEscapers; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -79,9 +78,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; - import javax.crypto.spec.SecretKeySpec; - import org.easymock.Capture; import org.easymock.EasyMock; import org.junit.After;