From b430476e79537a7ae5291c297ad55d1e938578b4 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 25 Feb 2021 06:51:36 -0500 Subject: [PATCH 1/3] fix build warnings --- samples/snippets/pom.xml | 7 +------ .../java/com/example/json/YouTubeSampleTest.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 27b1d7961..937086ec2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -15,6 +15,7 @@ com.google.cloud.samples shared-configuration 1.0.21 + @@ -60,12 +61,6 @@ 1.1.2 test - - com.google.http-client - google-http-client-gson - 1.39.0 - test - diff --git a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java index b4bbf6c8f..786f9cdbd 100644 --- a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java +++ b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java @@ -13,8 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.example.json; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import org.junit.Test; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpTransport; @@ -28,14 +36,6 @@ import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; import com.google.common.base.Preconditions; -import org.junit.Test; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; public class YouTubeSampleTest { From 5085e372889772d9f253221d43adc0071b43e9d1 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 25 Feb 2021 06:53:48 -0500 Subject: [PATCH 2/3] check requires http --- .../snippets/src/main/java/com/example/json/YouTubeSample.java | 2 +- .../src/test/java/com/example/json/YouTubeSampleTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java index 6aff27898..38fcbfc8c 100644 --- a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java +++ b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java index 786f9cdbd..8454437f5 100644 --- a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java +++ b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, From 74601507ab08ecf8cc859346c62ecbb7f0b063ab Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 25 Feb 2021 06:54:39 -0500 Subject: [PATCH 3/3] blank line before package --- .../snippets/src/main/java/com/example/json/YouTubeSample.java | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java index 38fcbfc8c..aad2b8a99 100644 --- a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java +++ b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.example.json; import com.google.api.client.http.HttpResponse;