From 7a72784076308bb31786b9138efe856845a86fde Mon Sep 17 00:00:00 2001
From: JesseLovelace <43148100+JesseLovelace@users.noreply.github.com>
Date: Tue, 25 Sep 2018 10:49:00 -0700
Subject: [PATCH] Remove dependency on vulnerable version of jackson, upgrade
to jackson2 (#3724)
---
.../google/cloud/bigquery/benchmark/Benchmark.java | 2 +-
.../google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java | 2 +-
.../compute/deprecated/spi/v1/HttpComputeRpc.java | 2 +-
google-cloud-clients/google-cloud-core-http/pom.xml | 11 -----------
.../java/com/google/cloud/dns/spi/v1/HttpDnsRpc.java | 2 +-
.../spi/v1beta1/HttpResourceManagerRpc.java | 2 +-
.../testing/LocalResourceManagerHelper.java | 2 +-
.../google/cloud/storage/spi/v1/HttpStorageRpc.java | 2 +-
.../cloud/translate/spi/v2/HttpTranslateRpc.java | 2 +-
google-cloud-clients/pom.xml | 5 -----
10 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/google-cloud-clients/google-cloud-bigquery/src/benchmark/java/com/google/cloud/bigquery/benchmark/Benchmark.java b/google-cloud-clients/google-cloud-bigquery/src/benchmark/java/com/google/cloud/bigquery/benchmark/Benchmark.java
index ae3e586303c9..e6fc16e176ee 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/benchmark/java/com/google/cloud/bigquery/benchmark/Benchmark.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/benchmark/java/com/google/cloud/bigquery/benchmark/Benchmark.java
@@ -16,7 +16,7 @@
package com.google.cloud.bigquery.benchmark;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.cloud.bigquery.BigQuery;
import com.google.cloud.bigquery.BigQueryOptions;
import com.google.cloud.bigquery.FieldValue;
diff --git a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
index 2f56d5386164..df7cc5bce1ea 100644
--- a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
+++ b/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/spi/v2/HttpBigQueryRpc.java
@@ -30,7 +30,7 @@
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.json.JsonHttpContent;
import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.core.InternalApi;
import com.google.api.core.InternalExtensionOnly;
import com.google.api.services.bigquery.Bigquery;
diff --git a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/HttpComputeRpc.java b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/HttpComputeRpc.java
index 4e9ad9b09b47..caaa57db3db5 100644
--- a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/HttpComputeRpc.java
+++ b/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/HttpComputeRpc.java
@@ -20,7 +20,7 @@
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.compute.Compute;
import com.google.api.services.compute.model.AccessConfig;
import com.google.api.services.compute.model.Address;
diff --git a/google-cloud-clients/google-cloud-core-http/pom.xml b/google-cloud-clients/google-cloud-core-http/pom.xml
index 852a1d1eb474..f9ec6fae85e6 100644
--- a/google-cloud-clients/google-cloud-core-http/pom.xml
+++ b/google-cloud-clients/google-cloud-core-http/pom.xml
@@ -66,17 +66,6 @@
-
- com.google.http-client
- google-http-client-jackson
- compile
-
-
- guava-jdk5
- com.google.guava
-
-
-
com.google.http-client
google-http-client-jackson2
diff --git a/google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/spi/v1/HttpDnsRpc.java b/google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/spi/v1/HttpDnsRpc.java
index 46dd806d02a4..3ae26557f697 100644
--- a/google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/spi/v1/HttpDnsRpc.java
+++ b/google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/spi/v1/HttpDnsRpc.java
@@ -24,7 +24,7 @@
import com.google.api.client.http.HttpHeaders;
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.dns.Dns;
import com.google.api.services.dns.model.Change;
import com.google.api.services.dns.model.ChangesListResponse;
diff --git a/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/spi/v1beta1/HttpResourceManagerRpc.java b/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/spi/v1beta1/HttpResourceManagerRpc.java
index f6672dd5c79a..777750769dc2 100644
--- a/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/spi/v1beta1/HttpResourceManagerRpc.java
+++ b/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/spi/v1beta1/HttpResourceManagerRpc.java
@@ -24,7 +24,7 @@
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.core.ApiClock;
import com.google.api.gax.retrying.ResultRetryAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
diff --git a/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/testing/LocalResourceManagerHelper.java b/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/testing/LocalResourceManagerHelper.java
index bf5626036cca..9c070d991703 100644
--- a/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/testing/LocalResourceManagerHelper.java
+++ b/google-cloud-clients/google-cloud-resourcemanager/src/main/java/com/google/cloud/resourcemanager/testing/LocalResourceManagerHelper.java
@@ -92,7 +92,7 @@
public class LocalResourceManagerHelper {
private static final Logger log = Logger.getLogger(LocalResourceManagerHelper.class.getName());
private static final JsonFactory jsonFactory =
- new com.google.api.client.json.jackson.JacksonFactory();
+ new com.google.api.client.json.jackson2.JacksonFactory();
private static final Random PROJECT_NUMBER_GENERATOR = new Random();
private static final String VERSION = "v1";
private static final String CONTEXT = "/" + VERSION + "/projects";
diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java
index 03db33dae835..c6b2e668742d 100644
--- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java
+++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/spi/v1/HttpStorageRpc.java
@@ -36,7 +36,7 @@
import com.google.api.client.http.LowLevelHttpResponse;
import com.google.api.client.http.json.JsonHttpContent;
import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.util.IOUtils;
import com.google.api.services.storage.Storage;
import com.google.api.services.storage.Storage.Objects.Get;
diff --git a/google-cloud-clients/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/v2/HttpTranslateRpc.java b/google-cloud-clients/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/v2/HttpTranslateRpc.java
index 5d9af53a0db3..2e024cb7029f 100644
--- a/google-cloud-clients/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/v2/HttpTranslateRpc.java
+++ b/google-cloud-clients/google-cloud-translate/src/main/java/com/google/cloud/translate/spi/v2/HttpTranslateRpc.java
@@ -23,7 +23,7 @@
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.json.JsonHttpContent;
-import com.google.api.client.json.jackson.JacksonFactory;
+import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.translate.Translate;
import com.google.api.services.translate.model.DetectionsListResponse;
import com.google.api.services.translate.model.DetectionsResourceItems;
diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml
index 9bd7d058eb7c..d4f2c0b5b336 100644
--- a/google-cloud-clients/pom.xml
+++ b/google-cloud-clients/pom.xml
@@ -310,11 +310,6 @@
google-http-client-jackson2
${http-client.version}
-
- com.google.http-client
- google-http-client-jackson
- ${http-client.version}
-
com.google.oauth-client
google-oauth-client