Repository: googleapis/google-http-java-client
Pull request #880 (2019-11-12 18:14:27)

Remove old jackson 1 reference
@chingor13 we deleted this artifact a while back



Patch:
diff --git a/.github/release-please.yml b/.github/release-please.yml
index 82744682..dce2c845 100644
--- a/.github/release-please.yml
+++ b/.github/release-please.yml
@@ -1,1 +1,2 @@
 releaseType: java-yoshi
+bumpMinorPreMajor: true
\ No newline at end of file
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index fa132f41..aa6d4f64 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -27,6 +27,7 @@ echo ${JOB_TYPE}
 mvn install -B -V \
   -DskipTests=true \
   -Dclirr.skip=true \
+  -Denforcer.skip=true \
   -Dmaven.javadoc.skip=true \
   -Dgcloud.download.skip=true \
   -T 1C
@@ -38,7 +39,7 @@ fi
 
 case ${JOB_TYPE} in
 test)
-    mvn test -B -Dclirr.skip=true
+    mvn test -B -Dclirr.skip=true -Denforcer.skip=true
     bash ${KOKORO_GFILE_DIR}/codecov.sh
     bash .kokoro/coerce_logs.sh
     ;;
@@ -57,4 +58,4 @@ clirr)
     ;;
 *)
     ;;
-esac
\ No newline at end of file
+esac
diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh
index 8e909db9..ccd3fe69 100755
--- a/.kokoro/dependencies.sh
+++ b/.kokoro/dependencies.sh
@@ -23,5 +23,9 @@ echo $JOB_TYPE
 
 export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
 
-mvn install -DskipTests=true -B -V
+# this should run maven enforcer
+mvn install -B -V \
+  -DskipTests=true \
+  -Dclirr.skip=true
+
 mvn -B dependency:analyze -DfailOnWarning=true
diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh
index b65eb9f9..8cccf565 100755
--- a/.kokoro/release/publish_javadoc.sh
+++ b/.kokoro/release/publish_javadoc.sh
@@ -33,7 +33,7 @@ python3 -m pip install gcp-docuploader
 # compile all packages
 mvn clean install -B -DskipTests=true
 
-NAME=google-http-client
+NAME=google-http-java-client
 VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
 
 # build the docs
diff --git a/docs/setup.md b/docs/setup.md
index d654e2ff..b184d006 100644
--- a/docs/setup.md
+++ b/docs/setup.md
@@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`:
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>libraries-bom</artifactId>
-      <version>2.7.1</version>
+      <version>2.9.0</version>
       <type>pom</type>
       <scope>import</scope>
      </dependency>
diff --git a/google-http-client-assembly/classpath-include b/google-http-client-assembly/classpath-include
index b7201881..c1bd8032 100644
--- a/google-http-client-assembly/classpath-include
+++ b/google-http-client-assembly/classpath-include
@@ -3,7 +3,6 @@
 	<classpathentry kind="lib" path="libs/google-http-client-appengine-${project.version}.jar" sourcepath="libs-sources/google-http-client-appengine-${project.version}-sources.jar"/>
 	<classpathentry kind="lib" path="libs/google-http-client-protobuf-${project.version}.jar" sourcepath="libs-sources/google-http-client-protobuf-${project.version}-sources.jar"/>
 	<classpathentry kind="lib" path="libs/google-http-client-gson-${project.version}.jar" sourcepath="libs-sources/google-http-client-gson-${project.version}-sources.jar"/>
-	<classpathentry kind="lib" path="libs/google-http-client-jackson-${project.version}.jar" sourcepath="libs-sources/google-http-client-jackson-${project.version}-sources.jar"/>
 	<classpathentry kind="lib" path="libs/google-http-client-jackson2-${project.version}.jar" sourcepath="libs-sources/google-http-client-jackson2-${project.version}-sources.jar"/>
 	<classpathentry kind="lib" path="libs/google-http-client-xml-${project.version}.jar" sourcepath="libs-sources/google-http-client-xml-${project.version}-sources.jar"/>
 	<classpathentry kind="lib" path="libs/commons-logging-${project.commons-logging.version}.jar" sourcepath="libs-sources/commons-logging-${project.commons-logging.version}-sources.jar"/>
diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java b/google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java
index 1f46eaad..4f7e18be 100644
--- a/google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java
+++ b/google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java
@@ -57,6 +57,9 @@ public class HttpStatusCodes {
   /** Status code for a resource that has temporarily moved to a new URI. */
   public static final int STATUS_CODE_TEMPORARY_REDIRECT = 307;
 
+  /** Status code for a resource that has permanently moved to a new URI. */
+  private static final int STATUS_CODE_PERMANENT_REDIRECT = 308;
+
   /** Status code for a request that could not be understood by the server. */
   public static final int STATUS_CODE_BAD_REQUEST = 400;
 
@@ -109,7 +112,7 @@ public class HttpStatusCodes {
 
   /**
    * Returns whether the given HTTP response status code is a redirect code {@code 301, 302, 303,
-   * 307}.
+   * 307, 308}.
    *
    * @since 1.11
    */
@@ -119,6 +122,7 @@ public class HttpStatusCodes {
       case HttpStatusCodes.STATUS_CODE_FOUND: // 302
       case HttpStatusCodes.STATUS_CODE_SEE_OTHER: // 303
       case HttpStatusCodes.STATUS_CODE_TEMPORARY_REDIRECT: // 307
+      case HttpStatusCodes.STATUS_CODE_PERMANENT_REDIRECT: // 308
         return true;
       default:
         return false;
diff --git a/synth.metadata b/synth.metadata
index 635b2ec0..9fb65ccc 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,5 +1,5 @@
 {
-  "updateTime": "2019-10-26T07:51:02.270792Z",
+  "updateTime": "2019-11-19T08:39:04.107173Z",
   "sources": [
     {
       "template": {


Test patch:
diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java
new file mode 100644
index 00000000..58b43f02
--- /dev/null
+++ b/google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * 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, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.google.api.client.http;
+
+import junit.framework.TestCase;
+
+/** Tests {@link HttpStatusCodes}. */
+public class HttpStatusCodesTest extends TestCase {
+
+  public void testIsRedirect_3xx() {
+    assertTrue(HttpStatusCodes.isRedirect(301));
+    assertTrue(HttpStatusCodes.isRedirect(302));
+    assertTrue(HttpStatusCodes.isRedirect(303));
+    assertTrue(HttpStatusCodes.isRedirect(307));
+    assertTrue(HttpStatusCodes.isRedirect(308));
+  }
+
+  public void testIsRedirect_non3xx() {
+    assertFalse(HttpStatusCodes.isRedirect(200));
+    assertFalse(HttpStatusCodes.isRedirect(401));
+    assertFalse(HttpStatusCodes.isRedirect(500));
+  }
+}