From d5effe81f5cb627d458929819914abf10086821a Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 2 Nov 2018 08:47:06 -0700 Subject: [PATCH 001/983] Remove deprecated BackOffPolicy interface (#506) * Remove deprecated BackOffPolicy interface It was scheduled to be removed in 1.18 (March 2014) * Add builder to removed deprecated classes --- clirr-ignored-differences.xml | 18 + .../google/api/client/http/BackOffPolicy.java | 74 --- .../client/http/ExponentialBackOffPolicy.java | 454 ------------------ .../google/api/client/http/HttpRequest.java | 57 +-- .../api/client/util/ExponentialBackOff.java | 4 +- .../http/ExponentialBackOffPolicyTest.java | 145 ------ .../api/client/http/HttpRequestTest.java | 215 +-------- 7 files changed, 23 insertions(+), 944 deletions(-) delete mode 100644 google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java delete mode 100644 google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java delete mode 100644 google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 898e94c20..775f12e7c 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -7,4 +7,22 @@ 8001 com/google/api/client/repackaged/** + + 7002 + com/google/api/client/http/HttpRequest + com.google.api.client.http.BackOffPolicy getBackOffPolicy() + + + 7002 + com/google/api/client/http/HttpRequest + com.google.api.client.http.HttpRequest setBackOffPolicy(com.google.api.client.http.BackOffPolicy) + + + 8001 + com/google/api/client/http/BackOffPolicy + + + 8001 + com/google/api/client/http/ExponentialBackOffPolicy* + diff --git a/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java deleted file mode 100644 index d06304011..000000000 --- a/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2011 Google Inc. - * - * 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 com.google.api.client.util.Beta; - -import java.io.IOException; - -/** - * {@link Beta}
- * Strategy interface to control back off between retry attempts. - * - * @since 1.7 - * @author Ravi Mistry - * @deprecated (scheduled to be removed in 1.18) Use {@link HttpBackOffUnsuccessfulResponseHandler} - * instead. - */ -@Deprecated -@Beta -public interface BackOffPolicy { - - /** - * Value indicating that no more retries should be made, see {@link #getNextBackOffMillis()}. - */ - public static final long STOP = -1L; - - /** - * Determines if back off is required based on the specified status code. - * - *

- * Implementations may want to back off on server or product-specific errors. - *

- * - * @param statusCode HTTP status code - */ - public boolean isBackOffRequired(int statusCode); - - /** - * Reset Back off counters (if any) in an implementation-specific fashion. - */ - public void reset(); - - /** - * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is - * returned, no retries should be made. - * - * This method should be used as follows: - * - *
-   *  long backoffTime = backoffPolicy.getNextBackoffMs();
-   *  if (backoffTime == BackoffPolicy.STOP) {
-   *    // Stop retrying.
-   *  } else {
-   *    // Retry after backoffTime.
-   *  }
-   *
- * - * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no - * more retries should be made - */ - public long getNextBackOffMillis() throws IOException; -} diff --git a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java deleted file mode 100644 index 90e8d0058..000000000 --- a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2011 Google Inc. - * - * 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 com.google.api.client.util.Beta; -import com.google.api.client.util.ExponentialBackOff; -import com.google.api.client.util.NanoClock; - -import java.io.IOException; - -/** - * {@link Beta}
- * Implementation of {@link BackOffPolicy} that increases the back off period for each retry attempt - * using a randomization function that grows exponentially. - * - *

- * {@link #getNextBackOffMillis()} is calculated using the following formula: - * - *

- * randomized_interval =
- *     retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
- * 
- * In other words {@link #getNextBackOffMillis()} will range between the randomization factor - * percentage below and above the retry interval. For example, using 2 seconds as the base retry - * interval and 0.5 as the randomization factor, the actual back off period used in the next retry - * attempt will be between 1 and 3 seconds. - *

- * - *

- * Note: max_interval caps the retry_interval and not the randomized_interval. - *

- * - *

- * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the - * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

- * - *

- * Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default - * multiplier is 1.5 and the default max_interval is 1 minute. For 10 requests the sequence will be - * (values in seconds) and assuming we go over the max_elapsed_time on the 10th request: - * - *

- * request#     retry_interval     randomized_interval
- *
- * 1             0.5                [0.25,   0.75]
- * 2             0.75               [0.375,  1.125]
- * 3             1.125              [0.562,  1.687]
- * 4             1.687              [0.8435, 2.53]
- * 5             2.53               [1.265,  3.795]
- * 6             3.795              [1.897,  5.692]
- * 7             5.692              [2.846,  8.538]
- * 8             8.538              [4.269, 12.807]
- * 9            12.807              [6.403, 19.210]
- * 10           19.210              {@link BackOffPolicy#STOP}
- * 
- *

- * - *

- * Implementation is not thread-safe. - *

- * - * @since 1.7 - * @author Ravi Mistry - * @deprecated (scheduled to be removed in 1.18). Use {@link HttpBackOffUnsuccessfulResponseHandler} - * with {@link ExponentialBackOff} instead. - */ -@Beta -@Deprecated -public class ExponentialBackOffPolicy implements BackOffPolicy { - - /** - * The default initial interval value in milliseconds (0.5 seconds). - */ - public static final int DEFAULT_INITIAL_INTERVAL_MILLIS = - ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS; - - /** - * The default randomization factor (0.5 which results in a random period ranging between 50% - * below and 50% above the retry interval). - */ - public static final double DEFAULT_RANDOMIZATION_FACTOR = - ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR; - - /** - * The default multiplier value (1.5 which is 50% increase per back off). - */ - public static final double DEFAULT_MULTIPLIER = ExponentialBackOff.DEFAULT_MULTIPLIER; - - /** - * The default maximum back off time in milliseconds (1 minute). - */ - public static final int DEFAULT_MAX_INTERVAL_MILLIS = - ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS; - - /** - * The default maximum elapsed time in milliseconds (15 minutes). - */ - public static final int DEFAULT_MAX_ELAPSED_TIME_MILLIS = - ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS; - - /** Exponential backoff. */ - private final ExponentialBackOff exponentialBackOff; - - /** - * Creates an instance of ExponentialBackOffPolicy using default values. To override the defaults - * use {@link #builder}. - * - */ - public ExponentialBackOffPolicy() { - this(new Builder()); - } - - /** - * @param builder builder - * - * @since 1.14 - */ - protected ExponentialBackOffPolicy(Builder builder) { - exponentialBackOff = builder.exponentialBackOffBuilder.build(); - } - - /** - * Determines if back off is required based on the specified status code. - * - *

- * The idea is that the servers are only temporarily unavailable, and they should not be - * overwhelmed when they are trying to get back up. - *

- * - *

- * The default implementation requires back off for 500 and 503 status codes. Subclasses may - * override if different status codes are required. - *

- */ - public boolean isBackOffRequired(int statusCode) { - switch (statusCode) { - case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: // 500 - case HttpStatusCodes.STATUS_CODE_SERVICE_UNAVAILABLE: // 503 - return true; - default: - return false; - } - } - - /** - * Sets the interval back to the initial retry interval and restarts the timer. - */ - public final void reset() { - exponentialBackOff.reset(); - } - - /** - * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is - * returned, no retries should be made. - * - *

- * This method calculates the next back off interval using the formula: randomized_interval = - * retry_interval +/- (randomization_factor * retry_interval) - *

- * - *

- * Subclasses may override if a different algorithm is required. - *

- * - * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no - * more retries should be made - */ - public long getNextBackOffMillis() throws IOException { - return exponentialBackOff.nextBackOffMillis(); - } - - /** - * Returns the initial retry interval in milliseconds. - */ - public final int getInitialIntervalMillis() { - return exponentialBackOff.getInitialIntervalMillis(); - } - - /** - * Returns the randomization factor to use for creating a range around the retry interval. - * - *

- * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% - * above the retry interval. - *

- */ - public final double getRandomizationFactor() { - return exponentialBackOff.getRandomizationFactor(); - } - - /** - * Returns the current retry interval in milliseconds. - */ - public final int getCurrentIntervalMillis() { - return exponentialBackOff.getCurrentIntervalMillis(); - } - - /** - * Returns the value to multiply the current interval with for each retry attempt. - */ - public final double getMultiplier() { - return exponentialBackOff.getMultiplier(); - } - - /** - * Returns the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. - */ - public final int getMaxIntervalMillis() { - return exponentialBackOff.getMaxIntervalMillis(); - } - - /** - * Returns the maximum elapsed time in milliseconds. - * - *

- * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the - * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

- */ - public final int getMaxElapsedTimeMillis() { - return exponentialBackOff.getMaxElapsedTimeMillis(); - } - - /** - * Returns the elapsed time in milliseconds since an {@link ExponentialBackOffPolicy} instance is - * created and is reset when {@link #reset()} is called. - * - *

- * The elapsed time is computed using {@link System#nanoTime()}. - *

- */ - public final long getElapsedTimeMillis() { - return exponentialBackOff.getElapsedTimeMillis(); - } - - /** - * Returns an instance of a new builder. - */ - public static Builder builder() { - return new Builder(); - } - - /** - * {@link Beta}
- * Builder for {@link ExponentialBackOffPolicy}. - * - *

- * Implementation is not thread-safe. - *

- * - * @since 1.7 - */ - @Beta - @Deprecated - public static class Builder { - - /** Exponential back-off builder. */ - final ExponentialBackOff.Builder exponentialBackOffBuilder = new ExponentialBackOff.Builder(); - - protected Builder() { - } - - /** Builds a new instance of {@link ExponentialBackOffPolicy}. */ - public ExponentialBackOffPolicy build() { - return new ExponentialBackOffPolicy(this); - } - - /** - * Returns the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. - */ - public final int getInitialIntervalMillis() { - return exponentialBackOffBuilder.getInitialIntervalMillis(); - } - - /** - * Sets the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. - * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public Builder setInitialIntervalMillis(int initialIntervalMillis) { - exponentialBackOffBuilder.setInitialIntervalMillis(initialIntervalMillis); - return this; - } - - /** - * Returns the randomization factor to use for creating a range around the retry interval. The - * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. - * - *

- * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% - * above the retry interval. - *

- * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public final double getRandomizationFactor() { - return exponentialBackOffBuilder.getRandomizationFactor(); - } - - /** - * Sets the randomization factor to use for creating a range around the retry interval. The - * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range - * {@code 0 <= randomizationFactor < 1}. - * - *

- * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% - * above the retry interval. - *

- * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public Builder setRandomizationFactor(double randomizationFactor) { - exponentialBackOffBuilder.setRandomizationFactor(randomizationFactor); - return this; - } - - /** - * Returns the value to multiply the current interval with for each retry attempt. The default - * value is {@link #DEFAULT_MULTIPLIER}. - */ - public final double getMultiplier() { - return exponentialBackOffBuilder.getMultiplier(); - } - - /** - * Sets the value to multiply the current interval with for each retry attempt. The default - * value is {@link #DEFAULT_MULTIPLIER}. Must be {@code >= 1}. - * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public Builder setMultiplier(double multiplier) { - exponentialBackOffBuilder.setMultiplier(multiplier); - return this; - } - - /** - * Returns the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. - */ - public final int getMaxIntervalMillis() { - return exponentialBackOffBuilder.getMaxIntervalMillis(); - } - - /** - * Sets the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. - * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public Builder setMaxIntervalMillis(int maxIntervalMillis) { - exponentialBackOffBuilder.setMaxIntervalMillis(maxIntervalMillis); - return this; - } - - /** - * Returns the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. - * - *

- * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past - * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

- */ - public final int getMaxElapsedTimeMillis() { - return exponentialBackOffBuilder.getMaxElapsedTimeMillis(); - } - - /** - * Sets the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. - * - *

- * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past - * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

- * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- */ - public Builder setMaxElapsedTimeMillis(int maxElapsedTimeMillis) { - exponentialBackOffBuilder.setMaxElapsedTimeMillis(maxElapsedTimeMillis); - return this; - } - - /** - * Returns the nano clock. - * - * @since 1.14 - */ - public final NanoClock getNanoClock() { - return exponentialBackOffBuilder.getNanoClock(); - } - - /** - * Sets the nano clock ({@link NanoClock#SYSTEM} by default). - * - *

- * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

- * - * @since 1.14 - */ - public Builder setNanoClock(NanoClock nanoClock) { - exponentialBackOffBuilder.setNanoClock(nanoClock); - return this; - } - } -} diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index d75b7fa2f..cb9e91e7e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -174,13 +174,6 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { /** HTTP content encoding or {@code null} for none. */ private HttpEncoding encoding; - /** - * The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. - */ - @Deprecated - @Beta - private BackOffPolicy backOffPolicy; - /** Whether to automatically follow redirects ({@code true} by default). */ private boolean followRedirects = true; @@ -305,37 +298,6 @@ public HttpRequest setEncoding(HttpEncoding encoding) { return this; } - /** - * {@link Beta}
- * Returns the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. - * - * @since 1.7 - * @deprecated (scheduled to be removed in 1.18). - * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new - * {@link HttpBackOffUnsuccessfulResponseHandler} instead. - */ - @Deprecated - @Beta - public BackOffPolicy getBackOffPolicy() { - return backOffPolicy; - } - - /** - * {@link Beta}
- * Sets the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. - * - * @since 1.7 - * @deprecated (scheduled to be removed in 1.18). Use - * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new - * {@link HttpBackOffUnsuccessfulResponseHandler} instead. - */ - @Deprecated - @Beta - public HttpRequest setBackOffPolicy(BackOffPolicy backOffPolicy) { - this.backOffPolicy = backOffPolicy; - return this; - } - /** * Returns the limit to the content size that will be logged during {@link #execute()}. * @@ -844,10 +806,8 @@ public HttpResponse execute() throws IOException { boolean retryRequest = false; Preconditions.checkArgument(numRetries >= 0); int retriesRemaining = numRetries; - if (backOffPolicy != null) { - // Reset the BackOffPolicy at the start of each execute. - backOffPolicy.reset(); - } + // TODO(chingor): notify error handlers that the request is about to start + HttpResponse response = null; IOException executeException; @@ -1020,19 +980,6 @@ public HttpResponse execute() throws IOException { if (handleRedirect(response.getStatusCode(), response.getHeaders())) { // The unsuccessful request's error could not be handled and it is a redirect request. errorHandled = true; - } else if (retryRequest && backOffPolicy != null - && backOffPolicy.isBackOffRequired(response.getStatusCode())) { - // The unsuccessful request's error could not be handled and should be backed off - // before retrying - long backOffTime = backOffPolicy.getNextBackOffMillis(); - if (backOffTime != BackOffPolicy.STOP) { - try { - sleeper.sleep(backOffTime); - } catch (InterruptedException exception) { - // ignore - } - errorHandled = true; - } } } // A retry is required if the error was successfully handled or if it is a redirect diff --git a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java index c949b6f23..f132c6a2e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java @@ -120,7 +120,7 @@ public class ExponentialBackOff implements BackOff { private final int maxIntervalMillis; /** - * The system time in nanoseconds. It is calculated when an ExponentialBackOffPolicy instance is + * The system time in nanoseconds. It is calculated when an ExponentialBackOff instance is * created and is reset when {@link #reset()} is called. */ long startTimeNanos; @@ -135,7 +135,7 @@ public class ExponentialBackOff implements BackOff { private final NanoClock nanoClock; /** - * Creates an instance of ExponentialBackOffPolicy using default values. + * Creates an instance of ExponentialBackOff using default values. * *

* To override the defaults use {@link Builder}. diff --git a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java deleted file mode 100644 index fc9dc9bd1..000000000 --- a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) 2011 Google Inc. - * - * 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 com.google.api.client.util.NanoClock; - -import junit.framework.TestCase; - -/** - * Tests {@link ExponentialBackOffPolicy}. - * - * @author Ravi Mistry - */ -@Deprecated -public class ExponentialBackOffPolicyTest extends TestCase { - - public ExponentialBackOffPolicyTest(String name) { - super(name); - } - - public void testConstructor() { - ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy(); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, - backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, - backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); - assertEquals( - ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, - backOffPolicy.getMaxElapsedTimeMillis()); - } - - public void testBuilder() { - ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder().build(); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, - backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, - backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); - assertEquals( - ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, - backOffPolicy.getMaxElapsedTimeMillis()); - - int testInitialInterval = 1; - double testRandomizationFactor = 0.1; - double testMultiplier = 5.0; - int testMaxInterval = 10; - int testMaxElapsedTime = 900000; - - backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); - assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); - assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); - assertEquals(testMultiplier, backOffPolicy.getMultiplier()); - assertEquals(testMaxInterval, backOffPolicy.getMaxIntervalMillis()); - assertEquals(testMaxElapsedTime, backOffPolicy.getMaxElapsedTimeMillis()); - } - - public void testBackOff() throws Exception { - int testInitialInterval = 500; - double testRandomizationFactor = 0.1; - double testMultiplier = 2.0; - int testMaxInterval = 5000; - int testMaxElapsedTime = 900000; - - ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); - int[] expectedResults = {500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000}; - for (int expected : expectedResults) { - assertEquals(expected, backOffPolicy.getCurrentIntervalMillis()); - // Assert that the next back off falls in the expected range. - int minInterval = (int) (expected - (testRandomizationFactor * expected)); - int maxInterval = (int) (expected + (testRandomizationFactor * expected)); - long actualInterval = backOffPolicy.getNextBackOffMillis(); - assertTrue(minInterval <= actualInterval && actualInterval <= maxInterval); - } - } - - static class MyNanoClock implements NanoClock { - - private int i = 0; - private long startSeconds; - - MyNanoClock() { - } - - MyNanoClock(long startSeconds) { - this.startSeconds = startSeconds; - } - - public long nanoTime() { - return (startSeconds + i++) * 1000000000; - } - } - - public void testGetElapsedTimeMillis() { - ExponentialBackOffPolicy backOffPolicy = - new ExponentialBackOffPolicy.Builder().setNanoClock(new MyNanoClock()).build(); - long elapsedTimeMillis = backOffPolicy.getElapsedTimeMillis(); - assertEquals("elapsedTimeMillis=" + elapsedTimeMillis, 1000, elapsedTimeMillis); - } - - public void testBackOffOverflow() throws Exception { - int testInitialInterval = Integer.MAX_VALUE / 2; - double testMultiplier = 2.1; - int testMaxInterval = Integer.MAX_VALUE; - ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .build(); - backOffPolicy.getNextBackOffMillis(); - // Assert that when an overflow is possible the current interval is set to the max interval. - assertEquals(testMaxInterval, backOffPolicy.getCurrentIntervalMillis()); - } -} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index 53a3d8842..f064b4802 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -100,6 +100,7 @@ public void testNotSupportedByDefault() throws Exception { static class MockExecutor implements Executor { private Runnable runnable; + public void actuallyRun() { runnable.run(); } @@ -109,39 +110,6 @@ public void execute(Runnable command) { } } - @Deprecated - static private class MockBackOffPolicy implements BackOffPolicy { - - int backOffCalls; - int resetCalls; - boolean returnBackOffStop; - - MockBackOffPolicy() { - } - - public boolean isBackOffRequired(int statusCode) { - switch (statusCode) { - case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: // 500 - case HttpStatusCodes.STATUS_CODE_SERVICE_UNAVAILABLE: // 503 - return true; - default: - return false; - } - } - - public void reset() { - resetCalls++; - } - - public long getNextBackOffMillis() { - backOffCalls++; - if (returnBackOffStop) { - return BackOffPolicy.STOP; - } - return 0; - } - } - /** * Transport used for testing the redirection logic in HttpRequest. */ @@ -210,29 +178,6 @@ public void test301Redirect() throws Exception { Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); } - @Deprecated - public void test301RedirectWithUnsuccessfulResponseHandled() throws Exception { - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - // Set up RedirectTransport to redirect on the first request and then return success. - RedirectTransport fakeTransport = new RedirectTransport(); - HttpRequest request = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://gmail.com")); - request.setUnsuccessfulResponseHandler(handler); - request.setBackOffPolicy(backOffPolicy); - HttpResponse resp = request.execute(); - - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - // Assert that the redirect logic was not invoked because the response handler could handle the - // request. The request url should be the original http://gmail.com - Assert.assertEquals("http://gmail.com", request.getUrl().toString()); - // Assert that the backoff policy was not invoked because the response handler could handle the - // request. - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Exception { MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); @@ -256,30 +201,6 @@ public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Excep Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void test301RedirectWithUnsuccessfulResponseNotHandled() throws Exception { - // Create an Unsuccessful response handler that always returns false. - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - // Set up RedirectTransport to redirect on the first request and then return success. - RedirectTransport fakeTransport = new RedirectTransport(); - HttpRequest request = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://gmail.com")); - request.setUnsuccessfulResponseHandler(handler); - request.setBackOffPolicy(backOffPolicy); - HttpResponse resp = request.execute(); - - Assert.assertEquals(200, resp.getStatusCode()); - // Assert that the redirect logic was invoked because the response handler could not handle the - // request. The request url should have changed from http://gmail.com to http://google.com - Assert.assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - // Assert that the backoff policy is never invoked (except to reset) because the response - // handler returned false. - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); - } - public void test301RedirectWithBackOffUnsuccessfulResponseNotHandled() throws Exception { // Create an Unsuccessful response handler that always returns false. MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); @@ -647,26 +568,6 @@ public void testAbnormalResponseHandlerWithNoBackOff() throws Exception { Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testAbnormalResponseHandlerWithBackOff() throws Exception { - FailThenSuccessBackoffTransport fakeTransport = - new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - HttpResponse resp = req.execute(); - - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -684,26 +585,6 @@ public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testBackOffSingleCall() throws Exception { - FailThenSuccessBackoffTransport fakeTransport = - new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - HttpResponse resp = req.execute(); - - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -721,27 +602,6 @@ public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testBackOffMultipleCalls() throws Exception { - int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - HttpResponse resp = req.execute(); - - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(callsBeforeSuccess, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( @@ -760,30 +620,6 @@ public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testBackOffCallsBeyondRetryLimit() throws Exception { - int callsBeforeSuccess = 11; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setNumberOfRetries(callsBeforeSuccess - 1); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - try { - req.execute(); - fail("expected HttpResponseException"); - } catch (HttpResponseException e) { - } - Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(callsBeforeSuccess - 1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( @@ -805,29 +641,6 @@ public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Excepti Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testBackOffUnRecognizedStatusCode() throws Exception { - FailThenSuccessBackoffTransport fakeTransport = - new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - try { - req.execute(); - } catch (HttpResponseException e) { - } - - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - // The BackOffPolicy should not be called since it does not support 401 status codes. - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); @@ -848,32 +661,6 @@ public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Except Assert.assertTrue(handler.isCalled()); } - @Deprecated - public void testBackOffStop() throws Exception { - int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); - MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); - MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); - backOffPolicy.returnBackOffStop = true; - - HttpRequest req = - fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); - req.setUnsuccessfulResponseHandler(handler); - req.setBackOffPolicy(backOffPolicy); - try { - req.execute(); - } catch (HttpResponseException e) { - } - - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - // The BackOffPolicy should be called only once and then it should return BackOffPolicy.STOP - // should stop all back off retries. - Assert.assertEquals(1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); - } - public void testBackOffUnsucessfulResponseStop() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( From b3aea0fa8ff815f349d8e36c7a313362a1e44f19 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 2 Nov 2018 14:35:08 -0700 Subject: [PATCH 002/983] Set the version of the jarjar-maven-plugin in pluginManagement (#515) --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b710eb0d..cb95ddfb9 100644 --- a/pom.xml +++ b/pom.xml @@ -297,7 +297,11 @@ 1.6 - + + org.sonatype.plugins + jarjar-maven-plugin + 1.9 + org.apache.maven.plugins maven-source-plugin From f4c456726233a2f917b2ee0a8ca660e802f17b76 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 2 Nov 2018 18:37:17 -0400 Subject: [PATCH 003/983] guava is not provided (#508) --- google-http-client/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0a5996d24..f5ea5497c 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -142,7 +142,6 @@ com.google.guava guava - provided com.google.guava From 0a95dd0d626a34b5127d2f3c78dfeef3cd555b4b Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 6 Nov 2018 15:15:15 -0800 Subject: [PATCH 004/983] Upgrade maven-javadoc-plugin to 3.0.1 (#519) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb95ddfb9..f480cc106 100644 --- a/pom.xml +++ b/pom.xml @@ -318,7 +318,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.0.1 attach-javadocs From e1c40f6127bf7b04bdc83b877156203a3194d7e3 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 6 Nov 2018 15:16:44 -0800 Subject: [PATCH 005/983] Add google-http-client-bom artifact (#517) * Add initial pom.xml and README for bom * Add the bom in the dependencyManagement section of the parent pom * artifact poms do not need special release info * PR comments * Put dependencyManagement section back in parent pom --- google-http-client-bom/README.md | 28 ++++++++ google-http-client-bom/pom.xml | 113 +++++++++++++++++++++++++++++++ pom.xml | 3 +- versions.txt | 1 + 4 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 google-http-client-bom/README.md create mode 100644 google-http-client-bom/pom.xml diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md new file mode 100644 index 000000000..568a067db --- /dev/null +++ b/google-http-client-bom/README.md @@ -0,0 +1,28 @@ +# Google HTTP Client Library Bill of Materials + +The `google-http-client-bom` modules is a pom that can be used to import consistent +versions of `google-http-client` components plus its dependencies. + +To use it in Maven, add the following to your `pom.xml`: + +[//]: # ({x-version-update-start:google-http-client-bom:released}) +```xml + + + + com.google.http-client + google-http-client-bom + 1.26.0 + pom + import + + + +``` +[//]: # ({x-version-update-end}) + +## License + +Apache 2.0 - See [LICENSE] for more information. + +[LICENSE]: https://github.com/googleapis/google-http-java-client/blob/master/LICENSE diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml new file mode 100644 index 000000000..a71e63ae9 --- /dev/null +++ b/google-http-client-bom/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + com.google.http-client + google-http-client-bom + 1.26.1-SNAPSHOT + pom + + Google HTTP Client Library for Java BOM + https://github.com/googleapis/google-http-java-client/tree/master/google-http-client-bom + + BOM for Google HTTP Client Library for Java + + + + Google LLC + + + + scm:git:https://github.com/googleapis/google-http-java-client.git + scm:git:git@github.com:googleapis/google-http-java-client.git + https://github.com/googleapis/google-http-java-client + + + + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + github-pages-site + Deployment through GitHub's site deployment plugin + site/google-cloud-bom + + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.http-client + google-http-client + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-android + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-appengine + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-assembly + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-findbugs + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-gson + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-jackson + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-jackson2 + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-jdo + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-protobuf + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-test + 1.26.1-SNAPSHOT + + + com.google.http-client + google-http-client-xml + 1.26.1-SNAPSHOT + + + + diff --git a/pom.xml b/pom.xml index f480cc106..ea6bdf3d1 100644 --- a/pom.xml +++ b/pom.xml @@ -66,6 +66,7 @@ google-http-client-jackson google-http-client-jackson2 google-http-client-jdo + google-http-client-xml google-http-client-findbugs google-http-client-test @@ -73,7 +74,7 @@ samples/googleplus-simple-cmdline-sample - google-http-client-xml + google-http-client-bom diff --git a/versions.txt b/versions.txt index 61355d7cd..6983f416e 100644 --- a/versions.txt +++ b/versions.txt @@ -2,6 +2,7 @@ # module:released-version:current-version google-http-client:1.26.0:1.26.1-SNAPSHOT +google-http-client-bom:1.26.0:1.26.1-SNAPSHOT google-http-client-parent:1.26.0:1.26.1-SNAPSHOT google-http-client-android:1.26.0:1.26.1-SNAPSHOT google-http-client-android-test:1.26.0:1.26.1-SNAPSHOT From 287cca15a34a2d758b4125c4a37e4ee38d2bdbdd Mon Sep 17 00:00:00 2001 From: Gerald Madlmayr Date: Wed, 7 Nov 2018 00:17:42 +0100 Subject: [PATCH 006/983] Allow Enums in DataMaps (#505) * Fixes bug in #475, add relevant Tests (#504) * Adding more Tests for XML parsing/mapping (#504) * Add more list tests (#504) * Cleanup documentation of tests (#504) * Adding asserts in GenericXmlTests (#504) * Try-with-resources Java6 Style (#504) * Replace Heise feed with Custom feed, set encoding for reading file (#504) * Use Guava for reading resource file (#504) * delete commented out code (#504) * Improve JavaDoc of Tests (#504) * Change method of asserting enums (#504) * Minor fixes in JavaDoc (#504) * Rename Test methods (#504) * Fix Typo in JavaDoc (#504) * Remove irrelevant annotation, clean up test case (#504) * Fix incorrect/missing annotations, improve instanceof annotations (#504) --- .../java/com/google/api/client/xml/Xml.java | 1 + .../com/google/api/client/xml/AtomTest.java | 270 +++++++- .../api/client/xml/GenericXmlListTest.java | 467 ++++++++++++++ .../google/api/client/xml/GenericXmlTest.java | 392 +++++++++++- .../google/api/client/xml/XmlEnumTest.java | 197 ++++-- .../google/api/client/xml/XmlListTest.java | 410 ++++++++++++ .../xml/XmlNamespaceDictionaryTest.java | 102 ++- .../com/google/api/client/xml/XmlTest.java | 605 ++++++++++++++++-- .../src/test/resources/sample-atom.xml | 1 + .../com/google/api/client/util/DataMap.java | 1 - 10 files changed, 2242 insertions(+), 204 deletions(-) create mode 100644 google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java create mode 100644 google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java create mode 100644 google-http-client-xml/src/test/resources/sample-atom.xml diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java index a0f0b95d2..935eee30b 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java @@ -94,6 +94,7 @@ public static XmlPullParser createParser() throws XmlPullParserException { /** * Shows a debug string representation of an element data object of key/value pairs. + * *

* It will make up something for the element name and XML namespaces. If those are known, it is * better to use {@link XmlNamespaceDictionary#toStringOf(String, Object)}. diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java index 65515f321..84f4bac91 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java @@ -14,26 +14,56 @@ package com.google.api.client.xml; -import com.google.api.client.http.HttpHeaders; -import com.google.api.client.xml.atom.Atom; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.StringReader; +import java.net.URL; import java.util.List; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.xmlpull.v1.XmlPullParser; +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.xml.atom.AtomFeedParser; +import com.google.api.client.util.Charsets; +import com.google.api.client.util.Key; +import com.google.api.client.xml.atom.AbstractAtomFeedParser; +import com.google.api.client.xml.atom.Atom; +import com.google.common.io.Resources; /** * Tests {@link Atom}. * * @author Yaniv Inbar + * @author Gerald Madlmayr */ -public class AtomTest extends TestCase { +public class AtomTest { - @SuppressWarnings("unchecked") + + private static final String SAMPLE_FEED = " Example Feed 2003-12-13T18:31:02Z " + + "John Doe urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6" + + " Atom-Powered Robots Run Amok urn:uuid:1225c695-cfb8-4ebb-aaaa" + + "-80da344efa6a 2003-12-13T18:30:02Z

Some text" + + ". Atom-Powered Robots Run Amok! urn:uuid:1225c695-cfb8-4ebb" + + "-aaaa-80da344efa62 2003-12-13T18:32:02Z Some " + + "other text. "; + + /** + * Test for checking the Slug Header + */ + @Test public void testSetSlugHeader() { HttpHeaders headers = new HttpHeaders(); assertNull(headers.get("Slug")); subtestSetSlugHeader(headers, "value", "value"); - subtestSetSlugHeader( - headers, " !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~", " !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~"); + subtestSetSlugHeader(headers, " !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~", " !\"#$&'()*+,-./:;" + + "<=>?@[\\]^_`{|}~"); subtestSetSlugHeader(headers, "%D7%99%D7%A0%D7%99%D7%91", "יניב"); subtestSetSlugHeader(headers, null, null); } @@ -44,8 +74,230 @@ public void subtestSetSlugHeader(HttpHeaders headers, String expectedValue, Stri if (value == null) { assertNull(headers.get("Slug")); } else { - Assert.assertArrayEquals( - new String[] {expectedValue}, ((List) headers.get("Slug")).toArray()); + Assert.assertArrayEquals(new String[]{expectedValue}, + ((List) headers.get("Slug")).toArray()); } } + + /** + * This tests parses a simple Atom Feed given as a constant. All elements are asserted, to see if + * everything works fine. For parsing a dedicated {@link AtomFeedParser} is used. + * + * The purpose of this test is to test the {@link AtomFeedParser#parseFeed} and {@link + * AtomFeedParser#parseNextEntry} and see if the mapping of the XML element to the entity classes + * is done correctly. + */ + @Test + public void testAtomFeedUsingCustomizedParser() throws Exception { + XmlPullParser parser = Xml.createParser(); + // Wired. Both, the InputStream for the FeedParser and the XPP need to be set (?) + parser.setInput(new StringReader(SAMPLE_FEED)); + InputStream stream = new ByteArrayInputStream(SAMPLE_FEED.getBytes()); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + AbstractAtomFeedParser atomParser = new AtomFeedParser(namespaceDictionary, + parser, stream, Feed.class, FeedEntry.class); + + Feed feed = (Feed) atomParser.parseFeed(); + assertEquals("John Doe", feed.author.name); + assertEquals("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", feed.id); + assertEquals("2003-12-13T18:31:02Z", feed.updated); + assertEquals("Example Feed", feed.title); + assertEquals("http://example.org/", feed.link.href); + + FeedEntry entry1 = (FeedEntry) atomParser.parseNextEntry(); + //assertNotNull(feed.entry); + assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", entry1.id); + assertEquals("2003-12-13T18:30:02Z", entry1.updated); + assertEquals("Some text.", entry1.summary); + assertEquals("Atom-Powered Robots Run Amok", entry1.title); + assertEquals("http://example.org/2003/12/13/atom03", entry1.link.href); + + FeedEntry entry2 = (FeedEntry) atomParser.parseNextEntry(); + assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa62", entry2.id); + assertEquals("2003-12-13T18:32:02Z", entry2.updated); + assertEquals("Some other text.", entry2.summary); + assertEquals("Atom-Powered Robots Run Amok!", entry2.title); + assertEquals("http://example.org/2003/12/13/atom02", entry2.link.href); + + FeedEntry entry3 = (FeedEntry) atomParser.parseNextEntry(); + assertNull(entry3); + + atomParser.close(); + } + + /** + * Tests of a constant string to see if the data structure can be parsed using the standard + * method {@link Xml#parseElement} + * + * The purpose of this test is to assert, if the parsed elements are correctly parsed using a + * {@link AtomFeedParser}. + */ + @Test + public void testAtomFeedUsingStandardParser() throws Exception { + Feed feed = new Feed(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SAMPLE_FEED)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, feed, namespaceDictionary, null); + assertNotNull(feed); + assertEquals(2, feed.entry.length); + + assertEquals("John Doe", feed.author.name); + assertEquals("urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", feed.id); + assertEquals("2003-12-13T18:31:02Z", feed.updated); + assertEquals("Example Feed", feed.title); + assertEquals("http://example.org/", feed.link.href); + + FeedEntry entry1 = feed.entry[0]; + //assertNotNull(feed.entry); + assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", entry1.id); + assertEquals("2003-12-13T18:30:02Z", entry1.updated); + assertEquals("Some text.", entry1.summary); + assertEquals("Atom-Powered Robots Run Amok", entry1.title); + assertEquals("http://example.org/2003/12/13/atom03", entry1.link.href); + + FeedEntry entry2 = feed.entry[1]; + assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa62", entry2.id); + assertEquals("2003-12-13T18:32:02Z", entry2.updated); + assertEquals("Some other text.", entry2.summary); + assertEquals("Atom-Powered Robots Run Amok!", entry2.title); + assertEquals("http://example.org/2003/12/13/atom02", entry2.link.href); + } + + /** + * Read an XML ATOM Feed from a file to a string and assert if all the {@link FeedEntry}s are + * present. No detailed assertion of each element + * + * The purpose of this test is to read a bunch of elements which contain additional elements + * (HTML in this case), that are not part of the {@link FeedEntry} and to see if there is an issue + * if we parse some more entries. + */ + @Test + public void testSampleFeedParser() throws Exception { + XmlPullParser parser = Xml.createParser(); + URL url = Resources.getResource("sample-atom.xml"); + String read = Resources.toString(url, Charsets.UTF_8); + parser.setInput(new StringReader(read)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + AbstractAtomFeedParser atomParser = new AtomFeedParser(namespaceDictionary, + parser, new ByteArrayInputStream(read.getBytes()), Feed.class, FeedEntry.class); + Feed feed = (Feed) atomParser.parseFeed(); + assertNotNull(feed); + + // validate feed 1 -- Long Content + FeedEntry entry = (FeedEntry) atomParser.parseNextEntry(); + assertNotNull(entry); + assertNotNull(entry.id); + assertNotNull(entry.title); + assertNotNull(entry.summary); + assertNotNull(entry.link); + assertNotNull(entry.updated); + assertNotNull(entry.content); + assertEquals(5000, entry.content.length()); + + // validate feed 2 -- Special Charts + entry = (FeedEntry) atomParser.parseNextEntry(); + assertNotNull(entry); + assertNotNull(entry.id); + assertNotNull(entry.title); + assertNotNull(entry.summary); + assertNotNull(entry.link); + assertNotNull(entry.updated); + assertNotNull(entry.content); + assertEquals("aäb cde fgh ijk lmn oöpoöp tuü vwx yz AÄBC DEF GHI JKL MNO ÖPQ RST UÜV WXYZ " + + "!\"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¼× {} aäb cde fgh ijk lmn oöp qrsß tuü vwx yz " + + "AÄBC DEF GHI JKL MNO", entry.content); + + // validate feed 3 -- Missing Content + entry = (FeedEntry) atomParser.parseNextEntry(); + assertNotNull(entry); + assertNotNull(entry.id); + assertNotNull(entry.title); + assertNotNull(entry.summary); + assertNotNull(entry.link); + assertNotNull(entry.updated); + assertNull(entry.content); + + // validate feed 4 -- Missing Updated + entry = (FeedEntry) atomParser.parseNextEntry(); + assertNotNull(entry); + assertNotNull(entry.id); + assertNotNull(entry.title); + assertNotNull(entry.summary); + assertNotNull(entry.link); + assertNull(entry.updated); + assertNotNull(entry.content); + + // validate feed 5 + entry = (FeedEntry) atomParser.parseNextEntry(); + assertNotNull(entry); + assertNotNull(entry.id); + assertNotNull(entry.title); + assertNull(entry.summary); + assertNotNull(entry.link); + assertNotNull(entry.updated); + assertNotNull(entry.content); + + // validate feed 6 + entry = (FeedEntry) atomParser.parseNextEntry(); + assertNull(entry); + + atomParser.close(); + } + + /** + * Feed Element to map the XML to + */ + public static class Feed { + @Key + private String title; + @Key + private Link link; + @Key + private String updated; + @Key + private Author author; + @Key + private String id; + @Key + private FeedEntry[] entry; + } + + /** + * Author Element as part of the {@link Feed} Element to map the XML to. As this is sub-element, + * this needs to be public. + */ + public static class Author { + @Key + private String name; + } + + /** + * Link Element as part of the {@link Feed} Element to map the XML to. As this is sub-element, + * this needs to be public. + */ + public static class Link { + @Key("@href") + private String href; + } + + /** + * Entry Element to cover the Entries of a Atom {@link Feed}. As this is sub-element, + * this needs to be public. + */ + public static class FeedEntry { + @Key + private String title; + @Key + private Link link; + @Key + private String updated; + @Key + private String summary; + @Key + private String id; + @Key + private String content; + } } + diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java new file mode 100644 index 000000000..6d2ec0769 --- /dev/null +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java @@ -0,0 +1,467 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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.xml; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.Collection; +import org.junit.Test; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlSerializer; +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; + +/** + * Tests List and Arrays of {@link GenericXml}. + * + * Tests are copies from {@link XmlListTest}, but the dedicated classes are derived from {@link + * GenericXml} + * + * + * @author Gerald Madlmayr + */ + +public class GenericXmlListTest { + + + private static final String MULTI_TYPE_WITH_CLASS_TYPE = "content1rep10" + + "rep11value1content2rep20rep21" + + "value2content3rep30rep31" + + "value3"; + private static final String MULTIPLE_STRING_ELEMENT = "rep1rep2"; + private static final String MULTIPLE_INTEGER_ELEMENT = "12"; + private static final String ARRAY_TYPE_WITH_PRIMITIVE_ADDED_NESTED = "1something2"; + private static final String MULTIPLE_ENUM_ELEMENT = "ENUM_1ENUM_2"; + private static final String COLLECTION_OF_ARRAY = "abcd"; + + /** + * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. + */ + @SuppressWarnings("unchecked") + @Test + public void testParseArrayTypeWithClassType() throws Exception { + ArrayWithClassTypeGeneric xml = new ArrayWithClassTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNotNull(xml.rep); + XmlTest.AnyType[] rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.length); + ArrayList> elem0 = (ArrayList>) rep[0].elem; + assertEquals(1, elem0.size()); + assertEquals("content1", elem0.get(0) + .get("text()")); + ArrayList> elem1 = (ArrayList>) rep[1].elem; + assertEquals(1, elem1.size()); + assertEquals("content2", elem1.get(0) + .get("text()")); + ArrayList> elem2 = (ArrayList>) rep[2].elem; + assertEquals(1, elem2.size()); + assertEquals("content3", elem2.get(0) + .get("text()")); + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link XmlTest.AnyType} + * objects. + */ + @Test + public void testParseCollectionWithClassType() throws Exception { + CollectionWithClassTypeGeneric xml = new CollectionWithClassTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNotNull(xml.rep); + Collection rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. + */ + @SuppressWarnings("unchecked") + @Test + public void testParseMultiGenericWithClassType() throws Exception { + MultiGenericWithClassType xml = new MultiGenericWithClassType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + GenericXml[] rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.length); + assertEquals("text()", ((ArrayMap) (rep[0].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content1", ((ArrayMap) (rep[0].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals("text()", ((ArrayMap) (rep[1].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content2", ((ArrayMap) (rep[1].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals("text()", ((ArrayMap) (rep[2].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content3", ((ArrayMap) (rep[2].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. + */ + @SuppressWarnings("unchecked") + @Test + public void testParseMultiGenericWithClassTypeGeneric() throws Exception { + MultiGenericWithClassTypeGeneric xml = new MultiGenericWithClassTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + GenericXml[] rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.length); + assertEquals("text()", ((ArrayMap) (rep[0].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content1", ((ArrayMap) (rep[0].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals("text()", ((ArrayMap) (rep[1].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content2", ((ArrayMap) (rep[1].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals("text()", ((ArrayMap) (rep[2].values() + .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); + assertEquals("content3", ((ArrayMap) (rep[2].values() + .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link String}. + */ + @Test + public void testParseCollectionTypeString() throws Exception { + CollectionTypeStringGeneric xml = new CollectionTypeStringGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_STRING_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals("rep1", xml.rep.toArray(new String[]{})[0]); + assertEquals("rep2", xml.rep.toArray(new String[]{})[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link String} objects. + */ + @Test + public void testParseArrayTypeString() throws Exception { + ArrayTypeStringGeneric xml = new ArrayTypeStringGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_STRING_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals("rep1", xml.rep[0]); + assertEquals("rep2", xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link Integer} objects. + */ + @Test + public void testParseCollectionTypeInteger() throws Exception { + CollectionTypeIntegerGeneric xml = new CollectionTypeIntegerGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals(1, xml.rep.toArray(new Integer[]{})[0].intValue()); + assertEquals(2, xml.rep.toArray(new Integer[]{})[1].intValue()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link Integer} objects. + */ + @Test + public void testParseArrayTypeInteger() throws Exception { + ArrayTypeIntegerGeneric xml = new ArrayTypeIntegerGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(1, xml.rep[0].intValue()); + assertEquals(2, xml.rep[1].intValue()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@code int} types. + */ + @Test + public void testParseArrayTypeInt() throws Exception { + ArrayTypeIntGeneric xml = new ArrayTypeIntGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(1, xml.rep[0]); + assertEquals(2, xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link Enum} objects. + */ + @Test + public void testParseCollectionTypeWithEnum() throws Exception { + CollectionTypeEnumGeneric xml = new CollectionTypeEnumGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_ENUM_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link Enum} objects. + */ + @Test + public void testParseArrayTypeWithEnum() throws Exception { + ArrayTypeEnumGeneric xml = new ArrayTypeEnumGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_ENUM_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); + } + + /** + * The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. + */ + @Test + public void testParseToArrayOfArrayMaps() throws Exception { + ArrayOfArrayMapsTypeGeneric xml = new ArrayOfArrayMapsTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(COLLECTION_OF_ARRAY)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals("a", xml.rep[0].getValue(0)); + assertEquals("a", xml.rep[0].getKey(0)); + assertEquals("b", xml.rep[0].getValue(1)); + assertEquals("b", xml.rep[0].getKey(1)); + assertEquals("c", xml.rep[1].getValue(0)); + assertEquals("c", xml.rep[1].getKey(0)); + assertEquals("d", xml.rep[1].getValue(1)); + assertEquals("d", xml.rep[1].getKey(1)); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(COLLECTION_OF_ARRAY, out.toString()); + } + + /** + * The purpose is to have a Collection of {@link java.lang.reflect.ParameterizedType} elements. + */ + @Test + public void testParseToCollectionOfArrayMaps() throws Exception { + CollectionOfArrayMapsTypeGeneric xml = new CollectionOfArrayMapsTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(COLLECTION_OF_ARRAY)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getValue(0)); + assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getKey(0)); + assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getValue(1)); + assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getKey(1)); + assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getValue(0)); + assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getKey(0)); + assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getValue(1)); + assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getKey(1)); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(COLLECTION_OF_ARRAY, out.toString()); + } + + private static class CollectionOfArrayMapsTypeGeneric extends GenericXml { + @Key + public Collection> rep; + } + + private static class ArrayOfArrayMapsTypeGeneric extends GenericXml { + @Key + public ArrayMap[] rep; + } + + private static class ArrayWithClassTypeGeneric extends GenericXml { + @Key + public XmlTest.AnyType[] rep; + } + + private static class CollectionWithClassTypeGeneric extends GenericXml { + @Key + public Collection rep; + } + + private static class MultiGenericWithClassType { + @Key + public GenericXml[] rep; + } + + private static class MultiGenericWithClassTypeGeneric extends GenericXml { + @Key + public GenericXml[] rep; + } + + private static class CollectionTypeStringGeneric extends GenericXml { + @Key + public Collection rep; + } + + private static class ArrayTypeStringGeneric extends GenericXml { + @Key + public String[] rep; + } + + private static class CollectionTypeIntegerGeneric extends GenericXml { + @Key + public Collection rep; + } + + private static class ArrayTypeIntegerGeneric extends GenericXml { + @Key + public Integer[] rep; + } + + private static class ArrayTypeIntGeneric extends GenericXml { + @Key + public int[] rep; + } + + private static class CollectionTypeEnumGeneric extends GenericXml { + @Key + public Collection rep; + } + + private static class ArrayTypeEnumGeneric extends GenericXml { + @Key + public XmlEnumTest.AnyEnum[] rep; + } + +} diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java index d8c57918e..0c98646b3 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java @@ -14,47 +14,401 @@ package com.google.api.client.xml; -import com.google.api.client.util.ArrayMap; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.StringReader; +import java.util.ArrayList; import java.util.Collection; -import junit.framework.TestCase; +import java.util.List; +import java.util.Map; +import org.junit.Test; import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlSerializer; +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; /** * Tests {@link GenericXml}. * + * Tests are copies from {@link XmlTest}, but the dedicated Objects are derived from {@link + * GenericXml} + * * @author Yaniv Inbar + * @author Gerald Madlmayr */ -public class GenericXmlTest extends TestCase { +public class GenericXmlTest { - public GenericXmlTest() { - } + private static final String XML = "OneTwo"; + private static final String ANY_GENERIC_TYPE_XML = "rep1rep2content"; + private static final String SIMPLE_XML = "test"; + private static final String SIMPLE_XML_NUMERIC = "1"; + private static final String ANY_TYPE_XML = "contentrep1rep2content"; + private static final String ANY_TYPE_XML_PRIMITIVE_INT = "112" + + ""; + private static final String ANY_TYPE_XML_PRIMITIVE_STR = "1+11+12" + + "+1"; + private static final String ALL_TYPE = ""; + private static final String ANY_TYPE_XML_NESTED_ARRAY = "content

rep1

rep2

rep3

rep4

content
"; - public GenericXmlTest(String name) { - super(name); + public GenericXmlTest() { } - private static final String XML = - "One" - + "Two"; - + /** + * The purpose of this test is to parse the given XML into a {@link GenericXml} Object that has no + * fixed structure. + */ @SuppressWarnings("unchecked") - public void testParse() throws Exception { + @Test + public void testParseToGenericXml() throws Exception { GenericXml xml = new GenericXml(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(XML)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); - ArrayMap expected = - ArrayMap.of("gd", "http://schemas.google.com/g/2005", "", "http://www.w3.org/2005/Atom"); + ArrayMap expected = ArrayMap.of("gd", "http://schemas.google.com/g/2005", "", + "http://www.w3.org/2005/Atom"); assertEquals(expected, namespaceDictionary.getAliasToUriMap()); assertEquals("feed", xml.name); Collection foo = (Collection) xml.get("entry"); - // TODO(yanivi): check contents of foo assertEquals(2, foo.size()); + ArrayMap singleElementOne = ArrayMap.of("text()", "One"); + List> testOne = new ArrayList>(); + testOne.add(singleElementOne); + assertEquals("abc", foo.toArray(new ArrayMap[]{})[0].get("@gd:etag")); + assertEquals(testOne, foo.toArray(new ArrayMap[]{})[0].get("title")); + ArrayMap singleElementTwoAttrib = ArrayMap.of("@attribute", "someattribute", + "text()", "Two"); + //ArrayMap singleElementTwoValue =ArrayMap.of(); + List> testTwo = new ArrayList>(); + testTwo.add(singleElementTwoAttrib); + //testTwo.add(singleElementTwoValue); + assertEquals("def", foo.toArray(new ArrayMap[]{})[1].get("@gd:etag")); + assertEquals(testTwo, foo.toArray(new ArrayMap[]{})[1].get("title")); + } + + /** + * The purpose of this test is map a generic XML to an element inside a dedicated element. + */ + @SuppressWarnings("unchecked") + @Test + public void testParseAnyGenericType() throws Exception { + AnyGenericType xml = new AnyGenericType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_GENERIC_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertTrue(xml.attr instanceof String); + Collection repList = (Collection) xml.elem.get("rep"); + assertEquals(2, repList.size()); + Collection repValue = (Collection) xml.elem.get("value"); + assertEquals(1, repValue.size()); + // 1st rep element + assertEquals("@attr", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[0]).getKey()); + assertEquals("param1", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[0]).getValue()); + assertEquals("text()", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[1]).getKey()); + assertEquals("rep1", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[1]).getValue()); + // 2nd rep element + assertEquals("@attr", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() + .toArray(new Map.Entry[]{})[0]).getKey()); + assertEquals("param2", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() + .toArray(new Map.Entry[]{})[0]).getValue()); + assertEquals("text()", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() + .toArray(new Map.Entry[]{})[1]).getKey()); + assertEquals("rep2", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() + .toArray(new Map.Entry[]{})[1]).getValue()); + // value element + assertEquals("text()", ((Map.Entry) repValue.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[0]).getKey()); + assertEquals("content", ((Map.Entry) repValue.toArray(new ArrayMap[]{})[0].entrySet() + .toArray(new Map.Entry[]{})[0]).getValue()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_GENERIC_TYPE_XML, out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseSimpleTypeAsValueString() throws Exception { + SimpleTypeStringGeneric xml = new SimpleTypeStringGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SIMPLE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(1, xml.values().size()); + assertEquals("test", xml.values().toArray()[0]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("test", out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseSimpleTypeAsValueInteger() throws Exception { + SimpleTypeNumericGeneric xml = new SimpleTypeNumericGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SIMPLE_XML_NUMERIC)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(1, xml.values().size()); + assertEquals(1, xml.values().toArray()[0]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("1", out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseToAnyType() throws Exception { + processAnyTypeGeneric(ANY_TYPE_XML); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseToAnyTypeMissingField() throws Exception { + AnyTypeMissingFieldGeneric xml = new AnyTypeMissingFieldGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(4, xml.values().size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("contentcontentrep1rep2", out.toString()); + } + + /** + * The purpose of this test isto map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseToAnyTypeAdditionalField() throws Exception { + AnyTypeAdditionalFieldGeneric xml = new AnyTypeAdditionalFieldGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(4, xml.values().size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML, out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseToAnyTypePrimitiveInt() throws Exception { + AnyTypePrimitiveIntGeneric xml = new AnyTypePrimitiveIntGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML_PRIMITIVE_INT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(3, xml.values().size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML_PRIMITIVE_INT, out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseToAnyTypeStringOnly() throws Exception { + AnyTypePrimitiveStringGeneric xml = new AnyTypePrimitiveStringGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML_PRIMITIVE_STR)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(3, xml.values().size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML_PRIMITIVE_STR, out.toString()); + } + + /** + * The purpose of this tests is to test the mapping of an XML to an object without any overlap. In + * this case all the objects are stored in the {@link GenericXml#values} field. + */ + @Test + public void testParseIncorrectMapping() throws Exception { + AnyTypeGeneric xml = new AnyTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ALL_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(6, xml.values().size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("", out.toString()); + } + + /** + * The purpose of this test is to map a {@link GenericXml} to the String element in the + * object. + */ + @Test + public void testParseAnyTypeWithNestedElementArrayMap() throws Exception { + processAnyTypeGeneric(ANY_TYPE_XML_NESTED_ARRAY); + } + + private void processAnyTypeGeneric(final String anyTypeXmlNestedArray) throws XmlPullParserException, IOException { + AnyTypeGeneric xml = new AnyTypeGeneric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(anyTypeXmlNestedArray)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertNotNull(xml); + assertEquals(4, xml.values() + .size()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(anyTypeXmlNestedArray, out.toString()); + } + + private static class AnyGenericType { + @Key("@attr") + public Object attr; + @Key + public GenericXml elem; } + + private static class SimpleTypeStringGeneric extends GenericXml { + @Key("text()") + public String value; + } + + private static class SimpleTypeNumericGeneric extends GenericXml { + @Key("text()") + public int value; + } + + private static class AnyTypeGeneric extends GenericXml { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public Object rep; + @Key + public ValueTypeGeneric value; + } + + private static class AnyTypeMissingFieldGeneric extends GenericXml { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public ValueTypeGeneric value; + } + + private static class AnyTypeAdditionalFieldGeneric extends GenericXml { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public Object rep; + @Key + public Object additionalField; + @Key + public ValueTypeGeneric value; + } + + public static class ValueTypeGeneric extends GenericXml { + @Key("text()") + public Object content; + } + + private static class AnyTypePrimitiveIntGeneric extends GenericXml { + @Key("text()") + public int value; + @Key("@attr") + public int attr; + @Key + public int[] intArray; + } + + private static class AnyTypePrimitiveStringGeneric extends GenericXml { + @Key("text()") + public String value; + @Key("@attr") + public String attr; + @Key + public String[] strArray; + } + + } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java index 1e0d79182..2d250a11d 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java @@ -1,64 +1,55 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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.xml; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; +import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; import com.google.api.client.util.Key; import com.google.api.client.util.Value; -import junit.framework.TestCase; - -public class XmlEnumTest extends TestCase { - - public enum AnyEnum { - @Value ENUM_1, - @Value ENUM_2 - } - - public static class AnyType { - @Key("@attr") - public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key("@anyEnum") - public XmlEnumTest.AnyEnum anyEnum; - @Key - public XmlEnumTest.AnyEnum anotherEnum; - @Key - public ValueType value; - } - - public static class AnyTypeEnumElementOnly { - @Key - public XmlEnumTest.AnyEnum elementEnum; - } - - public static class AnyTypeEnumAttributeOnly { - @Key("@attributeEnum") - public XmlEnumTest.AnyEnum attributeEnum; - } - - public static class ValueType { - @Key("text()") - public XmlEnumTest.AnyEnum content; - } - - private static final String XML = - "" - + "ENUM_2contentrep1rep2ENUM_1"; - - private static final String XML_ENUM_ELEMENT_ONLY = "ENUM_2"; - - private static final String XML_ENUM_ATTRIBUTE_ONLY = ""; - - private static final String XML_ENUM_INCORRECT = "ENUM_3"; - - @SuppressWarnings("cast") - public void testParse_anyType() throws Exception { +/** + * Tests {@link Xml}. + * + * @author Gerald Madlmayr + */ +public class XmlEnumTest { + + private static final String XML = "ENUM_2contentrep1rep2ENUM_1"; + private static final String XML_ENUM_ELEMENT_ONLY = "ENUM_2"; + private static final String XML_ENUM_ATTRIBUTE_ONLY = ""; + private static final String XML_ENUM_INCORRECT = "ENUM_3"; + private static final String XML_ENUM_ELEMENT_ONLY_NESTED = "ENUM_2something"; + + + @Test + public void testParseAnyType() throws Exception { AnyType xml = new AnyType(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(XML)); @@ -67,13 +58,13 @@ public void testParse_anyType() throws Exception { assertTrue(xml.attr instanceof String); assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList); - assertTrue(xml.value instanceof ValueType); - assertTrue(xml.value.content instanceof XmlEnumTest.AnyEnum); - assertTrue(xml.anyEnum instanceof XmlEnumTest.AnyEnum); - assertTrue(xml.anotherEnum instanceof XmlEnumTest.AnyEnum); - assertTrue(xml.anyEnum.equals(AnyEnum.ENUM_1)); - assertTrue(xml.anotherEnum.equals(AnyEnum.ENUM_2)); - assertTrue(xml.value.content.equals(AnyEnum.ENUM_1)); + assertNotNull(xml.value); + assertNotNull(xml.value.content); + assertNotNull(xml.anyEnum); + assertNotNull(xml.anotherEnum); + assertEquals(xml.anyEnum, AnyEnum.ENUM_1); + assertEquals(xml.anotherEnum, AnyEnum.ENUM_2); + assertEquals(xml.value.content, AnyEnum.ENUM_1); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -82,30 +73,59 @@ public void testParse_anyType() throws Exception { assertEquals(XML, out.toString()); } - public void testParse_enumElementType() throws Exception { - XmlEnumTest.AnyTypeEnumElementOnly xml = new XmlEnumTest.AnyTypeEnumElementOnly(); + /** + * The purpose of this test is to parse an XML element to an objects's field. + */ + @Test + public void testParseToEnumElementType() throws Exception { + assertEquals(XML_ENUM_ELEMENT_ONLY, testStandardXml(XML_ENUM_ELEMENT_ONLY)); + } + + /** + * The purpose of this test is to parse an XML element to an objects's field, whereas + * there are additional nested elements in the tag. + */ + @Test + public void testParseToEnumElementTypeWithNestedElement() throws Exception { + assertEquals(XML_ENUM_ELEMENT_ONLY, testStandardXml(XML_ENUM_ELEMENT_ONLY_NESTED)); + } + + /** + * Private Method to handle standard parsing and mapping to {@link AnyTypeEnumElementOnly}. + * + * @param xmlString XML String that needs to be mapped to {@link AnyTypeEnumElementOnly}. + * @return returns the serialized string of the XML object. + * @throws Exception thrown if there is an issue processing the XML. + */ + private String testStandardXml(final String xmlString) throws Exception { + AnyTypeEnumElementOnly xml = new AnyTypeEnumElementOnly(); XmlPullParser parser = Xml.createParser(); - parser.setInput(new StringReader(XML_ENUM_ELEMENT_ONLY)); + parser.setInput(new StringReader(xmlString)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); - assertTrue(xml.elementEnum instanceof XmlEnumTest.AnyEnum); - assertTrue(xml.elementEnum.equals(AnyEnum.ENUM_2)); + assertNotNull(xml.elementEnum); + assertEquals(xml.elementEnum, AnyEnum.ENUM_2); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals(XML_ENUM_ELEMENT_ONLY, out.toString()); + return out.toString(); + } + /** + * The purpose of this test is to parse an XML attribute to an object's field. + */ + @Test public void testParse_enumAttributeType() throws Exception { XmlEnumTest.AnyTypeEnumAttributeOnly xml = new XmlEnumTest.AnyTypeEnumAttributeOnly(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(XML_ENUM_ATTRIBUTE_ONLY)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); - assertTrue(xml.attributeEnum instanceof XmlEnumTest.AnyEnum); - assertTrue(xml.attributeEnum.equals(AnyEnum.ENUM_1)); + assertNotNull(xml.attributeEnum); + assertEquals(xml.attributeEnum, AnyEnum.ENUM_1); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -114,19 +134,60 @@ public void testParse_enumAttributeType() throws Exception { assertEquals(XML_ENUM_ATTRIBUTE_ONLY, out.toString()); } + /** + * The purpose of this test is to parse an XML element to an object's field which is an + * enumeration, whereas the enumeration element does not exist. + */ + @Test public void testParse_enumElementTypeIncorrect() throws Exception { XmlEnumTest.AnyTypeEnumElementOnly xml = new XmlEnumTest.AnyTypeEnumElementOnly(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(XML_ENUM_INCORRECT)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); - try{ + try { Xml.parseElement(parser, xml, namespaceDictionary, null); // fail test, if there is no exception fail(); - } catch (final IllegalArgumentException e){ + } catch (final IllegalArgumentException e) { assertEquals("given enum name ENUM_3 not part of enumeration", e.getMessage()); } + } + + public enum AnyEnum { + @Value ENUM_1, + @Value ENUM_2 + } + + private static class AnyType { + @Key("@attr") + private Object attr; + @Key + private Object elem; + @Key + private Object rep; + @Key("@anyEnum") + private XmlEnumTest.AnyEnum anyEnum; + @Key + private XmlEnumTest.AnyEnum anotherEnum; + @Key + private ValueType value; + } + private static class AnyTypeEnumElementOnly { + @Key + private XmlEnumTest.AnyEnum elementEnum; + } + + private static class AnyTypeEnumAttributeOnly { + @Key("@attributeEnum") + private AnyEnum attributeEnum; } + /** + * Needs to be public, this is referenced in another element. + */ + public static class ValueType { + @Key("text()") + private XmlEnumTest.AnyEnum content; + } } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java new file mode 100644 index 000000000..a53c4df12 --- /dev/null +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java @@ -0,0 +1,410 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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.xml; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import java.io.ByteArrayOutputStream; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.Collection; +import org.junit.Test; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlSerializer; +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; + + +/** + * Tests Lists of various data types parsed in {@link Xml}. + * + * @author Gerald Madlmayr + */ +public class XmlListTest { + + private static final String MULTI_TYPE_WITH_CLASS_TYPE = "content1rep10rep11value1content2rep20rep21value2content3rep30rep31value3"; + private static final String MULTIPLE_STRING_ELEMENT = "rep1rep2"; + private static final String MULTIPLE_STRING_ELEMENT_IN_COLLECTION = "rep1rep2"; + private static final String MULTIPLE_INTEGER_ELEMENT = "12"; + private static final String MULTIPLE_ENUM_ELEMENT = "ENUM_1ENUM_2"; + private static final String COLLECTION_OF_ARRAY = "abcd"; + + /** + * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. + */ + @SuppressWarnings("unchecked") + @Test + public void testParseArrayTypeWithClassType() throws Exception { + ArrayWithClassType xml = new ArrayWithClassType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNotNull(xml.rep); + XmlTest.AnyType[] rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.length); + ArrayList> elem0 = (ArrayList>) rep[0].elem; + assertEquals(1, elem0.size()); + assertEquals("content1", elem0.get(0) + .get("text()")); + ArrayList> elem1 = (ArrayList>) rep[1].elem; + assertEquals(1, elem1.size()); + assertEquals("content2", elem1.get(0) + .get("text()")); + ArrayList> elem2 = (ArrayList>) rep[2].elem; + assertEquals(1, elem2.size()); + assertEquals("content3", elem2.get(0) + .get("text()")); + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link XmlTest.AnyType} + * objects. + */ + @Test + public void testParseCollectionWithClassType() throws Exception { + CollectionWithClassType xml = new CollectionWithClassType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTI_TYPE_WITH_CLASS_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNotNull(xml.rep); + Collection rep = xml.rep; + assertNotNull(rep); + assertEquals(3, rep.size()); + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link String}. + */ + @Test + public void testParseCollectionTypeString() throws Exception { + CollectionTypeString xml = new CollectionTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_STRING_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals("rep1", xml.rep.toArray(new String[]{})[0]); + assertEquals("rep2", xml.rep.toArray(new String[]{})[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link String} objects. + */ + @Test + public void testParseArrayTypeString() throws Exception { + ArrayTypeString xml = new ArrayTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_STRING_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals("rep1", xml.rep[0]); + assertEquals("rep2", xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); + } + /** + * The purpose of this test is to map an XML with a sub element of a {@link Collection} of + * {@link String} objects. + */ + @Test + public void testParseAnyTypeWithACollectionString() throws Exception { + AnyTypeWithCollectionString xml = new AnyTypeWithCollectionString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_STRING_ELEMENT_IN_COLLECTION)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNotNull(xml.coll); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_STRING_ELEMENT_IN_COLLECTION, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link Integer} objects. + */ + @Test + public void testParseCollectionTypeInteger() throws Exception { + CollectionTypeInteger xml = new CollectionTypeInteger(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals(1, xml.rep.toArray(new Integer[]{})[0].intValue()); + assertEquals(2, xml.rep.toArray(new Integer[]{})[1].intValue()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link Integer} objects. + */ + @Test + public void testParseArrayTypeInteger() throws Exception { + ArrayTypeInteger xml = new ArrayTypeInteger(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(1, xml.rep[0].intValue()); + assertEquals(2, xml.rep[1].intValue()); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@code int} types. + */ + @Test + public void testParseArrayTypeInt() throws Exception { + ArrayTypeInt xml = new ArrayTypeInt(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_INTEGER_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(1, xml.rep[0]); + assertEquals(2, xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with a {@link Collection} of {@link Enum} objects. + */ + @Test + public void testParseCollectionTypeWithEnum() throws Exception { + CollectionTypeEnum xml = new CollectionTypeEnum(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_ENUM_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); + } + + /** + * The purpose of this test is to map an XML with an Array of {@link Enum} objects. + */ + @Test + public void testParseArrayTypeWithEnum() throws Exception { + ArrayTypeEnum xml = new ArrayTypeEnum(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MULTIPLE_ENUM_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); + } + + /** + * The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. + */ + @Test + public void testParseToArrayOfArrayMaps() throws Exception { + ArrayOfArrayMapsType xml = new ArrayOfArrayMapsType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(COLLECTION_OF_ARRAY)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.length); + assertEquals("a", xml.rep[0].getValue(0)); + assertEquals("a", xml.rep[0].getKey(0)); + assertEquals("b", xml.rep[0].getValue(1)); + assertEquals("b", xml.rep[0].getKey(1)); + assertEquals("c", xml.rep[1].getValue(0)); + assertEquals("c", xml.rep[1].getKey(0)); + assertEquals("d", xml.rep[1].getValue(1)); + assertEquals("d", xml.rep[1].getKey(1)); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(COLLECTION_OF_ARRAY, out.toString()); + } + + /** + * The purpose is to have an Collection of {@link java.lang.reflect.ParameterizedType} elements. + */ + @Test + public void testParseToCollectionOfArrayMaps() throws Exception { + CollectionOfArrayMapsType xml = new CollectionOfArrayMapsType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(COLLECTION_OF_ARRAY)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(2, xml.rep.size()); + assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getValue(0)); + assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getKey(0)); + assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getValue(1)); + assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getKey(1)); + assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getValue(0)); + assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getKey(0)); + assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getValue(1)); + assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getKey(1)); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(COLLECTION_OF_ARRAY, out.toString()); + } + + private static class CollectionOfArrayMapsType { + @Key + public Collection> rep; + } + + private static class ArrayOfArrayMapsType { + @Key + public ArrayMap[] rep; + } + + private static class ArrayWithClassType { + @Key + public XmlTest.AnyType[] rep; + } + + private static class CollectionWithClassType { + @Key + public Collection rep; + } + + /** + * Needs to be public, this is referenced in another element. + */ + public static class CollectionTypeString { + @Key + public Collection rep; + } + + private static class ArrayTypeString { + @Key + public String[] rep; + } + + private static class AnyTypeWithCollectionString { + @Key + public CollectionTypeString coll; + } + + private static class CollectionTypeInteger { + @Key + public Collection rep; + } + + private static class ArrayTypeInteger { + @Key + public Integer[] rep; + } + + private static class ArrayTypeInt { + @Key + public int[] rep; + } + + private static class CollectionTypeEnum { + @Key + public Collection rep; + } + + private static class ArrayTypeEnum { + @Key + public XmlEnumTest.AnyEnum[] rep; + } + +} diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java index 051b6e5ec..4c03f7028 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java @@ -14,14 +14,14 @@ package com.google.api.client.xml; -import com.google.api.client.util.Key; -import com.google.api.client.xml.atom.Atom; -import com.google.common.collect.ImmutableMap; import java.io.StringWriter; import java.util.Collection; import java.util.TreeSet; -import junit.framework.TestCase; import org.xmlpull.v1.XmlSerializer; +import com.google.api.client.util.Key; +import com.google.api.client.xml.atom.Atom; +import com.google.common.collect.ImmutableMap; +import junit.framework.TestCase; /** * Tests {@link XmlNamespaceDictionary}. @@ -30,6 +30,19 @@ */ public class XmlNamespaceDictionaryTest extends TestCase { + private static final String EXPECTED = "OneTwo"; + private static final String EXPECTED_EMPTY_MAP = ""; + private static final String EXPECTED_EMPTY_MAP_NS_UNDECLARED = ""; + private static final String EXPECTED_EMPTY_MAP_ATOM_NS = ""; + private static final String EXPECTED_UNKNOWN_NS = "One" + + "Two"; + public XmlNamespaceDictionaryTest() { } @@ -37,29 +50,10 @@ public XmlNamespaceDictionaryTest(String name) { super(name); } - private static final String EXPECTED = - "" + "" - + "One" - + "Two"; - - private static final String EXPECTED_EMPTY_MAP = - "" + ""; - - private static final String EXPECTED_EMPTY_MAP_NS_UNDECLARED = - "" + ""; - - private static final String EXPECTED_EMPTY_MAP_ATOM_NS = - "" + ""; - - private static final String EXPECTED_UNKNOWN_NS = - "" + "" + "One" - + "Two"; - public void testSet() { XmlNamespaceDictionary dictionary = new XmlNamespaceDictionary(); - dictionary.set("", "http://www.w3.org/2005/Atom").set("gd", "http://schemas.google.com/g/2005"); + dictionary.set("", "http://www.w3.org/2005/Atom") + .set("gd", "http://schemas.google.com/g/2005"); assertEquals("http://www.w3.org/2005/Atom", dictionary.getUriForAlias("")); assertEquals("", dictionary.getAliasForUri("http://www.w3.org/2005/Atom")); dictionary.set("", "http://www.w3.org/2006/Atom"); @@ -77,10 +71,12 @@ public void testSet() { dictionary.set(null, null); assertEquals("http://schemas.google.com/g/2005", dictionary.getUriForAlias("foo")); dictionary.set("foo", null); - assertTrue(dictionary.getAliasToUriMap().isEmpty()); - dictionary.set("foo", "http://schemas.google.com/g/2005").set( - null, "http://schemas.google.com/g/2005"); - assertTrue(dictionary.getAliasToUriMap().isEmpty()); + assertTrue(dictionary.getAliasToUriMap() + .isEmpty()); + dictionary.set("foo", "http://schemas.google.com/g/2005") + .set(null, "http://schemas.google.com/g/2005"); + assertTrue(dictionary.getAliasToUriMap() + .isEmpty()); } public void testSerialize() throws Exception { @@ -156,30 +152,6 @@ public void testSerialize_emptyMapNsUndeclared() throws Exception { assertEquals(EXPECTED_EMPTY_MAP_NS_UNDECLARED, writer.toString()); } - public static class Entry implements Comparable { - @Key - public String title; - - @Key("@gd:etag") - public String etag; - - public Entry(String title, String etag) { - super(); - this.title = title; - this.etag = etag; - } - - public int compareTo(Entry other) { - return title.compareTo(other.title); - } - } - - public static class Feed { - @Key("entry") - public Collection entries; - - } - public void testSerialize_errorOnUnknown() throws Exception { Entry entry = new Entry("One", "abc"); StringWriter writer = new StringWriter(); @@ -222,4 +194,28 @@ public void testSerialize_unknown() throws Exception { assertEquals(EXPECTED_UNKNOWN_NS, namespaceDictionary.toStringOf("feed", feed)); } + public static class Entry implements Comparable { + @Key + public String title; + + @Key("@gd:etag") + public String etag; + + public Entry(String title, String etag) { + super(); + this.title = title; + this.etag = etag; + } + + public int compareTo(Entry other) { + return title.compareTo(other.title); + } + } + + public static class Feed { + @Key("entry") + public Collection entries; + + } + } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java index 033d3e1ba..0462a2c3b 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java @@ -14,106 +14,376 @@ package com.google.api.client.xml; -import com.google.api.client.util.ArrayMap; -import com.google.api.client.util.Key; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; -import java.util.Map; -import junit.framework.TestCase; +import java.util.Collection; +import java.util.List; +import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; /** * Tests {@link Xml}. * * @author Yaniv Inbar + * @author Gerald Madlmayr */ -public class XmlTest extends TestCase { +public class XmlTest { - public static class AnyType { - @Key("@attr") - public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key - public ValueType value; + + private static final String SIMPLE_XML = "test"; + private static final String SIMPLE_XML_NUMERIC = "1"; + private static final String START_WITH_TEXT = "start_with_text"; + private static final String MISSING_END_ELEMENT = "" + + "missing_end_element"; + private static final String START_WITH_END_ELEMENT = "

start_with_end_elemtn"; + private static final String START_WITH_END_ELEMENT_NESTED = "

start_with_end_element_nested
"; + private static final String ANY_TYPE_XML = "contentrep1rep2" + + "content"; + private static final String ANY_TYPE_MISSING_XML = "contentcontent"; + private static final String ANY_TYPE_XML_PRIMITIVE_INT = "112" + + ""; + private static final String ANY_TYPE_XML_PRIMITIVE_STR = "1+11+12" + + "+1"; + private static final String NESTED_NS = "2011-08-09T04:38" + + ":14.017Z"; + private static final String NESTED_NS_SERIALIZED = "2011-08-09T04:38:14.017Z"; + private static final String INF_TEST = "-INFINF-INFINF" + + ""; + private static final String ALL_TYPE = ""; + private static final String ALL_TYPE_WITH_DATA = "" + + "ENUM_1ENUM_2Title

Test

112str1arr1arr2
"; + private static final String ANY_TYPE_XML_NESTED_ARRAY = "content

rep1

rep2

rep3

rep4

content
"; + + /** + * The purpose of this test is to map a single element to a single field of a + * destination object. In this case the object mapped is a {@link String}; no namespace used. + */ + @Test + public void testParseSimpleTypeAsValueString() throws Exception { + SimpleTypeString xml = new SimpleTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SIMPLE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals("test", xml.value); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("test", out.toString()); } - public static class ValueType { - @Key("text()") - public Object content; + /** + * The purpose of this test is to map a single element to a single field of a + * destination object. In this is it is not an object but a {@code int}. no namespace + * used. + */ + @Test + public void testParseSimpleTypeAsValueInteger() throws Exception { + SimpleTypeNumeric xml = new SimpleTypeNumeric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SIMPLE_XML_NUMERIC)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(1, xml.value); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("1", out.toString()); + } + + /** + * Negative test to check for text without a start-element. + */ + @Test + public void testWithTextFail() throws Exception { + SimpleTypeString xml = new SimpleTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(START_WITH_TEXT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + try { + Xml.parseElement(parser, xml, namespaceDictionary, null); + fail(); + } catch (final Exception e) { + assertEquals("only whitespace content allowed before start tag and not s (position: " + + "START_DOCUMENT seen s... @1:22)", e.getMessage() + .trim()); + } + } + + /** + * Negative test to check for missing end-element. + */ + @Test + public void testWithMissingEndElementFail() throws Exception { + SimpleTypeString xml = new SimpleTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(MISSING_END_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + try { + Xml.parseElement(parser, xml, namespaceDictionary, null); + fail(); + } catch (final Exception e) { + assertEquals("no more data available - expected end tag
to close start tag from line 1, parser stopped on START_TAG seen ...missing_end_element... @1:54", e.getMessage() + .trim()); + } + } + + /** + * Negative test with that start with a end-element. + */ + @Test + public void testWithEndElementStarting() throws Exception { + SimpleTypeString xml = new SimpleTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(START_WITH_END_ELEMENT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + try { + Xml.parseElement(parser, xml, namespaceDictionary, null); + fail(); + } catch (final Exception e) { + assertEquals("expected start tag name and not / (position: START_DOCUMENT seen " - + "contentrep1rep2content"; + /** + * Negative test with that start with a end element tag nested in an started element. + */ + @Test + public void testWithEndElementNested() throws Exception { + SimpleTypeString xml = new SimpleTypeString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(START_WITH_END_ELEMENT_NESTED)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + try { + Xml.parseElement(parser, xml, namespaceDictionary, null); + fail(); + } catch (final Exception e) { + assertEquals("end tag name

must match start tag name from line 1 (position:" + + " START_TAG seen ...

... @1:39)", e.getMessage() + .trim()); + } + } - @SuppressWarnings("cast") - public void testParse_anyType() throws Exception { + /** + * Negative test that maps a string to an integer and causes an exception. + */ + @Test + public void testFailMappingOfDataType() throws Exception { + SimpleTypeNumeric xml = new SimpleTypeNumeric(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(SIMPLE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + try { + Xml.parseElement(parser, xml, namespaceDictionary, null); + fail(); + } catch (final Exception e) { + assertEquals("For input string: \"test\"", e.getMessage() + .trim()); + } + } + + /** + * The purpose of this tests it to test the {@link Key} Annotation for mapping of elements and + * attributes. All elements/attributes are matched. + */ + @Test + public void testParseToAnyType() throws Exception { AnyType xml = new AnyType(); XmlPullParser parser = Xml.createParser(); - parser.setInput(new StringReader(XML)); + parser.setInput(new StringReader(ANY_TYPE_XML)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); assertTrue(xml.attr instanceof String); assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList); - assertTrue(xml.value instanceof ValueType); + assertNotNull(xml.value); assertTrue(xml.value.content instanceof String); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals(XML, out.toString()); + assertEquals(ANY_TYPE_XML, out.toString()); } - public static class ArrayType extends GenericXml { - @Key - public Map[] rep; + /** + * The purpose of this tests it to test the {@link Key} annotation for mapping of elements and + * attributes. The matched object misses some field that are present int the XML ('elem' is + * missing and therefore ignored). + */ + @Test + public void testParseToAnyTypeMissingField() throws Exception { + AnyTypeMissingField xml = new AnyTypeMissingField(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertTrue(xml.attr instanceof String); + assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); + assertNotNull(xml.value); + assertTrue(xml.value.content instanceof String); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_MISSING_XML, out.toString()); } - private static final String ARRAY_TYPE = - "" - + "rep1rep2"; - - public void testParse_arrayType() throws Exception { - ArrayType xml = new ArrayType(); + /** + * The purpose of this tests it to test the {@link Key} Annotation for mapping of elements and + * attributes. The matched object has an additional field, that will not be used and stays {@code + * null}. + */ + @Test + public void testParseToAnyTypeAdditionalField() throws Exception { + AnyTypeAdditionalField xml = new AnyTypeAdditionalField(); XmlPullParser parser = Xml.createParser(); - parser.setInput(new StringReader(ARRAY_TYPE)); + parser.setInput(new StringReader(ANY_TYPE_XML)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); - // check type - Map[] rep = xml.rep; - assertEquals(2, rep.length); - ArrayMap map0 = (ArrayMap) rep[0]; - assertEquals(1, map0.size()); - assertEquals("rep1", map0.get("text()")); - ArrayMap map1 = (ArrayMap) rep[1]; - assertEquals(1, map1.size()); - assertEquals("rep2", map1.get("text()")); + assertTrue(xml.attr instanceof String); + assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); + assertNotNull(xml.value); + assertNull(xml.additionalField); + assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList); + assertTrue(xml.value.content instanceof String); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML, out.toString()); + } + + /** + * The purpose of this test is to see, if there is an exception of the parameter 'destination' in + * {@link Xml#parseElement} is {@code null}. The parser internally will skip mapping of the XML + * structure, but will parse it anyway. + */ + @Test + public void testParseToAnyTypeWithNullDestination() throws Exception { + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, null, namespaceDictionary, null); + } + + /** + * The purpose of this test is to see, if parsing works with a {@link Xml.CustomizeParser}. + * The XML will be mapped to {@link AnyType}. + */ + @Test + public void testParseAnyTypeWithCustomParser() throws Exception { + AnyType xml = new AnyType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, new Xml.CustomizeParser()); + assertTrue(xml.attr instanceof String); + assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); + assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList); + assertNotNull(xml.value); + assertTrue(xml.value.content instanceof String); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals(ARRAY_TYPE, out.toString()); + assertEquals(ANY_TYPE_XML, out.toString()); } - private static final String NESTED_NS = - "" - + "2011-08-09T04:38:14.017Z" - + ""; + /** + * The purpose of this test it to parse elements which will be mapped to a + * {@link javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, + * elements and element arrays. + */ + @Test + public void testParseToAnyTypePrimitiveInt() throws Exception { + AnyTypePrimitiveInt xml = new AnyTypePrimitiveInt(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML_PRIMITIVE_INT)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, new Xml.CustomizeParser()); + assertEquals(1, xml.value); + assertEquals(2, xml.attr); + assertEquals(2, xml.intArray.length); + assertEquals(1, xml.intArray[0]); + assertEquals(2, xml.intArray[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML_PRIMITIVE_INT, out.toString()); + } - private static final String NESTED_NS_SERIALIZED = - "" + "2011-08-09T04:38:14.017Z" - + ""; + /** + * The purpose of this test it to parse elements which will be mapped to a Java + * {@link javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, + * elements and element arrays. + */ + @Test + public void testParseToAnyTypeStringOnly() throws Exception { + AnyTypePrimitiveString xml = new AnyTypePrimitiveString(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML_PRIMITIVE_STR)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, new Xml.CustomizeParser()); + assertEquals("1+1", xml.value); + assertEquals("2+1", xml.attr); + assertEquals(2, xml.strArray.length); + assertEquals("1+1", xml.strArray[0]); + assertEquals("2+1", xml.strArray[1]); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML_PRIMITIVE_STR, out.toString()); + } - public void testParse_nestedNs() throws Exception { + /** + * The purpose of this test is to map nested elements with a namespace attribute. + */ + @Test + public void testParseOfNestedNs() throws Exception { XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(NESTED_NS)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); @@ -127,4 +397,231 @@ public void testParse_nestedNs() throws Exception { namespaceDictionary.serialize(serializer, "any", xml); assertEquals(NESTED_NS_SERIALIZED, out.toString()); } + + /** + * The purpose of this test is to map the infinity values of both {@code doubles} and + * {@code floats}. + */ + @Test + public void testParseInfiniteValues() throws Exception { + AnyTypeInf xml = new AnyTypeInf(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(INF_TEST)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(Double.NEGATIVE_INFINITY, xml.dblInfNeg, 0.0001); + assertEquals(Double.POSITIVE_INFINITY, xml.dblInfPos, 0.0001); + assertEquals(Float.NEGATIVE_INFINITY, xml.fltInfNeg, 0.0001); + assertEquals(Float.POSITIVE_INFINITY, xml.fltInfPos, 0.0001); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(INF_TEST, out.toString()); + } + + /** + * The purpose of this test is to map multiple different data types in a single test, without + * data. (explorative) + */ + @Test + public void testParseEmptyElements() throws Exception { + AllType xml = new AllType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ALL_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertEquals(0, xml.integer); + // TODO: Shouldn't array size == 0? (currently generated via a = new x[1]). + assertEquals(1, xml.stringArray.length); + assertEquals(1, xml.anyEnum.length); + assertNotNull(xml.genericXml); + assertNotNull(xml.integerCollection); + assertNull(xml.str); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("0", out.toString()); + } + + /** + * The purpose of this test is to map multiple different data types in a single test, with data. + * (explorative) + */ + @Test + public void testParseAllElements() throws Exception { + AllType xml = new AllType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ALL_TYPE_WITH_DATA)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ALL_TYPE_WITH_DATA, out.toString()); + } + + /** + * The purpose of this tests is to map a completely unrelated XML to a given destination object. + * (explorative) + */ + @Test + public void testParseIncorrectMapping() throws Exception { + AnyType xml = new AnyType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ALL_TYPE)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary().set("", ""); + Xml.parseElement(parser, xml, namespaceDictionary, null); + // check type + assertNull(xml.elem); + assertNull(xml.value); + assertNull(xml.rep); + assertNull(xml.rep); + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals("", out.toString()); + } + + /** + * The purpose of this test is to map the sub elements of an {@link ArrayMap} again to an {@link + * ArrayMap}. + */ + @Test + public void testParseAnyTypeWithNestedElementArrayMap() throws Exception { + AnyType xml = new AnyType(); + XmlPullParser parser = Xml.createParser(); + parser.setInput(new StringReader(ANY_TYPE_XML_NESTED_ARRAY)); + XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); + Xml.parseElement(parser, xml, namespaceDictionary, null); + assertTrue(xml.attr instanceof String); + assertTrue(xml.elem.toString(), xml.elem instanceof ArrayList); + assertTrue(xml.rep.toString(), xml.rep instanceof ArrayList); + assertNotNull(xml.value); + assertTrue(xml.value.content instanceof String); + assertEquals(1, ((Collection) xml.elem).size()); + assertEquals(2, ((Collection) xml.rep).size()); + assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[]{})[0].size()); + assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[]{})[1].size()); + assertEquals("rep1", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[0].get("p")).toArray(new ArrayMap[]{})[0].getValue(0)); + assertEquals("rep2", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[0].get("p")).toArray(new ArrayMap[]{})[1].getValue(0)); + assertEquals("rep3", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[1].get("p")).toArray(new ArrayMap[]{})[0].getValue(0)); + assertEquals("rep4", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[1].get("p")).toArray(new ArrayMap[]{})[1].getValue(0)); + + // serialize + XmlSerializer serializer = Xml.createSerializer(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + serializer.setOutput(out, "UTF-8"); + namespaceDictionary.serialize(serializer, "any", xml); + assertEquals(ANY_TYPE_XML_NESTED_ARRAY, out.toString()); + } + + public static class SimpleTypeString { + @Key("text()") + public String value; + } + + public static class SimpleTypeNumeric { + @Key("text()") + public int value; + } + + public static class AnyType { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public Object rep; + @Key + public ValueType value; + } + + public static class AnyTypeMissingField { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public ValueType value; + } + + public static class AnyTypeAdditionalField { + @Key("@attr") + public Object attr; + @Key + public Object elem; + @Key + public Object rep; + @Key + public Object additionalField; + @Key + public ValueType value; + } + + public static class ValueType { + @Key("text()") + public Object content; + } + + public static class AnyTypePrimitiveInt { + @Key("text()") + public int value; + @Key("@attr") + public int attr; + @Key + public int[] intArray; + } + + public static class AnyTypePrimitiveString { + @Key("text()") + public String value; + @Key("@attr") + public String attr; + @Key + public String[] strArray; + } + + private static class AnyTypeInf { + @Key + public double dblInfNeg; + @Key + public double dblInfPos; + @Key + public float fltInfNeg; + @Key + public float fltInfPos; + } + + private static class AllType { + @Key + public int integer; + @Key + public String str; + @Key + public GenericXml genericXml; + @Key + public XmlEnumTest.AnyEnum[] anyEnum; + @Key + public String[] stringArray; + @Key + public List integerCollection; + } } + diff --git a/google-http-client-xml/src/test/resources/sample-atom.xml b/google-http-client-xml/src/test/resources/sample-atom.xml new file mode 100644 index 000000000..1d370a4dd --- /dev/null +++ b/google-http-client-xml/src/test/resources/sample-atom.xml @@ -0,0 +1 @@ +World Of Sample News online NewsEverything about Computers and ATOM Parsers2018-10-14T10:00:00+02:00https://www.world-of-sample-news.com/newsticker/https://www.world-of-sample-news.com/icons/svg/logos/svg/World Of Sample Newsonline.svgCopyright (c) 2018 World Of Sample News MedienWorld Of Sample News onlineTitle 01: Standard Blind Text with 5000 chars Contenthttps://world-of-sample-news.com/-41704982018-10-14T10:00:00+02:002018-10-14T10:00:00+02:00Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequatLorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis. Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero. Phasellus dolor. Maecenas vestibulum mollis diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In dui magna, posuere eget, vestibulum et, tempor auctor, justo. In ac felis quis tortor malesuada pretium. Pellentesque auctor neque nec urna. Proin sapien ipsum, porta a, auctor quis, euismod ut, mi. Aenean viverra rhoncus pede. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut non enim eleifend felis pretium feugiat. Vivamus quis mi. Phasellus a est. Phasellus magna. In hac habitasse platea dictumst. Curabitur at lacus ac velit ornare lobortis. Curabitur a felis in nunc fringilla tristique. Morbi mattis ullamcorper velit. Phasellus gravida semper nisi. Nullam vel sem. Pellentesque libero tortor, tincidunt et, tincidunt eget, semper nec, quam. Sed hendrerit. Morbi ac felis. Nunc egestas, augue at pellentesque laoreet, felis eros vehicula leo, at malesuada velit leo quis pede. Donec interdum, metus et hendrerit aliquet, dolor diam sagittis ligula, eget egestas libero turpis vel mi. Nunc nulla. Fusce risus nisl, viverra et, tempor et, pretium in, sapien. Donec venenatis vulputate lorem. Morbi nec metus. Phasellus blandit leo ut odio. Maecenas ullamcorper, dui et placerat feugiat, eros pede varius nisi, condimentum viverra felis nunc et lorem. Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. In auctor lobortis lacus. Quisque libero metus, condimentum nec, tempor a, commodo mollis, magna. Vestibulum ullamcorper mauris at ligulTitle 02: Blind Text with oöpoöp Charshttps://world-of-sample-news.com/-41881152018-10-14T09:00:00+02:002018-10-14T09:00:00+02:00aäb cde fgh ijk lmn oöpoöp tuü vwx yz AÄBC DEF GHI JKL MNO ÖPQ RST UÜV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¼× {} aäb cde fgh ijk lmn oöp qrsß tuü vwx yz AÄBC DEF GHI JKL MNOaäb cde fgh ijk lmn oöpoöp tuü vwx yz AÄBC DEF GHI JKL MNO ÖPQ RST UÜV WXYZ !"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¼× {} aäb cde fgh ijk lmn oöp qrsß tuü vwx yz AÄBC DEF GHI JKL MNOTitle 03: Atom-Powered Robots Run Amok, No Content!urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa622003-12-13T18:32:02ZSummary 03: Some other text.Title 04: Atom-Powered Robots Run Amok!urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa62Summary 04: Some other text.Content 04: Some more ContentTitle 05: Atom-Powered Robots Run Amok, No Summary!urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa622003-12-13T18:32:02ZContent 05: Some more Content \ No newline at end of file diff --git a/google-http-client/src/main/java/com/google/api/client/util/DataMap.java b/google-http-client/src/main/java/com/google/api/client/util/DataMap.java index cf234d15c..3432c1827 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DataMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DataMap.java @@ -43,7 +43,6 @@ final class DataMap extends AbstractMap { DataMap(Object object, boolean ignoreCase) { this.object = object; classInfo = ClassInfo.of(object.getClass(), ignoreCase); - Preconditions.checkArgument(!classInfo.isEnum()); } @Override From 710117e027c3579c1a1636483bce45eb6d164460 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 6 Nov 2018 18:18:14 -0500 Subject: [PATCH 007/983] Fix broken snapshot and proto tests (#512) * fix snapshot tests * ignore eclipse metadata * reset some sample files * fix prototest --- .gitignore | 4 ++++ google-http-client-protobuf/pom.xml | 2 +- .../java/com/google/api/client/http/HttpRequestTest.java | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 92c4b987a..8dd2d40af 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ target/ bin/ *.iml .idea +.project +.settings +.classpath + diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 87acfc2f1..8f6917aff 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -47,7 +47,7 @@ maven-protoc-plugin 0.4.2 - com.google.protobuf:protoc:${project.protobuf-java.version}-build2:exe:${os.detected.classifier} + com.google.protobuf:protoc:${project.protobuf-java.version}:exe:${os.detected.classifier} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index f064b4802..ae2303dbf 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -745,7 +745,8 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce assertEquals(ImmutableList.of("a2", "b2", "c2"), lowLevelRequest.getHeaderValues("objlist")); assertEquals(ImmutableList.of("a1", "a2"), lowLevelRequest.getHeaderValues("r")); assertTrue(lowLevelRequest.getHeaderValues("accept-encoding").isEmpty()); - assertEquals(ImmutableList.of("foo " + HttpRequest.USER_AGENT_SUFFIX), + assertEquals(ImmutableList.of("foo Google-HTTP-Java-Client/" + + HttpRequest.VERSION + " (gzip)"), lowLevelRequest.getHeaderValues("user-agent")); assertEquals(ImmutableList.of("b"), lowLevelRequest.getHeaderValues("a")); assertEquals(ImmutableList.of("VALUE"), lowLevelRequest.getHeaderValues("value")); @@ -984,7 +985,8 @@ public void testExecute_curlLogger() throws Exception { if (message.startsWith("curl")) { found = true; assertEquals("curl -v --compressed -H 'Accept-Encoding: gzip' -H 'User-Agent: " - + HttpRequest.USER_AGENT_SUFFIX + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'", + + "Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)" + + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'", message); } } From c5049a7d65b46bb3015623136ceca9c86ad62806 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 6 Nov 2018 17:35:37 -0800 Subject: [PATCH 008/983] Revert "Remove deprecated BackOffPolicy interface (#506)" (#521) This reverts commit d5effe81f5cb627d458929819914abf10086821a. --- clirr-ignored-differences.xml | 18 - .../google/api/client/http/BackOffPolicy.java | 74 +++ .../client/http/ExponentialBackOffPolicy.java | 454 ++++++++++++++++++ .../google/api/client/http/HttpRequest.java | 57 ++- .../api/client/util/ExponentialBackOff.java | 4 +- .../http/ExponentialBackOffPolicyTest.java | 145 ++++++ .../api/client/http/HttpRequestTest.java | 215 ++++++++- 7 files changed, 944 insertions(+), 23 deletions(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java create mode 100644 google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java create mode 100644 google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 775f12e7c..898e94c20 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -7,22 +7,4 @@ 8001 com/google/api/client/repackaged/** - - 7002 - com/google/api/client/http/HttpRequest - com.google.api.client.http.BackOffPolicy getBackOffPolicy() - - - 7002 - com/google/api/client/http/HttpRequest - com.google.api.client.http.HttpRequest setBackOffPolicy(com.google.api.client.http.BackOffPolicy) - - - 8001 - com/google/api/client/http/BackOffPolicy - - - 8001 - com/google/api/client/http/ExponentialBackOffPolicy* - diff --git a/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java new file mode 100644 index 000000000..d06304011 --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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 com.google.api.client.util.Beta; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Strategy interface to control back off between retry attempts. + * + * @since 1.7 + * @author Ravi Mistry + * @deprecated (scheduled to be removed in 1.18) Use {@link HttpBackOffUnsuccessfulResponseHandler} + * instead. + */ +@Deprecated +@Beta +public interface BackOffPolicy { + + /** + * Value indicating that no more retries should be made, see {@link #getNextBackOffMillis()}. + */ + public static final long STOP = -1L; + + /** + * Determines if back off is required based on the specified status code. + * + *

+ * Implementations may want to back off on server or product-specific errors. + *

+ * + * @param statusCode HTTP status code + */ + public boolean isBackOffRequired(int statusCode); + + /** + * Reset Back off counters (if any) in an implementation-specific fashion. + */ + public void reset(); + + /** + * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is + * returned, no retries should be made. + * + * This method should be used as follows: + * + *
+   *  long backoffTime = backoffPolicy.getNextBackoffMs();
+   *  if (backoffTime == BackoffPolicy.STOP) {
+   *    // Stop retrying.
+   *  } else {
+   *    // Retry after backoffTime.
+   *  }
+   *
+ * + * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no + * more retries should be made + */ + public long getNextBackOffMillis() throws IOException; +} diff --git a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java new file mode 100644 index 000000000..90e8d0058 --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java @@ -0,0 +1,454 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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 com.google.api.client.util.Beta; +import com.google.api.client.util.ExponentialBackOff; +import com.google.api.client.util.NanoClock; + +import java.io.IOException; + +/** + * {@link Beta}
+ * Implementation of {@link BackOffPolicy} that increases the back off period for each retry attempt + * using a randomization function that grows exponentially. + * + *

+ * {@link #getNextBackOffMillis()} is calculated using the following formula: + * + *

+ * randomized_interval =
+ *     retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
+ * 
+ * In other words {@link #getNextBackOffMillis()} will range between the randomization factor + * percentage below and above the retry interval. For example, using 2 seconds as the base retry + * interval and 0.5 as the randomization factor, the actual back off period used in the next retry + * attempt will be between 1 and 3 seconds. + *

+ * + *

+ * Note: max_interval caps the retry_interval and not the randomized_interval. + *

+ * + *

+ * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the + * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. + *

+ * + *

+ * Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default + * multiplier is 1.5 and the default max_interval is 1 minute. For 10 requests the sequence will be + * (values in seconds) and assuming we go over the max_elapsed_time on the 10th request: + * + *

+ * request#     retry_interval     randomized_interval
+ *
+ * 1             0.5                [0.25,   0.75]
+ * 2             0.75               [0.375,  1.125]
+ * 3             1.125              [0.562,  1.687]
+ * 4             1.687              [0.8435, 2.53]
+ * 5             2.53               [1.265,  3.795]
+ * 6             3.795              [1.897,  5.692]
+ * 7             5.692              [2.846,  8.538]
+ * 8             8.538              [4.269, 12.807]
+ * 9            12.807              [6.403, 19.210]
+ * 10           19.210              {@link BackOffPolicy#STOP}
+ * 
+ *

+ * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + * @author Ravi Mistry + * @deprecated (scheduled to be removed in 1.18). Use {@link HttpBackOffUnsuccessfulResponseHandler} + * with {@link ExponentialBackOff} instead. + */ +@Beta +@Deprecated +public class ExponentialBackOffPolicy implements BackOffPolicy { + + /** + * The default initial interval value in milliseconds (0.5 seconds). + */ + public static final int DEFAULT_INITIAL_INTERVAL_MILLIS = + ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS; + + /** + * The default randomization factor (0.5 which results in a random period ranging between 50% + * below and 50% above the retry interval). + */ + public static final double DEFAULT_RANDOMIZATION_FACTOR = + ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR; + + /** + * The default multiplier value (1.5 which is 50% increase per back off). + */ + public static final double DEFAULT_MULTIPLIER = ExponentialBackOff.DEFAULT_MULTIPLIER; + + /** + * The default maximum back off time in milliseconds (1 minute). + */ + public static final int DEFAULT_MAX_INTERVAL_MILLIS = + ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS; + + /** + * The default maximum elapsed time in milliseconds (15 minutes). + */ + public static final int DEFAULT_MAX_ELAPSED_TIME_MILLIS = + ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS; + + /** Exponential backoff. */ + private final ExponentialBackOff exponentialBackOff; + + /** + * Creates an instance of ExponentialBackOffPolicy using default values. To override the defaults + * use {@link #builder}. + *
    + *
  • {@code initialIntervalMillis} is defaulted to {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}
  • + *
  • {@code randomizationFactor} is defaulted to {@link #DEFAULT_RANDOMIZATION_FACTOR}
  • + *
  • {@code multiplier} is defaulted to {@link #DEFAULT_MULTIPLIER}
  • + *
  • {@code maxIntervalMillis} is defaulted to {@link #DEFAULT_MAX_INTERVAL_MILLIS}
  • + *
  • {@code maxElapsedTimeMillis} is defaulted in {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}
  • + *
+ */ + public ExponentialBackOffPolicy() { + this(new Builder()); + } + + /** + * @param builder builder + * + * @since 1.14 + */ + protected ExponentialBackOffPolicy(Builder builder) { + exponentialBackOff = builder.exponentialBackOffBuilder.build(); + } + + /** + * Determines if back off is required based on the specified status code. + * + *

+ * The idea is that the servers are only temporarily unavailable, and they should not be + * overwhelmed when they are trying to get back up. + *

+ * + *

+ * The default implementation requires back off for 500 and 503 status codes. Subclasses may + * override if different status codes are required. + *

+ */ + public boolean isBackOffRequired(int statusCode) { + switch (statusCode) { + case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: // 500 + case HttpStatusCodes.STATUS_CODE_SERVICE_UNAVAILABLE: // 503 + return true; + default: + return false; + } + } + + /** + * Sets the interval back to the initial retry interval and restarts the timer. + */ + public final void reset() { + exponentialBackOff.reset(); + } + + /** + * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is + * returned, no retries should be made. + * + *

+ * This method calculates the next back off interval using the formula: randomized_interval = + * retry_interval +/- (randomization_factor * retry_interval) + *

+ * + *

+ * Subclasses may override if a different algorithm is required. + *

+ * + * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no + * more retries should be made + */ + public long getNextBackOffMillis() throws IOException { + return exponentialBackOff.nextBackOffMillis(); + } + + /** + * Returns the initial retry interval in milliseconds. + */ + public final int getInitialIntervalMillis() { + return exponentialBackOff.getInitialIntervalMillis(); + } + + /** + * Returns the randomization factor to use for creating a range around the retry interval. + * + *

+ * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + * above the retry interval. + *

+ */ + public final double getRandomizationFactor() { + return exponentialBackOff.getRandomizationFactor(); + } + + /** + * Returns the current retry interval in milliseconds. + */ + public final int getCurrentIntervalMillis() { + return exponentialBackOff.getCurrentIntervalMillis(); + } + + /** + * Returns the value to multiply the current interval with for each retry attempt. + */ + public final double getMultiplier() { + return exponentialBackOff.getMultiplier(); + } + + /** + * Returns the maximum value of the back off period in milliseconds. Once the current interval + * reaches this value it stops increasing. + */ + public final int getMaxIntervalMillis() { + return exponentialBackOff.getMaxIntervalMillis(); + } + + /** + * Returns the maximum elapsed time in milliseconds. + * + *

+ * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the + * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. + *

+ */ + public final int getMaxElapsedTimeMillis() { + return exponentialBackOff.getMaxElapsedTimeMillis(); + } + + /** + * Returns the elapsed time in milliseconds since an {@link ExponentialBackOffPolicy} instance is + * created and is reset when {@link #reset()} is called. + * + *

+ * The elapsed time is computed using {@link System#nanoTime()}. + *

+ */ + public final long getElapsedTimeMillis() { + return exponentialBackOff.getElapsedTimeMillis(); + } + + /** + * Returns an instance of a new builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * {@link Beta}
+ * Builder for {@link ExponentialBackOffPolicy}. + * + *

+ * Implementation is not thread-safe. + *

+ * + * @since 1.7 + */ + @Beta + @Deprecated + public static class Builder { + + /** Exponential back-off builder. */ + final ExponentialBackOff.Builder exponentialBackOffBuilder = new ExponentialBackOff.Builder(); + + protected Builder() { + } + + /** Builds a new instance of {@link ExponentialBackOffPolicy}. */ + public ExponentialBackOffPolicy build() { + return new ExponentialBackOffPolicy(this); + } + + /** + * Returns the initial retry interval in milliseconds. The default value is + * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. + */ + public final int getInitialIntervalMillis() { + return exponentialBackOffBuilder.getInitialIntervalMillis(); + } + + /** + * Sets the initial retry interval in milliseconds. The default value is + * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setInitialIntervalMillis(int initialIntervalMillis) { + exponentialBackOffBuilder.setInitialIntervalMillis(initialIntervalMillis); + return this; + } + + /** + * Returns the randomization factor to use for creating a range around the retry interval. The + * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. + * + *

+ * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + * above the retry interval. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public final double getRandomizationFactor() { + return exponentialBackOffBuilder.getRandomizationFactor(); + } + + /** + * Sets the randomization factor to use for creating a range around the retry interval. The + * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range + * {@code 0 <= randomizationFactor < 1}. + * + *

+ * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + * above the retry interval. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setRandomizationFactor(double randomizationFactor) { + exponentialBackOffBuilder.setRandomizationFactor(randomizationFactor); + return this; + } + + /** + * Returns the value to multiply the current interval with for each retry attempt. The default + * value is {@link #DEFAULT_MULTIPLIER}. + */ + public final double getMultiplier() { + return exponentialBackOffBuilder.getMultiplier(); + } + + /** + * Sets the value to multiply the current interval with for each retry attempt. The default + * value is {@link #DEFAULT_MULTIPLIER}. Must be {@code >= 1}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setMultiplier(double multiplier) { + exponentialBackOffBuilder.setMultiplier(multiplier); + return this; + } + + /** + * Returns the maximum value of the back off period in milliseconds. Once the current interval + * reaches this value it stops increasing. The default value is + * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. + */ + public final int getMaxIntervalMillis() { + return exponentialBackOffBuilder.getMaxIntervalMillis(); + } + + /** + * Sets the maximum value of the back off period in milliseconds. Once the current interval + * reaches this value it stops increasing. The default value is + * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setMaxIntervalMillis(int maxIntervalMillis) { + exponentialBackOffBuilder.setMaxIntervalMillis(maxIntervalMillis); + return this; + } + + /** + * Returns the maximum elapsed time in milliseconds. The default value is + * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. + * + *

+ * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past + * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. + *

+ */ + public final int getMaxElapsedTimeMillis() { + return exponentialBackOffBuilder.getMaxElapsedTimeMillis(); + } + + /** + * Sets the maximum elapsed time in milliseconds. The default value is + * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. + * + *

+ * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past + * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. + *

+ * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ */ + public Builder setMaxElapsedTimeMillis(int maxElapsedTimeMillis) { + exponentialBackOffBuilder.setMaxElapsedTimeMillis(maxElapsedTimeMillis); + return this; + } + + /** + * Returns the nano clock. + * + * @since 1.14 + */ + public final NanoClock getNanoClock() { + return exponentialBackOffBuilder.getNanoClock(); + } + + /** + * Sets the nano clock ({@link NanoClock#SYSTEM} by default). + * + *

+ * Overriding is only supported for the purpose of calling the super implementation and changing + * the return type, but nothing else. + *

+ * + * @since 1.14 + */ + public Builder setNanoClock(NanoClock nanoClock) { + exponentialBackOffBuilder.setNanoClock(nanoClock); + return this; + } + } +} diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index cb9e91e7e..d75b7fa2f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -174,6 +174,13 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { /** HTTP content encoding or {@code null} for none. */ private HttpEncoding encoding; + /** + * The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. + */ + @Deprecated + @Beta + private BackOffPolicy backOffPolicy; + /** Whether to automatically follow redirects ({@code true} by default). */ private boolean followRedirects = true; @@ -298,6 +305,37 @@ public HttpRequest setEncoding(HttpEncoding encoding) { return this; } + /** + * {@link Beta}
+ * Returns the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. + * + * @since 1.7 + * @deprecated (scheduled to be removed in 1.18). + * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new + * {@link HttpBackOffUnsuccessfulResponseHandler} instead. + */ + @Deprecated + @Beta + public BackOffPolicy getBackOffPolicy() { + return backOffPolicy; + } + + /** + * {@link Beta}
+ * Sets the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. + * + * @since 1.7 + * @deprecated (scheduled to be removed in 1.18). Use + * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new + * {@link HttpBackOffUnsuccessfulResponseHandler} instead. + */ + @Deprecated + @Beta + public HttpRequest setBackOffPolicy(BackOffPolicy backOffPolicy) { + this.backOffPolicy = backOffPolicy; + return this; + } + /** * Returns the limit to the content size that will be logged during {@link #execute()}. * @@ -806,8 +844,10 @@ public HttpResponse execute() throws IOException { boolean retryRequest = false; Preconditions.checkArgument(numRetries >= 0); int retriesRemaining = numRetries; - // TODO(chingor): notify error handlers that the request is about to start - + if (backOffPolicy != null) { + // Reset the BackOffPolicy at the start of each execute. + backOffPolicy.reset(); + } HttpResponse response = null; IOException executeException; @@ -980,6 +1020,19 @@ public HttpResponse execute() throws IOException { if (handleRedirect(response.getStatusCode(), response.getHeaders())) { // The unsuccessful request's error could not be handled and it is a redirect request. errorHandled = true; + } else if (retryRequest && backOffPolicy != null + && backOffPolicy.isBackOffRequired(response.getStatusCode())) { + // The unsuccessful request's error could not be handled and should be backed off + // before retrying + long backOffTime = backOffPolicy.getNextBackOffMillis(); + if (backOffTime != BackOffPolicy.STOP) { + try { + sleeper.sleep(backOffTime); + } catch (InterruptedException exception) { + // ignore + } + errorHandled = true; + } } } // A retry is required if the error was successfully handled or if it is a redirect diff --git a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java index f132c6a2e..c949b6f23 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java @@ -120,7 +120,7 @@ public class ExponentialBackOff implements BackOff { private final int maxIntervalMillis; /** - * The system time in nanoseconds. It is calculated when an ExponentialBackOff instance is + * The system time in nanoseconds. It is calculated when an ExponentialBackOffPolicy instance is * created and is reset when {@link #reset()} is called. */ long startTimeNanos; @@ -135,7 +135,7 @@ public class ExponentialBackOff implements BackOff { private final NanoClock nanoClock; /** - * Creates an instance of ExponentialBackOff using default values. + * Creates an instance of ExponentialBackOffPolicy using default values. * *

* To override the defaults use {@link Builder}. diff --git a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java new file mode 100644 index 000000000..fc9dc9bd1 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2011 Google Inc. + * + * 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 com.google.api.client.util.NanoClock; + +import junit.framework.TestCase; + +/** + * Tests {@link ExponentialBackOffPolicy}. + * + * @author Ravi Mistry + */ +@Deprecated +public class ExponentialBackOffPolicyTest extends TestCase { + + public ExponentialBackOffPolicyTest(String name) { + super(name); + } + + public void testConstructor() { + ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy(); + assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + backOffPolicy.getInitialIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + backOffPolicy.getCurrentIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, + backOffPolicy.getRandomizationFactor()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + assertEquals( + ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + backOffPolicy.getMaxElapsedTimeMillis()); + } + + public void testBuilder() { + ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder().build(); + assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + backOffPolicy.getInitialIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + backOffPolicy.getCurrentIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, + backOffPolicy.getRandomizationFactor()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + assertEquals( + ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + backOffPolicy.getMaxElapsedTimeMillis()); + + int testInitialInterval = 1; + double testRandomizationFactor = 0.1; + double testMultiplier = 5.0; + int testMaxInterval = 10; + int testMaxElapsedTime = 900000; + + backOffPolicy = ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); + assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); + assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); + assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); + assertEquals(testMultiplier, backOffPolicy.getMultiplier()); + assertEquals(testMaxInterval, backOffPolicy.getMaxIntervalMillis()); + assertEquals(testMaxElapsedTime, backOffPolicy.getMaxElapsedTimeMillis()); + } + + public void testBackOff() throws Exception { + int testInitialInterval = 500; + double testRandomizationFactor = 0.1; + double testMultiplier = 2.0; + int testMaxInterval = 5000; + int testMaxElapsedTime = 900000; + + ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); + int[] expectedResults = {500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000}; + for (int expected : expectedResults) { + assertEquals(expected, backOffPolicy.getCurrentIntervalMillis()); + // Assert that the next back off falls in the expected range. + int minInterval = (int) (expected - (testRandomizationFactor * expected)); + int maxInterval = (int) (expected + (testRandomizationFactor * expected)); + long actualInterval = backOffPolicy.getNextBackOffMillis(); + assertTrue(minInterval <= actualInterval && actualInterval <= maxInterval); + } + } + + static class MyNanoClock implements NanoClock { + + private int i = 0; + private long startSeconds; + + MyNanoClock() { + } + + MyNanoClock(long startSeconds) { + this.startSeconds = startSeconds; + } + + public long nanoTime() { + return (startSeconds + i++) * 1000000000; + } + } + + public void testGetElapsedTimeMillis() { + ExponentialBackOffPolicy backOffPolicy = + new ExponentialBackOffPolicy.Builder().setNanoClock(new MyNanoClock()).build(); + long elapsedTimeMillis = backOffPolicy.getElapsedTimeMillis(); + assertEquals("elapsedTimeMillis=" + elapsedTimeMillis, 1000, elapsedTimeMillis); + } + + public void testBackOffOverflow() throws Exception { + int testInitialInterval = Integer.MAX_VALUE / 2; + double testMultiplier = 2.1; + int testMaxInterval = Integer.MAX_VALUE; + ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .build(); + backOffPolicy.getNextBackOffMillis(); + // Assert that when an overflow is possible the current interval is set to the max interval. + assertEquals(testMaxInterval, backOffPolicy.getCurrentIntervalMillis()); + } +} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index ae2303dbf..fc0e016ba 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -100,7 +100,6 @@ public void testNotSupportedByDefault() throws Exception { static class MockExecutor implements Executor { private Runnable runnable; - public void actuallyRun() { runnable.run(); } @@ -110,6 +109,39 @@ public void execute(Runnable command) { } } + @Deprecated + static private class MockBackOffPolicy implements BackOffPolicy { + + int backOffCalls; + int resetCalls; + boolean returnBackOffStop; + + MockBackOffPolicy() { + } + + public boolean isBackOffRequired(int statusCode) { + switch (statusCode) { + case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: // 500 + case HttpStatusCodes.STATUS_CODE_SERVICE_UNAVAILABLE: // 503 + return true; + default: + return false; + } + } + + public void reset() { + resetCalls++; + } + + public long getNextBackOffMillis() { + backOffCalls++; + if (returnBackOffStop) { + return BackOffPolicy.STOP; + } + return 0; + } + } + /** * Transport used for testing the redirection logic in HttpRequest. */ @@ -178,6 +210,29 @@ public void test301Redirect() throws Exception { Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); } + @Deprecated + public void test301RedirectWithUnsuccessfulResponseHandled() throws Exception { + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + // Set up RedirectTransport to redirect on the first request and then return success. + RedirectTransport fakeTransport = new RedirectTransport(); + HttpRequest request = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://gmail.com")); + request.setUnsuccessfulResponseHandler(handler); + request.setBackOffPolicy(backOffPolicy); + HttpResponse resp = request.execute(); + + Assert.assertEquals(200, resp.getStatusCode()); + Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + // Assert that the redirect logic was not invoked because the response handler could handle the + // request. The request url should be the original http://gmail.com + Assert.assertEquals("http://gmail.com", request.getUrl().toString()); + // Assert that the backoff policy was not invoked because the response handler could handle the + // request. + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(0, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Exception { MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); @@ -201,6 +256,30 @@ public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Excep Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void test301RedirectWithUnsuccessfulResponseNotHandled() throws Exception { + // Create an Unsuccessful response handler that always returns false. + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + // Set up RedirectTransport to redirect on the first request and then return success. + RedirectTransport fakeTransport = new RedirectTransport(); + HttpRequest request = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://gmail.com")); + request.setUnsuccessfulResponseHandler(handler); + request.setBackOffPolicy(backOffPolicy); + HttpResponse resp = request.execute(); + + Assert.assertEquals(200, resp.getStatusCode()); + // Assert that the redirect logic was invoked because the response handler could not handle the + // request. The request url should have changed from http://gmail.com to http://google.com + Assert.assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); + Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + // Assert that the backoff policy is never invoked (except to reset) because the response + // handler returned false. + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(0, backOffPolicy.backOffCalls); + } + public void test301RedirectWithBackOffUnsuccessfulResponseNotHandled() throws Exception { // Create an Unsuccessful response handler that always returns false. MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); @@ -568,6 +647,26 @@ public void testAbnormalResponseHandlerWithNoBackOff() throws Exception { Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testAbnormalResponseHandlerWithBackOff() throws Exception { + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + HttpResponse resp = req.execute(); + + Assert.assertEquals(200, resp.getStatusCode()); + Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(0, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -585,6 +684,26 @@ public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testBackOffSingleCall() throws Exception { + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + HttpResponse resp = req.execute(); + + Assert.assertEquals(200, resp.getStatusCode()); + Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(1, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -602,6 +721,27 @@ public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testBackOffMultipleCalls() throws Exception { + int callsBeforeSuccess = 5; + FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + HttpResponse resp = req.execute(); + + Assert.assertEquals(200, resp.getStatusCode()); + Assert.assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(callsBeforeSuccess, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( @@ -620,6 +760,30 @@ public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testBackOffCallsBeyondRetryLimit() throws Exception { + int callsBeforeSuccess = 11; + FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setNumberOfRetries(callsBeforeSuccess - 1); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + try { + req.execute(); + fail("expected HttpResponseException"); + } catch (HttpResponseException e) { + } + Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + Assert.assertEquals(callsBeforeSuccess - 1, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( @@ -641,6 +805,29 @@ public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Excepti Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testBackOffUnRecognizedStatusCode() throws Exception { + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + try { + req.execute(); + } catch (HttpResponseException e) { + } + + Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + // The BackOffPolicy should not be called since it does not support 401 status codes. + Assert.assertEquals(0, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); @@ -661,6 +848,32 @@ public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Except Assert.assertTrue(handler.isCalled()); } + @Deprecated + public void testBackOffStop() throws Exception { + int callsBeforeSuccess = 5; + FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); + MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); + backOffPolicy.returnBackOffStop = true; + + HttpRequest req = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + req.setUnsuccessfulResponseHandler(handler); + req.setBackOffPolicy(backOffPolicy); + try { + req.execute(); + } catch (HttpResponseException e) { + } + + Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); + Assert.assertEquals(1, backOffPolicy.resetCalls); + // The BackOffPolicy should be called only once and then it should return BackOffPolicy.STOP + // should stop all back off retries. + Assert.assertEquals(1, backOffPolicy.backOffCalls); + Assert.assertTrue(handler.isCalled()); + } + public void testBackOffUnsucessfulResponseStop() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( From 80b1a9c12056f1e4f4d9294f15d2c970f774a903 Mon Sep 17 00:00:00 2001 From: Gerald Madlmayr Date: Wed, 7 Nov 2018 22:36:23 +0100 Subject: [PATCH 009/983] Fix parameter of maven-javadoc-plugin (#522) (#523) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea6bdf3d1..e464c080b 100644 --- a/pom.xml +++ b/pom.xml @@ -384,7 +384,7 @@ maven-javadoc-plugin - -Xdoclint:none + -Xdoclint:none From d7f18a377b1ab257820898709693a11ab6a4714d Mon Sep 17 00:00:00 2001 From: Gerald Madlmayr Date: Fri, 9 Nov 2018 00:18:07 +0100 Subject: [PATCH 010/983] Skip Lint of JavaDoc (#525) * Use doclint to skip checks of javadoc (#524) * Remove comment out command (#522) --- .kokoro/build.sh | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index ac85fb805..b883e2c51 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -23,5 +23,5 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" -mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V +mvn install -DskipTests=true -B -V mvn test -B diff --git a/pom.xml b/pom.xml index e464c080b..6ced6b2ee 100644 --- a/pom.xml +++ b/pom.xml @@ -384,7 +384,7 @@ maven-javadoc-plugin - -Xdoclint:none + none From 7b95ce830d9fcce5e165db63ed245f6ed08ce4d4 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 9 Nov 2018 09:24:21 -0800 Subject: [PATCH 011/983] Add write timeout for post/put requests (#485) * Introduce API to set writeTimeout and use it in the NetHttp request * Surface the writeTimeout to HttpRequest * remove debug statements * Fix warnings * Fix syntax * DI for testing * Make field constant field final --- .../google/api/client/http/HttpRequest.java | 30 +++++++ .../api/client/http/LowLevelHttpRequest.java | 15 ++++ .../client/http/javanet/NetHttpRequest.java | 76 ++++++++++++++++- .../http/javanet/NetHttpRequestTest.java | 85 +++++++++++++++++++ .../src/test/resources/file.txt | 1 + 5 files changed, 205 insertions(+), 2 deletions(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java create mode 100644 google-http-client/src/test/resources/file.txt diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index d75b7fa2f..dcabb9044 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -158,6 +158,11 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { */ private int readTimeout = 20 * 1000; + /** + * Timeout in milliseconds to set POST/PUT data or {@code 0} for an infinite timeout. + */ + private int writeTimeout = 0; + /** HTTP unsuccessful (non-2XX) response handler or {@code null} for none. */ private HttpUnsuccessfulResponseHandler unsuccessfulResponseHandler; @@ -493,6 +498,30 @@ public HttpRequest setReadTimeout(int readTimeout) { return this; } + /** + * Returns the timeout in milliseconds to send POST/PUT data or {@code 0} for an infinite timeout. + * + *

+ * By default it is 0 (infinite). + *

+ * + * @since 1.26 + */ + public int getWriteTimeout() { + return writeTimeout; + } + + /** + * Sets the timeout in milliseconds to send POST/PUT data or {@code 0} for an infinite timeout. + * + * @since 1.26 + */ + public HttpRequest setWriteTimeout(int writeTimeout) { + Preconditions.checkArgument(writeTimeout >= 0); + this.writeTimeout = writeTimeout; + return this; + } + /** * Returns the HTTP request headers. * @@ -977,6 +1006,7 @@ public HttpResponse execute() throws IOException { // execute lowLevelHttpRequest.setTimeout(connectTimeout, readTimeout); + lowLevelHttpRequest.setWriteTimeout(writeTimeout); try { LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest.execute(); // Flag used to indicate if an exception is thrown before the response is constructed. diff --git a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java index a3f489efc..d3900f91c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java @@ -159,6 +159,21 @@ public final StreamingContent getStreamingContent() { public void setTimeout(int connectTimeout, int readTimeout) throws IOException { } + /** + * Sets the write timeout for POST/PUT requests. + * + *

+ * Default implementation does nothing, but subclasses should normally override. + *

+ * + * @param writeTimeout timeout in milliseconds to establish a connection or {@code 0} for an + * infinite timeout + * @throws IOException I/O exception + * @since 1.26 + */ + public void setWriteTimeout(int writeTimeout) throws IOException { + } + /** Executes the request and returns a low-level HTTP response object. */ public abstract LowLevelHttpResponse execute() throws IOException; } diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java index d0d8d0cb1..cd92cac11 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java @@ -18,9 +18,19 @@ import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.Preconditions; +import com.google.api.client.util.StreamingContent; +import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.FutureTask; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; /** * @author Yaniv Inbar @@ -28,12 +38,14 @@ final class NetHttpRequest extends LowLevelHttpRequest { private final HttpURLConnection connection; + private int writeTimeout; /** * @param connection HTTP URL connection */ NetHttpRequest(HttpURLConnection connection) { this.connection = connection; + this.writeTimeout = 0; connection.setInstanceFollowRedirects(false); } @@ -48,8 +60,32 @@ public void setTimeout(int connectTimeout, int readTimeout) { connection.setConnectTimeout(connectTimeout); } + @Override + public void setWriteTimeout(int writeTimeout) throws IOException { + this.writeTimeout = writeTimeout; + } + + interface OutputWriter { + void write(OutputStream outputStream, StreamingContent content) throws IOException; + } + + static class DefaultOutputWriter implements OutputWriter { + @Override + public void write(OutputStream outputStream, final StreamingContent content) + throws IOException { + content.writeTo(outputStream); + } + } + + private static final OutputWriter DEFAULT_CONNECTION_WRITER = new DefaultOutputWriter(); + @Override public LowLevelHttpResponse execute() throws IOException { + return execute(DEFAULT_CONNECTION_WRITER); + } + + @VisibleForTesting + LowLevelHttpResponse execute(final OutputWriter outputWriter) throws IOException { HttpURLConnection connection = this.connection; // write content if (getStreamingContent() != null) { @@ -74,10 +110,12 @@ public LowLevelHttpResponse execute() throws IOException { } else { connection.setChunkedStreamingMode(0); } - OutputStream out = connection.getOutputStream(); + final OutputStream out = connection.getOutputStream(); + boolean threw = true; try { - getStreamingContent().writeTo(out); + writeContentToOutputStream(outputWriter, out); + threw = false; } finally { try { @@ -111,4 +149,38 @@ public LowLevelHttpResponse execute() throws IOException { } } } + + private void writeContentToOutputStream(final OutputWriter outputWriter, final OutputStream out) + throws IOException { + if (writeTimeout == 0) { + outputWriter.write(out, getStreamingContent()); + } else { + // do it with timeout + final StreamingContent content = getStreamingContent(); + final Callable writeContent = new Callable() { + @Override + public Boolean call() throws IOException { + outputWriter.write(out, content); + return Boolean.TRUE; + } + }; + + final ExecutorService executor = Executors.newSingleThreadExecutor(); + final Future future = executor.submit(new FutureTask(writeContent), null); + executor.shutdown(); + + try { + future.get(writeTimeout, TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + throw new IOException("Socket write interrupted", e); + } catch (ExecutionException e) { + throw new IOException("Exception in socket write", e); + } catch (TimeoutException e) { + throw new IOException("Socket write timed out", e); + } + if (!executor.isTerminated()) { + executor.shutdown(); + } + } + } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java new file mode 100644 index 000000000..6839dfd76 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java @@ -0,0 +1,85 @@ +package com.google.api.client.http.javanet; + +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.javanet.NetHttpRequest.OutputWriter; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.javanet.MockHttpURLConnection; +import com.google.api.client.util.StreamingContent; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.util.concurrent.TimeoutException; +import org.junit.Test; + +public class NetHttpRequestTest { + + static class SleepingOutputWriter implements OutputWriter { + private long sleepTimeInMs; + public SleepingOutputWriter(long sleepTimeInMs) { + this.sleepTimeInMs = sleepTimeInMs; + } + @Override + public void write(OutputStream outputStream, StreamingContent content) throws IOException { + try { + Thread.sleep(sleepTimeInMs); + } catch (InterruptedException e) { + throw new IOException("sleep interrupted", e); + } + } + } + + @Test + public void testHangingWrite() throws InterruptedException { + Thread thread = new Thread() { + @Override + public void run() { + try { + postWithTimeout(0); + } catch (IOException e) { + // expected to be interrupted + assertEquals(e.getCause().getClass(), InterruptedException.class); + return; + } catch (Exception e) { + fail(); + } + fail("should be interrupted before here"); + } + }; + + thread.start(); + Thread.sleep(1000); + assertTrue(thread.isAlive()); + thread.interrupt(); + } + + @Test(timeout = 1000) + public void testOutputStreamWriteTimeout() throws Exception { + try { + postWithTimeout(100); + fail("should have timed out"); + } catch (IOException e) { + assertEquals(e.getCause().getClass(), TimeoutException.class); + } catch (Exception e) { + fail("Expected an IOException not a " + e.getCause().getClass().getName()); + } + } + + private static void postWithTimeout(int timeout) throws Exception { + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.setRequestMethod("POST"); + NetHttpRequest request = new NetHttpRequest(connection); + InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); + HttpContent content = new InputStreamContent("text/plain", is); + request.setStreamingContent(content); + request.setWriteTimeout(timeout); + request.execute(new SleepingOutputWriter(5000L)); + } + +} diff --git a/google-http-client/src/test/resources/file.txt b/google-http-client/src/test/resources/file.txt new file mode 100644 index 000000000..1065c29e7 --- /dev/null +++ b/google-http-client/src/test/resources/file.txt @@ -0,0 +1 @@ +some sample file From 67d8c5d6347944cb41f52e92389accb150b1eb3d Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 12 Nov 2018 08:46:33 -0800 Subject: [PATCH 012/983] Release google-http-java-client v1.27.0 (#527) * Release v1.27.0 * Fix `@since` javadoc for new write timeout features * Fix VERSION constant * Fix version annotations in google-http-client-android-test artifact * Fix line length * Cleanup output and fix plugin versions * Change order of deployed assets * Add nexus-staging-maven-plugin and release profile to bom * Put the pom last again * bom needs a developers section --- .kokoro/release/stage.sh | 2 +- google-http-client-android-test/pom.xml | 6 +- google-http-client-android/pom.xml | 4 +- google-http-client-appengine/pom.xml | 4 +- google-http-client-assembly/pom.xml | 4 +- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 89 ++++++++++++++++--- google-http-client-findbugs/pom.xml | 4 +- google-http-client-gson/pom.xml | 4 +- google-http-client-jackson/pom.xml | 4 +- google-http-client-jackson2/pom.xml | 4 +- google-http-client-jdo/pom.xml | 4 +- google-http-client-protobuf/pom.xml | 4 +- google-http-client-test/pom.xml | 4 +- google-http-client-xml/pom.xml | 4 +- google-http-client/pom.xml | 4 +- .../google/api/client/http/HttpRequest.java | 6 +- .../api/client/http/LowLevelHttpRequest.java | 2 +- pom.xml | 6 +- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- .../googleplus-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++---- 22 files changed, 131 insertions(+), 64 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 02809c918..3b6794c27 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -22,7 +22,7 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn clean install deploy \ +mvn clean install deploy -B \ --settings settings.xml \ -DperformRelease=true \ -Dgpg.executable=gpg \ diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d129d05e7..5d6953615 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.26.1-SNAPSHOT + 1.27.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.26.0-1.26.0 + 1.27.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.26.0 + 1.27.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 99968587f..e52bd4921 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-android - 1.26.1-SNAPSHOT + 1.27.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 27013590a..3fc0641de 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-appengine - 1.26.1-SNAPSHOT + 1.27.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index e89325431..6eb170031 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.26.1-SNAPSHOT + 1.27.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index 568a067db..4932f09d8 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.26.0 + 1.27.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index a71e63ae9..05078d44f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.26.1-SNAPSHOT + 1.27.0 pom Google HTTP Client Library for Java BOM @@ -16,6 +16,18 @@ Google LLC + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + scm:git:https://github.com/googleapis/google-http-java-client.git scm:git:git@github.com:googleapis/google-http-java-client.git @@ -51,63 +63,114 @@ com.google.http-client google-http-client - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-android - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-appengine - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-assembly - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-findbugs - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-gson - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-jackson - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-jackson2 - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-jdo - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-protobuf - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-test - 1.26.1-SNAPSHOT + 1.27.0 com.google.http-client google-http-client-xml - 1.26.1-SNAPSHOT + 1.27.0 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.6 + true + + sonatype-nexus-staging + https://oss.sonatype.org/ + false + + + + + + + + release-sign-artifacts + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 719b36eeb..243a44d42 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-findbugs - 1.26.1-SNAPSHOT + 1.27.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 443c23aef..40768d189 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-gson - 1.26.1-SNAPSHOT + 1.27.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index 712e5366e..177693c69 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-jackson - 1.26.1-SNAPSHOT + 1.27.0 Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c34bf6f19..ddb0ab9d1 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-jackson2 - 1.26.1-SNAPSHOT + 1.27.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jdo/pom.xml b/google-http-client-jdo/pom.xml index 020b1de33..d1aac3f60 100644 --- a/google-http-client-jdo/pom.xml +++ b/google-http-client-jdo/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-jdo - 1.26.1-SNAPSHOT + 1.27.0 JDO extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 8f6917aff..a08599caf 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-protobuf - 1.26.1-SNAPSHOT + 1.27.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index df038a2c1..da137f88f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-test - 1.26.1-SNAPSHOT + 1.27.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 9f7b745cc..848135406 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client-xml - 1.26.1-SNAPSHOT + 1.27.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f5ea5497c..9971a0280 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../pom.xml google-http-client - 1.26.1-SNAPSHOT + 1.27.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index dcabb9044..856666a68 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -50,7 +50,7 @@ public final class HttpRequest { * * @since 1.8 */ - public static final String VERSION = "1.26.0"; + public static final String VERSION = "1.27.0"; /** * User agent suffix for all requests. @@ -505,7 +505,7 @@ public HttpRequest setReadTimeout(int readTimeout) { * By default it is 0 (infinite). *

* - * @since 1.26 + * @since 1.27 */ public int getWriteTimeout() { return writeTimeout; @@ -514,7 +514,7 @@ public int getWriteTimeout() { /** * Sets the timeout in milliseconds to send POST/PUT data or {@code 0} for an infinite timeout. * - * @since 1.26 + * @since 1.27 */ public HttpRequest setWriteTimeout(int writeTimeout) { Preconditions.checkArgument(writeTimeout >= 0); diff --git a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java index d3900f91c..36e6c3c22 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java @@ -169,7 +169,7 @@ public void setTimeout(int connectTimeout, int readTimeout) throws IOException { * @param writeTimeout timeout in milliseconds to establish a connection or {@code 0} for an * infinite timeout * @throws IOException I/O exception - * @since 1.26 + * @since 1.27 */ public void setWriteTimeout(int writeTimeout) throws IOException { } diff --git a/pom.xml b/pom.xml index 6ced6b2ee..c341ca8bd 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 pom Parent for the Google HTTP Client Library for Java @@ -298,6 +298,10 @@ 1.6 + + maven-deploy-plugin + 2.8.2 + org.sonatype.plugins jarjar-maven-plugin diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ca0ffb08e..63d8dbd99 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/samples/googleplus-simple-cmdline-sample/pom.xml b/samples/googleplus-simple-cmdline-sample/pom.xml index 16d6b3a80..da75b3aa6 100644 --- a/samples/googleplus-simple-cmdline-sample/pom.xml +++ b/samples/googleplus-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.26.1-SNAPSHOT + 1.27.0 ../../pom.xml googleplus-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 6983f416e..6d23f2a92 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.26.0:1.26.1-SNAPSHOT -google-http-client-bom:1.26.0:1.26.1-SNAPSHOT -google-http-client-parent:1.26.0:1.26.1-SNAPSHOT -google-http-client-android:1.26.0:1.26.1-SNAPSHOT -google-http-client-android-test:1.26.0:1.26.1-SNAPSHOT -google-http-client-appengine:1.26.0:1.26.1-SNAPSHOT -google-http-client-assembly:1.26.0:1.26.1-SNAPSHOT -google-http-client-findbugs:1.26.0:1.26.1-SNAPSHOT -google-http-client-gson:1.26.0:1.26.1-SNAPSHOT -google-http-client-jackson:1.26.0:1.26.1-SNAPSHOT -google-http-client-jackson2:1.26.0:1.26.1-SNAPSHOT -google-http-client-jdo:1.26.0:1.26.1-SNAPSHOT -google-http-client-protobuf:1.26.0:1.26.1-SNAPSHOT -google-http-client-test:1.26.0:1.26.1-SNAPSHOT -google-http-client-xml:1.26.0:1.26.1-SNAPSHOT +google-http-client:1.27.0:1.27.0 +google-http-client-bom:1.27.0:1.27.0 +google-http-client-parent:1.27.0:1.27.0 +google-http-client-android:1.27.0:1.27.0 +google-http-client-android-test:1.27.0:1.27.0 +google-http-client-appengine:1.27.0:1.27.0 +google-http-client-assembly:1.27.0:1.27.0 +google-http-client-findbugs:1.27.0:1.27.0 +google-http-client-gson:1.27.0:1.27.0 +google-http-client-jackson:1.27.0:1.27.0 +google-http-client-jackson2:1.27.0:1.27.0 +google-http-client-jdo:1.27.0:1.27.0 +google-http-client-protobuf:1.27.0:1.27.0 +google-http-client-test:1.27.0:1.27.0 +google-http-client-xml:1.27.0:1.27.0 From 7d1f23a852b028574690be54cf574bea8c36d71c Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 12 Nov 2018 11:27:15 -0800 Subject: [PATCH 013/983] Bump next snapshot (#528) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 26 ++++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-jdo/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 2 +- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- .../googleplus-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 58 insertions(+), 58 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 5d6953615..06d65d2f8 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.27.0 + 1.27.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.27.0 + 1.27.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.27.0 + 1.27.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index e52bd4921..05d531e92 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-android - 1.27.0 + 1.27.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3fc0641de..d0cb381c2 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.27.0 + 1.27.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6eb170031..691062532 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.27.0 + 1.27.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 05078d44f..f60b55bcf 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.27.0 + 1.27.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,62 +63,62 @@ com.google.http-client google-http-client - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-android - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-assembly - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-jackson - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-jdo - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-test - 1.27.0 + 1.27.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.27.0 + 1.27.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 243a44d42..f785f9f02 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.27.0 + 1.27.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 40768d189..ce30b92ec 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.27.0 + 1.27.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index 177693c69..12584dd17 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-jackson - 1.27.0 + 1.27.1-SNAPSHOT Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index ddb0ab9d1..4eaa6cf29 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.27.0 + 1.27.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jdo/pom.xml b/google-http-client-jdo/pom.xml index d1aac3f60..6a42bdf0c 100644 --- a/google-http-client-jdo/pom.xml +++ b/google-http-client-jdo/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-jdo - 1.27.0 + 1.27.1-SNAPSHOT JDO extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index a08599caf..0f741b8f0 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.27.0 + 1.27.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index da137f88f..03fc43773 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-test - 1.27.0 + 1.27.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 848135406..a2bff67fe 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.27.0 + 1.27.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9971a0280..69bf450f4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../pom.xml google-http-client - 1.27.0 + 1.27.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c341ca8bd..94a6721aa 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 63d8dbd99..6db9d2fa7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/samples/googleplus-simple-cmdline-sample/pom.xml b/samples/googleplus-simple-cmdline-sample/pom.xml index da75b3aa6..fbb83ff0d 100644 --- a/samples/googleplus-simple-cmdline-sample/pom.xml +++ b/samples/googleplus-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.27.0 + 1.27.1-SNAPSHOT ../../pom.xml googleplus-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 6d23f2a92..b8854ee7f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.27.0:1.27.0 -google-http-client-bom:1.27.0:1.27.0 -google-http-client-parent:1.27.0:1.27.0 -google-http-client-android:1.27.0:1.27.0 -google-http-client-android-test:1.27.0:1.27.0 -google-http-client-appengine:1.27.0:1.27.0 -google-http-client-assembly:1.27.0:1.27.0 -google-http-client-findbugs:1.27.0:1.27.0 -google-http-client-gson:1.27.0:1.27.0 -google-http-client-jackson:1.27.0:1.27.0 -google-http-client-jackson2:1.27.0:1.27.0 -google-http-client-jdo:1.27.0:1.27.0 -google-http-client-protobuf:1.27.0:1.27.0 -google-http-client-test:1.27.0:1.27.0 -google-http-client-xml:1.27.0:1.27.0 +google-http-client:1.27.0:1.27.1-SNAPSHOT +google-http-client-bom:1.27.0:1.27.1-SNAPSHOT +google-http-client-parent:1.27.0:1.27.1-SNAPSHOT +google-http-client-android:1.27.0:1.27.1-SNAPSHOT +google-http-client-android-test:1.27.0:1.27.1-SNAPSHOT +google-http-client-appengine:1.27.0:1.27.1-SNAPSHOT +google-http-client-assembly:1.27.0:1.27.1-SNAPSHOT +google-http-client-findbugs:1.27.0:1.27.1-SNAPSHOT +google-http-client-gson:1.27.0:1.27.1-SNAPSHOT +google-http-client-jackson:1.27.0:1.27.1-SNAPSHOT +google-http-client-jackson2:1.27.0:1.27.1-SNAPSHOT +google-http-client-jdo:1.27.0:1.27.1-SNAPSHOT +google-http-client-protobuf:1.27.0:1.27.1-SNAPSHOT +google-http-client-test:1.27.0:1.27.1-SNAPSHOT +google-http-client-xml:1.27.0:1.27.1-SNAPSHOT From ab627ed38c5891139a507ee1b903e13f498045d8 Mon Sep 17 00:00:00 2001 From: ajaaym <34161822+ajaaym@users.noreply.github.com> Date: Tue, 4 Dec 2018 12:37:07 -0500 Subject: [PATCH 014/983] Request charset defaults to UTF-8, Response charset defaults to ISO_8859_1 (#532) --- .../java/com/google/api/client/http/AbstractHttpContent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java index d288db1fd..46fcabd45 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java @@ -98,7 +98,7 @@ public AbstractHttpContent setMediaType(HttpMediaType mediaType) { */ protected final Charset getCharset() { return mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.UTF_8 : mediaType.getCharsetParameter(); + ? Charsets.ISO_8859_1 : mediaType.getCharsetParameter(); } public String getType() { From fb1855551a998a1b62b319ca90840c4b45e052a4 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 4 Dec 2018 14:39:25 -0800 Subject: [PATCH 015/983] Update guava to 26.0-android (#531) --- ...oogle-http-client-appengine-dependencies.html | 8 ++++---- .../google-http-client-dependencies.html | 16 ++++++++-------- .../google-http-client-gson-dependencies.html | 8 ++++---- .../google-http-client-jackson-dependencies.html | 8 ++++---- ...google-http-client-jackson2-dependencies.html | 8 ++++---- .../google-http-client-jdo-dependencies.html | 8 ++++---- .../google-http-client-xml-dependencies.html | 8 ++++---- pom.xml | 2 +- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html index 91510b1ae..9dcd8632d 100644 --- a/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html +++ b/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html @@ -91,7 +91,7 @@

test

com.google.guava guava -20.0 +26.0-android jar The Apache Software License, Version 2.0 @@ -319,7 +319,7 @@

Dependency Tree

Description: JUnit is a regression testing framework. It is used by the developer who implements unit tests in Java.

URL: http://junit.org

Project License: Common Public License Version 1.0

-
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (provided) Information
  • com.google.guava:guava:jar:26.0-android (provided) Information
  • -
  • com.google.guava:guava-testlib:jar:20.0 (test) Information
  • com.google.guava:guava-testlib:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information
  • -
  • com.google.guava:guava:jar:20.0 (test) Information
  • com.google.guava:guava:jar:26.0-android (test) Information -
    -

    provided

    -

    The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

    - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.androidandroid4.1.1.4jarApache 2.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    provided

    -

    The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    org.jsonjson20080701jarprovided without support or warranty
    org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
    xercesxmlParserAPIs2.6.2jar-
    xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Unknown: xmlParserAPIs

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    provided without support or warranty: JSON (JavaScript Object Notation)

    -

    Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library

    -

    The Apache Software License, Version 2.0: Android Platform Extensions to the Google HTTP Client Library for Java., Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, J2ObjC Annotations

    -

    Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    android-4.1.1.4.jar12.35 MB7,2641,698711.5debug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.1.1.jar59.26 kB422821.1debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    json-20080701.jar36.99 kB261711.3debug
    opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
    xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
    xpp3-1.1.4c.jar117.25 kB7856131.1debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    1214.22 MB8,9723,0601731.611
    compile: 7compile: 1.58 MBcompile: 1,341compile: 1,069compile: 69-compile: 7
    provided: 5provided: 12.64 MBprovided: 7,631provided: 1,991provided: 104-provided: 4
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.android:android:jar:4.1.1.4---
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.1.1---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    org.json:json:jar:20080701---
    org.khronos:opengl-api:jar:gl1.1-android-2.1_r1---
    xerces:xmlParserAPIs:jar:2.6.2---
    xpp3:xpp3:jar:1.1.4c---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    12 (compile: 7, provided: 5)000
    - - -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html deleted file mode 100644 index 9dcd8632d..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.appengineappengine-api-stubs1.9.64jarGoogle App Engine Terms of Service
    com.google.appengineappengine-testing1.9.64jarGoogle App Engine Terms of Service
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client-test${project.version}jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    provided

    -

    The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

    - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.appengineappengine-api-1.0-sdk1.9.64jarGoogle App Engine Terms of Service
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Google App Engine Terms of Service: appengine-api-1.0-sdk, appengine-api-stubs, appengine-testing

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, Google App Engine extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, J2ObjC Annotations, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    appengine-api-1.0-sdk-1.9.64.jar30.66 MB6,5666,044861.6debug
    appengine-api-stubs-1.9.64.jar12.16 MB3,0982,7851671.6debug
    appengine-testing-1.9.64.jar10.32 MB2,2932,265261.6debug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    google-http-client-test-${project.version}.jar51.73 kB594921.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    1357.33 MB15,46814,2563981.613
    compile: 7compile: 1.59 MBcompile: 1,341compile: 1,069compile: 69-compile: 7
    test: 5test: 25.08 MBtest: 7,561test: 7,143test: 243-test: 5
    provided: 1provided: 30.66 MBprovided: 6,566provided: 6,044provided: 86-provided: 1
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.appengine:appengine-api-1.0-sdk:jar:1.9.64---
    com.google.appengine:appengine-api-stubs:jar:1.9.64---
    com.google.appengine:appengine-testing:jar:1.9.64---
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.guava:guava:jar:26.0-android---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.http-client:google-http-client-test:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    13 (compile: 7, test: 5, provided: 1)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-dependencies.html deleted file mode 100644 index b6dd27a3c..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-dependencies.html +++ /dev/null @@ -1,758 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava-testlib26.0-androidjarThe Apache Software License, Version 2.0
    com.google.truthtruth0.40jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    org.mockitomockito-all1.9.0jarThe MIT License
    -
    -

    provided

    -

    The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.androidandroid1.5_r4jarApache 2.0
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    commons-loggingcommons-logging1.1.1jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.errorproneerror_prone_annotations2.0.12jarApache 2.0
    com.googlecode.java-diff-utilsdiffutils1.3.0jarThe Apache Software License, Version 2.0
    -
    -

    provided

    -

    The following is a list of provided dependencies for this project. These dependencies are required to compile the application, but should be provided by default when using the library:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    org.khronosopengl-apigl1.1-android-2.1_r1jarApache 2.0
    xercesxmlParserAPIs2.6.2jar-
    xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Unknown: xmlParserAPIs

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    Apache 2.0: Google Android Java ME Library (Khronos), Google Android Library, error-prone annotations

    -

    The Apache Software License, Version 2.0: Commons Codec, Commons Logging, FindBugs-jsr305, Google HTTP Client Library for Java, Guava Testing Library, Guava: Google Core Libraries for Java, J2ObjC Annotations, Truth Core, java-diff-utils

    -

    The MIT License: Mockito

    -

    Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    android-1.5_r4.jar2.04 MB1,894965411.5debug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    error_prone_annotations-2.0.12.jar10.06 kB281621.6release
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    guava-testlib-26.0-android.jar748.27 kB59557471.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    truth-0.40.jar196.26 kB15013911.6debug
    diffutils-1.3.0.jar33.33 kB352621.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.1.1.jar59.26 kB422821.1debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    opengl-api-gl1.1-android-2.1_r1.jar18.06 kB251321.5debug
    mockito-all-1.9.0.jar1.43 MB1,279654661.5debug
    xmlParserAPIs-2.6.2.jar121.80 kB238207171.1release
    xpp3-1.1.4c.jar117.25 kB7856131.1debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    178.56 MB7,5515,5632521.615
    compile: 5compile: 1.11 MBcompile: 900compile: 793compile: 47-compile: 5
    test: 6test: 2.62 MBtest: 2,354test: 1,639test: 108-test: 5
    provided: 6provided: 4.84 MBprovided: 4,297provided: 3,131provided: 97-provided: 5
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.android:android:jar:1.5_r4---
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.errorprone:error_prone_annotations:jar:2.0.12---
    com.google.guava:guava:jar:26.0-android---
    com.google.guava:guava-testlib:jar:26.0-android---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    com.google.truth:truth:jar:0.40---
    com.googlecode.java-diff-utils:diffutils:jar:1.3.0---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.1.1---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    org.khronos:opengl-api:jar:gl1.1-android-2.1_r1---
    org.mockito:mockito-all:jar:1.9.0---
    xerces:xmlParserAPIs:jar:2.6.2---
    xpp3:xpp3:jar:1.1.4c---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    17 (compile: 5, test: 6, provided: 6)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-gson-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-gson-dependencies.html deleted file mode 100644 index 15f2296cf..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-gson-dependencies.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.gsongson2.1jarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client-test${project.version}jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, GSON extensions to the Google HTTP Client Library for Java., Google HTTP Client Library for Java, Gson, Guava: Google Core Libraries for Java, J2ObjC Annotations, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    gson-2.1.jar175.89 kB15814861.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    google-http-client-test-${project.version}.jar51.73 kB594921.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    114.36 MB3,6693,3101251.611
    compile: 8compile: 1.76 MBcompile: 1,499compile: 1,217compile: 75-compile: 8
    test: 3test: 2.61 MBtest: 2,170test: 2,093test: 50-test: 3
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.code.gson:gson:jar:2.1---
    com.google.guava:guava:jar:26.0-android---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.http-client:google-http-client-test:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    11 (compile: 8, test: 3)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-jackson-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-jackson-dependencies.html deleted file mode 100644 index e58f65e41..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-jackson-dependencies.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    org.codehaus.jacksonjackson-core-asl1jarThe Apache Software License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client-test${project.version}jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, J2ObjC Annotations, Jackson, Jackson extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    google-http-client-test-${project.version}.jar51.73 kB594921.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    jackson-core-asl-1.9.13.jar226.69 kB13712181.5debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    114.41 MB3,6483,2831271.611
    compile: 8compile: 1.81 MBcompile: 1,478compile: 1,190compile: 77-compile: 8
    test: 3test: 2.61 MBtest: 2,170test: 2,093test: 50-test: 3
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.guava:guava:jar:26.0-android---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.http-client:google-http-client-test:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    org.codehaus.jackson:jackson-core-asl:jar:1.9.13---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    11 (compile: 8, test: 3)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-jackson2-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-jackson2-dependencies.html deleted file mode 100644 index 3a8bd67b3..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-jackson2-dependencies.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.fasterxml.jackson.corejackson-core2.9.6jarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client-test${project.version}jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, J2ObjC Annotations, Jackson 2 extensions to the Google HTTP Client Library for Java., Jackson-core, Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jackson-core-2.9.6.jar313.71 kB130105111.6debug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    google-http-client-test-${project.version}.jar51.73 kB594921.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    114.50 MB3,6413,2671301.611
    compile: 8compile: 1.89 MBcompile: 1,471compile: 1,174compile: 80-compile: 8
    test: 3test: 2.61 MBtest: 2,170test: 2,093test: 50-test: 3
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.fasterxml.jackson.core:jackson-core:jar:2.9.6---
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.guava:guava:jar:26.0-android---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.http-client:google-http-client-test:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    11 (compile: 8, test: 3)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-jdo-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-jdo-dependencies.html deleted file mode 100644 index 0763419b7..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-jdo-dependencies.html +++ /dev/null @@ -1,712 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    javax.jdojdo2-api2.3-ebjarApache 2
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    com.google.http-clientgoogle-http-client-test${project.version}jarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    mysqlmysql-connector-java5.1.18jarThe GNU General Public License, Version 2
    org.datanucleusdatanucleus-api-jdo3.2.1jarThe Apache Software License, Version 2.0
    org.datanucleusdatanucleus-core3.2.2jarThe Apache Software License, Version 2.0
    org.datanucleusdatanucleus-rdbms3.2.1jarThe Apache Software License, Version 2.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    javax.transactiontransaction-api1.1jar-
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache 2: JDO2 API

    -

    Unknown: transaction-api

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, DataNucleus Core, DataNucleus JDO API plugin, DataNucleus RDBMS, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, J2ObjC Annotations, JDO extensions to the Google HTTP Client Library for Java., Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.

    -

    The GNU General Public License, Version 2: MySQL Connector/J

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    google-http-client-test-${project.version}.jar51.73 kB594921.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    jdo2-api-2.3-eb.jar188.18 kB22618271.5debug
    transaction-api-1.1.jar14.72 kB241821.3debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    mysql-connector-java-5.1.18.jar771.37 kB279245121.6debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    datanucleus-api-jdo-3.2.1.jar329.11 kB18012661.5debug
    datanucleus-core-3.2.2.jar1.72 MB943841501.5debug
    datanucleus-rdbms-3.2.1.jar1.69 MB768715291.6debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    168.87 MB5,9315,2892251.616
    compile: 9compile: 1.78 MBcompile: 1,591compile: 1,269compile: 78-compile: 9
    test: 7test: 7.09 MBtest: 4,340test: 4,020test: 147-test: 7
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    DN_M2_Repohttp://www.datanucleus.org/downloads/maven2/Yes-
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
    com.google.code.findbugs:jsr305:jar:3.0.2----
    com.google.guava:guava:jar:26.0-android----
    com.google.http-client:google-http-client:jar:${project.version}----
    com.google.http-client:google-http-client-test:jar:${project.version}----
    com.google.j2objc:j2objc-annotations:jar:1.1----
    commons-codec:commons-codec:jar:1.6----
    commons-logging:commons-logging:jar:1.2----
    javax.jdo:jdo2-api:jar:2.3-eb--Found at http://www.datanucleus.org/downloads/maven2/-
    javax.transaction:transaction-api:jar:1.1----
    junit:junit:jar:4.8.2----
    mysql:mysql-connector-java:jar:5.1.18----
    org.apache.httpcomponents:httpclient:jar:4.5.5----
    org.apache.httpcomponents:httpcore:jar:4.4.6----
    org.datanucleus:datanucleus-api-jdo:jar:3.2.1----
    org.datanucleus:datanucleus-core:jar:3.2.2----
    org.datanucleus:datanucleus-rdbms:jar:3.2.1----
    Totalapache.snapshotssonatype-nexus-snapshotsDN_M2_Repocentral
    16 (compile: 9, test: 7)0010
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-protobuf-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-protobuf-dependencies.html deleted file mode 100644 index cc8787bbf..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-protobuf-dependencies.html +++ /dev/null @@ -1,485 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    com.google.protobufprotobuf-java2.6.1jarNew BSD license
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    New BSD license: Protocol Buffer Java API

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, Google HTTP Client Library for Java, J2ObjC Annotations, Protocol Buffer extensions to the Google HTTP Client Library for Java.

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    protobuf-java-2.6.1.jar582.66 kB28627611.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    92.38 MB1,8941,5751001.69
    compile: 8compile: 2.15 MBcompile: 1,627compile: 1,345compile: 70-compile: 8
    test: 1test: 231.78 kBtest: 267test: 230test: 30-test: 1
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    com.google.protobuf:protobuf-java:jar:2.6.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    9 (compile: 8, test: 1)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/google-http-client-xml-dependencies.html b/google-http-client-assembly/dependencies/google-http-client-xml-dependencies.html deleted file mode 100644 index 5d55b0762..000000000 --- a/google-http-client-assembly/dependencies/google-http-client-xml-dependencies.html +++ /dev/null @@ -1,519 +0,0 @@ - - - - - - Project Dependencies - - - - - - - - - -
    - -
    -
    -
    - -
    -

    Project Dependencies

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.http-clientgoogle-http-client${project.version}jarThe Apache Software License, Version 2.0
    xpp3xpp31.1.4cjarIndiana University Extreme! Lab Software License, vesion 1.1.1-Public Domain-Apache Software License, version 1.1
    -
    -

    test

    -

    The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:

    - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.guavaguava26.0-androidjarThe Apache Software License, Version 2.0
    junitjunit4.8.2jarCommon Public License Version 1.0
    -
    -

    Project Transitive Dependencies

    -

    The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.

    -
    -

    compile

    -

    The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    GroupIdArtifactIdVersionTypeLicense
    com.google.code.findbugsjsr3053.0.2jarThe Apache Software License, Version 2.0
    com.google.j2objcj2objc-annotations1.1jarThe Apache Software License, Version 2.0
    commons-codeccommons-codec1.6jarThe Apache Software License, Version 2.0
    commons-loggingcommons-logging1.2jarThe Apache Software License, Version 2.0
    org.apache.httpcomponentshttpclient4.5.5jarApache License, Version 2.0
    org.apache.httpcomponentshttpcore4.4.6jarApache License, Version 2.0
    -
    -

    Project Dependency Graph

    - -
    -

    Dependency Tree

    -
    -
    -

    Licenses

    -

    Apache Software License, version 1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Public Domain: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -

    Apache License, Version 2.0: Apache HttpClient, Apache HttpCore

    -

    Common Public License Version 1.0: JUnit

    -

    The Apache Software License, Version 2.0: Apache Commons Logging, Commons Codec, FindBugs-jsr305, Google HTTP Client Library for Java, Guava: Google Core Libraries for Java, J2ObjC Annotations, XML extensions to the Google HTTP Client Library for Java.

    -

    Indiana University Extreme! Lab Software License, vesion 1.1.1: MXP1: Xml Pull Parser 3rd Edition (XPP3)

    -
    -

    Dependency File Details

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FilenameSizeEntriesClassesPackagesJDK RevDebug
    jsr305-3.0.2.jar19.47 kB463531.5debug
    guava-26.0-android.jar2.33 MB1,8441,814181.6debug
    google-http-client-${project.version}.jar261.81 kB223200161.6debug
    j2objc-annotations-1.1.jar8.58 kB231211.5debug
    commons-codec-1.6.jar227.32 kB2187661.5debug
    commons-logging-1.2.jar60.38 kB422821.2debug
    junit-4.8.2.jar231.78 kB267230301.5debug
    httpclient-4.5.5.jar730.27 kB507466241.6debug
    httpcore-4.4.6.jar316.23 kB282252171.6debug
    xpp3-1.1.4c.jar117.25 kB7856131.1debug
    TotalSizeEntriesClassesPackagesJDK RevDebug
    104.26 MB3,5303,1691301.610
    compile: 8compile: 1.70 MBcompile: 1,419compile: 1,125compile: 82-compile: 8
    test: 2test: 2.56 MBtest: 2,111test: 2,044test: 48-test: 2
    -
    -

    Dependency Repository Locations

    - - - - - - - - - - - - - - - - - - - - -
    Repo IDURLReleaseSnapshot
    apache.snapshotshttp://repository.apache.org/snapshots-Yes
    sonatype-nexus-snapshotshttps://oss.sonatype.org/content/repositories/snapshots-Yes
    centralhttps://repo.maven.apache.org/maven2Yes-
    -

    Repository locations for each of the Dependencies.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Artifactapache.snapshotssonatype-nexus-snapshotscentral
    com.google.code.findbugs:jsr305:jar:3.0.2---
    com.google.guava:guava:jar:26.0-android---
    com.google.http-client:google-http-client:jar:${project.version}---
    com.google.j2objc:j2objc-annotations:jar:1.1---
    commons-codec:commons-codec:jar:1.6---
    commons-logging:commons-logging:jar:1.2---
    junit:junit:jar:4.8.2---
    org.apache.httpcomponents:httpclient:jar:4.5.5---
    org.apache.httpcomponents:httpcore:jar:4.4.6---
    xpp3:xpp3:jar:1.1.4c---
    Totalapache.snapshotssonatype-nexus-snapshotscentral
    10 (compile: 8, test: 2)000
    -
    -
    -
    -
    -
    - - - diff --git a/google-http-client-assembly/dependencies/images/close.gif b/google-http-client-assembly/dependencies/images/close.gif deleted file mode 100644 index 1c26bbc5264fcc943ad7b5a0f1a84daece211f34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmZ?wbhEHb6kyFkwP}e}6+mLp=yE)H5&?6cps==O-j2#K*@61O)i|`#U%|*xTD17#Qg5 z>nkWI$ji$M2ng`=^D}^ygDj#2&;c6F0P+h1n~g(5frm~PL&uV$l`S$eFDwzBDbhJD v>}Bvw*Al_tWna1PC9OaGVdk23i}vRhZI{iR^*V|n<^22a#~T_O9T}_vbswrX diff --git a/google-http-client-assembly/dependencies/images/collapsed.gif b/google-http-client-assembly/dependencies/images/collapsed.gif deleted file mode 100644 index 6e710840640c1bfd9dd76ce7fef56f1004092508..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 ycmZ?wbhEHbWM^P!XkdT>#h)yUTnvm1Iv_qshJlI4r7uBZ*YkPFU8d4p4Aua}2?(?R diff --git a/google-http-client-assembly/dependencies/images/expanded.gif b/google-http-client-assembly/dependencies/images/expanded.gif deleted file mode 100644 index 0fef3d89e0df1f8bc49a0cd827f2607c7d7fd2f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 xcmZ?wbhEHbWM^P!XkdT>#h)yUTnvm1Iv_qshJlH@g}+fUi&t{amUB!D)&R0C2fzRT diff --git a/google-http-client-assembly/dependencies/images/external.png b/google-http-client-assembly/dependencies/images/external.png deleted file mode 100644 index 3f999fc88b360074e41f38c3b4bc06ccb3bb7cf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^+(699!3-oX?^2ToQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%@dWsUxR#cd{{R1fCIbVIy!atN z8e~{WkY6y6%iy53@(Yk3;OXKRQgJIOfsI*BO@UFsfhWLBc>*(#PB?Jn2*(o!76E4F z2oaVU3``tH+Kgs0GI5+@Tg}d)z%jd%F@?{8!SRZ5b1yT80-FZIMn)zc2Ca66y`pzY R*nwsJMCn#OVEqF*oew~oaAu*+mN;-=y?VHT3tIe$XQqrDo-uB_a z!$aaK`z6))OKGn34?nwc^SuifkIL#EmDgV_qjg-#8v*0u4q4%1moUw{LZ54UeCgzNF^jX`uv-XK+9g@yFrG9?@ z!9&5&Tgk*j(b!GF&{N4I-Owl3GNQ;Kslp@APSw&&&ux9d>WxL~{EYoKm2KHvv3+ax zZUYB?Ae*8JnchZheXeEaa>@87?_fB*jV>(`erUx0B6j@wa!KnN)QWMO1rn9HC8 zQU}Tt3>@bftT|;oHYhlHH8T8tc{qL2LBC1&wnQeg^-S05<#H=J%;q~&KX!$OXH$lP zifQJ#9>L8|xhAVRHT-xPa*}7JK>(A*!AmL!CQC~j>707p+C5b#ib-SZ5@wfn#-0y8 zor_pb3M^%mkXhlduwjw4dk@RWhYZ<*tSUAV9x3eYyi#^d39lH{872xT#>g14FgCZb z+Lvv}DClhGVU*`8y(Qe}(9I>Lw<6->0~Q`zX3oMH2272dBARI`0wDzxS_G8b_H+a` TZ#n2*^y*Bf^Krq04Gh)*dSnrT diff --git a/google-http-client-assembly/dependencies/images/icon_info_sml.gif b/google-http-client-assembly/dependencies/images/icon_info_sml.gif deleted file mode 100644 index c6cb9ad7ce438a798426703e86a7ffc197d51dbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 606 zcmZ?wbhEHb!Rj)7jHhhdgsOUdoQoueZi?7 z>>gViTe&E#V48n=mrru5S3;v}WQB8hiDz7$TU2Fg8RZkU)J)l4H+4sO@7jjxJ4?G(<~7c1nYFul=C0P+d#d`@bj{yi z-npcE!T#Qb2PP~z)H;3B%r(bntUlH>Y2~CvyV|C%UbyM>vTf&9?!2&e&!siHFV0_c zVB`KP8}?n^dg$7Yqc`@PxOMQ%-NWbZ9Xfk=)1K2OFF!hV;r{6>kIr6ua^~ve%eS9j zy7lbD`I|4_et!J??bq+WzI^-n`RfmdkOIfh!pgqYwSCK`t~@$#!^!1aj_y2mzyI{@?vuB79>2N$==JkApPs$`_~ygc*YCf)diVLp z{pXKfy#M&+`?nvze*gIk#Q*;N0|qHLXbBUFKUo+V7>XElKuSSz!oa?}p{S|3rL`#` zEj=M8CWV#D$GthOu#hRgfH^NPHz`Z6or!6tudIJkhF|)EqL_SUmH;#E=*;vU)ut4d z*}1MJ+3|6yK5|W*0YQlwY}}E_93D;*P3)($(!#iHyj&dYc$?gAB*f@)n?~7Mn)5Ze zB*b!gs&gB@F*e|Da`5(ac688Lp~TGAEh5PBlHo`4aV}w%hy?;49h(#+>`NXTD0Bjy;4ci{C-1K14rU#4Xoa9{m6qopA9n0cn|!>ecYkij zwyX=!4*mH3EoqLqSGiVbyFqxD(bS8XSDu{6U1jZO70Ic@{~t&7=B^ zBD)NOoAkU&Gy^LQJ5PtV?u{&65}4ZUmfYbweP{LTy^YnAGv=AGa7*6wj}%~b0?7r5!@qH7P%p1*$L z@#{ODxoUwG+WsY)zWExj-aqxpQS(e!bx&6L`u)?tfB$~}{{8*?cVO&*V`-G2NeC$Z zWMO1r=w{FXnGVVm3>>=|#5rX=HY{-DP?VFNPL-%m%>B+*~5-k^-+4*MLFr;tQ0}^rlS-^!^Q`Mx1hrB$jwn&hk~Xk=#Nl+_9Nu|Y$D G!5RQ;-6)O# diff --git a/google-http-client-assembly/dependencies/images/icon_warning_sml.gif b/google-http-client-assembly/dependencies/images/icon_warning_sml.gif deleted file mode 100644 index 873bbb52cb9768103c27fbb9a9bac16ac615fce5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 576 zcmZ?wbhEHbB!Sy%bj7w z8LP{2I!WYbmF&-Ixi?j6tD|K1XR2M#l>Aw*aXL%wXS3nYW}{zi=4WzsU5r%E6qx+# za{AThd85YVOsT`KDUrWsBtGknIa3>Sy(4;AS@f^Dxt>-=XPXm#FD(1Lr2hBv=9?3X zZS^!XrNw@)>eiN((2|w-y>{aB1+99DGMA?}+UTggT+(Z*rf8+5x~aWVOGcurtl;&U zIa)H3I&#vwvQjJBn`YHj9iKlB7`)(M#!e{yWMO1rC}Yq8NrU2qfqia6SyOXMYa1sM zM_a34eqyRfcQbQJY;^IYGTuzaxglKLqNQEA}OiQec+sQ#rUUjLqg_MpsPmY43 zsgmVV8EHK$eV-B~6*UcAW2+w%1e4o&9#aAczLGF}PmMg|6J0Ey4q A)Bpeg diff --git a/google-http-client-assembly/dependencies/images/logos/build-by-maven-black.png b/google-http-client-assembly/dependencies/images/logos/build-by-maven-black.png deleted file mode 100644 index 919fd0f66a7f713920dd7422035db1c9d484351d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2294 zcmVKOG`!VuDc=fnx$+R6#>c^>b&wcOS?|$!`a}U6ptjU_J zlBA}l*3{J0)YMd0R~Hr*dU$xO^ie1jhYlTLS+=C4#MRYRCX#twGUSD6Il$6AA+=UAlkY(ZF;m4037Yc>v&!1mPsNXdliHV74&z>zUEv=}iC@U)i zfc^XTJ3BiAKvYyzczAd~K){|od(ip)`}f`5-HnZnv$L~Hzqq=(y7Kb!>gsAwPfu@e z@3gcu0LabFC4?{xBNPh18Fpy3+Tr2hfq{Yc_V$w}PjVdhGtMTH$zU){PfznaPmK)? z4KH52=;-KZX=#a#jlFZ{PF7YH!!Q{c8Taqs=Xt)UsK{tE{@>vc{2Hgh!NL0adH}e0 z@19Df^78Tm0ES@zz{SO7Zf@=upJ1_AP_bIAgpih&mWqmsojZ4GG#a&9{f)&Au~_Wm z<0F^L4;(mPHk)-io!M*-3JMa7#VIK%EBy%}_$g6IPEM9cBvPp~K0f}{t5+6_rMbEJ z(xpqcZ{G$0j^p<2+vnuu^bN3MdU`rLJ3Br;9ss7MrVbuFxUjHLQBhGX6WriQ5|M*_w z@5bUDdV71dTCG;AO-@dx@4a~OA{y)K>k+2N$jAo|9?w z?b_+nr`2k;!{M;o?Qh<^`R=>#RtFA0KR<`Vfh)Li;|5+X!otGn&U<@%H*VaBDU;Gf zr_<5=()7Iqfmk>yLj`}084`48Zf?d|M~)mpOHfeI{QNv2WMN?;Dk=&9GBY#LVzb%$ z`};Aq6GAK&OK4~)&U*g*IT{xh7M8K~%9SgtQ-;OG#ZeC5ym=F=X|vf(9h#b&K7RZN z05+S=X0xGjU|@g-%ePwl!GC`7t=5VDruDp`t9rXwq=tAb*88KQqo~N`a#V_oixKzA z%F4dJzL1cRy1F{CSUfW`qfjWeZ{Hpm7>H$yNF>V6&c<>vGBOgU_w@7}J9g~o(WA6z z#sgc0B0VlH4i&T6{Pyiz)FUDys6$s*7rnXCi!3z)!0DGJ5eITHyM2Q|E@qtti{QRD z*nbiZg+h^&lY>QINl6I+oH}*N-Q67kYHMqqoSd*@fE67^695Pa36aTU0HD+95)%{g zFw)c0Gcqy&K&4WxG906$qk6p_b=txpgmiazqaGF(M)NU+!{3cPsc^{*a`Ja$nXfZ@ zhsL%N4whw0OG`2M6&4oG&CQ8KBHBPHC@3f>C|I^a>__(qFp!^RU zV`F0uhl6EVxm><`_ijATmoHz|)ztxjL?XdmSuB<(Po5A$mM!w}C3kdS~ef}W>dub-Hhz&fI`vJ#oXvTST@?6qsxN=r)tz|+%n^XARiL+I)0 z!HGL|?4Z?OC@z>ppO+fmk zEDIk1FgrV2R8&O&@;qNwR)+h@$;nZx)dqvXVzG2}b>-#d_4oHa!G&Dp59OYMg zd;9A2I}{29&+|ObzkB!Y^XJcKjE;^*({SomlT)I^E^_90Q{xPG;bvU;38ml zcng&pTZhKxAmAX-{xuvUBO`bZu-omWrKK8;X6fkl>(@`5I6;GyySuwkDCBv*tE;QE zwH1kg)0Ijk1~{Qms8A@Vadob6a=9D}VUx-9>C-1l1S|^dcDq`w#&Z*k#hB*+K%>#n z=0$)zo8T)X1Ujc}V+Omw8!O@%0GKp7%(fp1ER{;7QYogYiHQlT)w*&q5{X2iP;Ak diff --git a/google-http-client-assembly/dependencies/images/logos/build-by-maven-white.png b/google-http-client-assembly/dependencies/images/logos/build-by-maven-white.png deleted file mode 100644 index 7d44c9c2e5742bdf8649ad282f83208f1da9b982..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2260 zcmV;_2rKuAP)4hTLUyOQ{PVbVY5&Y3g!&hN~bnR7}ZgkXUt ziC%zU0gf+&kEv>t|d$x|zXw1mS0D%1b{8z7DF%0wW-8(XBFc`A3vVI|O z^!N97baWg(eE86zLn4uA_wL=Zb@+UKU|=8sJb3V6XlSUctSl!dhm4xd=KJ^W|8h2q zR4NS%3yX+|NKQ`f?d=7Cf`Wo)&z=E5TU%REQIXYZefjbwRvsQ6zIyfQojZ3l8V#{v zv)R(q)39Vr2GBPsa+apV2%%fIZY3ln0Kl+1Y8c*(xe3X6sWFH9kH*UDDLl)ZN`}u~;f9D%P!A2LK5P2`MQl z(b3TuDUC++_U+qm01k;n!Z1u+TwGjS+}X2d^Yil+3Pn;B-~q z{Qdm_z{kf&EEb1^gw)j3R904!x}#RBj~+c578Vv16olc}xpQZGd;7k9`>@WHD_2M| z{%VB2fNVCK&1U^_rTW_bx`C@MK&%ZR^ybZ*=;&yb zN);0mV>X+~OA`|lRVtNAr7A8i#zL)DyJycHxm+$5izO0?QmM?$%p@6le0*H3R;yI1 z=;-LCrlu1oPI!8HIypHhmCA~Wig|;>WHON!GbSbmcN`jxhJ=GssnlpRR;zVzaF8J4 z>+3sJhW@0w{LH6-`(Afr<9kMWBXoSUM7Dox&JGJtojOI96z3EG z*uH)HWN?qO7x!`hzQnzLg5JL3Ui^ps%X$n4`+YK2S-yNZo>gC8kJmXUC#D?-i_a7IlwdR(Kkw#T>s)<( zJ!ZVTycREBO!{t;H9|r{F#q)FQ_`LjAsBnPnnKk2PZ;V3*7{M#@%jyBNObh|^_fg2 zd|f0I3eTTEPf=83VhUbHWgRft|{%MRRMp6H>seM7wV6&k5Vn7H0DDSDT_wn(;aaUDU zWi%QoiptK;CgqIWB$bwy78Mm?w@oI~&6_tPBO~$kExCLno}10)mX;RGM?^%-PjqOt zTFi(#=@4C7NJmxEVK7l6G0yhEp_Lq9)1fj}S-2%Mdrv$L~tStVt%xVSheDG9e5EX$6J zj8GIMm&=bIKaK;TqoYG05D0}r0!Kqb1E0?q2n1`_uAR{_f0E{OgnR$~y~Sd|+0n_# z2@6L?MsUQ^H0|QzLJoDKqobtlneyk|8`Sp{cp}PUC5RRQ^8?;2;Iss$eWk%*n3$Nr z(73v~e)3}s219#$yTM=(2n6o#?!LahxUO>?H!v`O%bZ*;$Ideh!!Qg0h{fVXix$lf i91DLtEx@rr0RIK2cl{g~?Z1Nn0000}s diff --git a/google-http-client-assembly/dependencies/images/logos/maven-feather.png b/google-http-client-assembly/dependencies/images/logos/maven-feather.png deleted file mode 100644 index b5ada836e9eb4af4db810f648b013933e72c8fbe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3330 zcmX9>c{JN;_x~o5Ac>t)`_^PEV{L6MNl>(?QcG&7ly=N-Xep}HlEki6%d`xGQff?J zZ3V5?nxMK^TW!%rlc2Oi#TE&YeBaFbd(OGfJqdI` zc>}=J0{}qD0)QP*?7suRWeWiKhXeo)6#$?b`+NA18vvk_kGT^3lRrj~)ZiX~E=7&X z2SKm_0zsnO+$cbVdd$U-?NJjv4pVQ1Nhjly1q-WLl67`_;z%v-QHPc;g_!S~IRE^{ z!-r;4Azogl1_mw!0>pbvoPqVZ9U2s5dwy6sHa1p4L7^@xJ3CvqEtc6=V;Sjo`SKw` zH=oaUc5x93g$)f2RLqLwrQCI9Ez?$q{#(_7txem8O7-r(E=u3NrnVzb>g3;N!E`D4 z$F(MEarBhUUxI^!j~_>3u~Bhx7JsSR*w|dSa6vbc*_R&srRM|ftV?XHdFb}1C$WrQ zvCqw{t=r+KeZT{28=Et|SGiR|Ew_)PCPc7HL$FRx^tIjT!gS^&HZAG+)pJ^j_L!yB z-&JbQI5tJZ0TS}9l}GV-#=yY9@UZdW!+Wo8V)3OP+M~kh8Cox&UgiEXkb|OHrtnt7 z^5^7qoPgd(mzSp^UljFw^Ea1#($jleS~zn<*Qt%~?;g8p7T$+e1_e6_0RivD9i_fn zntBj|S0D{TF>ZC0BjrC=O}^<#pa0LS&uvarfWzp2`pUd__f_%7YV~7dt=r6SgMYpk zjT&tozdBVDfMU+}3PBKu{I@a0eE%y;<26%LfpraXnsz78oRL+ASlucsJ9Ov}^-cnR z?X0S*D(PH#SsA1;IVGjHr-u@pc=<9LQ|*-QU~8*d0k5yGUszbEsHmW5uYUjj;c@h| zc=i>Ql~f4Q{2jFogTeH_k#4q)N#10=x?L3lT5fn+n;f?)a5}#)D(b9?5F`jW*8R2B zY10|kzu50Yt-pEkr?pP=J)v#j+39IETXnv??EKOqdr`^I$PR$!&#+i*wr^07q=V|W zRr`cRLkwol7wvCgY>XVWV#HBVP$e>vs8#}bhe8j(d*@G*O1g5TCFF^jnVIZQvS`z% z5v0FEpQe3XqLbN{Z+4@!!}?n1jYn$VqUAWElr$a=d)NRcr?dxiBP0c$a4eq)C6kW} zg`-#3YZthl;XEcu_;g!xn!}4v15@n5*WxOpB14=8A8Dk>`K z>FLRD7bsziv>lNxci1YB3`T!HV#jF&kvayv7^9-Sg&l|eQ^qB(FU%g~JDx-!K6@(Waovi+Tc$s`@s@Sv* z9p0C*!~5#c{h1>d>@N5DL);Ea=d|PU4}@o zGdG0Ng%R<9V_jn-yfB3nD7kxXb8!sMIXlJ1WeD*5?60hT&XSa)+yVTVl9iP_o8v^w8_0650v?-3$V0uILqsvdAu+2y6|YCewgNhga^h4Y-lNq0Cah}ivo zpoq6EpmWSceZAoF%B5UfVPU3op{AfPhFM{FSFJMU!)c~SDTMch@trf6$~-E;5xn-d z<8`e~UPj0w%vDYVje(iQii)`c=wzHbR6^djAF^dnW5A}!CD-JMWyVHEkW;BwukLPq z9nsR%B=!TuB0vQ|DPO#J@zkle(n^?>&z)~)XSMt|Ks2+uT9af6QEqK-hanLX5&&xP z-l-<%m`WTuBR<~hh#iYkQxoQNXtTFvX)i0JF_1Iu5Wn+7^XJlfPFX+T%IM9_7+4B=%5Y=a!X6S`QV)~knSitusE`|vEgD?+D*SdgtN-v z@2!tnPsQ$W9OoldXg5!7EGfyuKEmbk%8!pz518D&%P>a8*ji>n+N5Y15QI!N3aw76 zk?~TlC_r^z21V(@jrIB2O=fW{*e;OxLwTOl%b7{65NYoUzv46uU?y1WK`h1$gXk#s zGM!NC1T6)2&vea(*Gjoe-Y0OseT68UKVi7GtWs>+{mTm3?9wmCl9JqVL7fcIg7PHy zS|uV8fd^!W2I;)j*_@ml#-BrjgIWH)bTI&Jf1fXAax!YjYcdmoW44Np%MhjRZR?D*fO!{1UqRj~p#EAohT=T-17$$k6AmQb( zr9h0V!aUsY=NL_BPmf|~=n=+2*+gqRK=3w1+z;yxltfUx%}G^AqM7qBoD>Zu#))>h z(O-H}7=Go_Xv&X~RNksk#{u}JDqbNyJIauD&lJ!>cpV`%&T(-`&1Vx}= z8{BIG$r-+Li5}_#{j}s%FlGk$jM1|WKp=Pv|*T=m!~I+rUjJ3F@7W!gumQD8RFwVZryr0 zG6IWssk0)%eJuVTRDtKPo&xDaOWF|RzCnozye=JYW-)oDFHKrbK}AL7sWkcH57B~D zWIZ`=QNK#g)SEJB!`69JGO3P=r08pDX))Bb6t@_;R!2TlYhv>Ek*cIBeDucB zNbDTV5C(L01Ze7}3Kc7OC~(zLdAV~G`9N+1xB3ie(wD=k6U z@g3gU065J9XPq{lyp>keB&(ixxdnV8$%i$asL6b0O)JUdYtCpuubGB*DbEFHXlQtp zXgMTG%@{+j0dI{Adnj6-$)BcQylA>}r~l(e_1pE-*`Eac5PAGF#EWMIO6;2ECZAeo ziPF85kd7Ft6f{I>ZQIUbf5YND4#d%gJpKl~IaM@Xl!bUvZj*0lQRvUOOhugnVG zMF7OiLdS5a+otCLNQI8V^8vu3ka8NP_S>32`v3S)2n{Pe(fRVLdLST=H+AiBqCTY3 zZWI=>Zsgp=`Z%jG=8)QMYZO=@1A#!)z2kiwpnq3DhkpUGZV&>CeaB0vA>Y6+Mrd+| zrA52d@P7Qe=6m=0Lz-`5yrGM(x*9Y0sP7_5T2*v`@~JgS7L3#>yY-7x_MJ+9`9JqyEa*$Q0 ziiL%hken<6A7+&3D;!0f@qP3TvIRVoufv)c8?&aw&B~1Y(02aUpDjK7B)cSkx8QDV zQMj_M+x+$UXOfa)nmweB@KP^Xm2R7$9(p;LCnufvW}*eG4R>Eak)Ei}%-KE8gsec^ zj=HuX z(qyBjd`DTC3ZeF2!np?{CKA-DtE=Op^zuqOJMFU}UTntQB1KKp81%{!bT~6heKA2v zt?`kF-Zi+k^YcNCz>V!+^RbV}r|Gp2j0+=crL`N5t}4tX=Ugo&7+C6ua?F4oX!wQ+)83@^vkY zDLFc>n(A(&_r09T&@t7l6XQ+b#6#=gA#14-D;h1Uq<(+=C8$D8`D^qmZ z9NOcdL`OIEho{GDl585|eQ0-*j0e6Rr=PNtyozBAqJr diff --git a/google-http-client-assembly/dependencies/images/newwindow.png b/google-http-client-assembly/dependencies/images/newwindow.png deleted file mode 100644 index 6287f72bd08a870908e7361d98c35ee0d6dcbc82..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^+(699!3-oX?^2ToQY`6?zK#qG>ra@ocD)4hB}-f* zN`mv#O3D+9QW+dm@{>{(JaZG%Q-e|yQz{EjrrH1%@dWsUxR#cd&SYTt4+aeuCvSob zD+%%o1`04ZXs!GLj7%Iec?BF2%&y2ZFfeUwWbk2P5nvW+xWT~4#-PT{uyM;F);OSv44$rjF6*2U FngH~|K)3(^ diff --git a/google-http-client-assembly/dependencies/APACHE-LICENSE.txt b/google-http-client-assembly/licenses/APACHE-LICENSE.txt similarity index 100% rename from google-http-client-assembly/dependencies/APACHE-LICENSE.txt rename to google-http-client-assembly/licenses/APACHE-LICENSE.txt diff --git a/google-http-client-assembly/dependencies/BSD-LICENSE.txt b/google-http-client-assembly/licenses/BSD-LICENSE.txt similarity index 100% rename from google-http-client-assembly/dependencies/BSD-LICENSE.txt rename to google-http-client-assembly/licenses/BSD-LICENSE.txt diff --git a/google-http-client-assembly/licenses/CDDL-LICENSE.txt b/google-http-client-assembly/licenses/CDDL-LICENSE.txt new file mode 100644 index 000000000..1154e0aee --- /dev/null +++ b/google-http-client-assembly/licenses/CDDL-LICENSE.txt @@ -0,0 +1,119 @@ +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + +1. Definitions. + +1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications. + +1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. + +1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. + +1.4. Executable means the Covered Software in any form other than Source Code. + +1.5. Initial Developer means the individual or entity that first makes Original Software available under this License. + +1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. + +1.7. License means this document. + +1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. Modifications means the Source Code and Executable form of any of the following: + +A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; + +B. Any new file that contains any part of the Original Software or previous Modification; or + +C. Any new file that is contributed or otherwise made available under the terms of this License. + +1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License. + +1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. + +1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)�the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)�ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. License Grants. + +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). +(c) The licenses granted in Sections�2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. +(d) Notwithstanding Section�2.1(b) above, no patent license is granted: (1)�for code that You delete from the Original Software, or (2)�for infringements caused by: (i)�the modification of the Original Software, or (ii)�the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: +(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and +(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)�Modifications made by that Contributor (or portions thereof); and (2)�the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). +(c) The licenses granted in Sections�2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. +(d) Notwithstanding Section�2.2(b) above, no patent license is granted: (1)�for any code that Contributor has deleted from the Contributor Version; (2)�for infringements caused by: (i)�third party modifications of Contributor Version, or (ii)�the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)�under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. + +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. + +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. + +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. +4.3. Modified Versions. + +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)�rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)�otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. + +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections�2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. In the event of termination under Sections�6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a commercial item, as that term is defined in 48�C.F.R.�2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. �252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48�C.F.R.�12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. + + + diff --git a/google-http-client-assembly/dependencies/xpp3_LICENSE.txt b/google-http-client-assembly/licenses/xpp3_LICENSE.txt similarity index 100% rename from google-http-client-assembly/dependencies/xpp3_LICENSE.txt rename to google-http-client-assembly/licenses/xpp3_LICENSE.txt diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 77cd50430..66977db1d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -20,15 +20,15 @@ com.google.http-client - google-http-client-appengine + google-http-client-android com.google.http-client - google-http-client-android + google-http-client-apache com.google.http-client - google-http-client-protobuf + google-http-client-appengine com.google.http-client @@ -46,6 +46,10 @@ com.google.http-client google-http-client-jdo + + com.google.http-client + google-http-client-protobuf + com.google.http-client google-http-client-xml @@ -53,19 +57,6 @@ - - - - maven-assembly-plugin - - - assembly.xml - - google-http-java-client - - - - maven-dependency-plugin @@ -108,6 +99,12 @@ + + + assembly.xml + + google-http-java-client + diff --git a/google-http-client-assembly/properties/google-http-client-apache.jar.properties b/google-http-client-assembly/properties/google-http-client-apache.jar.properties new file mode 100644 index 000000000..4046b3a73 --- /dev/null +++ b/google-http-client-assembly/properties/google-http-client-apache.jar.properties @@ -0,0 +1 @@ +src=../libs-sources/google-http-client-apache-${project.http-client-apache.version}-sources.jar diff --git a/google-http-client-assembly/android-properties/gson-2.1.jar.properties b/google-http-client-assembly/properties/gson.jar.properties similarity index 100% rename from google-http-client-assembly/android-properties/gson-2.1.jar.properties rename to google-http-client-assembly/properties/gson.jar.properties diff --git a/google-http-client-assembly/android-properties/jackson-core-asl-1.9.13.jar.properties b/google-http-client-assembly/properties/jackson-core-asl.jar.properties similarity index 100% rename from google-http-client-assembly/android-properties/jackson-core-asl-1.9.13.jar.properties rename to google-http-client-assembly/properties/jackson-core-asl.jar.properties diff --git a/google-http-client-assembly/android-properties/jackson-core-2.9.6.jar.properties b/google-http-client-assembly/properties/jackson-core.jar.properties similarity index 100% rename from google-http-client-assembly/android-properties/jackson-core-2.9.6.jar.properties rename to google-http-client-assembly/properties/jackson-core.jar.properties diff --git a/google-http-client-assembly/android-properties/protobuf-java-2.6.1.jar.properties b/google-http-client-assembly/properties/protobuf-java.jar.properties similarity index 100% rename from google-http-client-assembly/android-properties/protobuf-java-2.6.1.jar.properties rename to google-http-client-assembly/properties/protobuf-java.jar.properties diff --git a/pom.xml b/pom.xml index 1ef953dcb..4b3506679 100644 --- a/pom.xml +++ b/pom.xml @@ -178,7 +178,7 @@ com.google.http-client google-http-client-apache - ${project.http-client.version} + ${project.http-client-apache.version} com.google.http-client @@ -543,12 +543,26 @@ + + + maven-project-info-reports-plugin + 3.0.0 + + + + dependencies + + package + + + org.sonatype.plugins nexus-staging-maven-plugin + + 1.27.1-SNAPSHOT 1.28.1-SNAPSHOT + 2.0.1-SNAPSHOT 1.9.64 UTF-8 3.0.2 From 3ad95676107febdf8a5f48659233ef89c078e619 Mon Sep 17 00:00:00 2001 From: ajaaym <34161822+ajaaym@users.noreply.github.com> Date: Sun, 10 Feb 2019 10:22:27 -0500 Subject: [PATCH 049/983] Add option to return raw stream from response (#579) * Add option to return raw stream * fix formatting --- .../google/api/client/http/HttpRequest.java | 35 +++++++++++++++++++ .../google/api/client/http/HttpResponse.java | 7 +++- .../api/client/http/HttpResponseTest.java | 23 ++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 91a9c8a01..939a4dcdd 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -224,6 +224,16 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { /** OpenCensus tracing component. */ private final Tracer tracer = OpenCensusUtils.getTracer(); + /** + * Determines whether {@link HttpResponse#getContent()} of this request should return raw + * input stream or not. + * + *

    + * It is {@code false} by default. + *

    + */ + private boolean responseReturnRawInputStream = false; + /** * @param transport HTTP transport * @param requestMethod HTTP request method or {@code null} for none @@ -835,6 +845,31 @@ public HttpRequest setSuppressUserAgentSuffix(boolean suppressUserAgentSuffix) { return this; } + /** + * Returns whether {@link HttpResponse#getContent()} should return raw input stream for this + * request. + * + * @since 1.29 + */ + public boolean getResponseReturnRawInputStream() { + return responseReturnRawInputStream; + } + + /** + * Sets whether {@link HttpResponse#getContent()} should return raw input stream for this + * request. + * + *

    + * The default value is {@code false}. + *

    + * + * @since 1.29 + */ + public HttpRequest setResponseReturnRawInputStream(boolean responseReturnRawInputStream) { + this.responseReturnRawInputStream = responseReturnRawInputStream; + return this; + } + /** * Execute the HTTP request and returns the HTTP response. * diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 64e8986b1..01aea6d83 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -82,6 +82,9 @@ public final class HttpResponse { /** HTTP request. */ private final HttpRequest request; + /** Whether {@link #getContent()} should return raw input stream. */ + private final boolean returnRawInputStream; + /** * Determines the limit to the content size that will be logged during {@link #getContent()}. * @@ -118,6 +121,7 @@ public final class HttpResponse { HttpResponse(HttpRequest request, LowLevelHttpResponse response) throws IOException { this.request = request; + this.returnRawInputStream = request.getResponseReturnRawInputStream(); contentLoggingLimit = request.getContentLoggingLimit(); loggingEnabled = request.isLoggingEnabled(); this.response = response; @@ -359,7 +363,8 @@ public InputStream getContent() throws IOException { try { // gzip encoding (wrap content with GZipInputStream) String contentEncoding = this.contentEncoding; - if (contentEncoding != null && contentEncoding.contains("gzip")) { + if (!returnRawInputStream && contentEncoding != null && contentEncoding + .contains("gzip")) { lowLevelResponseContent = new GZIPInputStream(lowLevelResponseContent); } // logging (wrap content with LoggingInputStream) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index 6f6835d88..9a2bd43b6 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -29,6 +29,7 @@ import java.text.NumberFormat; import java.util.Arrays; import java.util.logging.Level; +import java.util.zip.GZIPInputStream; import junit.framework.TestCase; /** @@ -400,4 +401,26 @@ public LowLevelHttpResponse execute() throws IOException { transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); request.execute().getContent(); } + + public void testGetContent_gzipEncoding_ReturnRawStream() throws IOException { + HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(""); + result.setContentEncoding("gzip"); + result.setContentType("text/plain"); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setResponseReturnRawInputStream(true); + assertFalse("it should not decompress stream", request.execute().getContent() instanceof GZIPInputStream); + } } From 7e99da2d5ce71db5dbe0783688490e054bb7e4ac Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 10 Feb 2019 10:54:54 -0500 Subject: [PATCH 050/983] remove datanucleus (#480) --- google-http-client-jdo/pom.xml | 52 ---------------------------------- pom.xml | 19 ------------- 2 files changed, 71 deletions(-) diff --git a/google-http-client-jdo/pom.xml b/google-http-client-jdo/pom.xml index f17e19d43..35714fb10 100644 --- a/google-http-client-jdo/pom.xml +++ b/google-http-client-jdo/pom.xml @@ -45,43 +45,6 @@ - - org.datanucleus - datanucleus-maven-plugin - ${project.datanucleus-maven-plugin.version} - - JDO - true - - - - org.datanucleus - datanucleus-core - ${project.datanucleus-core.version} - runtime - - - org.datanucleus - datanucleus-api-jdo - ${project.datanucleus-api-jdo.version} - runtime - - - javax.jdo - jdo2-api - ${project.jdo2-api.version} - runtime - - - - - process-classes - - enhance - - - - @@ -103,21 +66,6 @@ javax.jdo jdo2-api
    - - org.datanucleus - datanucleus-core - test - - - org.datanucleus - datanucleus-api-jdo - test - - - org.datanucleus - datanucleus-rdbms - test - mysql mysql-connector-java diff --git a/pom.xml b/pom.xml index 4b3506679..4e7f76fb0 100644 --- a/pom.xml +++ b/pom.xml @@ -240,21 +240,6 @@ jdo2-api ${project.jdo2-api.version} - - org.datanucleus - datanucleus-core - ${project.datanucleus-core.version} - - - org.datanucleus - datanucleus-api-jdo - ${project.datanucleus-api-jdo.version} - - - org.datanucleus - datanucleus-rdbms - ${project.datanucleus-rdbms.version} - mysql mysql-connector-java @@ -588,10 +573,6 @@ 1.1.1 4.5.5 2.3-eb - 3.2.2 - 3.2.1 - 3.2.1 - 4.0.3 0.18.0 .. From 76e88f616d4e28bfb0ccef2c6abfe52f6a2d9606 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 11 Feb 2019 08:13:18 -0500 Subject: [PATCH 051/983] ignore Mac Finder metadata (#587) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8dd2d40af..542fed8d1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ bin/ .project .settings .classpath - +.DS_Store From cbecf1f27477819e658957b412048870a351c53b Mon Sep 17 00:00:00 2001 From: andrey-qlogic <44769745+andrey-qlogic@users.noreply.github.com> Date: Wed, 13 Feb 2019 17:50:28 +0300 Subject: [PATCH 052/983] 372: Changed SingleThreadExecutor to FixedThreadPool(1). (#588) * 372: Changed SingleThreadExecutor to FixedThreadPool(1). * 372: Use a deamon thread that the requests do not block jvm shutdown. --- .../main/java/com/google/api/client/http/HttpRequest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 939a4dcdd..2e949625e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -23,6 +23,7 @@ import com.google.api.client.util.StreamingContent; import com.google.api.client.util.StringUtils; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import io.opencensus.common.Scope; import io.opencensus.contrib.http.util.HttpTraceAttributeConstants; import io.opencensus.trace.AttributeValue; @@ -1200,14 +1201,15 @@ public HttpResponse call() throws Exception { /** * {@link Beta}
    * Executes this request asynchronously using {@link #executeAsync(Executor)} in a single separate - * thread using {@link Executors#newSingleThreadExecutor()}. + * thread using {@link Executors#newFixedThreadPool(1)}. * * @return A future for accessing the results of the asynchronous request. * @since 1.13 */ @Beta public Future executeAsync() { - return executeAsync(Executors.newSingleThreadExecutor()); + return executeAsync( + Executors.newFixedThreadPool(1, new ThreadFactoryBuilder().setDaemon(true).build())); } /** From 8a444b08aa82377e518e787f9cce667d5011ef60 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 13 Feb 2019 09:50:37 -0500 Subject: [PATCH 053/983] fix comment (#590) --- google-http-client-appengine/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index ae03f7995..935e3bc7b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -36,7 +36,7 @@ - + org.codehaus.mojo animal-sniffer-maven-plugin From 8e5a7bb52a90e5dc32d570ba91eb19e86af93846 Mon Sep 17 00:00:00 2001 From: andrey-qlogic <44769745+andrey-qlogic@users.noreply.github.com> Date: Wed, 13 Feb 2019 17:51:28 +0300 Subject: [PATCH 054/983] Implement equals and Hashcode on GenericData (#589) * 936: Added hashCode(), toString() and equals() methods relaing on classInfo and unknownFields. * 936: Changes after review. * 936: Modified unit test. * 936: Added more unit tests. * 936: GenericJsonTest fixed because toString was updated in GenericData. * 936: Changes after review. * Update GenericData.java --- .../google/api/client/util/GenericData.java | 23 ++++++++ .../api/client/json/GenericJsonTest.java | 2 +- .../api/client/util/GenericDataTest.java | 57 ++++++++++++++++++- 3 files changed, 79 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/GenericData.java b/google-http-client/src/main/java/com/google/api/client/util/GenericData.java index 6d1b5b14a..7596a7b61 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/GenericData.java +++ b/google-http-client/src/main/java/com/google/api/client/util/GenericData.java @@ -20,6 +20,7 @@ import java.util.Iterator; import java.util.Locale; import java.util.Map; +import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentMap; @@ -196,6 +197,28 @@ public final void setUnknownKeys(Map unknownFields) { this.unknownFields = unknownFields; } + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o == null || !(o instanceof GenericData)) { + return false; + } + GenericData that = (GenericData) o; + return super.equals(that) && Objects.equals(this.classInfo, that.classInfo); + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), classInfo); + } + + @Override + public String toString() { + return "GenericData{" + "classInfo=" + classInfo.names + ", " + super.toString() + "}"; + } + /** * Returns the class information. * diff --git a/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java b/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java index 662e6e129..5d56eae40 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java @@ -26,6 +26,6 @@ public class GenericJsonTest extends TestCase { public void testToString_noFactory() { GenericJson data = new GenericJson(); data.put("a", "b"); - assertEquals("{a=b}", data.toString()); + assertEquals("GenericData{classInfo=[], {a=b}}", data.toString()); } } diff --git a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java index 4daf1bf3f..9dabe8298 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java @@ -48,13 +48,66 @@ public void setFieldB(List fieldB) { } } + private class GenericData1 extends GenericData { + public GenericData1() { + super(EnumSet.of(Flags.IGNORE_CASE)); + } + + @Key("FieldA") + public String fieldA; + } + + private class GenericData2 extends GenericData { + public GenericData2() { + super(EnumSet.of(Flags.IGNORE_CASE)); + } + + @Key("FieldA") + public String fieldA; + } + + public void testEquals_Symmetric() { + GenericData actual = new GenericData1(); + actual.set("fieldA", "bar"); + GenericData expected = new GenericData2(); + // Test that objects are equal. + expected.set("fieldA", "bar"); + assertNotSame(expected, actual); + assertTrue(expected.equals(expected) && actual.equals(actual)); + // Test that objects not are equal. + expected.set("fieldA", "far"); + assertFalse(expected.equals(actual) || actual.equals(expected)); + assertFalse(expected.hashCode() == actual.hashCode()); + } + + public void testEquals_SymmetricWithSameClass() { + GenericData actual = new MyData(); + actual.set("fieldA", "bar"); + GenericData expected = new MyData(); + // Test that objects are equal. + expected.set("fieldA", "bar"); + assertNotSame(expected, actual); + assertTrue(expected.equals(expected) && actual.equals(actual)); + assertTrue(expected.hashCode() == expected.hashCode()); + } + + public void testNotEquals_SymmetricWithSameClass() { + GenericData actual = new MyData(); + actual.set("fieldA", "bar"); + GenericData expected = new MyData(); + // Test that objects are not equal. + expected.set("fieldA", "far"); + assertNotSame(expected, actual); + assertFalse(expected.equals(actual) || actual.equals(expected)); + assertFalse(expected.hashCode() == actual.hashCode()); + } public void testClone_changingEntrySet() { GenericData data = new GenericData(); - assertEquals("{}", data.toString()); + assertEquals("GenericData{classInfo=[], {}}", data.toString()); GenericData clone = data.clone(); clone.set("foo", "bar"); - assertEquals("{foo=bar}", clone.toString()); + assertEquals("GenericData{classInfo=[], {foo=bar}}", clone.toString()); } public void testSetIgnoreCase_unknownKey() { From a0480abec598976cf8fac525534b3757217b7891 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 13 Feb 2019 09:55:06 -0500 Subject: [PATCH 055/983] Remove old JDO artifact (#584) * remove google-http-client-jdo that hasn;t been touched in 5 years, has no tests, and does not appear to work * wip * more references to JDO --- google-http-client-assembly/assembly.xml | 11 - google-http-client-assembly/classpath-include | 2 - google-http-client-assembly/pom.xml | 4 - .../google-http-client-jdo.jar.properties | 1 - google-http-client-assembly/readme.html | 7 - google-http-client-jdo/pom.xml | 80 ---- .../extensions/jdo/JdoDataStoreFactory.java | 385 ------------------ .../client/extensions/jdo/package-info.java | 22 - .../jdo/JdoDataStoreFactoryTest.java | 75 ---- pom.xml | 10 - 10 files changed, 597 deletions(-) delete mode 100644 google-http-client-assembly/properties/google-http-client-jdo.jar.properties delete mode 100644 google-http-client-jdo/pom.xml delete mode 100644 google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/JdoDataStoreFactory.java delete mode 100644 google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/package-info.java delete mode 100644 google-http-client-jdo/src/test/java/com/google/api/client/extensions/jdo/JdoDataStoreFactoryTest.java diff --git a/google-http-client-assembly/assembly.xml b/google-http-client-assembly/assembly.xml index be1385815..80ee72de1 100644 --- a/google-http-client-assembly/assembly.xml +++ b/google-http-client-assembly/assembly.xml @@ -62,12 +62,6 @@ google-http-java-client/libs true - - properties/google-http-client-jdo.jar.properties - google-http-client-jdo-${project.version}.jar.properties - google-http-java-client/libs - true - properties/google-http-client-protobuf.jar.properties google-http-client-protobuf-${project.version}.jar.properties @@ -135,11 +129,6 @@ google-http-client-jackson2-dependencies.html google-http-java-client/dependencies - - ../google-http-client-jdo/target/site/dependencies.html - google-http-client-jdo-dependencies.html - google-http-java-client/dependencies - ../google-http-client-protobuf/target/site/dependencies.html google-http-client-protobuf-dependencies.html diff --git a/google-http-client-assembly/classpath-include b/google-http-client-assembly/classpath-include index 52d9bee51..b72018813 100644 --- a/google-http-client-assembly/classpath-include +++ b/google-http-client-assembly/classpath-include @@ -5,7 +5,6 @@ - @@ -13,7 +12,6 @@ - diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 66977db1d..db005160e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -42,10 +42,6 @@ com.google.http-client google-http-client-jackson2
    - - com.google.http-client - google-http-client-jdo - com.google.http-client google-http-client-protobuf diff --git a/google-http-client-assembly/properties/google-http-client-jdo.jar.properties b/google-http-client-assembly/properties/google-http-client-jdo.jar.properties deleted file mode 100644 index 60dae42e1..000000000 --- a/google-http-client-assembly/properties/google-http-client-jdo.jar.properties +++ /dev/null @@ -1 +0,0 @@ -src=../libs-sources/google-http-client-jdo-${project.version}-sources.jar diff --git a/google-http-client-assembly/readme.html b/google-http-client-assembly/readme.html index 32eff5f54..2dcaa65d2 100644 --- a/google-http-client-assembly/readme.html +++ b/google-http-client-assembly/readme.html @@ -41,8 +41,6 @@

    Dependencies and Licenses

    href='dependencies/google-http-client-jackson-dependencies.html'>google-http-client-jackson-dependencies.html
  • google-http-client-jackson2: google-http-client-jackson2-dependencies.html
  • -
  • google-http-client-jdo: google-http-client-jdo-dependencies.html
  • google-http-client-xml: google-http-client-xml-dependencies.html
  • @@ -104,11 +102,6 @@

    Dependencies for all Platforms

  • jackson-core-asl-${project.jackson-core-asl.version}.jar
  • -
  • google-http-client-jdo-${project.version}.jar (when using JDO) -
      -
    • jdo2-api-${project.jdo2-api.version}.jar
    • -
    -
  • google-http-client-xml-${project.version}.jar (when using XML)
    • xpp3-${project.xpp3.version}.jar (when NOT on Android)
    • diff --git a/google-http-client-jdo/pom.xml b/google-http-client-jdo/pom.xml deleted file mode 100644 index 35714fb10..000000000 --- a/google-http-client-jdo/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - com.google.http-client - google-http-client-parent - 1.28.1-SNAPSHOT - ../pom.xml - - google-http-client-jdo - 1.28.1-SNAPSHOT - JDO extensions to the Google HTTP Client Library for Java. - - - - - maven-javadoc-plugin - - - http://download.oracle.com/javase/7/docs/api/ - - ${project.name} ${project.version} - ${project.artifactId} ${project.version} - - - - maven-jar-plugin - - - - true - - - - - - maven-source-plugin - - - source-jar - compile - - jar - - - - - - - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-test - test - - - junit - junit - test - - - javax.jdo - jdo2-api - - - mysql - mysql-connector-java - test - - - com.google.guava - guava - test - - - diff --git a/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/JdoDataStoreFactory.java b/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/JdoDataStoreFactory.java deleted file mode 100644 index ef1d6cc20..000000000 --- a/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/JdoDataStoreFactory.java +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright (c) 2013 Google Inc. - * - * 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.extensions.jdo; - -import com.google.api.client.extensions.jdo.JdoDataStoreFactory.PrivateUtils.ComposedIdKey; -import com.google.api.client.util.IOUtils; -import com.google.api.client.util.Lists; -import com.google.api.client.util.Preconditions; -import com.google.api.client.util.Sets; -import com.google.api.client.util.store.AbstractDataStore; -import com.google.api.client.util.store.AbstractDataStoreFactory; -import com.google.api.client.util.store.DataStore; -import com.google.api.client.util.store.DataStoreUtils; - -import java.io.IOException; -import java.io.Serializable; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Set; -import java.util.StringTokenizer; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import javax.jdo.PersistenceManager; -import javax.jdo.PersistenceManagerFactory; -import javax.jdo.Query; -import javax.jdo.annotations.PersistenceCapable; -import javax.jdo.annotations.Persistent; -import javax.jdo.annotations.PrimaryKey; - -/** - * Thread-safe JDO implementation of a data store factory. - * - * @since 1.16 - * @author Yaniv Inbar - * @deprecated Please use an alternative like Objectify. - */ -@Deprecated -public class JdoDataStoreFactory extends AbstractDataStoreFactory { - - /** Persistence manager factory. */ - private final PersistenceManagerFactory persistenceManagerFactory; - - public JdoDataStoreFactory(PersistenceManagerFactory persistenceManagerFactory) { - this.persistenceManagerFactory = Preconditions.checkNotNull(persistenceManagerFactory); - } - - @Override - protected DataStore createDataStore(String id) throws IOException { - return new JdoDataStore(this, persistenceManagerFactory, id); - } - - static class JdoDataStore extends AbstractDataStore { - - /** Lock on storing, loading and deleting a credential. */ - private final Lock lock = new ReentrantLock(); - - /** Persistence manager factory. */ - private final PersistenceManagerFactory persistenceManagerFactory; - - JdoDataStore(JdoDataStoreFactory dataStore, PersistenceManagerFactory persistenceManagerFactory, - String id) { - super(dataStore, id); - this.persistenceManagerFactory = persistenceManagerFactory; - } - - public Set keySet() throws IOException { - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newAllKeysQuery(persistenceManager); - try { - Set result = Sets.newHashSet(); - for (JdoValue jdoValue : executeAllKeysQuery(query)) { - result.add(jdoValue.getKey()); - } - return Collections.unmodifiableSet(result); - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - } - - public Collection values() throws IOException { - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newAllKeysQuery(persistenceManager); - try { - List result = Lists.newArrayList(); - for (JdoValue jdoValue : executeAllKeysQuery(query)) { - result.add(jdoValue.deserialize()); - } - return Collections.unmodifiableList(result); - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - } - - public V get(String key) throws IOException { - if (key == null) { - return null; - } - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newKeyQuery(persistenceManager); - try { - JdoValue jdoValue = executeKeyQuery(query, key); - return jdoValue == null ? null : jdoValue.deserialize(); - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - } - - public JdoDataStore set(String key, V value) throws IOException { - Preconditions.checkNotNull(key); - Preconditions.checkNotNull(value); - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newKeyQuery(persistenceManager); - try { - JdoValue jdoValue = executeKeyQuery(query, key); - if (jdoValue != null) { - jdoValue.serialize(value); - } else { - jdoValue = new JdoValue(getId(), key, value); - persistenceManager.makePersistent(jdoValue); - } - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - return this; - } - - public DataStore delete(String key) throws IOException { - if (key == null) { - return this; - } - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newKeyQuery(persistenceManager); - try { - JdoValue jdoValue = executeKeyQuery(query, key); - if (jdoValue != null) { - persistenceManager.deletePersistent(jdoValue); - } - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - return this; - } - - public JdoDataStore clear() throws IOException { - lock.lock(); - try { - PersistenceManager persistenceManager = persistenceManagerFactory.getPersistenceManager(); - try { - Query query = newAllKeysQuery(persistenceManager); - try { - persistenceManager.deletePersistentAll(executeAllKeysQuery(query)); - } finally { - query.closeAll(); - } - } finally { - persistenceManager.close(); - } - } finally { - lock.unlock(); - } - return this; - } - - @Override - public JdoDataStoreFactory getDataStoreFactory() { - return (JdoDataStoreFactory) super.getDataStoreFactory(); - } - - @Override - public String toString() { - return DataStoreUtils.toString(this); - } - - /** - * Returns a new query for all keys. - * - * @param persistenceManager persistence manager - * @return new query for all keys - */ - Query newAllKeysQuery(PersistenceManager persistenceManager) { - Query query = persistenceManager.newQuery(JdoValue.class); - query.setFilter("id == idParam"); - query.declareParameters("String idParam"); - return query; - } - - /** - * Executes the query for all keys. - * - * @param allKeysQuery query for all keys - * @return query result - */ - @SuppressWarnings("unchecked") - Collection executeAllKeysQuery(Query allKeysQuery) { - return (Collection) allKeysQuery.execute(getId()); - } - - /** - * Returns a new query for a given key. - * - * @param persistenceManager persistence manager - * @return new new query for a given key - */ - Query newKeyQuery(PersistenceManager persistenceManager) { - Query query = persistenceManager.newQuery(JdoValue.class); - query.setFilter("id == idParam && key == keyParam"); - query.declareParameters("String idParam, String keyParam"); - return query; - } - - /** - * Executes the query for a given key, and returns the {@link JdoValue}. - * - * @param keyQuery query for a given key - * @param key key - * @return found {@link JdoValue} or {@code null} for none found - */ - @SuppressWarnings("unchecked") - JdoValue executeKeyQuery(Query keyQuery, String key) { - Collection queryResult = (Collection) keyQuery.execute(getId(), key); - return queryResult.isEmpty() ? null : queryResult.iterator().next(); - } - } - - /** - * JDO value class that contains the key-value pair, as well as the data store ID. - */ - @PersistenceCapable(objectIdClass = ComposedIdKey.class) - static class JdoValue { - - /** Key. */ - @PrimaryKey - @Persistent - private String key; - - /** Data store ID. */ - @PrimaryKey - @Persistent - private String id; - - /** Byte array of value. */ - @Persistent - private byte[] bytes; - - /* Required by JDO. */ - @SuppressWarnings("unused") - JdoValue() { - } - - JdoValue(String id, String key, V value) throws IOException { - this.id = id; - this.key = key; - serialize(value); - } - - void serialize(V value) throws IOException { - bytes = IOUtils.serialize(value); - } - - V deserialize() throws IOException { - return IOUtils.deserialize(bytes); - } - - String getKey() { - return key; - } - } - - /** - * Package private utilities class so the classes here isn't considered to be an external part of - * the library. We need this because {@link ComposedIdKey} MUST be public because it is the - * objectIdClass of {@link JdoValue}. - */ - static class PrivateUtils { - - /** - * See JDO : - * PrimaryKey Classes for a reference. - */ - public static class ComposedIdKey implements Serializable { - - private static final long serialVersionUID = 1L; - - /** Key. */ - public String key; - - /** Data store ID. */ - public String id; - - public ComposedIdKey() { - } - - /** - * @param value matches the result of toString() - */ - public ComposedIdKey(String value) { - StringTokenizer token = new StringTokenizer(value, "::"); - token.nextToken(); // className - this.key = token.nextToken(); // key - this.id = token.nextToken(); // id - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof ComposedIdKey)) { - return false; - } - ComposedIdKey other = (ComposedIdKey) obj; - return key.equals(other.key) && id.equals(other.id); - } - - @Override - public int hashCode() { - return this.key.hashCode() ^ this.id.hashCode(); - } - - @Override - public String toString() { - return this.getClass().getName() + "::" + this.key + "::" + this.id; - } - } - } -} diff --git a/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/package-info.java b/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/package-info.java deleted file mode 100644 index 706030644..000000000 --- a/google-http-client-jdo/src/main/java/com/google/api/client/extensions/jdo/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2013 Google Inc. - * - * 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. - */ - -/** - * Support for the JDO data store. - * - * @since 1.15 - * @author Yaniv Inbar - */ -package com.google.api.client.extensions.jdo; - diff --git a/google-http-client-jdo/src/test/java/com/google/api/client/extensions/jdo/JdoDataStoreFactoryTest.java b/google-http-client-jdo/src/test/java/com/google/api/client/extensions/jdo/JdoDataStoreFactoryTest.java deleted file mode 100644 index 3adc00c45..000000000 --- a/google-http-client-jdo/src/test/java/com/google/api/client/extensions/jdo/JdoDataStoreFactoryTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2013 Google Inc. - * - * 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.extensions.jdo; - -import com.google.api.client.test.util.store.AbstractDataStoreFactoryTest; -import com.google.api.client.util.store.DataStoreFactory; -import com.google.api.client.util.store.MemoryDataStoreFactory; - -import java.io.IOException; -import java.util.Properties; - -import javax.jdo.JDOHelper; -import javax.jdo.PersistenceManagerFactory; - -/** - * Tests {@link JdoDataStoreFactory}. - * - * @author Yaniv Inbar - */ -public class JdoDataStoreFactoryTest extends AbstractDataStoreFactoryTest { - - /** - * This test is *disabled* by default just because you need to run special set up steps first. - * Specifically on Linux: - * - *
      -sudo apt-get install mysql-server
      -mysql -u root -p
      -create database mytest;
      -   * 
      - * - * Then update ConnectionUserName and ConnectionPassword below. - */ - static boolean ENABLE_TEST = false; - - static class PersistenceManagerFactoryHolder { - static PersistenceManagerFactory pmf; - - public static PersistenceManagerFactory get() { - return pmf; - } - - static { - Properties properties = new Properties(); - properties.setProperty("javax.jdo.PersistenceManagerFactoryClass", - "org.datanucleus.api.jdo.JDOPersistenceManagerFactory"); - properties.setProperty("javax.jdo.option.ConnectionDriverName", "com.mysql.jdbc.Driver"); - properties.setProperty( - "javax.jdo.option.ConnectionURL", "jdbc:mysql://localhost:3306/mytest"); - properties.setProperty("javax.jdo.option.ConnectionUserName", "root"); - properties.setProperty("javax.jdo.option.ConnectionPassword", ""); - properties.setProperty("datanucleus.autoCreateSchema", "true"); - pmf = JDOHelper.getPersistenceManagerFactory(properties); - } - } - - @Override - protected DataStoreFactory newDataStoreFactory() throws IOException { - // hack: if test not enabled run memory data store which we know works - return ENABLE_TEST - ? new JdoDataStoreFactory(PersistenceManagerFactoryHolder.get()) : new MemoryDataStoreFactory(); - } -} diff --git a/pom.xml b/pom.xml index 4e7f76fb0..586f100f3 100644 --- a/pom.xml +++ b/pom.xml @@ -63,7 +63,6 @@ google-http-client-gson google-http-client-jackson google-http-client-jackson2 - google-http-client-jdo google-http-client-xml google-http-client-findbugs @@ -210,11 +209,6 @@ google-http-client-jackson2 ${project.http-client.version} - - com.google.http-client - google-http-client-jdo - ${project.http-client.version} - com.google.http-client google-http-client-xml @@ -450,10 +444,6 @@ google-http-client-jackson2 com.google.api.client.json.jackson2.* - - google-http-client-jdo - com.google.api.client.extensions.jdo* - google-http-client-xml com.google.api.client.xml*:com.google.api.client.http.xml* From d184f1087e0eb787c9836b1e00cad77ae05dd1b1 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 13 Feb 2019 16:30:30 -0500 Subject: [PATCH 056/983] remove duplicate version definition (#594) --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index 586f100f3..e7451b5f6 100644 --- a/pom.xml +++ b/pom.xml @@ -548,7 +548,6 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.27.1-SNAPSHOT 1.28.1-SNAPSHOT 2.0.1-SNAPSHOT 1.9.64 From 869664141ec0e91229db85a2e42fe5b430e7350c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 13 Feb 2019 16:30:55 -0500 Subject: [PATCH 057/983] more fixes for Java 7 minimum version (#592) * more fixes for Java 7 minimum version * one more java 6 reference * one more java 6 reference --- google-http-client-apache-legacy/pom.xml | 2 +- google-http-client-apache/pom.xml | 2 +- google-http-client/pom.xml | 2 +- .../dailymotion-simple-cmdline-sample/instructions.html | 9 ++++----- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 303a04479..213efecd3 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -17,7 +17,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/6/docs/api/ + https://download.oracle.com/javase/7/docs/api/ https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation ${project.name} ${project.version} diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache/pom.xml index 05770a37c..015edcf25 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache/pom.xml @@ -17,7 +17,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/6/docs/api/ + https://download.oracle.com/javase/7/docs/api/ https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation ${project.name} ${project.version} diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 72d6dd4c5..e978b4333 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -12,7 +12,7 @@ Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, - including Java 6 (or higher) desktop (SE) and web (EE), Android, and Google App Engine. + including Java 7 (or higher) desktop (SE) and web (EE), Android, and Google App Engine. diff --git a/samples/dailymotion-simple-cmdline-sample/instructions.html b/samples/dailymotion-simple-cmdline-sample/instructions.html index b3ef6e311..0d8a32074 100644 --- a/samples/dailymotion-simple-cmdline-sample/instructions.html +++ b/samples/dailymotion-simple-cmdline-sample/instructions.html @@ -14,16 +14,15 @@

      Browse Online

      Checkout Instructions

      -

      Prerequisites: install Java 6, Mercurial and Prerequisites: install Java 7 or later, Mercurial, and Maven. You may need to set your JAVA_HOME.

      -
      cd [someDirectory]
      -git clone https://github.com/googleapis/google-http-java-client
      +
      git clone https://github.com/googleapis/google-http-java-client
       cd google-http-java-client-samples/dailymotion-simple-cmdline-sample
       mvn compile
      -mvn -q exec:java
      +mvn -q exec:java

      Setup Project in Eclipse 3.5/3.6

      From 02ad11c35062cc19b45f8a1f8808f5bdc7dbca95 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 14 Feb 2019 09:20:39 -0500 Subject: [PATCH 058/983] upgrade dependencies (#596) --- pom.xml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index e7451b5f6..e18210518 100644 --- a/pom.xml +++ b/pom.xml @@ -357,18 +357,13 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.9 + 1.17 org.apache.maven.plugins maven-project-info-reports-plugin 2.7 - - org.datanucleus - maven-datanucleus-plugin - ${project.datanucleus-maven-plugin.version} - @@ -550,18 +545,17 @@ --> 1.28.1-SNAPSHOT 2.0.1-SNAPSHOT - 1.9.64 + 1.9.71 UTF-8 3.0.2 2.1 1.9.13 2.9.6 - 2.6.1 + 3.6.1 26.0-android 1.1.4c - 1.1.1 + 1.2 4.5.5 - 2.3-eb 0.18.0 .. From 4b1f4b84caf21ae0731c01b476092e27c0c6c09c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 15 Feb 2019 08:53:04 -0500 Subject: [PATCH 059/983] depend directly on Apache httpclient (#591) * depend directly on Apache httpclient instead of old version bundled in android * format XML * inherit version --- google-http-client/pom.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e978b4333..e7fc85769 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -69,10 +69,8 @@
      - com.google.android - android - 1.5_r4 - provided + org.apache.httpcomponents + httpclient com.google.code.findbugs From 3fe880e9d49ef470c43e7b6ba3d6192b8afa0997 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 18 Feb 2019 16:20:33 -0500 Subject: [PATCH 060/983] update instructions (#598) --- .../instructions.html | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/samples/dailymotion-simple-cmdline-sample/instructions.html b/samples/dailymotion-simple-cmdline-sample/instructions.html index 0d8a32074..59f93bcc1 100644 --- a/samples/dailymotion-simple-cmdline-sample/instructions.html +++ b/samples/dailymotion-simple-cmdline-sample/instructions.html @@ -14,22 +14,19 @@

      Browse Online

      Checkout Instructions

      -

      Prerequisites: install Java 7 or later, Mercurial, and Maven. You may need to set +

      Prerequisites: install Java 7 or later, git, + and Maven. You may need to set your JAVA_HOME.

      -
      git clone https://github.com/googleapis/google-http-java-client
      -cd google-http-java-client-samples/dailymotion-simple-cmdline-sample
      -mvn compile
      -mvn -q exec:java
      +
      $ git clone https://github.com/googleapis/google-http-java-client
      +$ cd google-http-java-client-samples/dailymotion-simple-cmdline-sample
      +$ mvn compile
      +$ mvn -q exec:java
      -

      Setup Project in Eclipse 3.5/3.6

      +

      Setup Project in Eclipse

      -

      Prerequisites: install Eclipse, -the Mercurial plugin, and the Maven -plugin.

      +

      Prerequisites: install Eclipse IDE +and the M2Eclipse plugin.

      • Setup Eclipse Preferences @@ -37,8 +34,8 @@

        Setup Project in Eclipse 3.5/3.6

      • Window > Preferences... (or on Mac, Eclipse > Preferences...)
      • Select Maven
          -
        • check on "Download Artifact Sources"
        • -
        • check on "Download Artifact JavaDoc"
        • +
        • Check "Download Artifact Sources"
        • +
        • Check "Download Artifact JavaDoc"
      @@ -46,10 +43,10 @@

      Setup Project in Eclipse 3.5/3.6

    • Import dailymotion-simple-cmdline-sample project
      • File > Import...
      • -
      • Select "General > Existing Project into Workspace" and click +
      • Select "Maven > Existing Maven Project" and click "Next"
      • -
      • Click "Browse" next to "Select root directory", find [someDirectory]/google-http-java-client-samples/dailymotion-simple-cmdline-sample - and click "Next"
      • +
      • Click "Browse" next to "Select root directory", find + google-http-java-client/samples/dailymotion-simple-cmdline-sample
      • Click "Finish"
    • @@ -57,8 +54,7 @@

      Setup Project in Eclipse 3.5/3.6

      • Right-click on project dailymotion-simple-cmdline-sample
      • Run As > Java Application
      • -
      • If asked, type "DailyMotionSample" and click OK
      • -
      • To enabled logging: +
      • To enable logging:
        • Run > Run Configurations...
        • Click on "Java Application > DailyMotionSample"
        • From b4662209266ada78792e6ce6a82eb867e3d9988d Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 19 Feb 2019 09:06:51 -0500 Subject: [PATCH 061/983] remove Java 5 reference (#600) --- google-http-client-assembly/readme.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/google-http-client-assembly/readme.html b/google-http-client-assembly/readme.html index 2dcaa65d2..549520ebb 100644 --- a/google-http-client-assembly/readme.html +++ b/google-http-client-assembly/readme.html @@ -20,7 +20,7 @@

          Overview

          Dependencies and Licenses

          The license can be found here. -
          Dependent jars can be found in the +
          Dependency jars can be found in the libs folder and the corresponding source jars can be found in the libs-sources folder. @@ -110,9 +110,9 @@

          Dependencies for all Platforms

        Android Dependencies

        - The following are the jars from the - libs folder required for Android applications or a newer - compatible version: + The following jars from the + libs folder or newer compatible versions + are required for Android applications:
        • google-http-client-android-${project.version}.jar
        @@ -124,9 +124,9 @@

        Android Dependencies

        wiki for the Android Developer's Guide.

        Google App Engine Dependencies

        - The following are the jars from the - libs folder required for Google App Engine applications or - a newer compatible version: + The following jars from the + libs folder or newer compatible versions + are required for Google App Engine applications.
        • google-http-client-appengine-${project.version}.jar
        @@ -135,10 +135,10 @@

        Google App Engine Dependencies

        href='https://developers.google.com/api-client-library/java/google-http-java-client/app-engine'>GoogleAppEngine wiki for the Google App Engine Developer's Guide. -

        General Purpose Java 5 Environment Dependencies

        - The following are the jars from the - libs folder required for general purpose Java 5 - applications or a newer compatible version: +

        General Purpose Java Environment Dependencies

        + The following jars from the + libs folder or newer compatible versions are + required for general purpose Java applications :
        • commons-logging-${project.commons-logging.version}.jar
        • httpclient-${project.httpclient.version}.jar
        • From a7ee06950b8309787127340e90be0b528c197378 Mon Sep 17 00:00:00 2001 From: andrey-qlogic <44769745+andrey-qlogic@users.noreply.github.com> Date: Tue, 19 Feb 2019 20:51:38 +0300 Subject: [PATCH 062/983] Added unit tests for null enum and unknown enum. (#602) --- .../com/google/api/client/util/DataTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java index 75ebc160b..8a40c3f01 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java @@ -242,6 +242,25 @@ public void testParsePrimitiveValue() { // expected } assertNull(Data.parsePrimitiveValue(Void.class, "abc")); + assertNull(Data.parsePrimitiveValue(Enum.class, null)); + } + + private enum MyEnum { + A("a"); + private final String s; + + MyEnum(String s) { + this.s = s; + } + } + + public void testParsePrimitiveValueWithUnknownEnum() { + try { + Data.parsePrimitiveValue(MyEnum.class, "foo"); + fail("expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // expected + } } static class Resolve { From 380a60b499b845a4ba423e1105a469dabfdf4ad2 Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Mon, 25 Feb 2019 14:07:01 -0500 Subject: [PATCH 063/983] Release v1.29.0 (#605) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-legacy/pom.xml | 4 +-- google-http-client-apache/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 28 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 6 ++-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 34 +++++++++---------- 19 files changed, 65 insertions(+), 65 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index c4a464ae8..297e1c580 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.28.1-SNAPSHOT + 1.29.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.28.1-SNAPSHOT + 1.29.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.28.1-SNAPSHOT + 1.29.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index a3408c357..7273e0930 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-android - 1.28.1-SNAPSHOT + 1.29.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 213efecd3..26dd2e010 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-apache - 1.28.1-SNAPSHOT + 1.29.0 Legacy Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache/pom.xml index 015edcf25..1a54d21c3 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-apache - 2.0.1-SNAPSHOT + 2.1.0 Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 935e3bc7b..a577a24cf 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-appengine - 1.28.1-SNAPSHOT + 1.29.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index db005160e..42be755aa 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.28.1-SNAPSHOT + 1.29.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index 7a7f8fa39..2033cff81 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.28.0 + 1.29.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9db216c9c..2960e9d37 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.28.1-SNAPSHOT + 1.29.0 pom Google HTTP Client Library for Java BOM @@ -63,67 +63,67 @@ com.google.http-client google-http-client - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-android - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-apache - 2.0.1-SNAPSHOT + 2.1.0 com.google.http-client google-http-client-appengine - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-assembly - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-findbugs - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-gson - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-jackson - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-jackson2 - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-jdo - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-protobuf - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-test - 1.28.1-SNAPSHOT + 1.29.0 com.google.http-client google-http-client-xml - 1.28.1-SNAPSHOT + 1.29.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c72fcc834..5c2c33395 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-findbugs - 1.28.1-SNAPSHOT + 1.29.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 675414f79..81194b23e 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-gson - 1.28.1-SNAPSHOT + 1.29.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index dbd8ce974..e0b687d9c 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-jackson - 1.28.1-SNAPSHOT + 1.29.0 Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 967e94dbf..c01f532e2 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-jackson2 - 1.28.1-SNAPSHOT + 1.29.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index e82606716..79b983072 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-protobuf - 1.28.1-SNAPSHOT + 1.29.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d025a3c0c..6f4ebf927 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-test - 1.28.1-SNAPSHOT + 1.29.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 43e43311b..3f8840e13 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client-xml - 1.28.1-SNAPSHOT + 1.29.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e7fc85769..24d6afcc8 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../pom.xml google-http-client - 1.28.1-SNAPSHOT + 1.29.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index e18210518..7f8d8a1be 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 pom Parent for the Google HTTP Client Library for Java @@ -543,8 +543,8 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.28.1-SNAPSHOT - 2.0.1-SNAPSHOT + 1.29.0 + 2.1.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 9e1e9d57b..f0457c426 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.28.1-SNAPSHOT + 1.29.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index a6a7fd165..c63859a7e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,20 +1,20 @@ # Format: # module:released-version:current-version -google-http-client:1.28.0:1.28.1-SNAPSHOT -google-http-client-bom:1.28.0:1.28.1-SNAPSHOT -google-http-client-parent:1.28.0:1.28.1-SNAPSHOT -google-http-client-android:1.28.0:1.28.1-SNAPSHOT -google-http-client-android-test:1.28.0:1.28.1-SNAPSHOT -google-http-client-apache:2.0.0:2.0.1-SNAPSHOT -google-http-client-apache-legacy:1.28.0:1.28.1-SNAPSHOT -google-http-client-appengine:1.28.0:1.28.1-SNAPSHOT -google-http-client-assembly:1.28.0:1.28.1-SNAPSHOT -google-http-client-findbugs:1.28.0:1.28.1-SNAPSHOT -google-http-client-gson:1.28.0:1.28.1-SNAPSHOT -google-http-client-jackson:1.28.0:1.28.1-SNAPSHOT -google-http-client-jackson2:1.28.0:1.28.1-SNAPSHOT -google-http-client-jdo:1.28.0:1.28.1-SNAPSHOT -google-http-client-protobuf:1.28.0:1.28.1-SNAPSHOT -google-http-client-test:1.28.0:1.28.1-SNAPSHOT -google-http-client-xml:1.28.0:1.28.1-SNAPSHOT +google-http-client:1.29.0:1.29.0 +google-http-client-bom:1.29.0:1.29.0 +google-http-client-parent:1.29.0:1.29.0 +google-http-client-android:1.29.0:1.29.0 +google-http-client-android-test:1.29.0:1.29.0 +google-http-client-apache:2.1.0:2.1.0 +google-http-client-apache-legacy:1.29.0:1.29.0 +google-http-client-appengine:1.29.0:1.29.0 +google-http-client-assembly:1.29.0:1.29.0 +google-http-client-findbugs:1.29.0:1.29.0 +google-http-client-gson:1.29.0:1.29.0 +google-http-client-jackson:1.29.0:1.29.0 +google-http-client-jackson2:1.29.0:1.29.0 +google-http-client-jdo:1.29.0:1.29.0 +google-http-client-protobuf:1.29.0:1.29.0 +google-http-client-test:1.29.0:1.29.0 +google-http-client-xml:1.29.0:1.29.0 From 6c6b2dc4c06026cd5a41ce5307ab111293a31ef2 Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Wed, 27 Feb 2019 09:32:17 -0700 Subject: [PATCH 064/983] Revert "Release v1.29.0 (#605)" (#607) This reverts commit 380a60b499b845a4ba423e1105a469dabfdf4ad2. --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-legacy/pom.xml | 4 +-- google-http-client-apache/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 28 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 6 ++-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 34 +++++++++---------- 19 files changed, 65 insertions(+), 65 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 297e1c580..c4a464ae8 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.29.0 + 1.28.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.29.0 + 1.28.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.29.0 + 1.28.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 7273e0930..a3408c357 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-android - 1.29.0 + 1.28.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 26dd2e010..213efecd3 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-apache - 1.29.0 + 1.28.1-SNAPSHOT Legacy Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache/pom.xml index 1a54d21c3..015edcf25 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-apache - 2.1.0 + 2.0.1-SNAPSHOT Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index a577a24cf..935e3bc7b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.29.0 + 1.28.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 42be755aa..db005160e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.29.0 + 1.28.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index 2033cff81..7a7f8fa39 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.29.0 + 1.28.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 2960e9d37..9db216c9c 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.29.0 + 1.28.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,67 +63,67 @@ com.google.http-client google-http-client - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-android - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-apache - 2.1.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-assembly - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-jackson - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-jdo - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-test - 1.29.0 + 1.28.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.29.0 + 1.28.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5c2c33395..c72fcc834 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.29.0 + 1.28.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 81194b23e..675414f79 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.29.0 + 1.28.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index e0b687d9c..dbd8ce974 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-jackson - 1.29.0 + 1.28.1-SNAPSHOT Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c01f532e2..967e94dbf 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.29.0 + 1.28.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 79b983072..e82606716 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.29.0 + 1.28.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 6f4ebf927..d025a3c0c 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-test - 1.29.0 + 1.28.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 3f8840e13..43e43311b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.29.0 + 1.28.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 24d6afcc8..e7fc85769 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../pom.xml google-http-client - 1.29.0 + 1.28.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 7f8d8a1be..e18210518 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java @@ -543,8 +543,8 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.29.0 - 2.1.0 + 1.28.1-SNAPSHOT + 2.0.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f0457c426..9e1e9d57b 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.29.0 + 1.28.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index c63859a7e..a6a7fd165 100644 --- a/versions.txt +++ b/versions.txt @@ -1,20 +1,20 @@ # Format: # module:released-version:current-version -google-http-client:1.29.0:1.29.0 -google-http-client-bom:1.29.0:1.29.0 -google-http-client-parent:1.29.0:1.29.0 -google-http-client-android:1.29.0:1.29.0 -google-http-client-android-test:1.29.0:1.29.0 -google-http-client-apache:2.1.0:2.1.0 -google-http-client-apache-legacy:1.29.0:1.29.0 -google-http-client-appengine:1.29.0:1.29.0 -google-http-client-assembly:1.29.0:1.29.0 -google-http-client-findbugs:1.29.0:1.29.0 -google-http-client-gson:1.29.0:1.29.0 -google-http-client-jackson:1.29.0:1.29.0 -google-http-client-jackson2:1.29.0:1.29.0 -google-http-client-jdo:1.29.0:1.29.0 -google-http-client-protobuf:1.29.0:1.29.0 -google-http-client-test:1.29.0:1.29.0 -google-http-client-xml:1.29.0:1.29.0 +google-http-client:1.28.0:1.28.1-SNAPSHOT +google-http-client-bom:1.28.0:1.28.1-SNAPSHOT +google-http-client-parent:1.28.0:1.28.1-SNAPSHOT +google-http-client-android:1.28.0:1.28.1-SNAPSHOT +google-http-client-android-test:1.28.0:1.28.1-SNAPSHOT +google-http-client-apache:2.0.0:2.0.1-SNAPSHOT +google-http-client-apache-legacy:1.28.0:1.28.1-SNAPSHOT +google-http-client-appengine:1.28.0:1.28.1-SNAPSHOT +google-http-client-assembly:1.28.0:1.28.1-SNAPSHOT +google-http-client-findbugs:1.28.0:1.28.1-SNAPSHOT +google-http-client-gson:1.28.0:1.28.1-SNAPSHOT +google-http-client-jackson:1.28.0:1.28.1-SNAPSHOT +google-http-client-jackson2:1.28.0:1.28.1-SNAPSHOT +google-http-client-jdo:1.28.0:1.28.1-SNAPSHOT +google-http-client-protobuf:1.28.0:1.28.1-SNAPSHOT +google-http-client-test:1.28.0:1.28.1-SNAPSHOT +google-http-client-xml:1.28.0:1.28.1-SNAPSHOT From 8217035a79bfdc0f4a7193293a8583ee831ee25a Mon Sep 17 00:00:00 2001 From: andrey-qlogic <44769745+andrey-qlogic@users.noreply.github.com> Date: Thu, 28 Feb 2019 16:46:21 +0300 Subject: [PATCH 065/983] Added Warning header and unit tests. (#601) * Added Warning header and unit tests. * Changes after review * Method setWarning renamed to addWarning that makes it more accurate * Renamed warning variable to warnings * Reverting back to "warning" rather than "warnings" * Update HttpHeadersTest.java --- .../google/api/client/http/HttpHeaders.java | 33 +++++++++++++++++++ .../api/client/http/HttpHeadersTest.java | 12 +++++++ 2 files changed, 45 insertions(+) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java index 87560573f..cd60cd3e1 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java @@ -158,6 +158,10 @@ public HttpHeaders() { @Key("User-Agent") private List userAgent; + /** {@code "Warning"} header. */ + @Key("Warning") + private List warning; + /** {@code "WWW-Authenticate"} header. */ @Key("WWW-Authenticate") private List authenticate; @@ -811,6 +815,35 @@ public HttpHeaders setAuthenticate(String authenticate) { return this; } + /** + * Adds the {@code "Warning"} header or {@code null} for none. + * + *

          Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. + * + * @since 1.28 + */ + public HttpHeaders addWarning(String warning) { + if (warning == null) { + return this; + } + if (this.warning == null) { + this.warning = getAsList(warning); + } else { + this.warning.add(warning); + } + return this; + } + + /** + * Returns all {@code "Warning"} headers or {@code null} for none. + * + * @since 1.28 + */ + public final List getWarning() { + return warning == null ? null : new ArrayList<>(warning); + } + /** * Returns the first {@code "Age"} header or {@code null} for none. * diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java index 46ba7de72..1112f5bc9 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java @@ -86,6 +86,8 @@ public void testSerializeHeaders() throws Exception { myHeaders.setAcceptEncoding(null); myHeaders.setContentLength(Long.MAX_VALUE); myHeaders.setUserAgent("foo"); + myHeaders.addWarning("warn0"); + myHeaders.addWarning("warn1"); myHeaders.set("a", "b"); myHeaders.value = E.VALUE; myHeaders.otherValue = E.OTHER_VALUE; @@ -103,6 +105,7 @@ public void testSerializeHeaders() throws Exception { assertEquals(ImmutableList.of("a1", "a2"), lowLevelRequest.getHeaderValues("r")); assertTrue(lowLevelRequest.getHeaderValues("accept-encoding").isEmpty()); assertEquals(ImmutableList.of("foo"), lowLevelRequest.getHeaderValues("user-agent")); + assertEquals(ImmutableList.of("warn0", "warn1"), lowLevelRequest.getHeaderValues("warning")); assertEquals(ImmutableList.of("b"), lowLevelRequest.getHeaderValues("a")); assertEquals(ImmutableList.of("VALUE"), lowLevelRequest.getHeaderValues("value")); assertEquals(ImmutableList.of("other"), lowLevelRequest.getHeaderValues("othervalue")); @@ -128,6 +131,8 @@ public void testSerializeHeaders() throws Exception { expectedOutput.append("someLong: 0\r\n"); expectedOutput.append("User-Agent: foo\r\n"); expectedOutput.append("value: VALUE\r\n"); + expectedOutput.append("Warning: warn0\r\n"); + expectedOutput.append("Warning: warn1\r\n"); expectedOutput.append("a: b\r\n"); assertEquals(expectedOutput.toString(), outputStream.toString()); @@ -139,6 +144,8 @@ public void testFromHttpHeaders() { rawHeaders.setContentLength(Long.MAX_VALUE); rawHeaders.setContentType("foo/bar"); rawHeaders.setUserAgent("FooBar"); + rawHeaders.addWarning("warn0"); + rawHeaders.addWarning("warn1"); rawHeaders.set("foo", "bar"); rawHeaders.set("someLong", "5"); rawHeaders.set("list", ImmutableList.of("a", "b", "c")); @@ -154,6 +161,8 @@ public void testFromHttpHeaders() { assertEquals(Long.MAX_VALUE, myHeaders.getContentLength().longValue()); assertEquals("foo/bar", myHeaders.getContentType()); assertEquals("FooBar", myHeaders.getUserAgent()); + assertEquals("warn0", myHeaders.getWarning().get(0)); + assertEquals("warn1", myHeaders.getWarning().get(1)); assertEquals("bar", myHeaders.foo); assertEquals(5, myHeaders.someLong); assertEquals(ImmutableList.of("5"), myHeaders.objNum); @@ -197,6 +206,7 @@ public void testHeaderStringValues() { myHeaders.setAcceptEncoding(null); myHeaders.setContentLength(Long.MAX_VALUE); myHeaders.setUserAgent("foo"); + myHeaders.addWarning("warn"); myHeaders.set("a", "b"); myHeaders.value = E.VALUE; myHeaders.otherValue = E.OTHER_VALUE; @@ -207,6 +217,7 @@ public void testHeaderStringValues() { assertEquals("a1", myHeaders.getFirstHeaderStringValue("r")); assertNull(myHeaders.getFirstHeaderStringValue("accept-encoding")); assertEquals("foo", myHeaders.getFirstHeaderStringValue("user-agent")); + assertEquals("warn", myHeaders.getFirstHeaderStringValue("warning")); assertEquals("b", myHeaders.getFirstHeaderStringValue("a")); assertEquals("VALUE", myHeaders.getFirstHeaderStringValue("value")); assertEquals("other", myHeaders.getFirstHeaderStringValue("othervalue")); @@ -219,6 +230,7 @@ public void testHeaderStringValues() { assertEquals(ImmutableList.of("a1", "a2"), myHeaders.getHeaderStringValues("r")); assertTrue(myHeaders.getHeaderStringValues("accept-encoding").isEmpty()); assertEquals(ImmutableList.of("foo"), myHeaders.getHeaderStringValues("user-agent")); + assertEquals(ImmutableList.of("warn"), myHeaders.getHeaderStringValues("warning")); assertEquals(ImmutableList.of("b"), myHeaders.getHeaderStringValues("a")); assertEquals(ImmutableList.of("VALUE"), myHeaders.getHeaderStringValues("value")); assertEquals(ImmutableList.of("other"), myHeaders.getHeaderStringValues("othervalue")); From 50db8c9617b7a520bd973be561ea3e58587e5c14 Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Thu, 7 Mar 2019 11:13:50 -0500 Subject: [PATCH 066/983] Fix build issue for findbugs module. (#610) --- google-http-client-findbugs/pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c72fcc834..4628e3dcd 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -25,8 +25,6 @@ - org.codehaus.mojo animal-sniffer-maven-plugin @@ -44,7 +42,7 @@ com.google.code.findbugs findbugs - 2.0.0 + 3.0.1 xalan From 2e2b70b6690a0dcbaf6527d4bcfb8a72977ebdf1 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 15 Mar 2019 17:10:38 -0400 Subject: [PATCH 067/983] move apache classes back into google-http-client (#614) * move apache classes back into google-http-client This reverts commit bb32cebad72582ff5dbf609db902f573267a9a6f. --- clirr-ignored-differences.xml | 8 +++++++- .../google/api/client/http/apache/ApacheHttpRequest.java | 0 .../google/api/client/http/apache/ApacheHttpResponse.java | 0 .../api/client/http/apache/ApacheHttpTransport.java | 0 .../com/google/api/client/http/apache/ContentEntity.java | 0 .../api/client/http/apache/HttpExtensionMethod.java | 0 .../com/google/api/client/http/apache/package-info.java | 0 7 files changed, 7 insertions(+), 1 deletion(-) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java (100%) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java (100%) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java (100%) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/ContentEntity.java (100%) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java (100%) rename {google-http-client-apache => google-http-client}/src/main/java/com/google/api/client/http/apache/package-info.java (100%) diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index fb3252a38..6421a4fd2 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -1,5 +1,5 @@ - + @@ -11,4 +11,10 @@ 8001 com/google/api/client/http/apache/** + + 7006 + com/google/api/client/http/apache/** + org.apache.http.impl.client.DefaultHttpClient newDefaultHttpClient() + org.apache.http.client.HttpClient + diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/ContentEntity.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/ContentEntity.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java b/google-http-client/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java diff --git a/google-http-client-apache/src/main/java/com/google/api/client/http/apache/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java similarity index 100% rename from google-http-client-apache/src/main/java/com/google/api/client/http/apache/package-info.java rename to google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java From 2f12c8530a0ef9ec60aa1b6ba37ad3f6bca6087b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 15 Mar 2019 18:48:49 -0400 Subject: [PATCH 068/983] Revert change to return type of ApacheHttpTransport.newDefaultHttpClient() (#615) * move apache classes back into google-http-client * revert unrelated metadata * revert unrelated metadata * ignore differences caused by move * rollback return type change * Revert "rollback return type change" This reverts commit bb32cebad72582ff5dbf609db902f573267a9a6f. * Reapply return type change This reverts commit 358d94dc852f46c4bd3ab1f55ef8fb04a7b9f1a6. * revert return type change --- clirr-ignored-differences.xml | 6 - .../http/apache/ApacheHttpTransportTest.java | 113 ++----- .../http/apache/ApacheHttpTransport.java | 316 +++++++++++++++--- .../apache/SSLSocketFactoryExtension.java | 61 ++++ 4 files changed, 351 insertions(+), 145 deletions(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 6421a4fd2..bb01b2b4d 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -11,10 +11,4 @@ 8001 com/google/api/client/http/apache/** - - 7006 - com/google/api/client/http/apache/** - org.apache.http.impl.client.DefaultHttpClient newDefaultHttpClient() - org.apache.http.client.HttpClient - diff --git a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java b/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java index ef46084fe..21aa27357 100644 --- a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java +++ b/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java @@ -14,73 +14,48 @@ package com.google.api.client.http.apache; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; -import java.io.IOException; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import org.apache.http.Header; -import org.apache.http.HttpClientConnection; -import org.apache.http.HttpException; -import org.apache.http.HttpRequest; -import org.apache.http.HttpRequestInterceptor; +import junit.framework.TestCase; import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.message.BasicHttpResponse; -import org.apache.http.protocol.HttpContext; -import org.apache.http.protocol.HttpRequestExecutor; -import org.junit.Test; +import org.apache.http.client.params.ClientPNames; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; +import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; +import org.apache.http.params.CoreConnectionPNames; +import org.apache.http.params.HttpParams; +import org.apache.http.params.HttpProtocolParams; /** * Tests {@link ApacheHttpTransport}. * * @author Yaniv Inbar */ -public class ApacheHttpTransportTest { +public class ApacheHttpTransportTest extends TestCase { - @Test public void testApacheHttpTransport() { ApacheHttpTransport transport = new ApacheHttpTransport(); - checkHttpTransport(transport); + DefaultHttpClient httpClient = (DefaultHttpClient) transport.getHttpClient(); + checkDefaultHttpClient(httpClient); + checkHttpClient(httpClient); } - @Test public void testApacheHttpTransportWithParam() { - ApacheHttpTransport transport = new ApacheHttpTransport(HttpClients.custom().build()); - checkHttpTransport(transport); + ApacheHttpTransport transport = new ApacheHttpTransport(new DefaultHttpClient()); + checkHttpClient(transport.getHttpClient()); } - @Test public void testNewDefaultHttpClient() { - HttpClient client = ApacheHttpTransport.newDefaultHttpClient(); - checkHttpClient(client); + checkDefaultHttpClient(ApacheHttpTransport.newDefaultHttpClient()); } - private void checkHttpTransport(ApacheHttpTransport transport) { - assertNotNull(transport); - HttpClient client = transport.getHttpClient(); - checkHttpClient(client); - } - - private void checkHttpClient(HttpClient client) { - assertNotNull(client); - // TODO(chingor): Is it possible to test this effectively? The newer HttpClient implementations - // are read-only and we're testing that we built the client with the right configuration - } - - @Test public void testRequestsWithContent() throws Exception { HttpClient mockClient = mock(HttpClient.class); HttpResponse mockResponse = mock(HttpResponse.class); @@ -98,8 +73,6 @@ public void testRequestsWithContent() throws Exception { subtestUnsupportedRequestsWithContent( transport.buildRequest("HEAD", "http://www.test.url"), "HEAD"); - // Test PATCH. - execute(transport.buildRequest("PATCH", "http://www.test.url")); // Test PUT. execute(transport.buildRequest("PUT", "http://www.test.url")); // Test POST. @@ -128,51 +101,19 @@ private void execute(ApacheHttpRequest request) throws Exception { request.execute(); } - @Test - public void testRequestShouldNotFollowRedirects() throws IOException { - final AtomicInteger requestsAttempted = new AtomicInteger(0); - HttpRequestExecutor requestExecutor = new HttpRequestExecutor() { - @Override - public HttpResponse execute(HttpRequest request, HttpClientConnection conn, - HttpContext context) throws IOException, HttpException { - HttpResponse resp = new BasicHttpResponse(HttpVersion.HTTP_1_1, 302, null); - resp.addHeader("location", "https://google.com/path"); - requestsAttempted.incrementAndGet(); - return resp; - } - }; - HttpClient client = HttpClients.custom().setRequestExecutor(requestExecutor).build(); - ApacheHttpTransport transport = new ApacheHttpTransport(client); - ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); - LowLevelHttpResponse response = request.execute(); - assertEquals(1, requestsAttempted.get()); - assertEquals(302, response.getStatusCode()); + private void checkDefaultHttpClient(DefaultHttpClient client) { + HttpParams params = client.getParams(); + assertTrue(client.getConnectionManager() instanceof ThreadSafeClientConnManager); + assertEquals(8192, params.getIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1)); + DefaultHttpRequestRetryHandler retryHandler = + (DefaultHttpRequestRetryHandler) client.getHttpRequestRetryHandler(); + assertEquals(0, retryHandler.getRetryCount()); + assertFalse(retryHandler.isRequestSentRetryEnabled()); } - @Test - public void testRequestCanSetHeaders() { - final AtomicBoolean interceptorCalled = new AtomicBoolean(false); - HttpClient client = HttpClients.custom().addInterceptorFirst(new HttpRequestInterceptor() { - @Override - public void process(HttpRequest request, HttpContext context) - throws HttpException, IOException { - Header header = request.getFirstHeader("foo"); - assertNotNull("Should have found header", header); - assertEquals("bar", header.getValue()); - interceptorCalled.set(true); - throw new IOException("cancelling request"); - } - }).build(); - - ApacheHttpTransport transport = new ApacheHttpTransport(client); - ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); - request.addHeader("foo", "bar"); - try { - LowLevelHttpResponse response = request.execute(); - fail("should not actually make the request"); - } catch (IOException exception) { - assertEquals("cancelling request", exception.getMessage()); - } - assertTrue("Expected to have called our test interceptor", interceptorCalled.get()); + private void checkHttpClient(HttpClient client) { + HttpParams params = client.getParams(); + assertFalse(params.getBooleanParameter(ClientPNames.HANDLE_REDIRECTS, true)); + assertEquals(HttpVersion.HTTP_1_1, HttpProtocolParams.getVersion(params)); } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java index ecc7e0c13..50e74dc87 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java @@ -15,7 +15,9 @@ package com.google.api.client.http.apache; import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; import com.google.api.client.util.SecurityUtils; import com.google.api.client.util.SslUtils; @@ -25,24 +27,36 @@ import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.cert.CertificateFactory; -import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLContext; +import org.apache.http.HttpHost; +import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpHead; import org.apache.http.client.methods.HttpOptions; -import org.apache.http.client.methods.HttpPatch; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpTrace; -import org.apache.http.config.SocketConfig; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.impl.conn.SystemDefaultRoutePlanner; +import org.apache.http.client.params.ClientPNames; +import org.apache.http.conn.ClientConnectionManager; +import org.apache.http.conn.params.ConnManagerParams; +import org.apache.http.conn.params.ConnPerRouteBean; +import org.apache.http.conn.params.ConnRouteParams; +import org.apache.http.conn.scheme.PlainSocketFactory; +import org.apache.http.conn.scheme.Scheme; +import org.apache.http.conn.scheme.SchemeRegistry; +import org.apache.http.conn.ssl.SSLSocketFactory; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; +import org.apache.http.impl.conn.DefaultHttpRoutePlanner; +import org.apache.http.impl.conn.ProxySelectorRoutePlanner; +import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; +import org.apache.http.params.BasicHttpParams; +import org.apache.http.params.HttpConnectionParams; +import org.apache.http.params.HttpParams; +import org.apache.http.params.HttpProtocolParams; /** * Thread-safe HTTP transport based on the Apache HTTP Client library. @@ -56,7 +70,8 @@ *

          * Default settings are specified in {@link #newDefaultHttpClient()}. Use the * {@link #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. - * Please read the Apache HTTP * Client connection management tutorial for more complex configuration options. *

          @@ -72,6 +87,10 @@ public final class ApacheHttpTransport extends HttpTransport { /** * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. * + *

          + * Use {@link Builder} to modify HTTP client options. + *

          + * * @since 1.3 */ public ApacheHttpTransport() { @@ -82,23 +101,34 @@ public ApacheHttpTransport() { * Constructor that allows an alternative Apache HTTP client to be used. * *

          - * Note that in the previous version, we tried overrode several settings, however, we are no - * longer able to do so. + * Note that a few settings are overridden: *

          - * - *

          If you choose to provide your own Apache HttpClient implementation, be sure that

          *
            - *
          • HTTP version is set to 1.1.
          • - *
          • Redirects are disabled (google-http-client handles redirects).
          • - *
          • Retries are disabled (google-http-client handles retries).
          • + *
          • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with + * {@link HttpVersion#HTTP_1_1}.
          • + *
          • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}.
          • + *
          • {@link ConnManagerParams#setTimeout} and {@link HttpConnectionParams#setConnectionTimeout} + * are set on each request based on {@link HttpRequest#getConnectTimeout()}.
          • + *
          • {@link HttpConnectionParams#setSoTimeout} is set on each request based on + * {@link HttpRequest#getReadTimeout()}.
          • *
          * + *

          + * Use {@link Builder} for a more user-friendly way to modify the HTTP client options. + *

          + * * @param httpClient Apache HTTP client to use * * @since 1.6 */ public ApacheHttpTransport(HttpClient httpClient) { this.httpClient = httpClient; + HttpParams params = httpClient.getParams(); + if (params == null) { + params = newDefaultHttpClient().getParams(); + } + HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); + params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false); } /** @@ -106,46 +136,63 @@ public ApacheHttpTransport(HttpClient httpClient) { * {@link #ApacheHttpTransport()} constructor. * *

          - * Settings: + * Use this constructor if you want to customize the default Apache HTTP client. Settings: *

          *
            - *
          • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
          • - *
          • The socket buffer size is set to 8192 using {@link SocketConfig}.
          • - *
          • - *
          • The route planner uses {@link SystemDefaultRoutePlanner} with + *
          • The client connection manager is set to {@link ThreadSafeClientConnManager}.
          • + *
          • The socket buffer size is set to 8192 using + * {@link HttpConnectionParams#setSocketBufferSize}.
          • + *
          • + *
          • The route planner uses {@link ProxySelectorRoutePlanner} with * {@link ProxySelector#getDefault()}, which uses the proxy settings from system * properties.
          • *
          * * @return new instance of the Apache HTTP client - * @since 2.0 + * @since 1.6 + */ + public static DefaultHttpClient newDefaultHttpClient() { + return newDefaultHttpClient( + SSLSocketFactory.getSocketFactory(), newDefaultHttpParams(), ProxySelector.getDefault()); + } + + /** Returns a new instance of the default HTTP parameters we use. */ + static HttpParams newDefaultHttpParams() { + HttpParams params = new BasicHttpParams(); + // Turn off stale checking. Our connections break all the time anyway, + // and it's not worth it to pay the penalty of checking every time. + HttpConnectionParams.setStaleCheckingEnabled(params, false); + HttpConnectionParams.setSocketBufferSize(params, 8192); + ConnManagerParams.setMaxTotalConnections(params, 200); + ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(20)); + return params; + } + + /** + * Creates a new instance of the Apache HTTP client that is used by the + * {@link #ApacheHttpTransport()} constructor. + * + * @param socketFactory SSL socket factory + * @param params HTTP parameters + * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or + * {@code null} for {@link DefaultHttpRoutePlanner} + * @return new instance of the Apache HTTP client */ - public static HttpClient newDefaultHttpClient() { - // Set socket buffer sizes to 8192 - SocketConfig socketConfig = - SocketConfig.custom() - .setRcvBufSize(8192) - .setSndBufSize(8192) - .build(); - - PoolingHttpClientConnectionManager connectionManager = - new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); - // Disable the stale connection check (previously configured in the HttpConnectionParams - connectionManager.setValidateAfterInactivity(-1); - - return HttpClientBuilder.create() - .useSystemProperties() - .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) - .setDefaultSocketConfig(socketConfig) - .setMaxConnTotal(200) - .setMaxConnPerRoute(20) - .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) - .setConnectionManager(connectionManager) - .disableRedirectHandling() - .disableAutomaticRetries() - .build(); + static DefaultHttpClient newDefaultHttpClient( + SSLSocketFactory socketFactory, HttpParams params, ProxySelector proxySelector) { + // See http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html + SchemeRegistry registry = new SchemeRegistry(); + registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); + registry.register(new Scheme("https", socketFactory, 443)); + ClientConnectionManager connectionManager = new ThreadSafeClientConnManager(params, registry); + DefaultHttpClient defaultHttpClient = new DefaultHttpClient(connectionManager, params); + defaultHttpClient.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(0, false)); + if (proxySelector != null) { + defaultHttpClient.setRoutePlanner(new ProxySelectorRoutePlanner(registry, proxySelector)); + } + return defaultHttpClient; } @Override @@ -162,8 +209,6 @@ protected ApacheHttpRequest buildRequest(String method, String url) { requestBase = new HttpGet(url); } else if (method.equals(HttpMethods.HEAD)) { requestBase = new HttpHead(url); - } else if (method.equals(HttpMethods.PATCH)) { - requestBase = new HttpPatch(url); } else if (method.equals(HttpMethods.POST)) { requestBase = new HttpPost(url); } else if (method.equals(HttpMethods.PUT)) { @@ -185,10 +230,8 @@ protected ApacheHttpRequest buildRequest(String method, String url) { * @since 1.4 */ @Override - public void shutdown() throws IOException { - if (httpClient instanceof CloseableHttpClient) { - ((CloseableHttpClient) httpClient).close(); - } + public void shutdown() { + httpClient.getConnectionManager().shutdown(); } /** @@ -199,4 +242,171 @@ public void shutdown() throws IOException { public HttpClient getHttpClient() { return httpClient; } + + /** + * Builder for {@link ApacheHttpTransport}. + * + *

          + * Implementation is not thread-safe. + *

          + * + * @since 1.13 + */ + public static final class Builder { + + /** SSL socket factory. */ + private SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory(); + + /** HTTP parameters. */ + private HttpParams params = newDefaultHttpParams(); + + /** + * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for + * {@link DefaultHttpRoutePlanner}. + */ + private ProxySelector proxySelector = ProxySelector.getDefault(); + + /** + * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use + * {@link #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. + * + *

          + * By default it is {@code null}, which uses the proxy settings from system + * properties. + *

          + * + *

          + * For example: + *

          + * + *
          +       setProxy(new HttpHost("127.0.0.1", 8080))
          +     * 
          + */ + public Builder setProxy(HttpHost proxy) { + ConnRouteParams.setDefaultProxy(params, proxy); + if (proxy != null) { + proxySelector = null; + } + return this; + } + + /** + * Sets the HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for + * {@link DefaultHttpRoutePlanner}. + * + *

          + * By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from system + * properties. + *

          + */ + public Builder setProxySelector(ProxySelector proxySelector) { + this.proxySelector = proxySelector; + if (proxySelector != null) { + ConnRouteParams.setDefaultProxy(params, null); + } + return this; + } + /** + * Sets the SSL socket factory based on root certificates in a Java KeyStore. + * + *

          + * Example usage: + *

          + * + *
          +    trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
          +     * 
          + * + * @param keyStoreStream input stream to the key store (closed at the end of this method in a + * finally block) + * @param storePass password protecting the key store file + * @since 1.14 + */ + public Builder trustCertificatesFromJavaKeyStore(InputStream keyStoreStream, String storePass) + throws GeneralSecurityException, IOException { + KeyStore trustStore = SecurityUtils.getJavaKeyStore(); + SecurityUtils.loadKeyStore(trustStore, keyStoreStream, storePass); + return trustCertificates(trustStore); + } + + /** + * Sets the SSL socket factory based root certificates generated from the specified stream using + * {@link CertificateFactory#generateCertificates(InputStream)}. + * + *

          + * Example usage: + *

          + * + *
          +    trustCertificatesFromStream(new FileInputStream("certs.pem"));
          +     * 
          + * + * @param certificateStream certificate stream + * @since 1.14 + */ + public Builder trustCertificatesFromStream(InputStream certificateStream) + throws GeneralSecurityException, IOException { + KeyStore trustStore = SecurityUtils.getJavaKeyStore(); + trustStore.load(null, null); + SecurityUtils.loadKeyStoreFromCertificates( + trustStore, SecurityUtils.getX509CertificateFactory(), certificateStream); + return trustCertificates(trustStore); + } + + /** + * Sets the SSL socket factory based on a root certificate trust store. + * + * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} + * or {@link SecurityUtils#loadKeyStoreFromCertificates}) + * + * @since 1.14 + */ + public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityException { + SSLContext sslContext = SslUtils.getTlsSslContext(); + SslUtils.initSslContext(sslContext, trustStore, SslUtils.getPkixTrustManagerFactory()); + return setSocketFactory(new SSLSocketFactoryExtension(sslContext)); + } + + /** + * {@link Beta}
          + * Disables validating server SSL certificates by setting the SSL socket factory using + * {@link SslUtils#trustAllSSLContext()} for the SSL context and + * {@link SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. + * + *

          + * Be careful! Disabling certificate validation is dangerous and should only be done in testing + * environments. + *

          + */ + @Beta + public Builder doNotValidateCertificate() throws GeneralSecurityException { + socketFactory = new SSLSocketFactoryExtension(SslUtils.trustAllSSLContext()); + socketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); + return this; + } + + /** Sets the SSL socket factory ({@link SSLSocketFactory#getSocketFactory()} by default). */ + public Builder setSocketFactory(SSLSocketFactory socketFactory) { + this.socketFactory = Preconditions.checkNotNull(socketFactory); + return this; + } + + /** Returns the SSL socket factory ({@link SSLSocketFactory#getSocketFactory()} by default). */ + public SSLSocketFactory getSSLSocketFactory() { + return socketFactory; + } + + /** Returns the HTTP parameters. */ + public HttpParams getHttpParams() { + return params; + } + + /** Returns a new instance of {@link ApacheHttpTransport} based on the options. */ + public ApacheHttpTransport build() { + return new ApacheHttpTransport(newDefaultHttpClient(socketFactory, params, proxySelector)); + } + } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java b/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java new file mode 100644 index 000000000..3d507371b --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2013 Google Inc. + * + * 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.apache; + +import java.io.IOException; +import java.net.Socket; +import java.net.UnknownHostException; +import java.security.KeyManagementException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocket; +import org.apache.http.conn.ssl.SSLSocketFactory; + +/** + * Implementation of SSL socket factory that extends Apache's implementation to provide + * functionality missing from the Android SDK that is available in Apache HTTP Client. + * + * @author Yaniv Inbar + */ +final class SSLSocketFactoryExtension extends SSLSocketFactory { + + /** Wrapped Java SSL socket factory. */ + private final javax.net.ssl.SSLSocketFactory socketFactory; + + /** + * @param sslContext SSL context + */ + SSLSocketFactoryExtension(SSLContext sslContext) throws KeyManagementException, + UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { + super((KeyStore) null); + socketFactory = sslContext.getSocketFactory(); + } + + @Override + public Socket createSocket() throws IOException { + return socketFactory.createSocket(); + } + + @Override + public Socket createSocket(Socket socket, String host, int port, boolean autoClose) + throws IOException, UnknownHostException { + SSLSocket sslSocket = (SSLSocket) socketFactory.createSocket(socket, host, port, autoClose); + getHostnameVerifier().verify(host, sslSocket); + return sslSocket; + } +} From 9a99e3d2f0d863d417f29391a6c8ba30aee432ff Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 18 Mar 2019 08:06:22 -0400 Subject: [PATCH 069/983] avoid default locale (#617) --- .../java/com/google/api/client/util/FieldInfo.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java index ac7cdd422..7204dd872 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java @@ -144,7 +144,7 @@ public static FieldInfo of(Field field) { private Method[] settersMethodForField(Field field) { List methods = new ArrayList<>(); for (Method method : field.getDeclaringClass().getDeclaredMethods()) { - if (Ascii.toLowerCase(method.getName()).equals("set" + field.getName().toLowerCase()) + if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName())) && method.getParameterTypes().length == 1) { methods.add(method); } @@ -221,9 +221,9 @@ public Object getValue(Object obj) { } /** - * Sets to the given value of the field in the given object instance using reflection. + * Sets this field in the given object to the given value using reflection. *

          - * If the field is final, it checks that value being set is identical to the existing value. + * If the field is final, it checks that the value being set is identical to the existing value. */ public void setValue(Object obj, Object value) { if (setters.length > 0) { @@ -252,7 +252,7 @@ public > T enumValue() { } /** - * Returns the value of the given field in the given object instance using reflection. + * Returns the value of the given field in the given object using reflection. */ public static Object getFieldValue(Field field, Object obj) { try { @@ -263,9 +263,9 @@ public static Object getFieldValue(Field field, Object obj) { } /** - * Sets to the given value of the given field in the given object instance using reflection. + * Sets the given field in the given object to the given value using reflection. *

          - * If the field is final, it checks that value being set is identical to the existing value. + * If the field is final, it checks that the value being set is identical to the existing value. */ public static void setFieldValue(Field field, Object obj, Object value) { if (Modifier.isFinal(field.getModifiers())) { From c39e63cf577df3538e5330c220c9692f0210b3af Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Tue, 19 Mar 2019 18:48:24 +0530 Subject: [PATCH 070/983] Used google-java-formatter and added plugin (#619) --- .../extensions/android/AndroidUtils.java | 11 +- .../extensions/android/http/AndroidHttp.java | 22 +- .../extensions/android/http/package-info.java | 2 +- .../android/json/AndroidJsonFactory.java | 10 +- .../android/json/AndroidJsonGenerator.java | 6 +- .../android/json/AndroidJsonParser.java | 13 +- .../extensions/android/json/package-info.java | 2 +- .../extensions/android/package-info.java | 2 +- .../client/http/apache/ApacheHttpRequest.java | 7 +- .../http/apache/ApacheHttpTransport.java | 114 ++--- .../api/client/http/apache/ContentEntity.java | 4 +- .../apache/SSLSocketFactoryExtension.java | 9 +- .../api/client/http/apache/package-info.java | 2 - .../http/apache/ApacheHttpTransportTest.java | 3 +- .../http/apache/ApacheHttpTransportTest.java | 3 +- .../datastore/AppEngineDataStoreFactory.java | 42 +- .../appengine/datastore/package-info.java | 1 - .../appengine/http/UrlFetchRequest.java | 13 +- .../appengine/http/UrlFetchResponse.java | 1 - .../appengine/http/UrlFetchTransport.java | 56 +-- .../appengine/http/package-info.java | 5 +- ...pEngineNoMemcacheDataStoreFactoryTest.java | 4 +- .../api/client/findbugs/BetaDetector.java | 27 +- .../api/client/json/gson/GsonFactory.java | 7 +- .../api/client/json/gson/GsonGenerator.java | 5 +- .../api/client/json/gson/GsonParser.java | 11 +- .../api/client/json/gson/package-info.java | 2 - .../api/client/json/gson/GsonFactoryTest.java | 26 +- .../client/json/jackson/JacksonFactory.java | 6 +- .../client/json/jackson/JacksonGenerator.java | 5 +- .../client/json/jackson/JacksonParser.java | 5 +- .../api/client/json/jackson/package-info.java | 1 - .../json/jackson/JacksonFactoryTest.java | 19 +- .../client/json/jackson2/JacksonFactory.java | 6 +- .../json/jackson2/JacksonGenerator.java | 5 +- .../client/json/jackson2/JacksonParser.java | 5 +- .../client/json/jackson2/package-info.java | 2 - .../json/jackson2/JacksonFactoryTest.java | 19 +- .../http/protobuf/ProtoHttpContent.java | 23 +- .../client/http/protobuf/package-info.java | 6 +- .../client/protobuf/ProtoObjectParser.java | 15 +- .../api/client/protobuf/ProtocolBuffers.java | 18 +- .../api/client/protobuf/package-info.java | 6 +- .../client/protobuf/ProtocolBuffersTest.java | 16 +- .../test/json/AbstractJsonFactoryTest.java | 463 ++++++++---------- .../api/client/test/json/package-info.java | 2 - .../store/AbstractDataStoreFactoryTest.java | 3 +- .../client/test/util/store/package-info.java | 1 - .../util/store/FileDataStoreFactoryTest.java | 5 +- .../store/MemoryDataStoreFactoryTest.java | 1 - .../http/xml/AbstractXmlHttpContent.java | 6 +- .../api/client/http/xml/XmlHttpContent.java | 24 +- .../api/client/http/xml/atom/AtomContent.java | 32 +- .../client/http/xml/atom/AtomFeedParser.java | 21 +- .../client/http/xml/atom/package-info.java | 3 +- .../api/client/http/xml/package-info.java | 3 +- .../com/google/api/client/xml/GenericXml.java | 11 +- .../java/com/google/api/client/xml/Xml.java | 179 +++---- .../client/xml/XmlNamespaceDictionary.java | 96 ++-- .../api/client/xml/XmlObjectParser.java | 23 +- .../xml/atom/AbstractAtomFeedParser.java | 13 +- .../com/google/api/client/xml/atom/Atom.java | 16 +- .../api/client/xml/atom/package-info.java | 3 +- .../google/api/client/xml/package-info.java | 3 +- .../com/google/api/client/xml/AtomTest.java | 135 +++-- .../api/client/xml/GenericXmlListTest.java | 232 +++++---- .../google/api/client/xml/GenericXmlTest.java | 249 +++++----- .../google/api/client/xml/XmlEnumTest.java | 76 ++- .../google/api/client/xml/XmlListTest.java | 155 +++--- .../xml/XmlNamespaceDictionaryTest.java | 56 +-- .../com/google/api/client/xml/XmlTest.java | 280 ++++++----- .../api/client/http/AbstractHttpContent.java | 23 +- .../http/AbstractInputStreamContent.java | 25 +- .../google/api/client/http/BackOffPolicy.java | 23 +- .../api/client/http/BasicAuthentication.java | 11 +- .../api/client/http/ByteArrayContent.java | 34 +- .../google/api/client/http/EmptyContent.java | 10 +- .../client/http/ExponentialBackOffPolicy.java | 215 +++----- .../google/api/client/http/FileContent.java | 15 +- .../google/api/client/http/GZipEncoding.java | 23 +- .../google/api/client/http/GenericUrl.java | 130 ++--- .../http/HttpBackOffIOExceptionHandler.java | 41 +- ...ttpBackOffUnsuccessfulResponseHandler.java | 78 ++- .../google/api/client/http/HttpContent.java | 5 +- .../google/api/client/http/HttpEncoding.java | 13 +- .../http/HttpEncodingStreamingContent.java | 5 +- .../client/http/HttpExecuteInterceptor.java | 66 ++- .../google/api/client/http/HttpHeaders.java | 239 ++++----- .../client/http/HttpIOExceptionHandler.java | 45 +- .../google/api/client/http/HttpMediaType.java | 81 +-- .../google/api/client/http/HttpMethods.java | 3 +- .../google/api/client/http/HttpRequest.java | 360 ++++++-------- .../api/client/http/HttpRequestFactory.java | 23 +- .../client/http/HttpRequestInitializer.java | 50 +- .../google/api/client/http/HttpResponse.java | 196 +++----- .../client/http/HttpResponseException.java | 65 +-- .../client/http/HttpResponseInterceptor.java | 84 ++-- .../api/client/http/HttpStatusCodes.java | 26 +- .../google/api/client/http/HttpTransport.java | 93 ++-- .../http/HttpUnsuccessfulResponseHandler.java | 89 ++-- .../api/client/http/InputStreamContent.java | 26 +- .../api/client/http/LowLevelHttpRequest.java | 44 +- .../api/client/http/LowLevelHttpResponse.java | 15 +- .../api/client/http/MultipartContent.java | 50 +- .../api/client/http/OpenCensusUtils.java | 62 +-- .../google/api/client/http/UriTemplate.java | 167 +++---- .../api/client/http/UrlEncodedContent.java | 38 +- .../api/client/http/UrlEncodedParser.java | 56 +-- .../client/http/apache/ApacheHttpRequest.java | 10 +- .../http/apache/ApacheHttpTransport.java | 135 +++-- .../api/client/http/apache/ContentEntity.java | 4 +- .../apache/SSLSocketFactoryExtension.java | 9 +- .../api/client/http/apache/package-info.java | 2 - .../http/javanet/ConnectionFactory.java | 4 +- .../javanet/DefaultConnectionFactory.java | 4 +- .../client/http/javanet/NetHttpRequest.java | 24 +- .../client/http/javanet/NetHttpResponse.java | 40 +- .../client/http/javanet/NetHttpTransport.java | 103 ++-- .../api/client/http/javanet/package-info.java | 2 - .../api/client/http/json/JsonHttpContent.java | 23 +- .../api/client/http/json/package-info.java | 2 - .../google/api/client/http/package-info.java | 2 - .../api/client/json/CustomizeJsonParser.java | 24 +- .../google/api/client/json/GenericJson.java | 12 +- .../java/com/google/api/client/json/Json.java | 4 +- .../google/api/client/json/JsonFactory.java | 39 +- .../google/api/client/json/JsonGenerator.java | 20 +- .../api/client/json/JsonObjectParser.java | 42 +- .../google/api/client/json/JsonParser.java | 317 ++++++------ .../client/json/JsonPolymorphicTypeMap.java | 13 +- .../google/api/client/json/JsonString.java | 29 +- .../google/api/client/json/package-info.java | 2 - .../api/client/json/rpc2/JsonRpcRequest.java | 18 +- .../api/client/json/rpc2/package-info.java | 3 +- .../json/webtoken/JsonWebSignature.java | 136 ++--- .../client/json/webtoken/JsonWebToken.java | 101 ++-- .../client/json/webtoken/package-info.java | 3 +- .../api/client/testing/http/FixedClock.java | 13 +- .../api/client/testing/http/HttpTesting.java | 5 +- .../client/testing/http/MockHttpContent.java | 15 +- .../testing/http/MockHttpTransport.java | 96 ++-- .../MockHttpUnsuccessfulResponseHandler.java | 11 +- .../testing/http/MockLowLevelHttpRequest.java | 34 +- .../http/MockLowLevelHttpResponse.java | 43 +- .../testing/http/apache/MockHttpClient.java | 25 +- .../testing/http/apache/package-info.java | 3 +- .../http/javanet/MockHttpURLConnection.java | 39 +- .../testing/http/javanet/package-info.java | 3 +- .../api/client/testing/http/package-info.java | 3 +- .../client/testing/json/MockJsonFactory.java | 7 +- .../testing/json/MockJsonGenerator.java | 58 +-- .../client/testing/json/MockJsonParser.java | 7 +- .../api/client/testing/json/package-info.java | 3 +- .../json/webtoken/TestCertificates.java | 354 ++++++------- .../testing/json/webtoken/package-info.java | 2 +- .../testing/util/LogRecordingHandler.java | 9 +- .../api/client/testing/util/MockBackOff.java | 19 +- .../api/client/testing/util/MockSleeper.java | 6 +- .../testing/util/SecurityTestUtils.java | 98 ++-- .../util/TestableByteArrayInputStream.java | 7 +- .../util/TestableByteArrayOutputStream.java | 7 +- .../api/client/testing/util/package-info.java | 3 +- .../com/google/api/client/util/ArrayMap.java | 37 +- .../google/api/client/util/ArrayValueMap.java | 26 +- .../com/google/api/client/util/BackOff.java | 44 +- .../google/api/client/util/BackOffUtils.java | 13 +- .../com/google/api/client/util/Base64.java | 12 +- .../java/com/google/api/client/util/Beta.java | 49 +- .../util/ByteArrayStreamingContent.java | 8 +- .../google/api/client/util/ByteStreams.java | 31 +- .../com/google/api/client/util/Charsets.java | 7 +- .../com/google/api/client/util/ClassInfo.java | 36 +- .../com/google/api/client/util/Clock.java | 21 +- .../google/api/client/util/Collections2.java | 9 +- .../java/com/google/api/client/util/Data.java | 186 +++---- .../com/google/api/client/util/DataMap.java | 22 +- .../com/google/api/client/util/DateTime.java | 71 ++- .../api/client/util/ExponentialBackOff.java | 231 ++++----- .../com/google/api/client/util/FieldInfo.java | 48 +- .../google/api/client/util/GenericData.java | 27 +- .../com/google/api/client/util/IOUtils.java | 51 +- .../com/google/api/client/util/Joiner.java | 12 +- .../java/com/google/api/client/util/Key.java | 31 +- .../com/google/api/client/util/Lists.java | 14 +- .../util/LoggingByteArrayOutputStream.java | 11 +- .../api/client/util/LoggingInputStream.java | 2 +- .../api/client/util/LoggingOutputStream.java | 3 +- .../client/util/LoggingStreamingContent.java | 4 +- .../java/com/google/api/client/util/Maps.java | 7 +- .../com/google/api/client/util/NanoClock.java | 17 +- .../com/google/api/client/util/NullValue.java | 13 +- .../google/api/client/util/ObjectParser.java | 8 +- .../com/google/api/client/util/Objects.java | 79 ++- .../com/google/api/client/util/PemReader.java | 45 +- .../google/api/client/util/Preconditions.java | 47 +- .../google/api/client/util/SecurityUtils.java | 53 +- .../java/com/google/api/client/util/Sets.java | 7 +- .../com/google/api/client/util/Sleeper.java | 20 +- .../com/google/api/client/util/SslUtils.java | 48 +- .../api/client/util/StreamingContent.java | 12 +- .../google/api/client/util/StringUtils.java | 12 +- .../com/google/api/client/util/Strings.java | 7 +- .../google/api/client/util/Throwables.java | 81 ++- .../com/google/api/client/util/Types.java | 74 ++- .../com/google/api/client/util/Value.java | 39 +- .../api/client/util/escape/CharEscapers.java | 155 +++--- .../api/client/util/escape/Escaper.java | 23 +- .../client/util/escape/PercentEscaper.java | 55 +-- .../api/client/util/escape/Platform.java | 20 +- .../client/util/escape/UnicodeEscaper.java | 101 ++-- .../api/client/util/escape/package-info.java | 2 - .../google/api/client/util/package-info.java | 2 - .../client/util/store/AbstractDataStore.java | 24 +- .../util/store/AbstractDataStoreFactory.java | 9 +- .../util/store/AbstractMemoryDataStore.java | 5 +- .../api/client/util/store/DataStore.java | 10 +- .../client/util/store/DataStoreFactory.java | 26 +- .../api/client/util/store/DataStoreUtils.java | 14 +- .../util/store/FileDataStoreFactory.java | 19 +- .../util/store/MemoryDataStoreFactory.java | 6 +- .../api/client/util/store/package-info.java | 1 - .../client/http/AbstractHttpContentTest.java | 2 - .../client/http/BasicAuthenticationTest.java | 6 +- .../api/client/http/EmptyContentTest.java | 1 - .../http/ExponentialBackOffPolicyTest.java | 69 +-- .../api/client/http/GZipEncodingTest.java | 8 +- .../api/client/http/GenericUrlTest.java | 47 +- ...ackOffUnsuccessfulResponseHandlerTest.java | 21 +- .../HttpEncodingStreamingContentTest.java | 7 +- .../api/client/http/HttpHeadersTest.java | 72 +-- .../api/client/http/HttpMediaTypeTest.java | 21 +- .../api/client/http/HttpRequestTest.java | 302 +++++++----- .../http/HttpResponseExceptionTest.java | 177 +++---- .../api/client/http/HttpResponseTest.java | 364 +++++++------- .../api/client/http/MultipartContentTest.java | 60 ++- .../api/client/http/OpenCensusUtilsTest.java | 83 ++-- .../api/client/http/UriTemplateTest.java | 107 ++-- .../client/http/UrlEncodedContentTest.java | 12 +- .../api/client/http/UrlEncodedParserTest.java | 57 +-- .../http/javanet/NetHttpRequestTest.java | 130 ++--- .../http/javanet/NetHttpResponseTest.java | 33 +- .../http/javanet/NetHttpTransportTest.java | 39 +- .../api/client/json/JsonObjectParserTest.java | 3 +- .../api/client/json/JsonParserTest.java | 2 - .../json/webtoken/JsonWebSignatureTest.java | 9 +- .../client/testing/http/FixedClockTest.java | 5 +- .../testing/http/MockHttpTransportTest.java | 1 - .../http/MockLowLevelHttpRequestTest.java | 1 - .../javanet/MockHttpUrlConnectionTest.java | 54 +- .../client/testing/util/MockBackOffTest.java | 1 - .../google/api/client/util/ArrayMapTest.java | 6 +- .../api/client/util/BackOffUtilsTest.java | 1 - .../google/api/client/util/ClassInfoTest.java | 16 +- .../com/google/api/client/util/ClockTest.java | 5 +- .../google/api/client/util/DataMapTest.java | 9 +- .../com/google/api/client/util/DataTest.java | 88 ++-- .../google/api/client/util/DateTimeTest.java | 51 +- .../client/util/ExponentialBackOffTest.java | 70 +-- .../google/api/client/util/FieldInfoTest.java | 5 +- .../google/api/client/util/IOUtilsTest.java | 5 +- .../util/LoggingStreamingContentTest.java | 37 +- .../google/api/client/util/ObjectsTest.java | 11 +- .../google/api/client/util/PemReaderTest.java | 65 +-- .../api/client/util/SecurityUtilsTest.java | 156 +++--- .../com/google/api/client/util/TypesTest.java | 115 +++-- pom.xml | 9 + .../cmdline/simple/DailyMotionSample.java | 40 +- 267 files changed, 5235 insertions(+), 6379 deletions(-) diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java index 61522acc6..8fa595b43 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java @@ -19,7 +19,7 @@ import com.google.api.client.util.Preconditions; /** - * {@link Beta}
          + * {@link Beta}
          * Utilities for Android. * * @since 1.11 @@ -44,11 +44,12 @@ public static boolean isMinimumSdkLevel(int minimumSdkLevel) { * @see android.os.Build.VERSION_CODES */ public static void checkMinimumSdkLevel(int minimumSdkLevel) { - Preconditions.checkArgument(isMinimumSdkLevel(minimumSdkLevel), - "running on Android SDK level %s but requires minimum %s", Build.VERSION.SDK_INT, + Preconditions.checkArgument( + isMinimumSdkLevel(minimumSdkLevel), + "running on Android SDK level %s but requires minimum %s", + Build.VERSION.SDK_INT, minimumSdkLevel); } - private AndroidUtils() { - } + private AndroidUtils() {} } diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java index 63287ee18..2b908d469 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java @@ -19,17 +19,16 @@ import com.google.api.client.http.apache.ApacheHttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.util.Beta; - import java.net.HttpURLConnection; /** - * {@link Beta}
          + * {@link Beta}
          * Utilities for Android HTTP transport. * * @since 1.11 * @author Yaniv Inbar - * @deprecated Gingerbread is no longer supported by Google Play Services. Please use - * {@link NetHttpTransport} directly or switch to Cronet which is better supported. + * @deprecated Gingerbread is no longer supported by Google Play Services. Please use {@link + * NetHttpTransport} directly or switch to Cronet which is better supported. */ @Beta @Deprecated @@ -39,24 +38,19 @@ public class AndroidHttp { * Returns a new thread-safe HTTP transport instance that is compatible with Android SDKs prior to * Gingerbread. * - *

          - * Don't use this for Android applications that anyway require Gingerbread. Instead just call + *

          Don't use this for Android applications that anyway require Gingerbread. Instead just call * {@code new NetHttpTransport()}. - *

          * - *

          - * Prior to Gingerbread, the {@link HttpURLConnection} implementation was buggy, and the Apache + *

          Prior to Gingerbread, the {@link HttpURLConnection} implementation was buggy, and the Apache * HTTP Client was preferred. However, starting with Gingerbread, the {@link HttpURLConnection} * implementation bugs were fixed, and is now better supported than the Apache HTTP Client. There * is no guarantee that Apache HTTP transport will continue to work in future SDKs. Therefore, - * this method uses {@link NetHttpTransport} for Gingerbread or higher, and otherwise - * {@link ApacheHttpTransport}. - *

          + * this method uses {@link NetHttpTransport} for Gingerbread or higher, and otherwise {@link + * ApacheHttpTransport}. */ public static HttpTransport newCompatibleTransport() { return AndroidUtils.isMinimumSdkLevel(9) ? new NetHttpTransport() : new ApacheHttpTransport(); } - private AndroidHttp() { - } + private AndroidHttp() {} } diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java index 1b9d72b75..1491436b7 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
          + * {@link com.google.api.client.util.Beta}
          * Utilities for Android HTTP transport. * * @since 1.11 diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java index e9b30c4b9..7b2b2cbbc 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java @@ -33,17 +33,13 @@ import java.nio.charset.Charset; /** - * {@link Beta}
          + * {@link Beta}
          * Low-level JSON library implementation based on GSON. * - *

          - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

          Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. - *

          * - *

          - * Required minimum Android SDK 3.0 (level 11). - *

          + *

          Required minimum Android SDK 3.0 (level 11). * * @since 1.11 * @author Yaniv Inbar diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java index 27b403804..fcda663f7 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java @@ -24,12 +24,10 @@ import java.math.BigInteger; /** - * {@link Beta}
          + * {@link Beta}
          * Low-level JSON serializer implementation based on GSON. * - *

          - * Implementation is not thread-safe. - *

          + *

          Implementation is not thread-safe. * * @author Yaniv Inbar */ diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java index b7af28466..622dcc971 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java @@ -29,12 +29,10 @@ import java.util.List; /** - * {@link Beta}
          + * {@link Beta}
          * Low-level JSON serializer implementation based on GSON. * - *

          - * Implementation is not thread-safe. - *

          + *

          Implementation is not thread-safe. * * @author Yaniv Inbar */ @@ -87,7 +85,6 @@ public short getShortValue() { return Short.parseShort(currentText); } - @Override public int getIntValue() { checkNumber(); @@ -199,8 +196,10 @@ public JsonToken nextToken() throws IOException { break; case NUMBER: currentText = reader.nextString(); - currentToken = currentText.indexOf('.') == -1 - ? JsonToken.VALUE_NUMBER_INT : JsonToken.VALUE_NUMBER_FLOAT; + currentToken = + currentText.indexOf('.') == -1 + ? JsonToken.VALUE_NUMBER_INT + : JsonToken.VALUE_NUMBER_FLOAT; break; case NAME: currentText = reader.nextName(); diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java index 0507f3dc9..cd99614f8 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
          + * {@link com.google.api.client.util.Beta}
          * Low-level implementation of the GSON parser library built-in to the Android 3.0 SDK. * * @since 1.11 diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java index 7149b88a7..3862d01ba 100644 --- a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
          + * {@link com.google.api.client.util.Beta}
          * Utilities for Android. * * @since 1.11 diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java index b31b20594..2d2f40189 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java +++ b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java @@ -25,9 +25,7 @@ import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; @@ -54,7 +52,8 @@ public void setTimeout(int connectTimeout, int readTimeout) throws IOException { @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, + Preconditions.checkArgument( + request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java index 82ce559bb..2dfda73fe 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java @@ -61,20 +61,16 @@ /** * Thread-safe HTTP transport based on the Apache HTTP Client library. * - *

          - * Implementation is thread-safe, as long as any parameter modification to the - * {@link #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum - * efficiency, applications should use a single globally-shared instance of the HTTP transport. - *

          + *

          Implementation is thread-safe, as long as any parameter modification to the {@link + * #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum efficiency, + * applications should use a single globally-shared instance of the HTTP transport. * - *

          - * Default settings are specified in {@link #newDefaultHttpClient()}. Use the - * {@link #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. + *

          Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link + * #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. * Alternatively, use {@link #ApacheHttpTransport()} and change the {@link #getHttpClient()}. Please * read the Apache HTTP * Client connection management tutorial for more complex configuration options. - *

          * * @since 1.0 * @author Yaniv Inbar @@ -87,9 +83,7 @@ public final class ApacheHttpTransport extends HttpTransport { /** * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. * - *

          - * Use {@link Builder} to modify HTTP client options. - *

          + *

          Use {@link Builder} to modify HTTP client options. * * @since 1.3 */ @@ -100,25 +94,22 @@ public ApacheHttpTransport() { /** * Constructor that allows an alternative Apache HTTP client to be used. * - *

          - * Note that a few settings are overridden: - *

          + *

          Note that a few settings are overridden: + * *

            - *
          • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with - * {@link HttpVersion#HTTP_1_1}.
          • - *
          • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}.
          • - *
          • {@link ConnManagerParams#setTimeout} and {@link HttpConnectionParams#setConnectionTimeout} - * are set on each request based on {@link HttpRequest#getConnectTimeout()}.
          • - *
          • {@link HttpConnectionParams#setSoTimeout} is set on each request based on - * {@link HttpRequest#getReadTimeout()}.
          • + *
          • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with {@link + * HttpVersion#HTTP_1_1}. + *
          • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}. + *
          • {@link ConnManagerParams#setTimeout} and {@link + * HttpConnectionParams#setConnectionTimeout} are set on each request based on {@link + * HttpRequest#getConnectTimeout()}. + *
          • {@link HttpConnectionParams#setSoTimeout} is set on each request based on {@link + * HttpRequest#getReadTimeout()}. *
          * - *

          - * Use {@link Builder} for a more user-friendly way to modify the HTTP client options. - *

          + *

          Use {@link Builder} for a more user-friendly way to modify the HTTP client options. * * @param httpClient Apache HTTP client to use - * * @since 1.6 */ public ApacheHttpTransport(HttpClient httpClient) { @@ -150,11 +141,11 @@ static HttpParams newDefaultHttpParams() { *

          Use this constructor if you want to customize the default Apache HTTP client. Settings: * *

            - *
          • The client connection manager is set to {@link ThreadSafeClientConnManager}.
          • + *
          • The client connection manager is set to {@link ThreadSafeClientConnManager}. *
          • The socket buffer size is set to 8192 using {@link * HttpConnectionParams#setSocketBufferSize}. - *
          • The retry mechanism is turned off by setting {@code new - * DefaultHttpRequestRetryHandler(0, false)}. + *
          • The retry mechanism is turned off by setting {@code new DefaultHttpRequestRetryHandler(0, + * false)}. *
          • The route planner uses {@link ProxySelectorRoutePlanner} with {@link * ProxySelector#getDefault()}, which uses the proxy settings from system @@ -170,13 +161,13 @@ public static DefaultHttpClient newDefaultHttpClient() { } /** - * Creates a new instance of the Apache HTTP client that is used by the - * {@link #ApacheHttpTransport()} constructor. + * Creates a new instance of the Apache HTTP client that is used by the {@link + * #ApacheHttpTransport()} constructor. * * @param socketFactory SSL socket factory * @param params HTTP parameters - * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or - * {@code null} for {@link DefaultHttpRoutePlanner} + * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code + * null} for {@link DefaultHttpRoutePlanner} * @return new instance of the Apache HTTP client */ static DefaultHttpClient newDefaultHttpClient( @@ -245,9 +236,7 @@ public HttpClient getHttpClient() { /** * Builder for {@link ApacheHttpTransport}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.13 */ @@ -260,27 +249,23 @@ public static final class Builder { private final HttpParams params = newDefaultHttpParams(); /** - * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for - * {@link DefaultHttpRoutePlanner}. + * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for {@link + * DefaultHttpRoutePlanner}. */ private ProxySelector proxySelector = ProxySelector.getDefault(); /** - * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use - * {@link #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. + * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use {@link + * #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. * - *

            - * By default it is {@code null}, which uses the proxy settings from By default it is {@code null}, which uses the proxy settings from system * properties. - *

            * - *

            - * For example: - *

            + *

            For example: * *

            -       setProxy(new HttpHost("127.0.0.1", 8080))
            +     * setProxy(new HttpHost("127.0.0.1", 8080))
                  * 
            */ public Builder setProxy(HttpHost proxy) { @@ -295,11 +280,9 @@ public Builder setProxy(HttpHost proxy) { * Sets the HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for * {@link DefaultHttpRoutePlanner}. * - *

            - * By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from system * properties. - *

            */ public Builder setProxySelector(ProxySelector proxySelector) { this.proxySelector = proxySelector; @@ -311,16 +294,14 @@ public Builder setProxySelector(ProxySelector proxySelector) { /** * Sets the SSL socket factory based on root certificates in a Java KeyStore. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
            +     * trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
                  * 
            * * @param keyStoreStream input stream to the key store (closed at the end of this method in a - * finally block) + * finally block) * @param storePass password protecting the key store file * @since 1.14 */ @@ -335,12 +316,10 @@ public Builder trustCertificatesFromJavaKeyStore(InputStream keyStoreStream, Str * Sets the SSL socket factory based root certificates generated from the specified stream using * {@link CertificateFactory#generateCertificates(InputStream)}. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromStream(new FileInputStream("certs.pem"));
            +     * trustCertificatesFromStream(new FileInputStream("certs.pem"));
                  * 
            * * @param certificateStream certificate stream @@ -359,8 +338,7 @@ public Builder trustCertificatesFromStream(InputStream certificateStream) * Sets the SSL socket factory based on a root certificate trust store. * * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} - * or {@link SecurityUtils#loadKeyStoreFromCertificates}) - * + * or {@link SecurityUtils#loadKeyStoreFromCertificates}) * @since 1.14 */ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityException { @@ -370,15 +348,13 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce } /** - * {@link Beta}
            - * Disables validating server SSL certificates by setting the SSL socket factory using - * {@link SslUtils#trustAllSSLContext()} for the SSL context and - * {@link SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. + * {@link Beta}
            + * Disables validating server SSL certificates by setting the SSL socket factory using {@link + * SslUtils#trustAllSSLContext()} for the SSL context and {@link + * SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. * - *

            - * Be careful! Disabling certificate validation is dangerous and should only be done in testing - * environments. - *

            + *

            Be careful! Disabling certificate validation is dangerous and should only be done in + * testing environments. */ @Beta public Builder doNotValidateCertificate() throws GeneralSecurityException { diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java index 293f8a908..343b35c50 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java +++ b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java @@ -21,9 +21,7 @@ import java.io.OutputStream; import org.apache.http.entity.AbstractHttpEntity; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ContentEntity extends AbstractHttpEntity { /** Content length or less than zero if not known. */ diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java index 809849fcb..4b9a624f2 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java +++ b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java @@ -36,11 +36,10 @@ final class SSLSocketFactoryExtension extends SSLSocketFactory { /** Wrapped Java SSL socket factory. */ private final javax.net.ssl.SSLSocketFactory socketFactory; - /** - * @param sslContext SSL context - */ - SSLSocketFactoryExtension(SSLContext sslContext) throws KeyManagementException, - UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { + /** @param sslContext SSL context */ + SSLSocketFactoryExtension(SSLContext sslContext) + throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, + KeyStoreException { super((KeyStore) null); socketFactory = sslContext.getSocketFactory(); } diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java index e0f5be089..0c2c23b4f 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java +++ b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java @@ -18,6 +18,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.http.apache; - diff --git a/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java b/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java index 21aa27357..8176166db 100644 --- a/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java +++ b/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java @@ -88,7 +88,8 @@ private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, St fail("expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { // expected - assertEquals(e.getMessage(), + assertEquals( + e.getMessage(), "Apache HTTP client does not support " + method + " requests with content."); } } diff --git a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java b/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java index 21aa27357..8176166db 100644 --- a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java +++ b/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java @@ -88,7 +88,8 @@ private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, St fail("expected " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { // expected - assertEquals(e.getMessage(), + assertEquals( + e.getMessage(), "Apache HTTP client does not support " + method + " requests with content."); } } diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java index 5fca5a684..0894d8192 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java @@ -34,7 +34,6 @@ import com.google.appengine.api.memcache.Expiration; import com.google.appengine.api.memcache.MemcacheService; import com.google.appengine.api.memcache.MemcacheServiceFactory; - import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serializable; @@ -50,18 +49,13 @@ * Thread-safe Google App Engine implementation of a data store factory that directly uses the App * Engine Data Store API. * - *

            - * For convenience, a default global instance is provided in {@link #getDefaultInstance()}. - *

            + *

            For convenience, a default global instance is provided in {@link #getDefaultInstance()}. * - *

            - * By default, it uses the Memcache API as an in-memory data cache. To disable it, call - * {@link Builder#setDisableMemcache(boolean)}. The Memcache is only read to check if a key already - * has a value inside {@link DataStore#get(String)}. The values in the Memcache are updated in the - * {@link DataStore#get(String)}, {@link DataStore#set(String, Serializable)}, - * {@link DataStore#delete(String)}, {@link DataStore#values()}, and {@link DataStore#clear()} - * methods. - *

            + *

            By default, it uses the Memcache API as an in-memory data cache. To disable it, call {@link + * Builder#setDisableMemcache(boolean)}. The Memcache is only read to check if a key already has a + * value inside {@link DataStore#get(String)}. The values in the Memcache are updated in the {@link + * DataStore#get(String)}, {@link DataStore#set(String, Serializable)}, {@link + * DataStore#delete(String)}, {@link DataStore#values()}, and {@link DataStore#clear()} methods. * * @since 1.16 * @author Yaniv Inbar @@ -83,9 +77,7 @@ public AppEngineDataStoreFactory() { this(new Builder()); } - /** - * @param builder builder - */ + /** @param builder builder */ public AppEngineDataStoreFactory(Builder builder) { disableMemcache = builder.disableMemcache; memcacheExpiration = builder.memcacheExpiration; @@ -97,8 +89,8 @@ public boolean getDisableMemcache() { } /** - * Returns a global thread-safe instance based on the default constructor - * {@link #AppEngineDataStoreFactory()}. + * Returns a global thread-safe instance based on the default constructor {@link + * #AppEngineDataStoreFactory()}. */ public static AppEngineDataStoreFactory getDefaultInstance() { return InstanceHolder.INSTANCE; @@ -296,9 +288,7 @@ private Iterable query(boolean keysOnly) { /** * App Engine data store factory builder. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.16 */ @@ -318,10 +308,8 @@ public final boolean getDisableMemcache() { /** * Sets whether to disable the memcache ({@code false} by default). * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setDisableMemcache(boolean disableMemcache) { this.disableMemcache = disableMemcache; @@ -336,10 +324,8 @@ public final Expiration getMemcacheExpiration() { /** * Sets the Memcache expiration policy on puts. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMemcacheExpiration(Expiration memcacheExpiration) { this.memcacheExpiration = memcacheExpiration; diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java index fd9acf785..b81c6c4bc 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java @@ -19,4 +19,3 @@ * @author Yaniv Inbar */ package com.google.api.client.extensions.appengine.datastore; - diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java index f79b93c6f..903b2cc43 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java @@ -23,14 +23,11 @@ import com.google.appengine.api.urlfetch.HTTPResponse; import com.google.appengine.api.urlfetch.URLFetchService; import com.google.appengine.api.urlfetch.URLFetchServiceFactory; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URL; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class UrlFetchRequest extends LowLevelHttpRequest { private final HTTPRequest request; @@ -46,8 +43,12 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) { - request.getFetchOptions().setDeadline(connectTimeout == 0 || readTimeout == 0 - ? Double.MAX_VALUE : (connectTimeout + readTimeout) / 1000.0); + request + .getFetchOptions() + .setDeadline( + connectTimeout == 0 || readTimeout == 0 + ? Double.MAX_VALUE + : (connectTimeout + readTimeout) / 1000.0); } @Override diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java index c10fdee6c..19e6a1ef3 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java @@ -17,7 +17,6 @@ import com.google.api.client.http.LowLevelHttpResponse; import com.google.appengine.api.urlfetch.HTTPHeader; import com.google.appengine.api.urlfetch.HTTPResponse; - import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java index a7ba1b940..b6dfa8d3d 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java @@ -19,7 +19,6 @@ import com.google.api.client.util.Preconditions; import com.google.appengine.api.urlfetch.FetchOptions; import com.google.appengine.api.urlfetch.HTTPMethod; - import java.io.IOException; import java.net.HttpURLConnection; import java.util.Arrays; @@ -28,21 +27,18 @@ * Thread-safe HTTP transport for Google App Engine based on URL Fetch. * - *

            - * Implementation is thread-safe. For maximum efficiency, applications should use a single + *

            Implementation is thread-safe. For maximum efficiency, applications should use a single * globally-shared instance of the HTTP transport. - *

            * - *

            - * URL Fetch is only available on Google App Engine (not on any other Java environment), and is the - * underlying HTTP transport used for App Engine. Their implementation of {@link HttpURLConnection} - * is simply an abstraction layer on top of URL Fetch. By implementing a transport that directly - * uses URL Fetch, we can optimize the behavior slightly, and can potentially take advantage of - * features in URL Fetch that are not available in {@link HttpURLConnection}. Furthermore, there is - * currently a serious bug in how HTTP headers are processed in the App Engine implementation of - * {@link HttpURLConnection}, which we are able to avoid using this implementation. Therefore, this - * is the recommended transport to use on App Engine. - *

            + *

            URL Fetch is only available on Google App Engine (not on any other Java environment), and is + * the underlying HTTP transport used for App Engine. Their implementation of {@link + * HttpURLConnection} is simply an abstraction layer on top of URL Fetch. By implementing a + * transport that directly uses URL Fetch, we can optimize the behavior slightly, and can + * potentially take advantage of features in URL Fetch that are not available in {@link + * HttpURLConnection}. Furthermore, there is currently a serious bug in how HTTP headers are + * processed in the App Engine implementation of {@link HttpURLConnection}, which we are able to + * avoid using this implementation. Therefore, this is the recommended transport to use on App + * Engine. * * @since 1.10 * @author Yaniv Inbar @@ -54,16 +50,24 @@ public final class UrlFetchTransport extends HttpTransport { * {@link FetchOptions#validateCertificate()}. */ enum CertificateValidationBehavior { - DEFAULT, VALIDATE, DO_NOT_VALIDATE + DEFAULT, + VALIDATE, + DO_NOT_VALIDATE } /** * All valid request methods as specified in {@link HTTPMethod}, sorted in ascending alphabetical * order. */ - private static final String[] SUPPORTED_METHODS = - {HttpMethods.DELETE, HttpMethods.GET, HttpMethods.HEAD, HttpMethods.POST, - HttpMethods.PUT, HttpMethods.PATCH}; + private static final String[] SUPPORTED_METHODS = { + HttpMethods.DELETE, + HttpMethods.GET, + HttpMethods.HEAD, + HttpMethods.POST, + HttpMethods.PUT, + HttpMethods.PATCH + }; + static { Arrays.sort(SUPPORTED_METHODS); } @@ -74,17 +78,13 @@ enum CertificateValidationBehavior { /** * Constructor with the default fetch options. * - *

            - * Use {@link Builder} to modify fetch options. - *

            + *

            Use {@link Builder} to modify fetch options. */ public UrlFetchTransport() { this(new Builder()); } - /** - * @param builder builder - */ + /** @param builder builder */ UrlFetchTransport(Builder builder) { certificateValidationBehavior = builder.certificateValidationBehavior; } @@ -144,9 +144,7 @@ protected UrlFetchRequest buildRequest(String method, String url) throws IOExcep /** * Builder for {@link UrlFetchTransport}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.13 */ @@ -160,10 +158,8 @@ public static final class Builder { * Sets whether to use {@link FetchOptions#doNotValidateCertificate()} ({@code false} by * default). * - *

            - * Be careful! Disabling certificate validation is dangerous and should be done in testing + *

            Be careful! Disabling certificate validation is dangerous and should be done in testing * environments only. - *

            */ public Builder doNotValidateCertificate() { this.certificateValidationBehavior = CertificateValidationBehavior.DO_NOT_VALIDATE; diff --git a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java index ef321de84..e9c6e9b31 100644 --- a/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java +++ b/google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java @@ -14,11 +14,10 @@ /** * HTTP Transport library for Google API's based on URL Fetch in Google App Engine. + * href="https://cloud.google.com/appengine/docs/standard/java/issue-requests">URL Fetch in Google + * App Engine. * * @since 1.10 * @author Yaniv Inbar */ - package com.google.api.client.extensions.appengine.http; - diff --git a/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java b/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java index 2fb1594ec..33d1fc468 100644 --- a/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java +++ b/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java @@ -17,8 +17,8 @@ import com.google.api.client.util.store.DataStoreFactory; /** - * Tests {@link AppEngineDataStoreFactory} with - * {@link AppEngineDataStoreFactory.Builder#setDisableMemcache(boolean)}. + * Tests {@link AppEngineDataStoreFactory} with {@link + * AppEngineDataStoreFactory.Builder#setDisableMemcache(boolean)}. * * @author Yaniv Inbar */ diff --git a/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java b/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java index 97e138be3..791d37f39 100644 --- a/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java +++ b/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java @@ -15,7 +15,6 @@ package com.google.api.client.findbugs; import com.google.api.client.util.Beta; - import edu.umd.cs.findbugs.BugInstance; import edu.umd.cs.findbugs.BugReporter; import edu.umd.cs.findbugs.bcel.OpcodeStackDetector; @@ -36,19 +35,13 @@ public class BetaDetector extends OpcodeStackDetector { /** Beta annotation "signature". */ private static final String BETA_ANNOTATION = "Lcom/google/api/client/util/Beta;"; - /** - * A message indicating there is a usage of a method annotated with Beta annotation. - */ + /** A message indicating there is a usage of a method annotated with Beta annotation. */ private static final String BETA_METHOD_USAGE = "BETA_METHOD_USAGE"; - /** - * A message indicating there is a usage of a field annotated with Beta annotation. - */ + /** A message indicating there is a usage of a field annotated with Beta annotation. */ private static final String BETA_FIELD_USAGE = "BETA_FIELD_USAGE"; - /** - * A message indicating there is a usage of a class annotated with Beta annotation. - */ + /** A message indicating there is a usage of a class annotated with Beta annotation. */ private static final String BETA_CLASS_USAGE = "BETA_CLASS_USAGE"; /** The bug reporter is used to report errors. */ @@ -96,7 +89,7 @@ public void sawOpcode(int seen) { break; default: - // DO NOTHING + // DO NOTHING } } @@ -115,9 +108,7 @@ private static boolean isBeta(AnnotationEntry[] annotationEntries) { * class, it's not {@link Beta} and it doesn't appear in other {@link Beta} section. Otherwise * returns {@code null}. * - *

            - * Reports a bug in case the class is {@link Beta}. - *

            + *

            Reports a bug in case the class is {@link Beta}. */ private JavaClass checkClass() { // TODO(peleyal): check if caching the beta state of every class could improve @@ -167,9 +158,7 @@ private JavaClass getSuperclass(JavaClass javaClass) { /** * Reports bug in case the method defined by the given name and signature is {@link Beta}. * - *

            - * The method is searched in current class and all super classses as well. - *

            + *

            The method is searched in current class and all super classses as well. */ private void checkMethod(String methodName, String signature) { JavaClass javaClass = checkClass(); @@ -197,9 +186,7 @@ private void checkMethod(String methodName, String signature) { /** * Reports bug in case the field defined by the given name is {@link Beta}. * - *

            - * The field is searched in current class and all super classses as well. - *

            + *

            The field is searched in current class and all super classses as well. */ private void checkField(String fieldName) { JavaClass javaClass = checkClass(); diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java index b604a8414..391dbf3d4 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java @@ -21,7 +21,6 @@ import com.google.api.client.util.Charsets; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; - import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; @@ -34,10 +33,8 @@ /** * Low-level JSON library implementation based on GSON. * - *

            - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. - *

            * * @since 1.3 * @author Yaniv Inbar @@ -45,7 +42,7 @@ public class GsonFactory extends JsonFactory { /** - * {@link Beta}
            + * {@link Beta}
            * Returns a global thread-safe instance. * * @since 1.16 diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java index 73ac802e1..9fa561019 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java @@ -17,7 +17,6 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonGenerator; import com.google.gson.stream.JsonWriter; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -25,9 +24,7 @@ /** * Low-level JSON serializer implementation based on GSON. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar */ diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java index d7bbee1aa..1527660d5 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java @@ -29,9 +29,7 @@ /** * Low-level JSON serializer implementation based on GSON. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar */ @@ -82,7 +80,6 @@ public short getShortValue() { return Short.parseShort(currentText); } - @Override public int getIntValue() { checkNumber(); @@ -194,8 +191,10 @@ public JsonToken nextToken() throws IOException { break; case NUMBER: currentText = reader.nextString(); - currentToken = currentText.indexOf('.') == -1 - ? JsonToken.VALUE_NUMBER_INT : JsonToken.VALUE_NUMBER_FLOAT; + currentToken = + currentText.indexOf('.') == -1 + ? JsonToken.VALUE_NUMBER_INT + : JsonToken.VALUE_NUMBER_FLOAT; break; case NAME: currentText = reader.nextName(); diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java index 943323c45..a68f6c97c 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java @@ -19,6 +19,4 @@ * @since 1.3 * @author Yaniv Inbar */ - package com.google.api.client.json.gson; - diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java index 1dd970070..57d98041e 100644 --- a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java @@ -18,7 +18,6 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.test.json.AbstractJsonFactoryTest; import com.google.common.base.Charsets; - import java.io.ByteArrayInputStream; import java.util.ArrayList; @@ -33,11 +32,26 @@ public class GsonFactoryTest extends AbstractJsonFactoryTest { private static final String JSON_ENTRY_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" + GSON_LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"entries\": [" - + GSON_LINE_SEPARATOR + " {" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" - + GSON_LINE_SEPARATOR + " }," + GSON_LINE_SEPARATOR + " {" - + GSON_LINE_SEPARATOR + " \"title\": \"bar\"" + GSON_LINE_SEPARATOR + " }" - + GSON_LINE_SEPARATOR + " ]" + GSON_LINE_SEPARATOR + "}"; + private static final String JSON_FEED_PRETTY = + "{" + + GSON_LINE_SEPARATOR + + " \"entries\": [" + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"foo\"" + + GSON_LINE_SEPARATOR + + " }," + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"bar\"" + + GSON_LINE_SEPARATOR + + " }" + + GSON_LINE_SEPARATOR + + " ]" + + GSON_LINE_SEPARATOR + + "}"; public GsonFactoryTest(String name) { super(name); diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java index 817bdbb14..c44ebc7fa 100644 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java +++ b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java @@ -19,7 +19,6 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -30,10 +29,8 @@ /** * Low-level JSON library implementation based on Jackson. * - *

            - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. - *

            * * @since 1.3 * @author Yaniv Inbar @@ -44,6 +41,7 @@ public final class JacksonFactory extends JsonFactory { /** JSON factory. */ private final org.codehaus.jackson.JsonFactory factory = new org.codehaus.jackson.JsonFactory(); + { // don't auto-close JSON content in order to ensure consistent behavior across JSON factories // TODO(rmistry): Should we disable the JsonGenerator.Feature.AUTO_CLOSE_TARGET feature? diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java index 64c0eed57..096b892ac 100644 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java +++ b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java @@ -15,7 +15,6 @@ package com.google.api.client.json.jackson; import com.google.api.client.json.JsonGenerator; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -23,9 +22,7 @@ /** * Low-level JSON serializer implementation based on Jackson. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java index 9a246d185..529582075 100644 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java +++ b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java @@ -16,7 +16,6 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -24,9 +23,7 @@ /** * Low-level JSON serializer implementation based on Jackson. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java index 81ca7adb7..eabec34a6 100644 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java +++ b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java @@ -21,4 +21,3 @@ * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. */ package com.google.api.client.json.jackson; - diff --git a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java b/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java index 84502d37b..892d5b3b6 100644 --- a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java +++ b/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java @@ -19,7 +19,6 @@ import com.google.api.client.test.json.AbstractJsonFactoryTest; import com.google.api.client.util.StringUtils; import com.google.common.base.Charsets; - import java.io.ByteArrayInputStream; import java.util.ArrayList; @@ -32,10 +31,20 @@ public class JacksonFactoryTest extends AbstractJsonFactoryTest { private static final String JSON_ENTRY_PRETTY = "{" + StringUtils.LINE_SEPARATOR + " \"title\" : \"foo\"" + StringUtils.LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = "{" + StringUtils.LINE_SEPARATOR - + " \"entries\" : [ {" + StringUtils.LINE_SEPARATOR + " \"title\" : \"foo\"" - + StringUtils.LINE_SEPARATOR + " }, {" + StringUtils.LINE_SEPARATOR + " \"title\" : \"bar\"" - + StringUtils.LINE_SEPARATOR + " } ]" + StringUtils.LINE_SEPARATOR + "}"; + private static final String JSON_FEED_PRETTY = + "{" + + StringUtils.LINE_SEPARATOR + + " \"entries\" : [ {" + + StringUtils.LINE_SEPARATOR + + " \"title\" : \"foo\"" + + StringUtils.LINE_SEPARATOR + + " }, {" + + StringUtils.LINE_SEPARATOR + + " \"title\" : \"bar\"" + + StringUtils.LINE_SEPARATOR + + " } ]" + + StringUtils.LINE_SEPARATOR + + "}"; public JacksonFactoryTest(String name) { super(name); diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java index 6eacfa8bb..62bc14ec7 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java @@ -19,7 +19,6 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -30,10 +29,8 @@ /** * Low-level JSON library implementation based on Jackson 2. * - *

            - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. - *

            * * @since 1.11 * @author Yaniv Inbar @@ -43,6 +40,7 @@ public final class JacksonFactory extends JsonFactory { /** JSON factory. */ private final com.fasterxml.jackson.core.JsonFactory factory = new com.fasterxml.jackson.core.JsonFactory(); + { // don't auto-close JSON content in order to ensure consistent behavior across JSON factories // TODO(rmistry): Should we disable the JsonGenerator.Feature.AUTO_CLOSE_TARGET feature? diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java index 7288a442a..fd02c54c3 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java @@ -15,7 +15,6 @@ package com.google.api.client.json.jackson2; import com.google.api.client.json.JsonGenerator; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -23,9 +22,7 @@ /** * Low-level JSON serializer implementation based on Jackson. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar */ diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java index 76f3f4a76..5de53112f 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java @@ -16,7 +16,6 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; @@ -24,9 +23,7 @@ /** * Low-level JSON serializer implementation based on Jackson. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar */ diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java index 02d2b4191..3c1bc0c3f 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java @@ -19,6 +19,4 @@ * @since 1.11 * @author Yaniv Inbar */ - package com.google.api.client.json.jackson2; - diff --git a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java index 68152aecc..86d13783c 100644 --- a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java +++ b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java @@ -19,7 +19,6 @@ import com.google.api.client.test.json.AbstractJsonFactoryTest; import com.google.api.client.util.StringUtils; import com.google.common.base.Charsets; - import java.io.ByteArrayInputStream; import java.util.ArrayList; @@ -32,10 +31,20 @@ public class JacksonFactoryTest extends AbstractJsonFactoryTest { private static final String JSON_ENTRY_PRETTY = "{" + StringUtils.LINE_SEPARATOR + " \"title\" : \"foo\"" + StringUtils.LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = "{" + StringUtils.LINE_SEPARATOR - + " \"entries\" : [ {" + StringUtils.LINE_SEPARATOR + " \"title\" : \"foo\"" - + StringUtils.LINE_SEPARATOR + " }, {" + StringUtils.LINE_SEPARATOR + " \"title\" : \"bar\"" - + StringUtils.LINE_SEPARATOR + " } ]" + StringUtils.LINE_SEPARATOR + "}"; + private static final String JSON_FEED_PRETTY = + "{" + + StringUtils.LINE_SEPARATOR + + " \"entries\" : [ {" + + StringUtils.LINE_SEPARATOR + + " \"title\" : \"foo\"" + + StringUtils.LINE_SEPARATOR + + " }, {" + + StringUtils.LINE_SEPARATOR + + " \"title\" : \"bar\"" + + StringUtils.LINE_SEPARATOR + + " } ]" + + StringUtils.LINE_SEPARATOR + + "}"; public JacksonFactoryTest(String name) { super(name); diff --git a/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java b/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java index c4fca7f58..c25f2793e 100644 --- a/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java +++ b/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java @@ -20,28 +20,23 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; import com.google.protobuf.MessageLite; - import java.io.IOException; import java.io.OutputStream; /** - * {@link Beta}
            + * {@link Beta}
            * Serializes of a protocol buffer message to HTTP content. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  static HttpRequest buildPostRequest(
            -      HttpRequestFactory requestFactory, GenericUrl url, MessageLite message) throws IOException {
            -    return requestFactory.buildPostRequest(url, new ProtoHttpContent(message));
            -  }
            + * static HttpRequest buildPostRequest(
            + * HttpRequestFactory requestFactory, GenericUrl url, MessageLite message) throws IOException {
            + * return requestFactory.buildPostRequest(url, new ProtoHttpContent(message));
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.5 * @author Yaniv Inbar @@ -52,9 +47,7 @@ public class ProtoHttpContent extends AbstractHttpContent { /** Message to serialize. */ private final MessageLite message; - /** - * @param message message to serialize - */ + /** @param message message to serialize */ public ProtoHttpContent(MessageLite message) { super(ProtocolBuffers.CONTENT_TYPE); this.message = Preconditions.checkNotNull(message); diff --git a/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java b/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java index 7f028cb3d..b786dba70 100644 --- a/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java +++ b/google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java @@ -13,9 +13,9 @@ */ /** - * {@link com.google.api.client.util.Beta}
            - * HTTP utilities for the Protocol Buffer format - * based on the pluggable HTTP library. + * {@link com.google.api.client.util.Beta}
            + * HTTP utilities for the Protocol Buffer + * format based on the pluggable HTTP library. * * @since 1.5 * @author Yaniv Inbar diff --git a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java index 37b1e87f8..60ed3f46a 100644 --- a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java +++ b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java @@ -17,7 +17,6 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.ObjectParser; import com.google.protobuf.MessageLite; - import java.io.IOException; import java.io.InputStream; import java.io.Reader; @@ -25,20 +24,14 @@ import java.nio.charset.Charset; /** - * {@link Beta}
            + * {@link Beta}
            * Parses protocol buffer HTTP response content into a protocol buffer message. * - *

            - * Implementation is immutable and therefore thread-safe. - *

            + *

            Implementation is immutable and therefore thread-safe. * - *

            - * Data-classes are expected to extend {@link MessageLite}. - *

            + *

            Data-classes are expected to extend {@link MessageLite}. * - *

            - * All Charset parameters are ignored for protocol buffers. - *

            + *

            All Charset parameters are ignored for protocol buffers. * * @author Matthias Linder (mlinder) * @since 1.10 diff --git a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java index aa2138ea3..b9b383d1d 100644 --- a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java +++ b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java @@ -17,21 +17,18 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Throwables; import com.google.protobuf.MessageLite; - import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Method; /** - * {@link Beta}
            + * {@link Beta}
            * Utilities for protocol buffers. * - *

            - * There is no official media type for protocol buffers registered with the IANA. - * {@link #CONTENT_TYPE} and {@link #ALT_CONTENT_TYPE} are some of the more popular choices being - * used today, but other media types are also in use. - *

            + *

            There is no official media type for protocol buffers registered with the IANA. {@link + * #CONTENT_TYPE} and {@link #ALT_CONTENT_TYPE} are some of the more popular choices being used + * today, but other media types are also in use. * * @since 1.5 * @author Yaniv Inbar @@ -51,7 +48,7 @@ public class ProtocolBuffers { * * @param destination message type * @param messageClass destination message class that has a {@code parseFrom(InputStream)} public - * static method + * static method * @return new instance of the parsed destination message class */ public static T parseAndClose( @@ -69,6 +66,5 @@ public static T parseAndClose( } } - private ProtocolBuffers() { - } + private ProtocolBuffers() {} } diff --git a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java index deec6ea8d..c6b19b0a2 100644 --- a/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java +++ b/google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java @@ -13,12 +13,12 @@ */ /** - * {@link com.google.api.client.util.Beta}
            - * Utilities for the Protocol Buffer format. + * {@link com.google.api.client.util.Beta}
            + * Utilities for the Protocol Buffer + * format. * * @since 1.5 * @author Yaniv Inbar */ @com.google.api.client.util.Beta package com.google.api.client.protobuf; - diff --git a/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java b/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java index c8c5c6ec9..94d7d1391 100644 --- a/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java +++ b/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java @@ -25,14 +25,16 @@ public class ProtocolBuffersTest extends TestCase { public void testParseAndClose() throws Exception { - SimpleProto.TestMessage mockResponse = SimpleProto.TestMessage.newBuilder() - .setStatus(SimpleProto.TestStatus.SUCCESS) - .setName("This is a test!") - .setValue(123454321) - .build(); + SimpleProto.TestMessage mockResponse = + SimpleProto.TestMessage.newBuilder() + .setStatus(SimpleProto.TestStatus.SUCCESS) + .setName("This is a test!") + .setValue(123454321) + .build(); // Create the parser and test it with our mock response - SimpleProto.TestMessage parsedResponse = ProtocolBuffers.parseAndClose( - new ByteArrayInputStream(mockResponse.toByteArray()), SimpleProto.TestMessage.class); + SimpleProto.TestMessage parsedResponse = + ProtocolBuffers.parseAndClose( + new ByteArrayInputStream(mockResponse.toByteArray()), SimpleProto.TestMessage.class); // Validate the parser properly parsed the response // (i.e. it matches the original mock response) assertEquals(mockResponse.getSerializedSize(), parsedResponse.getSerializedSize()); diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java index ee3386eaf..8bf518109 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java @@ -69,8 +69,12 @@ public AbstractJsonFactoryTest(String name) { protected abstract JsonFactory newFactory(); private static final String EMPTY = ""; - private static final String JSON_THREE_ELEMENTS = "{" + " \"one\": { \"num\": 1 }" - + ", \"two\": { \"num\": 2 }" + ", \"three\": { \"num\": 3 }" + "}"; + private static final String JSON_THREE_ELEMENTS = + "{" + + " \"one\": { \"num\": 1 }" + + ", \"two\": { \"num\": 2 }" + + ", \"three\": { \"num\": 3 }" + + "}"; public void testParse_empty() throws Exception { JsonParser parser = newFactory().createJsonParser(EMPTY); @@ -262,18 +266,15 @@ public void testCurrentToken() throws Exception { } public static class Entry { - @Key - public String title; + @Key public String title; } public static class Feed { - @Key - public Collection entries; + @Key public Collection entries; } public static class A { - @Key - public Map map; + @Key public Map map; } static final String CONTAINED_MAP = "{\"map\":{\"title\":\"foo\"}}"; @@ -286,114 +287,69 @@ public void testParse() throws Exception { } public static class NumberTypes { - @Key - byte byteValue; - @Key - Byte byteObjValue; - @Key - short shortValue; - @Key - Short shortObjValue; - @Key - int intValue; - @Key - Integer intObjValue; - @Key - float floatValue; - @Key - Float floatObjValue; - @Key - long longValue; - @Key - Long longObjValue; - @Key - double doubleValue; - @Key - Double doubleObjValue; - @Key - BigInteger bigIntegerValue; - @Key - BigDecimal bigDecimalValue; + @Key byte byteValue; + @Key Byte byteObjValue; + @Key short shortValue; + @Key Short shortObjValue; + @Key int intValue; + @Key Integer intObjValue; + @Key float floatValue; + @Key Float floatObjValue; + @Key long longValue; + @Key Long longObjValue; + @Key double doubleValue; + @Key Double doubleObjValue; + @Key BigInteger bigIntegerValue; + @Key BigDecimal bigDecimalValue; + @Key("yetAnotherBigDecimalValue") BigDecimal anotherBigDecimalValue; - @Key - List longListValue; + @Key List longListValue; - @Key - Map longMapValue; + @Key Map longMapValue; } public static class NumberTypesAsString { - @Key - @JsonString - byte byteValue; - @Key - @JsonString - Byte byteObjValue; - @Key - @JsonString - short shortValue; - @Key - @JsonString - Short shortObjValue; - @Key - @JsonString - int intValue; - @Key - @JsonString - Integer intObjValue; - @Key - @JsonString - float floatValue; - @Key - @JsonString - Float floatObjValue; - @Key - @JsonString - long longValue; - @Key - @JsonString - Long longObjValue; - @Key - @JsonString - double doubleValue; - @Key - @JsonString - Double doubleObjValue; - @Key - @JsonString - BigInteger bigIntegerValue; - @Key - @JsonString - BigDecimal bigDecimalValue; + @Key @JsonString byte byteValue; + @Key @JsonString Byte byteObjValue; + @Key @JsonString short shortValue; + @Key @JsonString Short shortObjValue; + @Key @JsonString int intValue; + @Key @JsonString Integer intObjValue; + @Key @JsonString float floatValue; + @Key @JsonString Float floatObjValue; + @Key @JsonString long longValue; + @Key @JsonString Long longObjValue; + @Key @JsonString double doubleValue; + @Key @JsonString Double doubleObjValue; + @Key @JsonString BigInteger bigIntegerValue; + @Key @JsonString BigDecimal bigDecimalValue; + @Key("yetAnotherBigDecimalValue") @JsonString BigDecimal anotherBigDecimalValue; - @Key - @JsonString - List longListValue; + @Key @JsonString List longListValue; - @Key - @JsonString - Map longMapValue; + @Key @JsonString Map longMapValue; } static final String NUMBER_TYPES = "{\"bigDecimalValue\":1.0,\"bigIntegerValue\":1,\"byteObjValue\":1,\"byteValue\":1," - + "\"doubleObjValue\":1.0,\"doubleValue\":1.0,\"floatObjValue\":1.0,\"floatValue\":1.0," - + "\"intObjValue\":1,\"intValue\":1,\"longListValue\":[1],\"longMapValue\":{\"a\":1}," - + "\"longObjValue\":1,\"longValue\":1,\"shortObjValue\":1,\"shortValue\":1," - + "\"yetAnotherBigDecimalValue\":1}"; + + "\"doubleObjValue\":1.0,\"doubleValue\":1.0,\"floatObjValue\":1.0,\"floatValue\":1.0," + + "\"intObjValue\":1,\"intValue\":1,\"longListValue\":[1],\"longMapValue\":{\"a\":1}," + + "\"longObjValue\":1,\"longValue\":1,\"shortObjValue\":1,\"shortValue\":1," + + "\"yetAnotherBigDecimalValue\":1}"; static final String NUMBER_TYPES_AS_STRING = "{\"bigDecimalValue\":\"1.0\",\"bigIntegerValue\":\"1\",\"byteObjValue\":\"1\"," - + "\"byteValue\":\"1\",\"doubleObjValue\":\"1.0\",\"doubleValue\":\"1.0\"," - + "\"floatObjValue\":\"1.0\",\"floatValue\":\"1.0\",\"intObjValue\":\"1\"," - + "\"intValue\":\"1\",\"longListValue\":[\"1\"],\"longMapValue\":{\"a\":\"1\"}," - + "\"longObjValue\":\"1\",\"longValue\":\"1\"," + "\"shortObjValue\":\"1\"," - + "\"shortValue\":\"1\",\"yetAnotherBigDecimalValue\":\"1\"}"; + + "\"byteValue\":\"1\",\"doubleObjValue\":\"1.0\",\"doubleValue\":\"1.0\"," + + "\"floatObjValue\":\"1.0\",\"floatValue\":\"1.0\",\"intObjValue\":\"1\"," + + "\"intValue\":\"1\",\"longListValue\":[\"1\"],\"longMapValue\":{\"a\":\"1\"}," + + "\"longObjValue\":\"1\",\"longValue\":\"1\"," + + "\"shortObjValue\":\"1\"," + + "\"shortValue\":\"1\",\"yetAnotherBigDecimalValue\":\"1\"}"; public void testParser_numberTypes() throws Exception { JsonFactory factory = newFactory(); @@ -445,22 +401,17 @@ public void testToFromString_UTF8() throws Exception { } public static class AnyType { - @Key - public Object arr; - @Key - public Object bool; - @Key - public Object num; - @Key - public Object obj; - @Key - public Object str; - @Key - public Object nul; + @Key public Object arr; + @Key public Object bool; + @Key public Object num; + @Key public Object obj; + @Key public Object str; + @Key public Object nul; } - static final String ANY_TYPE = "{\"arr\":[1],\"bool\":true,\"nul\":null,\"num\":5," - + "\"obj\":{\"key\":\"value\"},\"str\":\"value\"}"; + static final String ANY_TYPE = + "{\"arr\":[1],\"bool\":true,\"nul\":null,\"num\":5," + + "\"obj\":{\"key\":\"value\"},\"str\":\"value\"}"; public void testParser_anyType() throws Exception { JsonFactory factory = newFactory(); @@ -472,14 +423,11 @@ public void testParser_anyType() throws Exception { } public static class ArrayType { - @Key - int[] arr; + @Key int[] arr; - @Key - int[][] arr2; + @Key int[][] arr2; - @Key - public Integer[] integerArr; + @Key public Integer[] integerArr; } static final String ARRAY_TYPE = "{\"arr\":[4,5],\"arr2\":[[1,2],[3]],\"integerArr\":[6,7]}"; @@ -510,8 +458,7 @@ public void testParser_arrayType() throws Exception { } public static class CollectionOfCollectionType { - @Key - public LinkedList> arr; + @Key public LinkedList> arr; } static final String COLLECTION_TYPE = "{\"arr\":[[\"a\",\"b\"],[\"c\"]]}"; @@ -530,8 +477,7 @@ public void testParser_collectionType() throws Exception { } public static class MapOfMapType { - @Key - public Map>[] value; + @Key public Map>[] value; } static final String MAP_TYPE = @@ -577,23 +523,17 @@ public void testParser_hashmapForMapType() throws Exception { } public static class WildCardTypes { - @Key - public Collection[] lower; - @Key - public Map map; - @Key - public Collection> mapInWild; - @Key - public Map mapUpper; - @Key - public Collection[] simple; - @Key - public Collection[] upper; + @Key public Collection[] lower; + @Key public Map map; + @Key public Collection> mapInWild; + @Key public Map mapUpper; + @Key public Collection[] simple; + @Key public Collection[] upper; } static final String WILDCARD_TYPE = "{\"lower\":[[1,2,3]],\"map\":{\"v\":1},\"mapInWild\":[{\"v\":1}]," - + "\"mapUpper\":{\"v\":1},\"simple\":[[1,2,3]],\"upper\":[[1,2,3]]}"; + + "\"mapUpper\":{\"v\":1},\"simple\":[[1,2,3]],\"upper\":[[1,2,3]]}"; @SuppressWarnings("unchecked") public void testParser_wildCardType() throws Exception { @@ -633,30 +573,22 @@ public void testParser_wildCardType() throws Exception { public static class TypeVariableType { - @Key - public T[][] arr; + @Key public T[][] arr; - @Key - public LinkedList> list; + @Key public LinkedList> list; - @Key - public T nullValue; + @Key public T nullValue; - @Key - public T value; + @Key public T value; } - public static class IntegerTypeVariableType extends TypeVariableType { - } + public static class IntegerTypeVariableType extends TypeVariableType {} - public static class IntArrayTypeVariableType extends TypeVariableType { - } + public static class IntArrayTypeVariableType extends TypeVariableType {} - public static class DoubleListTypeVariableType extends TypeVariableType> { - } + public static class DoubleListTypeVariableType extends TypeVariableType> {} - public static class FloatMapTypeVariableType extends TypeVariableType> { - } + public static class FloatMapTypeVariableType extends TypeVariableType> {} static final String INTEGER_TYPE_VARIABLE_TYPE = "{\"arr\":[null,[null,1]],\"list\":[null,[null,1]],\"nullValue\":null,\"value\":1}"; @@ -666,11 +598,11 @@ public static class FloatMapTypeVariableType extends TypeVariableType { - @Key - Y y; + @Key Y y; } public static class Y { - @Key - Z z; + @Key Z z; } public static class Z { - @Key - ZT f; + @Key ZT f; } - public static class TypeVariablesPassedAround extends X> { - } + public static class TypeVariablesPassedAround extends X> {} static final String TYPE_VARS = "{\"y\":{\"z\":{\"f\":[\"abc\"]}}}"; @@ -1147,16 +1069,23 @@ public void testParser_nullReader() throws Exception { public void testObjectParserParse_entry() throws Exception { @SuppressWarnings("serial") - Entry entry = (Entry) newFactory().createJsonObjectParser() - .parseAndClose(new StringReader(JSON_ENTRY), new TypeToken() {}.getType()); + Entry entry = + (Entry) + newFactory() + .createJsonObjectParser() + .parseAndClose(new StringReader(JSON_ENTRY), new TypeToken() {}.getType()); assertEquals("foo", entry.title); } public void testObjectParserParse_stringList() throws Exception { JsonFactory factory = newFactory(); @SuppressWarnings({"unchecked", "serial"}) - List result = (List) factory.createJsonObjectParser() - .parseAndClose(new StringReader(STRING_ARRAY), new TypeToken>() {}.getType()); + List result = + (List) + factory + .createJsonObjectParser() + .parseAndClose( + new StringReader(STRING_ARRAY), new TypeToken>() {}.getType()); result.get(0); assertEquals(STRING_ARRAY, factory.toString(result)); // check types and values @@ -1232,8 +1161,7 @@ public final void testParse_array() throws Exception { } public static class TestClass { - public TestClass() { - } + public TestClass() {} @Key("foo") public int foo; @@ -1284,9 +1212,7 @@ public final void testGenerate_infinityOrNanError() throws Exception { } public static class ExtendsGenericJson extends GenericJson { - @Key - @JsonString - Long numAsString; + @Key @JsonString Long numAsString; @Override public ExtendsGenericJson set(String fieldName, Object value) { @@ -1307,8 +1233,7 @@ public void testParser_extendsGenericJson() throws Exception { } public static class Simple { - @Key - String a; + @Key String a; } static final String SIMPLE = "{\"a\":\"b\"}"; @@ -1324,8 +1249,11 @@ public void testJsonObjectParser_reader() throws Exception { public void testJsonObjectParser_inputStream() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = new JsonObjectParser(factory); - Simple simple = parser.parseAndClose( - new ByteArrayInputStream(StringUtils.getBytesUtf8(SIMPLE)), Charsets.UTF_8, Simple.class); + Simple simple = + parser.parseAndClose( + new ByteArrayInputStream(StringUtils.getBytesUtf8(SIMPLE)), + Charsets.UTF_8, + Simple.class); assertEquals("b", simple.a); } @@ -1341,9 +1269,11 @@ public void testJsonObjectParser_inputStreamWrapped() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = new JsonObjectParser.Builder(factory).setWrapperKeys(Collections.singleton("d")).build(); - Simple simple = parser.parseAndClose( - new ByteArrayInputStream(StringUtils.getBytesUtf8(SIMPLE_WRAPPED)), Charsets.UTF_8, - Simple.class); + Simple simple = + parser.parseAndClose( + new ByteArrayInputStream(StringUtils.getBytesUtf8(SIMPLE_WRAPPED)), + Charsets.UTF_8, + Simple.class); assertEquals("b", simple.a); } @@ -1368,10 +1298,8 @@ public void testJsonHttpContent_wrapped() throws Exception { } public static class V { - @Key - Void v; - @Key - String s; + @Key Void v; + @Key String s; } public void testParse_void() throws Exception { @@ -1396,10 +1324,8 @@ public void subtestParse_void(String value) throws Exception { } public static class BooleanTypes { - @Key - Boolean boolObj; - @Key - boolean bool; + @Key Boolean boolObj; + @Key boolean bool; } public static final String BOOLEAN_TYPE_EMPTY = "{}"; @@ -1442,21 +1368,25 @@ public void testParse_boolean() throws Exception { } public abstract static class Animal { - @Key - public String name; + @Key public String name; + @Key("legCount") public int numberOfLegs; + @Key - @JsonPolymorphicTypeMap(typeDefinitions = {@TypeDef(key = "dog", ref = Dog.class), - @TypeDef(key = "bug", ref = Centipede.class), @TypeDef(key = "human", ref = Human.class), - @TypeDef(key = "dogwithfamily", ref = DogWithFamily.class), - @TypeDef(key = "human with pets", ref = HumanWithPets.class)}) + @JsonPolymorphicTypeMap( + typeDefinitions = { + @TypeDef(key = "dog", ref = Dog.class), + @TypeDef(key = "bug", ref = Centipede.class), + @TypeDef(key = "human", ref = Human.class), + @TypeDef(key = "dogwithfamily", ref = DogWithFamily.class), + @TypeDef(key = "human with pets", ref = HumanWithPets.class) + }) public String type; } public static class Dog extends Animal { - @Key - public int tricksKnown; + @Key public int tricksKnown; } public static class Centipede extends Animal { @@ -1479,10 +1409,10 @@ public static class Centipede extends Animal { // Test heterogeneous scheme with additional, unused information: public static final String DOG_EXTRA_INFO = "{\"name\":\"Fido\",\"legCount\":4,\"unusedInfo\":\"this is not being used!\"," - + "\"tricksKnown\":3,\"type\":\"dog\",\"unused\":{\"foo\":200}}"; + + "\"tricksKnown\":3,\"type\":\"dog\",\"unused\":{\"foo\":200}}"; public static final String CENTIPEDE_EXTRA_INFO = "{\"unused\":0, \"bodyColor\":\"green\",\"name\":\"Mr. Icky\",\"legCount\":68,\"type\":" - + "\"bug\"}"; + + "\"bug\"}"; public void testParser_heterogeneousSchemata() throws Exception { testParser_heterogeneousSchemata_Helper(DOG, CENTIPEDE); @@ -1534,8 +1464,7 @@ public void testParser_heterogeneousSchema_missingType() throws Exception { } public static class Human extends Animal { - @Key - public Dog bestFriend; + @Key public Dog bestFriend; } // Test a subclass with an additional object in it. @@ -1560,23 +1489,23 @@ public void testParser_heterogeneousSchema_withObject() throws Exception { } public static class AnimalGenericJson extends GenericJson { - @Key - public String name; + @Key public String name; + @Key("legCount") public int numberOfLegs; + @Key @JsonPolymorphicTypeMap(typeDefinitions = {@TypeDef(key = "dog", ref = DogGenericJson.class)}) public String type; } public static class DogGenericJson extends AnimalGenericJson { - @Key - public int tricksKnown; + @Key public int tricksKnown; } public static final String DOG_EXTRA_INFO_ORDERED = "{\"legCount\":4,\"name\":\"Fido\",\"tricksKnown\":3,\"type\":\"dog\"," - + "\"unusedInfo\":\"this is not being used!\",\"unused\":{\"foo\":200}}"; + + "\"unusedInfo\":\"this is not being used!\",\"unused\":{\"foo\":200}}"; @SuppressWarnings("unchecked") public void testParser_heterogeneousSchema_genericJson() throws Exception { @@ -1594,15 +1523,17 @@ public void testParser_heterogeneousSchema_genericJson() throws Exception { assertEquals(200, foo.intValue()); } - public static final String DOG_WITH_FAMILY = "{\"children\":[" + DOG + "," + CENTIPEDE - + "],\"legCount\":4,\"name\":\"Bob\",\"nicknames\":[\"Fluffy\",\"Hey, you\"]," - + "\"tricksKnown\":10,\"type\":\"dogwithfamily\"}"; + public static final String DOG_WITH_FAMILY = + "{\"children\":[" + + DOG + + "," + + CENTIPEDE + + "],\"legCount\":4,\"name\":\"Bob\",\"nicknames\":[\"Fluffy\",\"Hey, you\"]," + + "\"tricksKnown\":10,\"type\":\"dogwithfamily\"}"; public static class DogWithFamily extends Dog { - @Key - public String[] nicknames; - @Key - public Animal[] children; + @Key public String[] nicknames; + @Key public Animal[] children; } public void testParser_heterogeneousSchema_withArrays() throws Exception { @@ -1643,13 +1574,14 @@ public void testParser_heterogeneousSchema_withNullArrays() throws Exception { } public static class PolymorphicWithMultipleAnnotations { - @Key - String a; + @Key String a; + @Key @JsonPolymorphicTypeMap(typeDefinitions = {@TypeDef(key = "dog", ref = Dog.class)}) String b; - @Key - String c; + + @Key String c; + @Key @JsonPolymorphicTypeMap(typeDefinitions = {@TypeDef(key = "bug", ref = Centipede.class)}) String d; @@ -1666,22 +1598,24 @@ public void testParser_polymorphicClass_tooManyAnnotations() throws Exception { } catch (IllegalArgumentException e) { return; // expected } - fail("Expected IllegalArgumentException on class with multiple @JsonPolymorphicTypeMap" - + " annotations."); + fail( + "Expected IllegalArgumentException on class with multiple @JsonPolymorphicTypeMap" + + " annotations."); } public static class PolymorphicWithNumericType { @Key - @JsonPolymorphicTypeMap(typeDefinitions = { - @TypeDef(key = "1", ref = NumericTypedSubclass1.class), - @TypeDef(key = "2", ref = NumericTypedSubclass2.class)}) + @JsonPolymorphicTypeMap( + typeDefinitions = { + @TypeDef(key = "1", ref = NumericTypedSubclass1.class), + @TypeDef(key = "2", ref = NumericTypedSubclass2.class) + }) Integer type; } - public static class NumericTypedSubclass1 extends PolymorphicWithNumericType { - } - public static class NumericTypedSubclass2 extends PolymorphicWithNumericType { - } + public static class NumericTypedSubclass1 extends PolymorphicWithNumericType {} + + public static class NumericTypedSubclass2 extends PolymorphicWithNumericType {} public static final String POLYMORPHIC_NUMERIC_TYPE_1 = "{\"foo\":\"bar\",\"type\":1}"; public static final String POLYMORPHIC_NUMERIC_TYPE_2 = "{\"foo\":\"bar\",\"type\":2}"; @@ -1700,16 +1634,17 @@ public void testParser_heterogeneousSchema_numericType() throws Exception { public static class PolymorphicWithNumericValueType { @Key - @JsonPolymorphicTypeMap(typeDefinitions = { - @TypeDef(key = "1", ref = NumericValueTypedSubclass1.class), - @TypeDef(key = "2", ref = NumericValueTypedSubclass2.class)}) + @JsonPolymorphicTypeMap( + typeDefinitions = { + @TypeDef(key = "1", ref = NumericValueTypedSubclass1.class), + @TypeDef(key = "2", ref = NumericValueTypedSubclass2.class) + }) int type; } - public static class NumericValueTypedSubclass1 extends PolymorphicWithNumericValueType { - } - public static class NumericValueTypedSubclass2 extends PolymorphicWithNumericValueType { - } + public static class NumericValueTypedSubclass1 extends PolymorphicWithNumericValueType {} + + public static class NumericValueTypedSubclass2 extends PolymorphicWithNumericValueType {} public static final String POLYMORPHIC_NUMERIC_UNSPECIFIED_TYPE = "{\"foo\":\"bar\"}"; @@ -1736,8 +1671,11 @@ public void testParser_heterogeneousSchema_numericValueType() throws Exception { public static class PolymorphicWithIllegalValueType { @Key - @JsonPolymorphicTypeMap(typeDefinitions = { - @TypeDef(key = "foo", ref = Object.class), @TypeDef(key = "bar", ref = Object.class)}) + @JsonPolymorphicTypeMap( + typeDefinitions = { + @TypeDef(key = "foo", ref = Object.class), + @TypeDef(key = "bar", ref = Object.class) + }) Object type; } @@ -1752,11 +1690,13 @@ public void testParser_heterogeneousSchema_illegalValueType() throws Exception { fail("Expected IllegalArgumentException on class with illegal @JsonPolymorphicTypeMap type"); } - public static class PolymorphicWithDuplicateTypeKeys { @Key - @JsonPolymorphicTypeMap(typeDefinitions = { - @TypeDef(key = "foo", ref = Object.class), @TypeDef(key = "foo", ref = Object.class)}) + @JsonPolymorphicTypeMap( + typeDefinitions = { + @TypeDef(key = "foo", ref = Object.class), + @TypeDef(key = "foo", ref = Object.class) + }) String type; } @@ -1790,8 +1730,8 @@ public static class PolymorphicSelfReferencing { @JsonPolymorphicTypeMap( typeDefinitions = {@TypeDef(key = "self", ref = PolymorphicSelfReferencing.class)}) String type; - @Key - String info; + + @Key String info; } public static final String POLYMORPHIC_SELF_REFERENCING = "{\"info\":\"blah\",\"type\":\"self\"}"; @@ -1807,18 +1747,23 @@ public void testParser_polymorphicClass_selfReferencing() throws Exception { } public static class HumanWithPets extends Human { - @Key - Map pets; + @Key Map pets; } - public static final String HUMAN_WITH_PETS = "{\"bestFriend\":" + DOG - + ",\"legCount\":2,\"name\":\"Joe\",\"pets\":{\"first\":" + CENTIPEDE - + ",\"second\":{\"type\":\"dog\"}},\"type\":\"human with pets\",\"unused\":\"foo\"}"; + public static final String HUMAN_WITH_PETS = + "{\"bestFriend\":" + + DOG + + ",\"legCount\":2,\"name\":\"Joe\",\"pets\":{\"first\":" + + CENTIPEDE + + ",\"second\":{\"type\":\"dog\"}},\"type\":\"human with pets\",\"unused\":\"foo\"}"; - public static final String HUMAN_WITH_PETS_PARSED = "{\"bestFriend\":" + DOG - + ",\"legCount\":2,\"name\":\"Joe\",\"pets\":{\"first\":" + CENTIPEDE - + ",\"second\":{\"legCount\":0,\"tricksKnown\":0,\"type\":\"dog\"}}," - + "\"type\":\"human with pets\"}"; + public static final String HUMAN_WITH_PETS_PARSED = + "{\"bestFriend\":" + + DOG + + ",\"legCount\":2,\"name\":\"Joe\",\"pets\":{\"first\":" + + CENTIPEDE + + ",\"second\":{\"legCount\":0,\"tricksKnown\":0,\"type\":\"dog\"}}," + + "\"type\":\"human with pets\"}"; public void testParser_polymorphicClass_mapOfPolymorphicClasses() throws Exception { JsonFactory factory = newFactory(); @@ -1839,6 +1784,4 @@ public void testParser_polymorphicClass_mapOfPolymorphicClasses() throws Excepti assertEquals(0, ((Dog) humanWithPets.pets.get("second")).tricksKnown); assertEquals(2, humanWithPets.pets.size()); } - - } diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java index 53de2931e..e633d85cf 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java @@ -17,6 +17,4 @@ * * @author Ravi Mistry */ - package com.google.api.client.test.json; - diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java index 1986c6204..e1e8e4061 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java @@ -56,8 +56,7 @@ public void tearDown() throws Exception { } private static void assertContentsAnyOrder(Collection c, Object... elts) { - assertEquals(Sets.newHashSet(c), - Sets.newHashSet(Arrays.asList(elts))); + assertEquals(Sets.newHashSet(c), Sets.newHashSet(Arrays.asList(elts))); } public void testId() throws Exception { diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java index ef5f485ec..fb4d33427 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java @@ -18,4 +18,3 @@ * @author Yaniv Inbar */ package com.google.api.client.test.util.store; - diff --git a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java index 63685d33e..46918d765 100644 --- a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java +++ b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java @@ -14,12 +14,10 @@ package com.google.api.client.test.util.store; -import com.google.api.client.test.util.store.AbstractDataStoreFactoryTest; import com.google.api.client.util.store.DataStore; import com.google.api.client.util.store.FileDataStoreFactory; import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; - import java.io.File; import java.io.IOException; @@ -41,7 +39,8 @@ public void testSave() throws IOException { FileDataStoreFactory factory = newDataStoreFactory(); DataStore store = factory.getDataStore("foo"); store.set("k", "v"); - assertEquals(ImmutableSet.of("k"), + assertEquals( + ImmutableSet.of("k"), new FileDataStoreFactory(factory.getDataDirectory()).getDataStore("foo").keySet()); store.clear(); assertTrue(new FileDataStoreFactory(factory.getDataDirectory()).getDataStore("foo").isEmpty()); diff --git a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java index bdee074d5..a18384a10 100644 --- a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java +++ b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java @@ -14,7 +14,6 @@ package com.google.api.client.test.util.store; -import com.google.api.client.test.util.store.AbstractDataStoreFactoryTest; import com.google.api.client.util.store.DataStoreFactory; import com.google.api.client.util.store.MemoryDataStoreFactory; diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java index 643fa8369..792138bfe 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java @@ -25,12 +25,10 @@ import org.xmlpull.v1.XmlSerializer; /** - * {@link Beta}
            + * {@link Beta}
            * Abstract serializer for XML HTTP content based on the data key/value mapping object for an item. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java index 5184aed3e..db3802d84 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java @@ -22,23 +22,19 @@ import org.xmlpull.v1.XmlSerializer; /** - * {@link Beta}
            + * {@link Beta}
            * Serializes XML HTTP content based on the data key/value mapping object for an item. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
            -      String elementName, Object data) {
            -    request.setContent(new XmlHttpContent(namespaceDictionary, elementName, data));
            -  }
            + * static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
            + * String elementName, Object data) {
            + * request.setContent(new XmlHttpContent(namespaceDictionary, elementName, data));
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -51,7 +47,7 @@ public class XmlHttpContent extends AbstractXmlHttpContent { * * @param namespaceDictionary XML namespace dictionary * @param elementName XML element local name, optionally prefixed by its namespace alias, for - * example {@code "atom:entry"} + * example {@code "atom:entry"} * @param data Key/value pair data * @since 1.5 */ @@ -63,8 +59,8 @@ public XmlHttpContent( } /** - * XML element local name, optionally prefixed by its namespace alias, for example - * {@code "atom:entry"}. + * XML element local name, optionally prefixed by its namespace alias, for example {@code + * "atom:entry"}. */ private final String elementName; diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java index 7badc9e62..5f1f5d254 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java @@ -24,32 +24,26 @@ import org.xmlpull.v1.XmlSerializer; /** - * {@link Beta}
            + * {@link Beta}
            * Serializes Atom XML HTTP content based on the data key/value mapping object for an Atom entry. * - *

            - * Default value for {@link #getType()} is {@link Atom#MEDIA_TYPE}. - *

            + *

            Default value for {@link #getType()} is {@link Atom#MEDIA_TYPE}. * - *

            - * Sample usages: - *

            + *

            Sample usages: * *

            -  static void setAtomEntryContent(
            -      HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object entry) {
            -    request.setContent(AtomContent.forEntry(namespaceDictionary, entry));
            -  }
            -
            -  static void setAtomBatchContent(
            -      HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object batchFeed) {
            -    request.setContent(AtomContent.forFeed(namespaceDictionary, batchFeed));
            -  }
            + * static void setAtomEntryContent(
            + * HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object entry) {
            + * request.setContent(AtomContent.forEntry(namespaceDictionary, entry));
            + * }
            + *
            + * static void setAtomBatchContent(
            + * HttpRequest request, XmlNamespaceDictionary namespaceDictionary, Object batchFeed) {
            + * request.setContent(AtomContent.forFeed(namespaceDictionary, batchFeed));
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.4 * @author Yaniv Inbar diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java index 71a032429..e3542bdae 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java @@ -28,12 +28,10 @@ import org.xmlpull.v1.XmlPullParserException; /** - * {@link Beta}
            + * {@link Beta}
            * Atom feed pull parser when the Atom entry class is known in advance. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @param feed type * @param entry type @@ -53,8 +51,12 @@ public final class AtomFeedParser extends AbstractAtomFeedParser { * @param feedClass feed class to parse * @since 1.5 */ - public AtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, - InputStream inputStream, Class feedClass, Class entryClass) { + public AtomFeedParser( + XmlNamespaceDictionary namespaceDictionary, + XmlPullParser parser, + InputStream inputStream, + Class feedClass, + Class entryClass) { super(namespaceDictionary, parser, inputStream, feedClass); this.entryClass = Preconditions.checkNotNull(entryClass); } @@ -94,8 +96,11 @@ public final Class getEntryClass() { * @throws IOException I/O exception * @throws XmlPullParserException XML pull parser exception */ - public static AtomFeedParser create(HttpResponse response, - XmlNamespaceDictionary namespaceDictionary, Class feedClass, Class entryClass) + public static AtomFeedParser create( + HttpResponse response, + XmlNamespaceDictionary namespaceDictionary, + Class feedClass, + Class entryClass) throws IOException, XmlPullParserException { InputStream content = response.getContent(); try { diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java index a94a6c93d..810f86c60 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Atom XML HTTP library based on the pluggable HTTP library. * * @since 1.4 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.http.xml.atom; - diff --git a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java index 975cf8828..abe066191 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * XML HTTP library based on the pluggable HTTP library. * * @since 1.3 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.http.xml; - diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java index 1f4ca3615..a2ffd684b 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java @@ -17,25 +17,20 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.GenericData; import com.google.api.client.util.Key; - import java.util.concurrent.ConcurrentMap; /** - * {@link Beta}
            + * {@link Beta}
            * Generic XML data that stores all unknown key name/value pairs. * - *

            - * Each data key name maps into the name of the XPath expression value for the XML element, + *

            Each data key name maps into the name of the XPath expression value for the XML element, * attribute, or text content (using {@code "text()"}). Subclasses can declare fields for known XML * content using the {@link Key} annotation. Each field can be of any visibility (private, package * private, protected, or public) and must not be static. {@code null} unknown data key names are * not allowed, but {@code null} data values are allowed. - *

            * - *

            - * Implementation is not thread-safe. For a thread-safe choice instead use an implementation of + *

            Implementation is not thread-safe. For a thread-safe choice instead use an implementation of * {@link ConcurrentMap}. - *

            * * @since 1.0 * @author Yaniv Inbar diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java index 935eee30b..3955c5e18 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java @@ -37,7 +37,7 @@ import org.xmlpull.v1.XmlSerializer; /** - * {@link Beta}
            + * {@link Beta}
            * XML utilities. * * @since 1.0 @@ -48,9 +48,7 @@ public class Xml { /** * {@code "application/xml; charset=utf-8"} media type used as a default for XML parsing. * - *

            - * Use {@link HttpMediaType#equalsIgnoreParameters} for comparing media types. - *

            + *

            Use {@link HttpMediaType#equalsIgnoreParameters} for comparing media types. * * @since 1.10 */ @@ -66,12 +64,12 @@ public class Xml { private static synchronized XmlPullParserFactory getParserFactory() throws XmlPullParserException { if (factory == null) { - factory = XmlPullParserFactory.newInstance( - System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); + factory = + XmlPullParserFactory.newInstance( + System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); factory.setNamespaceAware(true); } return factory; - } /** @@ -95,12 +93,11 @@ public static XmlPullParser createParser() throws XmlPullParserException { /** * Shows a debug string representation of an element data object of key/value pairs. * - *

            - * It will make up something for the element name and XML namespaces. If those are known, it is + *

            It will make up something for the element name and XML namespaces. If those are known, it is * better to use {@link XmlNamespaceDictionary#toStringOf(String, Object)}. * * @param element element data object of key/value pairs ({@link GenericXml}, {@link Map}, or any - * object with public fields) + * object with public fields) */ public static String toStringOf(Object element) { return new XmlNamespaceDictionary().toStringOf(null, element); @@ -112,15 +109,16 @@ public static String toStringOf(Object element) { * @param stringValue string value * @param field field to set or {@code null} if not applicable * @param valueType value type (class, parameterized type, or generic array type) or {@code null} - * for none + * for none * @param context context list, going from least specific to most specific type context, for - * example container class and its field + * example container class and its field * @param destination destination object or {@code null} for none * @param genericXml generic XML or {@code null} if not applicable * @param destinationMap destination map or {@code null} if not applicable * @param name key name */ - private static void parseAttributeOrTextContent(String stringValue, + private static void parseAttributeOrTextContent( + String stringValue, Field field, Type valueType, List context, @@ -145,7 +143,8 @@ private static void parseAttributeOrTextContent(String stringValue, * @param destinationMap destination map or {@code null} if not applicable * @param name key name */ - private static void setValue(Object value, + private static void setValue( + Object value, Field field, Object destination, GenericXml genericXml, @@ -164,10 +163,8 @@ private static void setValue(Object value, * Customizes the behavior of XML parsing. Subclasses may override any methods they need to * customize behavior. * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            */ public static class CustomizeParser { /** @@ -184,8 +181,8 @@ public boolean stopBeforeStartTag(String namespace, String localName) { /** * Returns whether to stop parsing when reaching the end tag of an XML element after it has been - * processed. Only called if the element is actually being processed. By default, returns - * {@code false}, but subclasses may override. + * processed. Only called if the element is actually being processed. By default, returns {@code + * false}, but subclasses may override. * * @param namespace XML element's namespace URI * @param localName XML element's local name @@ -198,21 +195,22 @@ public boolean stopAfterEndTag(String namespace, String localName) { /** * Parses an XML element using the given XML pull parser into the given destination object. * - *

            - * Requires the the current event be {@link XmlPullParser#START_TAG} (skipping any initial + *

            Requires the the current event be {@link XmlPullParser#START_TAG} (skipping any initial * {@link XmlPullParser#START_DOCUMENT}) of the element being parsed. At normal parsing * completion, the current event will either be {@link XmlPullParser#END_TAG} of the element being * parsed, or the {@link XmlPullParser#START_TAG} of the requested {@code atom:entry}. - *

            * * @param parser XML pull parser * @param destination optional destination object to parser into or {@code null} to ignore XML - * content + * content * @param namespaceDictionary XML namespace dictionary to store unknown namespaces * @param customizeParser optional parser customizer or {@code null} for none */ - public static void parseElement(XmlPullParser parser, Object destination, - XmlNamespaceDictionary namespaceDictionary, CustomizeParser customizeParser) + public static void parseElement( + XmlPullParser parser, + Object destination, + XmlNamespaceDictionary namespaceDictionary, + CustomizeParser customizeParser) throws IOException, XmlPullParserException { ArrayList context = new ArrayList(); if (destination != null) { @@ -223,15 +221,17 @@ public static void parseElement(XmlPullParser parser, Object destination, /** * Returns whether the customize parser has requested to stop or reached end of document. - * Otherwise, identical to - * {@link #parseElement(XmlPullParser, Object, XmlNamespaceDictionary, CustomizeParser)} . + * Otherwise, identical to {@link #parseElement(XmlPullParser, Object, XmlNamespaceDictionary, + * CustomizeParser)} . */ - private static boolean parseElementInternal(XmlPullParser parser, + private static boolean parseElementInternal( + XmlPullParser parser, ArrayList context, Object destination, Type valueType, XmlNamespaceDictionary namespaceDictionary, - CustomizeParser customizeParser) throws IOException, XmlPullParserException { + CustomizeParser customizeParser) + throws IOException, XmlPullParserException { // TODO(yanivi): method is too long; needs to be broken down into smaller methods and comment // better GenericXml genericXml = destination instanceof GenericXml ? (GenericXml) destination : null; @@ -261,11 +261,14 @@ private static boolean parseElementInternal(XmlPullParser parser, // TODO(yanivi): can have repeating attribute values, e.g. "@a=value1 @a=value2"? String attributeName = parser.getAttributeName(i); String attributeNamespace = parser.getAttributeNamespace(i); - String attributeAlias = attributeNamespace.length() == 0 - ? "" : namespaceDictionary.getNamespaceAliasForUriErrorOnUnknown(attributeNamespace); + String attributeAlias = + attributeNamespace.length() == 0 + ? "" + : namespaceDictionary.getNamespaceAliasForUriErrorOnUnknown(attributeNamespace); String fieldName = getFieldName(true, attributeAlias, attributeNamespace, attributeName); Field field = classInfo == null ? null : classInfo.getField(fieldName); - parseAttributeOrTextContent(parser.getAttributeValue(i), + parseAttributeOrTextContent( + parser.getAttributeValue(i), field, valueType, context, @@ -279,21 +282,24 @@ private static boolean parseElementInternal(XmlPullParser parser, ArrayValueMap arrayValueMap = new ArrayValueMap(destination); boolean isStopped = false; // TODO(yanivi): support Void type as "ignore" element/attribute - main: while (true) { + main: + while (true) { int event = parser.next(); switch (event) { case XmlPullParser.END_DOCUMENT: isStopped = true; break main; case XmlPullParser.END_TAG: - isStopped = customizeParser != null - && customizeParser.stopAfterEndTag(parser.getNamespace(), parser.getName()); + isStopped = + customizeParser != null + && customizeParser.stopAfterEndTag(parser.getNamespace(), parser.getName()); break main; case XmlPullParser.TEXT: // parse text content if (destination != null) { field = classInfo == null ? null : classInfo.getField(TEXT_CONTENT); - parseAttributeOrTextContent(parser.getText(), + parseAttributeOrTextContent( + parser.getText(), field, valueType, context, @@ -350,7 +356,8 @@ private static boolean parseElementInternal(XmlPullParser parser, break; case XmlPullParser.TEXT: if (!ignore && level == 1) { - parseAttributeOrTextContent(parser.getText(), + parseAttributeOrTextContent( + parser.getText(), field, valueType, context, @@ -364,23 +371,27 @@ private static boolean parseElementInternal(XmlPullParser parser, break; } } - } else if (fieldType == null || fieldClass != null - && Types.isAssignableToOrFrom(fieldClass, Map.class)) { + } else if (fieldType == null + || fieldClass != null && Types.isAssignableToOrFrom(fieldClass, Map.class)) { // store the element as a map Map mapValue = Data.newMapInstance(fieldClass); int contextSize = context.size(); if (fieldType != null) { context.add(fieldType); } - Type subValueType = fieldType != null && Map.class.isAssignableFrom(fieldClass) - ? Types.getMapValueParameter(fieldType) : null; + Type subValueType = + fieldType != null && Map.class.isAssignableFrom(fieldClass) + ? Types.getMapValueParameter(fieldType) + : null; subValueType = Data.resolveWildcardTypeOrTypeVariable(context, subValueType); - isStopped = parseElementInternal(parser, - context, - mapValue, - subValueType, - namespaceDictionary, - customizeParser); + isStopped = + parseElementInternal( + parser, + context, + mapValue, + subValueType, + namespaceDictionary, + customizeParser); if (fieldType != null) { context.remove(contextSize); } @@ -424,8 +435,10 @@ private static boolean parseElementInternal(XmlPullParser parser, // TODO(yanivi): some duplicate code here; isolate into reusable methods FieldInfo fieldInfo = FieldInfo.of(field); Object elementValue = null; - Type subFieldType = isArray - ? Types.getArrayComponentType(fieldType) : Types.getIterableParameter(fieldType); + Type subFieldType = + isArray + ? Types.getArrayComponentType(fieldType) + : Types.getIterableParameter(fieldType); Class rawArrayComponentType = Types.getRawArrayComponentType(context, subFieldType); subFieldType = Data.resolveWildcardTypeOrTypeVariable(context, subFieldType); @@ -437,23 +450,27 @@ private static boolean parseElementInternal(XmlPullParser parser, boolean isSubEnum = subFieldClass != null && subFieldClass.isEnum(); if (Data.isPrimitive(subFieldType) || isSubEnum) { elementValue = parseTextContentForElement(parser, context, false, subFieldType); - } else if (subFieldType == null || subFieldClass != null - && Types.isAssignableToOrFrom(subFieldClass, Map.class)) { + } else if (subFieldType == null + || subFieldClass != null + && Types.isAssignableToOrFrom(subFieldClass, Map.class)) { elementValue = Data.newMapInstance(subFieldClass); int contextSize = context.size(); if (subFieldType != null) { context.add(subFieldType); } - Type subValueType = subFieldType != null - && Map.class.isAssignableFrom(subFieldClass) ? Types.getMapValueParameter( - subFieldType) : null; + Type subValueType = + subFieldType != null && Map.class.isAssignableFrom(subFieldClass) + ? Types.getMapValueParameter(subFieldType) + : null; subValueType = Data.resolveWildcardTypeOrTypeVariable(context, subValueType); - isStopped = parseElementInternal(parser, - context, - elementValue, - subValueType, - namespaceDictionary, - customizeParser); + isStopped = + parseElementInternal( + parser, + context, + elementValue, + subValueType, + namespaceDictionary, + customizeParser); if (subFieldType != null) { context.remove(contextSize); } @@ -461,12 +478,9 @@ private static boolean parseElementInternal(XmlPullParser parser, elementValue = Types.newInstance(rawArrayComponentType); int contextSize = context.size(); context.add(fieldType); - isStopped = parseElementInternal(parser, - context, - elementValue, - null, - namespaceDictionary, - customizeParser); + isStopped = + parseElementInternal( + parser, context, elementValue, null, namespaceDictionary, customizeParser); context.remove(contextSize); } if (isArray) { @@ -479,16 +493,15 @@ private static boolean parseElementInternal(XmlPullParser parser, } else { // collection: add new element to collection @SuppressWarnings("unchecked") - Collection collectionValue = (Collection) (field == null - ? destinationMap.get(fieldName) : fieldInfo.getValue(destination)); + Collection collectionValue = + (Collection) + (field == null + ? destinationMap.get(fieldName) + : fieldInfo.getValue(destination)); if (collectionValue == null) { collectionValue = Data.newCollectionInstance(fieldType); - setValue(collectionValue, - field, - destination, - genericXml, - destinationMap, - fieldName); + setValue( + collectionValue, field, destination, genericXml, destinationMap, fieldName); } collectionValue.add(elementValue); } @@ -497,12 +510,9 @@ private static boolean parseElementInternal(XmlPullParser parser, Object value = Types.newInstance(fieldClass); int contextSize = context.size(); context.add(fieldType); - isStopped = parseElementInternal(parser, - context, - value, - null, - namespaceDictionary, - customizeParser); + isStopped = + parseElementInternal( + parser, context, value, null, namespaceDictionary, customizeParser); context.remove(contextSize); setValue(value, field, destination, genericXml, destinationMap, fieldName); } @@ -592,8 +602,10 @@ private static void parseNamespacesForElement( XmlPullParser parser, XmlNamespaceDictionary namespaceDictionary) throws XmlPullParserException { int eventType = parser.getEventType(); - Preconditions.checkState(eventType == XmlPullParser.START_TAG, - "expected start of XML element, but got something else (event type %s)", eventType); + Preconditions.checkState( + eventType == XmlPullParser.START_TAG, + "expected start of XML element, but got something else (event type %s)", + eventType); int depth = parser.getDepth(); int nsStart = parser.getNamespaceCount(depth - 1); int nsEnd = parser.getNamespaceCount(depth); @@ -615,6 +627,5 @@ private static void parseNamespacesForElement( } } - private Xml() { - } + private Xml() {} } diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java index ae32fe5e4..c500e2f83 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java @@ -32,31 +32,26 @@ import org.xmlpull.v1.XmlSerializer; /** - * {@link Beta}
            + * {@link Beta}
            * Thread-safe XML namespace dictionary that provides a one-to-one map of namespace alias to URI. * - *

            - * Implementation is thread-safe. For maximum efficiency, applications should use a single + *

            Implementation is thread-safe. For maximum efficiency, applications should use a single * globally-shared instance of the XML namespace dictionary. - *

            * - *

            - * A namespace alias is uniquely mapped to a single namespace URI, and a namespace URI is uniquely - * mapped to a single namespace alias. In other words, it is not possible to have duplicates. - *

            + *

            A namespace alias is uniquely mapped to a single namespace URI, and a namespace URI is + * uniquely mapped to a single namespace alias. In other words, it is not possible to have + * duplicates. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            {@code
            -  static final XmlNamespaceDictionary DICTIONARY = new XmlNamespaceDictionary()
            -      .set("", "http://www.w3.org/2005/Atom")
            -      .set("activity", "http://activitystrea.ms/spec/1.0/")
            -      .set("georss", "http://www.georss.org/georss")
            -      .set("media", "http://search.yahoo.com/mrss/")
            -      .set("thr", "http://purl.org/syndication/thread/1.0");
            - *}
            + * static final XmlNamespaceDictionary DICTIONARY = new XmlNamespaceDictionary() + * .set("", "http://www.w3.org/2005/Atom") + * .set("activity", "http://activitystrea.ms/spec/1.0/") + * .set("georss", "http://www.georss.org/georss") + * .set("media", "http://search.yahoo.com/mrss/") + * .set("thr", "http://purl.org/syndication/thread/1.0"); + * } * * @since 1.0 * @author Yaniv Inbar @@ -119,12 +114,10 @@ public synchronized Map getUriToAliasMap() { /** * Adds a namespace of the given alias and URI. * - *

            - * If the uri is {@code null}, the namespace alias will be removed. Similarly, if the alias is + *

            If the uri is {@code null}, the namespace alias will be removed. Similarly, if the alias is * {@code null}, the namespace URI will be removed. Otherwise, if the alias is already mapped to a * different URI, it will be remapped to the new URI. Similarly, if a URI is already mapped to a * different alias, it will be remapped to the new alias. - *

            * * @param alias alias or {@code null} to remove the namespace URI * @param uri namespace URI or {@code null} to remove the namespace alias @@ -141,8 +134,9 @@ public synchronized XmlNamespaceDictionary set(String alias, String uri) { } else if (alias == null) { previousAlias = namespaceUriToAliasMap.remove(uri); } else { - previousUri = namespaceAliasToUriMap.put( - Preconditions.checkNotNull(alias), Preconditions.checkNotNull(uri)); + previousUri = + namespaceAliasToUriMap.put( + Preconditions.checkNotNull(alias), Preconditions.checkNotNull(uri)); if (!uri.equals(previousUri)) { previousAlias = namespaceUriToAliasMap.put(uri, alias); } else { @@ -162,9 +156,9 @@ public synchronized XmlNamespaceDictionary set(String alias, String uri) { * Shows a debug string representation of an element data object of key/value pairs. * * @param element element data object ({@link GenericXml}, {@link Map}, or any object with public - * fields) + * fields) * @param elementName optional XML element local name prefixed by its namespace alias -- for - * example {@code "atom:entry"} -- or {@code null} to make up something + * example {@code "atom:entry"} -- or {@code null} to make up something */ public String toStringOf(String elementName, Object element) { try { @@ -182,7 +176,7 @@ public String toStringOf(String elementName, Object element) { * Shows a debug string representation of an element data object of key/value pairs. * * @param element element data object ({@link GenericXml}, {@link Map}, or any object with public - * fields) + * fields) * @param elementNamespaceUri XML namespace URI or {@code null} for no namespace * @param elementLocalName XML local name * @throws IOException I/O exception @@ -197,7 +191,7 @@ public void serialize( * Shows a debug string representation of an element data object of key/value pairs. * * @param element element data object ({@link GenericXml}, {@link Map}, or any object with public - * fields) + * fields) * @param elementName XML element local name prefixed by its namespace alias * @throws IOException I/O exception */ @@ -206,11 +200,16 @@ public void serialize(XmlSerializer serializer, String elementName, Object eleme serialize(serializer, elementName, element, true); } - private void serialize(XmlSerializer serializer, String elementNamespaceUri, - String elementLocalName, Object element, boolean errorOnUnknown) throws IOException { + private void serialize( + XmlSerializer serializer, + String elementNamespaceUri, + String elementLocalName, + Object element, + boolean errorOnUnknown) + throws IOException { String elementAlias = elementNamespaceUri == null ? null : getAliasForUri(elementNamespaceUri); - startDoc(serializer, element, errorOnUnknown, elementAlias).serialize( - serializer, elementNamespaceUri, elementLocalName); + startDoc(serializer, element, errorOnUnknown, elementAlias) + .serialize(serializer, elementNamespaceUri, elementLocalName); serializer.endDocument(); } @@ -257,7 +256,7 @@ private void computeAliases(Object element, SortedSet aliases) { aliases.add(alias); } Class valueClass = value.getClass(); - if (!isAttribute && !Data.isPrimitive(valueClass) && !valueClass.isEnum() ) { + if (!isAttribute && !Data.isPrimitive(valueClass) && !valueClass.isEnum()) { if (value instanceof Iterable || valueClass.isArray()) { for (Object subValue : Types.iterableOf(value)) { computeAliases(subValue, aliases); @@ -275,18 +274,16 @@ private void computeAliases(Object element, SortedSet aliases) { * Returns the namespace URI to use for serialization for a given namespace alias, possibly using * a predictable made-up namespace URI if the alias is not recognized. * - *

            - * Specifically, if the namespace alias is not recognized, the namespace URI returned will be + *

            Specifically, if the namespace alias is not recognized, the namespace URI returned will be * {@code "http://unknown/"} plus the alias, unless {@code errorOnUnknown} is {@code true} in * which case it will throw an {@link IllegalArgumentException}. - *

            * * @param errorOnUnknown whether to thrown an exception if the namespace alias is not recognized * @param alias namespace alias * @return namespace URI, using a predictable made-up namespace URI if the namespace alias is not - * recognized + * recognized * @throws IllegalArgumentException if the namespace alias is not recognized and {@code - * errorOnUnkown} is {@code true} + * errorOnUnkown} is {@code true} */ String getNamespaceUriForAliasHandlingUnknown(boolean errorOnUnknown, String alias) { String result = getUriForAlias(alias); @@ -307,10 +304,12 @@ String getNamespaceUriForAliasHandlingUnknown(boolean errorOnUnknown, String ali */ String getNamespaceAliasForUriErrorOnUnknown(String namespaceUri) { String result = getAliasForUri(namespaceUri); - Preconditions.checkArgument(result != null, + Preconditions.checkArgument( + result != null, "invalid XML: no alias declared for namesapce <%s>; " + "work-around by setting XML namepace directly by calling the set method of %s", - namespaceUri, XmlNamespaceDictionary.class.getName()); + namespaceUri, + XmlNamespaceDictionary.class.getName()); return result; } @@ -328,8 +327,8 @@ class ElementSerializer { Class valueClass = elementValue.getClass(); if (Data.isPrimitive(valueClass) && !Data.isNull(elementValue)) { textValue = elementValue; - } else if (valueClass.isEnum() && !Data.isNull(elementValue)){ - textValue = elementValue; + } else if (valueClass.isEnum() && !Data.isNull(elementValue)) { + textValue = elementValue; } else { for (Map.Entry entry : Data.mapOf(elementValue).entrySet()) { Object fieldValue = entry.getValue(); @@ -377,8 +376,11 @@ void serialize(XmlSerializer serializer, String elementNamespaceUri, String elem String attributeName = attributeNames.get(i); int colon = attributeName.indexOf(':'); String attributeLocalName = attributeName.substring(colon + 1); - String attributeNamespaceUri = colon == -1 ? null : getNamespaceUriForAliasHandlingUnknown( - errorOnUnknown, attributeName.substring(0, colon)); + String attributeNamespaceUri = + colon == -1 + ? null + : getNamespaceUriForAliasHandlingUnknown( + errorOnUnknown, attributeName.substring(0, colon)); serializer.attribute( attributeNamespaceUri, attributeLocalName, toSerializedValue(attributeValues.get(i))); } @@ -395,13 +397,13 @@ void serialize(XmlSerializer serializer, String elementNamespaceUri, String elem if (subElementValue instanceof Iterable || valueClass.isArray()) { for (Object subElement : Types.iterableOf(subElementValue)) { if (subElement != null && !Data.isNull(subElement)) { - new ElementSerializer(subElement, errorOnUnknown).serialize( - serializer, subElementName); + new ElementSerializer(subElement, errorOnUnknown) + .serialize(serializer, subElementName); } } } else { - new ElementSerializer(subElementValue, errorOnUnknown).serialize( - serializer, subElementName); + new ElementSerializer(subElementValue, errorOnUnknown) + .serialize(serializer, subElementName); } } serializer.endTag(elementNamespaceUri, elementLocalName); diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java index 2c0a173b5..b29717922 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java @@ -27,21 +27,17 @@ import org.xmlpull.v1.XmlPullParserException; /** - * {@link Beta}
            + * {@link Beta}
            * XML HTTP parser into an data class of key/value pairs. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  static void setParser(HttpRequest request, XmlNamespaceDictionary namespaceDictionary) {
            -    request.setParser(new XmlObjectParser(namespaceDictionary));
            -  }
            + * static void setParser(HttpRequest request, XmlNamespaceDictionary namespaceDictionary) {
            + * request.setParser(new XmlObjectParser(namespaceDictionary));
            + * }
              * 
            * * @since 1.10 @@ -61,9 +57,7 @@ public XmlObjectParser(XmlNamespaceDictionary namespaceDictionary) { this.namespaceDictionary = Preconditions.checkNotNull(namespaceDictionary); } - /** - * Returns the XML namespace dictionary. - */ + /** Returns the XML namespace dictionary. */ public final XmlNamespaceDictionary getNamespaceDictionary() { return namespaceDictionary; } @@ -82,8 +76,7 @@ public T parseAndClose(InputStream in, Charset charset, Class dataClass) return (T) parseAndClose(in, charset, (Type) dataClass); } - public Object parseAndClose(InputStream in, Charset charset, Type dataType) - throws IOException { + public Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException { try { // Initialize the parser XmlPullParser parser = Xml.createParser(); diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java index c68453f57..041f04860 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java @@ -25,12 +25,10 @@ import org.xmlpull.v1.XmlPullParserException; /** - * {@link Beta}
            + * {@link Beta}
            * Abstract base class for an Atom feed parser when the feed type is known in advance. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @param feed type * @since 1.0 @@ -61,8 +59,11 @@ public abstract class AbstractAtomFeedParser { * @param feedClass feed class to parse * @since 1.5 */ - protected AbstractAtomFeedParser(XmlNamespaceDictionary namespaceDictionary, XmlPullParser parser, - InputStream inputStream, Class feedClass) { + protected AbstractAtomFeedParser( + XmlNamespaceDictionary namespaceDictionary, + XmlPullParser parser, + InputStream inputStream, + Class feedClass) { this.namespaceDictionary = Preconditions.checkNotNull(namespaceDictionary); this.parser = Preconditions.checkNotNull(parser); this.inputStream = Preconditions.checkNotNull(inputStream); diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java index fe5575c84..85b39b0a9 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java @@ -22,11 +22,10 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.escape.PercentEscaper; import com.google.api.client.xml.Xml; - import java.util.Arrays; /** - * {@link Beta}
            + * {@link Beta}
            * Atom Utilities. * * @since 1.0 @@ -41,9 +40,7 @@ public final class Atom { /** * {@code "application/atom+xml; charset=utf-8"} media type used as a default for Atom parsing. * - *

            - * Use {@link HttpMediaType#equalsIgnoreParameters} for comparing media types. - *

            + *

            Use {@link HttpMediaType#equalsIgnoreParameters} for comparing media types. * * @since 1.10 */ @@ -64,8 +61,7 @@ public boolean stopBeforeStartTag(String namespace, String localName) { } } - private Atom() { - } + private Atom() {} /** * Checks the given content type matches the Atom content type specified in {@link #MEDIA_TYPE}. @@ -74,8 +70,10 @@ private Atom() { */ public static void checkContentType(String contentType) { Preconditions.checkArgument(contentType != null); // for backwards compatibility - Preconditions.checkArgument(HttpMediaType.equalsIgnoreParameters(MEDIA_TYPE, contentType), - "Wrong content type: expected <" + MEDIA_TYPE + "> but got <%s>", contentType); + Preconditions.checkArgument( + HttpMediaType.equalsIgnoreParameters(MEDIA_TYPE, contentType), + "Wrong content type: expected <" + MEDIA_TYPE + "> but got <%s>", + contentType); } /** diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java index e210800fa..afb992a0b 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Utilities for Atom XML. * * @since 1.0 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.xml.atom; - diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java index 4076d8288..a5f0bed0a 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Utilities for XML. * * @since 1.0 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.xml; - diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java index 84f4bac91..f93311d46 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java @@ -17,6 +17,14 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; + +import com.google.api.client.http.HttpHeaders; +import com.google.api.client.http.xml.atom.AtomFeedParser; +import com.google.api.client.util.Charsets; +import com.google.api.client.util.Key; +import com.google.api.client.xml.atom.AbstractAtomFeedParser; +import com.google.api.client.xml.atom.Atom; +import com.google.common.io.Resources; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.StringReader; @@ -25,13 +33,6 @@ import org.junit.Assert; import org.junit.Test; import org.xmlpull.v1.XmlPullParser; -import com.google.api.client.http.HttpHeaders; -import com.google.api.client.http.xml.atom.AtomFeedParser; -import com.google.api.client.util.Charsets; -import com.google.api.client.util.Key; -import com.google.api.client.xml.atom.AbstractAtomFeedParser; -import com.google.api.client.xml.atom.Atom; -import com.google.common.io.Resources; /** * Tests {@link Atom}. @@ -41,29 +42,27 @@ */ public class AtomTest { + private static final String SAMPLE_FEED = + " Example Feed 2003-12-13T18:31:02Z " + + "John Doe urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6" + + " Atom-Powered Robots Run Amok urn:uuid:1225c695-cfb8-4ebb-aaaa" + + "-80da344efa6a 2003-12-13T18:30:02Z

            Some text" + + ". Atom-Powered Robots Run Amok! urn:uuid:1225c695-cfb8-4ebb" + + "-aaaa-80da344efa62 2003-12-13T18:32:02Z Some " + + "other text. "; - private static final String SAMPLE_FEED = " Example Feed 2003-12-13T18:31:02Z " + - "John Doe urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6" + - " Atom-Powered Robots Run Amok urn:uuid:1225c695-cfb8-4ebb-aaaa" + - "-80da344efa6a 2003-12-13T18:30:02Z Some text" + - ". Atom-Powered Robots Run Amok! urn:uuid:1225c695-cfb8-4ebb" + - "-aaaa-80da344efa62 2003-12-13T18:32:02Z Some " + - "other text. "; - - /** - * Test for checking the Slug Header - */ + /** Test for checking the Slug Header */ @Test public void testSetSlugHeader() { HttpHeaders headers = new HttpHeaders(); assertNull(headers.get("Slug")); subtestSetSlugHeader(headers, "value", "value"); - subtestSetSlugHeader(headers, " !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~", " !\"#$&'()*+,-./:;" + - "<=>?@[\\]^_`{|}~"); + subtestSetSlugHeader( + headers, " !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~", " !\"#$&'()*+,-./:;" + "<=>?@[\\]^_`{|}~"); subtestSetSlugHeader(headers, "%D7%99%D7%A0%D7%99%D7%91", "יניב"); subtestSetSlugHeader(headers, null, null); } @@ -74,8 +73,8 @@ public void subtestSetSlugHeader(HttpHeaders headers, String expectedValue, Stri if (value == null) { assertNull(headers.get("Slug")); } else { - Assert.assertArrayEquals(new String[]{expectedValue}, - ((List) headers.get("Slug")).toArray()); + Assert.assertArrayEquals( + new String[] {expectedValue}, ((List) headers.get("Slug")).toArray()); } } @@ -83,7 +82,7 @@ public void subtestSetSlugHeader(HttpHeaders headers, String expectedValue, Stri * This tests parses a simple Atom Feed given as a constant. All elements are asserted, to see if * everything works fine. For parsing a dedicated {@link AtomFeedParser} is used. * - * The purpose of this test is to test the {@link AtomFeedParser#parseFeed} and {@link + *

            The purpose of this test is to test the {@link AtomFeedParser#parseFeed} and {@link * AtomFeedParser#parseNextEntry} and see if the mapping of the XML element to the entity classes * is done correctly. */ @@ -94,8 +93,9 @@ public void testAtomFeedUsingCustomizedParser() throws Exception { parser.setInput(new StringReader(SAMPLE_FEED)); InputStream stream = new ByteArrayInputStream(SAMPLE_FEED.getBytes()); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); - AbstractAtomFeedParser atomParser = new AtomFeedParser(namespaceDictionary, - parser, stream, Feed.class, FeedEntry.class); + AbstractAtomFeedParser atomParser = + new AtomFeedParser( + namespaceDictionary, parser, stream, Feed.class, FeedEntry.class); Feed feed = (Feed) atomParser.parseFeed(); assertEquals("John Doe", feed.author.name); @@ -105,7 +105,7 @@ public void testAtomFeedUsingCustomizedParser() throws Exception { assertEquals("http://example.org/", feed.link.href); FeedEntry entry1 = (FeedEntry) atomParser.parseNextEntry(); - //assertNotNull(feed.entry); + // assertNotNull(feed.entry); assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", entry1.id); assertEquals("2003-12-13T18:30:02Z", entry1.updated); assertEquals("Some text.", entry1.summary); @@ -126,10 +126,10 @@ public void testAtomFeedUsingCustomizedParser() throws Exception { } /** - * Tests of a constant string to see if the data structure can be parsed using the standard - * method {@link Xml#parseElement} + * Tests of a constant string to see if the data structure can be parsed using the standard method + * {@link Xml#parseElement} * - * The purpose of this test is to assert, if the parsed elements are correctly parsed using a + *

            The purpose of this test is to assert, if the parsed elements are correctly parsed using a * {@link AtomFeedParser}. */ @Test @@ -149,7 +149,7 @@ public void testAtomFeedUsingStandardParser() throws Exception { assertEquals("http://example.org/", feed.link.href); FeedEntry entry1 = feed.entry[0]; - //assertNotNull(feed.entry); + // assertNotNull(feed.entry); assertEquals("urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", entry1.id); assertEquals("2003-12-13T18:30:02Z", entry1.updated); assertEquals("Some text.", entry1.summary); @@ -168,7 +168,7 @@ public void testAtomFeedUsingStandardParser() throws Exception { * Read an XML ATOM Feed from a file to a string and assert if all the {@link FeedEntry}s are * present. No detailed assertion of each element * - * The purpose of this test is to read a bunch of elements which contain additional elements + *

            The purpose of this test is to read a bunch of elements which contain additional elements * (HTML in this case), that are not part of the {@link FeedEntry} and to see if there is an issue * if we parse some more entries. */ @@ -179,8 +179,13 @@ public void testSampleFeedParser() throws Exception { String read = Resources.toString(url, Charsets.UTF_8); parser.setInput(new StringReader(read)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); - AbstractAtomFeedParser atomParser = new AtomFeedParser(namespaceDictionary, - parser, new ByteArrayInputStream(read.getBytes()), Feed.class, FeedEntry.class); + AbstractAtomFeedParser atomParser = + new AtomFeedParser( + namespaceDictionary, + parser, + new ByteArrayInputStream(read.getBytes()), + Feed.class, + FeedEntry.class); Feed feed = (Feed) atomParser.parseFeed(); assertNotNull(feed); @@ -204,9 +209,11 @@ public void testSampleFeedParser() throws Exception { assertNotNull(entry.link); assertNotNull(entry.updated); assertNotNull(entry.content); - assertEquals("aäb cde fgh ijk lmn oöpoöp tuü vwx yz AÄBC DEF GHI JKL MNO ÖPQ RST UÜV WXYZ " + - "!\"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¼× {} aäb cde fgh ijk lmn oöp qrsß tuü vwx yz " + - "AÄBC DEF GHI JKL MNO", entry.content); + assertEquals( + "aäb cde fgh ijk lmn oöpoöp tuü vwx yz AÄBC DEF GHI JKL MNO ÖPQ RST UÜV WXYZ " + + "!\"§ $%& /() =?* '<> #|; ²³~ @`´ ©«» ¼× {} aäb cde fgh ijk lmn oöp qrsß tuü vwx yz " + + "AÄBC DEF GHI JKL MNO", + entry.content); // validate feed 3 -- Missing Content entry = (FeedEntry) atomParser.parseNextEntry(); @@ -245,22 +252,14 @@ public void testSampleFeedParser() throws Exception { atomParser.close(); } - /** - * Feed Element to map the XML to - */ + /** Feed Element to map the XML to */ public static class Feed { - @Key - private String title; - @Key - private Link link; - @Key - private String updated; - @Key - private Author author; - @Key - private String id; - @Key - private FeedEntry[] entry; + @Key private String title; + @Key private Link link; + @Key private String updated; + @Key private Author author; + @Key private String id; + @Key private FeedEntry[] entry; } /** @@ -268,8 +267,7 @@ public static class Feed { * this needs to be public. */ public static class Author { - @Key - private String name; + @Key private String name; } /** @@ -282,22 +280,15 @@ public static class Link { } /** - * Entry Element to cover the Entries of a Atom {@link Feed}. As this is sub-element, - * this needs to be public. + * Entry Element to cover the Entries of a Atom {@link Feed}. As this is sub-element, this needs + * to be public. */ public static class FeedEntry { - @Key - private String title; - @Key - private Link link; - @Key - private String updated; - @Key - private String summary; - @Key - private String id; - @Key - private String content; + @Key private String title; + @Key private Link link; + @Key private String updated; + @Key private String summary; + @Key private String id; + @Key private String content; } } - diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java index 6d2ec0769..0172fccb7 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java @@ -16,7 +16,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; + +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; @@ -24,42 +26,41 @@ import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; -import com.google.api.client.util.ArrayMap; -import com.google.api.client.util.Key; /** * Tests List and Arrays of {@link GenericXml}. * - * Tests are copies from {@link XmlListTest}, but the dedicated classes are derived from {@link + *

            Tests are copies from {@link XmlListTest}, but the dedicated classes are derived from {@link * GenericXml} * - * * @author Gerald Madlmayr */ - public class GenericXmlListTest { - - private static final String MULTI_TYPE_WITH_CLASS_TYPE = "content1rep10" + - "rep11value1content2rep20rep21" - + "value2content3rep30rep31" + - "value3"; - private static final String MULTIPLE_STRING_ELEMENT = "rep1rep2"; - private static final String MULTIPLE_INTEGER_ELEMENT = "12"; - private static final String ARRAY_TYPE_WITH_PRIMITIVE_ADDED_NESTED = "1something2"; - private static final String MULTIPLE_ENUM_ELEMENT = "ENUM_1ENUM_2"; - private static final String COLLECTION_OF_ARRAY = "abcd"; - - /** - * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. - */ + private static final String MULTI_TYPE_WITH_CLASS_TYPE = + "content1rep10" + + "rep11value1content2rep20rep21" + + "value2content3rep30rep31" + + "value3"; + private static final String MULTIPLE_STRING_ELEMENT = + "rep1rep2"; + private static final String MULTIPLE_INTEGER_ELEMENT = + "12"; + private static final String ARRAY_TYPE_WITH_PRIMITIVE_ADDED_NESTED = + "1something2"; + private static final String MULTIPLE_ENUM_ELEMENT = + "ENUM_1ENUM_2"; + private static final String COLLECTION_OF_ARRAY = + "abcd"; + + /** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */ @SuppressWarnings("unchecked") @Test public void testParseArrayTypeWithClassType() throws Exception { @@ -75,16 +76,13 @@ public void testParseArrayTypeWithClassType() throws Exception { assertEquals(3, rep.length); ArrayList> elem0 = (ArrayList>) rep[0].elem; assertEquals(1, elem0.size()); - assertEquals("content1", elem0.get(0) - .get("text()")); + assertEquals("content1", elem0.get(0).get("text()")); ArrayList> elem1 = (ArrayList>) rep[1].elem; assertEquals(1, elem1.size()); - assertEquals("content2", elem1.get(0) - .get("text()")); + assertEquals("content2", elem1.get(0).get("text()")); ArrayList> elem2 = (ArrayList>) rep[2].elem; assertEquals(1, elem2.size()); - assertEquals("content3", elem2.get(0) - .get("text()")); + assertEquals("content3", elem2.get(0).get("text()")); // serialize XmlSerializer serializer = Xml.createSerializer(); @@ -118,9 +116,7 @@ public void testParseCollectionWithClassType() throws Exception { assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */ @SuppressWarnings("unchecked") @Test public void testParseMultiGenericWithClassType() throws Exception { @@ -133,18 +129,30 @@ public void testParseMultiGenericWithClassType() throws Exception { GenericXml[] rep = xml.rep; assertNotNull(rep); assertEquals(3, rep.length); - assertEquals("text()", ((ArrayMap) (rep[0].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content1", ((ArrayMap) (rep[0].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); - assertEquals("text()", ((ArrayMap) (rep[1].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content2", ((ArrayMap) (rep[1].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); - assertEquals("text()", ((ArrayMap) (rep[2].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content3", ((ArrayMap) (rep[2].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[0].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content1", + ((ArrayMap) (rep[0].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[1].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content2", + ((ArrayMap) (rep[1].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[2].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content3", + ((ArrayMap) (rep[2].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -153,9 +161,7 @@ public void testParseMultiGenericWithClassType() throws Exception { assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */ @SuppressWarnings("unchecked") @Test public void testParseMultiGenericWithClassTypeGeneric() throws Exception { @@ -168,18 +174,30 @@ public void testParseMultiGenericWithClassTypeGeneric() throws Exception { GenericXml[] rep = xml.rep; assertNotNull(rep); assertEquals(3, rep.length); - assertEquals("text()", ((ArrayMap) (rep[0].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content1", ((ArrayMap) (rep[0].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); - assertEquals("text()", ((ArrayMap) (rep[1].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content2", ((ArrayMap) (rep[1].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); - assertEquals("text()", ((ArrayMap) (rep[2].values() - .toArray(new ArrayList[]{})[0].get(0))).getKey(0)); - assertEquals("content3", ((ArrayMap) (rep[2].values() - .toArray(new ArrayList[]{})[0].get(0))).getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[0].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content1", + ((ArrayMap) (rep[0].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[1].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content2", + ((ArrayMap) (rep[1].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); + assertEquals( + "text()", + ((ArrayMap) (rep[2].values().toArray(new ArrayList[] {})[0].get(0))) + .getKey(0)); + assertEquals( + "content3", + ((ArrayMap) (rep[2].values().toArray(new ArrayList[] {})[0].get(0))) + .getValue(0)); // serialize XmlSerializer serializer = Xml.createSerializer(); @@ -189,9 +207,7 @@ public void testParseMultiGenericWithClassTypeGeneric() throws Exception { assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); } - /** - * The purpose of this test is to map an XML with a {@link Collection} of {@link String}. - */ + /** The purpose of this test is to map an XML with a {@link Collection} of {@link String}. */ @Test public void testParseCollectionTypeString() throws Exception { CollectionTypeStringGeneric xml = new CollectionTypeStringGeneric(); @@ -201,8 +217,8 @@ public void testParseCollectionTypeString() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals("rep1", xml.rep.toArray(new String[]{})[0]); - assertEquals("rep2", xml.rep.toArray(new String[]{})[1]); + assertEquals("rep1", xml.rep.toArray(new String[] {})[0]); + assertEquals("rep2", xml.rep.toArray(new String[] {})[1]); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -211,9 +227,7 @@ public void testParseCollectionTypeString() throws Exception { assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link String} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link String} objects. */ @Test public void testParseArrayTypeString() throws Exception { ArrayTypeStringGeneric xml = new ArrayTypeStringGeneric(); @@ -245,8 +259,8 @@ public void testParseCollectionTypeInteger() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals(1, xml.rep.toArray(new Integer[]{})[0].intValue()); - assertEquals(2, xml.rep.toArray(new Integer[]{})[1].intValue()); + assertEquals(1, xml.rep.toArray(new Integer[] {})[0].intValue()); + assertEquals(2, xml.rep.toArray(new Integer[] {})[1].intValue()); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -255,9 +269,7 @@ public void testParseCollectionTypeInteger() throws Exception { assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link Integer} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link Integer} objects. */ @Test public void testParseArrayTypeInteger() throws Exception { ArrayTypeIntegerGeneric xml = new ArrayTypeIntegerGeneric(); @@ -277,9 +289,7 @@ public void testParseArrayTypeInteger() throws Exception { assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@code int} types. - */ + /** The purpose of this test is to map an XML with an Array of {@code int} types. */ @Test public void testParseArrayTypeInt() throws Exception { ArrayTypeIntGeneric xml = new ArrayTypeIntGeneric(); @@ -311,8 +321,8 @@ public void testParseCollectionTypeWithEnum() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[0]); - assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[1]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[] {})[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[] {})[1]); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -343,9 +353,7 @@ public void testParseArrayTypeWithEnum() throws Exception { assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); } - /** - * The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. - */ + /** The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. */ @Test public void testParseToArrayOfArrayMaps() throws Exception { ArrayOfArrayMapsTypeGeneric xml = new ArrayOfArrayMapsTypeGeneric(); @@ -383,14 +391,14 @@ public void testParseToCollectionOfArrayMaps() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getValue(0)); - assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getKey(0)); - assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getValue(1)); - assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getKey(1)); - assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getValue(0)); - assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getKey(0)); - assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getValue(1)); - assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getKey(1)); + assertEquals("a", xml.rep.toArray(new ArrayMap[] {})[0].getValue(0)); + assertEquals("a", xml.rep.toArray(new ArrayMap[] {})[0].getKey(0)); + assertEquals("b", xml.rep.toArray(new ArrayMap[] {})[0].getValue(1)); + assertEquals("b", xml.rep.toArray(new ArrayMap[] {})[0].getKey(1)); + assertEquals("c", xml.rep.toArray(new ArrayMap[] {})[1].getValue(0)); + assertEquals("c", xml.rep.toArray(new ArrayMap[] {})[1].getKey(0)); + assertEquals("d", xml.rep.toArray(new ArrayMap[] {})[1].getValue(1)); + assertEquals("d", xml.rep.toArray(new ArrayMap[] {})[1].getKey(1)); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -400,68 +408,54 @@ public void testParseToCollectionOfArrayMaps() throws Exception { } private static class CollectionOfArrayMapsTypeGeneric extends GenericXml { - @Key - public Collection> rep; + @Key public Collection> rep; } private static class ArrayOfArrayMapsTypeGeneric extends GenericXml { - @Key - public ArrayMap[] rep; + @Key public ArrayMap[] rep; } private static class ArrayWithClassTypeGeneric extends GenericXml { - @Key - public XmlTest.AnyType[] rep; + @Key public XmlTest.AnyType[] rep; } private static class CollectionWithClassTypeGeneric extends GenericXml { - @Key - public Collection rep; + @Key public Collection rep; } private static class MultiGenericWithClassType { - @Key - public GenericXml[] rep; + @Key public GenericXml[] rep; } private static class MultiGenericWithClassTypeGeneric extends GenericXml { - @Key - public GenericXml[] rep; + @Key public GenericXml[] rep; } private static class CollectionTypeStringGeneric extends GenericXml { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeStringGeneric extends GenericXml { - @Key - public String[] rep; + @Key public String[] rep; } private static class CollectionTypeIntegerGeneric extends GenericXml { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeIntegerGeneric extends GenericXml { - @Key - public Integer[] rep; + @Key public Integer[] rep; } private static class ArrayTypeIntGeneric extends GenericXml { - @Key - public int[] rep; + @Key public int[] rep; } private static class CollectionTypeEnumGeneric extends GenericXml { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeEnumGeneric extends GenericXml { - @Key - public XmlEnumTest.AnyEnum[] rep; + @Key public XmlEnumTest.AnyEnum[] rep; } - } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java index 0c98646b3..02a85cfa9 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java @@ -17,6 +17,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; + +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.StringReader; @@ -28,13 +31,11 @@ import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; -import com.google.api.client.util.ArrayMap; -import com.google.api.client.util.Key; /** * Tests {@link GenericXml}. * - * Tests are copies from {@link XmlTest}, but the dedicated Objects are derived from {@link + *

            Tests are copies from {@link XmlTest}, but the dedicated Objects are derived from {@link * GenericXml} * * @author Yaniv Inbar @@ -42,33 +43,39 @@ */ public class GenericXmlTest { - private static final String XML = "OneTwo"; - private static final String ANY_GENERIC_TYPE_XML = "rep1rep2content"; + private static final String XML = + "OneTwo"; + private static final String ANY_GENERIC_TYPE_XML = + "rep1rep2content"; private static final String SIMPLE_XML = "test"; private static final String SIMPLE_XML_NUMERIC = "1"; - private static final String ANY_TYPE_XML = "contentrep1rep2content"; - private static final String ANY_TYPE_XML_PRIMITIVE_INT = "112" + - ""; - private static final String ANY_TYPE_XML_PRIMITIVE_STR = "1+11+12" + - "+1"; - private static final String ALL_TYPE = ""; - private static final String ANY_TYPE_XML_NESTED_ARRAY = "content

            rep1

            rep2

            rep3

            rep4

            content"; - - public GenericXmlTest() { - } + private static final String ANY_TYPE_XML = + "contentrep1rep2content"; + private static final String ANY_TYPE_XML_PRIMITIVE_INT = + "112" + + ""; + private static final String ANY_TYPE_XML_PRIMITIVE_STR = + "1+11+12" + + "+1"; + private static final String ALL_TYPE = + ""; + private static final String ANY_TYPE_XML_NESTED_ARRAY = + "content

            rep1

            rep2

            rep3

            rep4

            content
            "; + + public GenericXmlTest() {} /** * The purpose of this test is to parse the given XML into a {@link GenericXml} Object that has no @@ -82,8 +89,8 @@ public void testParseToGenericXml() throws Exception { parser.setInput(new StringReader(XML)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); - ArrayMap expected = ArrayMap.of("gd", "http://schemas.google.com/g/2005", "", - "http://www.w3.org/2005/Atom"); + ArrayMap expected = + ArrayMap.of("gd", "http://schemas.google.com/g/2005", "", "http://www.w3.org/2005/Atom"); assertEquals(expected, namespaceDictionary.getAliasToUriMap()); assertEquals("feed", xml.name); Collection foo = (Collection) xml.get("entry"); @@ -91,21 +98,19 @@ public void testParseToGenericXml() throws Exception { ArrayMap singleElementOne = ArrayMap.of("text()", "One"); List> testOne = new ArrayList>(); testOne.add(singleElementOne); - assertEquals("abc", foo.toArray(new ArrayMap[]{})[0].get("@gd:etag")); - assertEquals(testOne, foo.toArray(new ArrayMap[]{})[0].get("title")); - ArrayMap singleElementTwoAttrib = ArrayMap.of("@attribute", "someattribute", - "text()", "Two"); - //ArrayMap singleElementTwoValue =ArrayMap.of(); + assertEquals("abc", foo.toArray(new ArrayMap[] {})[0].get("@gd:etag")); + assertEquals(testOne, foo.toArray(new ArrayMap[] {})[0].get("title")); + ArrayMap singleElementTwoAttrib = + ArrayMap.of("@attribute", "someattribute", "text()", "Two"); + // ArrayMap singleElementTwoValue =ArrayMap.of(); List> testTwo = new ArrayList>(); testTwo.add(singleElementTwoAttrib); - //testTwo.add(singleElementTwoValue); - assertEquals("def", foo.toArray(new ArrayMap[]{})[1].get("@gd:etag")); - assertEquals(testTwo, foo.toArray(new ArrayMap[]{})[1].get("title")); + // testTwo.add(singleElementTwoValue); + assertEquals("def", foo.toArray(new ArrayMap[] {})[1].get("@gd:etag")); + assertEquals(testTwo, foo.toArray(new ArrayMap[] {})[1].get("title")); } - /** - * The purpose of this test is map a generic XML to an element inside a dedicated element. - */ + /** The purpose of this test is map a generic XML to an element inside a dedicated element. */ @SuppressWarnings("unchecked") @Test public void testParseAnyGenericType() throws Exception { @@ -120,28 +125,58 @@ public void testParseAnyGenericType() throws Exception { Collection repValue = (Collection) xml.elem.get("value"); assertEquals(1, repValue.size()); // 1st rep element - assertEquals("@attr", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[0]).getKey()); - assertEquals("param1", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[0]).getValue()); - assertEquals("text()", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[1]).getKey()); - assertEquals("rep1", ((Map.Entry) repList.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[1]).getValue()); + assertEquals( + "@attr", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[0]) + .getKey()); + assertEquals( + "param1", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[0]) + .getValue()); + assertEquals( + "text()", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[1]) + .getKey()); + assertEquals( + "rep1", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[1]) + .getValue()); // 2nd rep element - assertEquals("@attr", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() - .toArray(new Map.Entry[]{})[0]).getKey()); - assertEquals("param2", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() - .toArray(new Map.Entry[]{})[0]).getValue()); - assertEquals("text()", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() - .toArray(new Map.Entry[]{})[1]).getKey()); - assertEquals("rep2", ((Map.Entry) repList.toArray(new ArrayMap[]{})[1].entrySet() - .toArray(new Map.Entry[]{})[1]).getValue()); + assertEquals( + "@attr", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[1].entrySet().toArray(new Map.Entry[] {})[0]) + .getKey()); + assertEquals( + "param2", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[1].entrySet().toArray(new Map.Entry[] {})[0]) + .getValue()); + assertEquals( + "text()", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[1].entrySet().toArray(new Map.Entry[] {})[1]) + .getKey()); + assertEquals( + "rep2", + ((Map.Entry) + repList.toArray(new ArrayMap[] {})[1].entrySet().toArray(new Map.Entry[] {})[1]) + .getValue()); // value element - assertEquals("text()", ((Map.Entry) repValue.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[0]).getKey()); - assertEquals("content", ((Map.Entry) repValue.toArray(new ArrayMap[]{})[0].entrySet() - .toArray(new Map.Entry[]{})[0]).getValue()); + assertEquals( + "text()", + ((Map.Entry) + repValue.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[0]) + .getKey()); + assertEquals( + "content", + ((Map.Entry) + repValue.toArray(new ArrayMap[] {})[0].entrySet().toArray(new Map.Entry[] {})[0]) + .getValue()); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -151,8 +186,7 @@ public void testParseAnyGenericType() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseSimpleTypeAsValueString() throws Exception { @@ -173,8 +207,7 @@ public void testParseSimpleTypeAsValueString() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseSimpleTypeAsValueInteger() throws Exception { @@ -195,8 +228,7 @@ public void testParseSimpleTypeAsValueInteger() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseToAnyType() throws Exception { @@ -204,8 +236,7 @@ public void testParseToAnyType() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseToAnyTypeMissingField() throws Exception { @@ -221,15 +252,14 @@ public void testParseToAnyTypeMissingField() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals("contentcontentrep1rep2", out.toString()); + assertEquals( + "contentcontentrep1rep2", + out.toString()); } - /** - * The purpose of this test isto map a {@link GenericXml} to the String element in the - * object. - */ + /** The purpose of this test isto map a {@link GenericXml} to the String element in the object. */ @Test public void testParseToAnyTypeAdditionalField() throws Exception { AnyTypeAdditionalFieldGeneric xml = new AnyTypeAdditionalFieldGeneric(); @@ -248,8 +278,7 @@ public void testParseToAnyTypeAdditionalField() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseToAnyTypePrimitiveInt() throws Exception { @@ -269,8 +298,7 @@ public void testParseToAnyTypePrimitiveInt() throws Exception { } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseToAnyTypeStringOnly() throws Exception { @@ -307,28 +335,29 @@ public void testParseIncorrectMapping() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals("", out.toString()); + assertEquals( + "", + out.toString()); } /** - * The purpose of this test is to map a {@link GenericXml} to the String element in the - * object. + * The purpose of this test is to map a {@link GenericXml} to the String element in the object. */ @Test public void testParseAnyTypeWithNestedElementArrayMap() throws Exception { processAnyTypeGeneric(ANY_TYPE_XML_NESTED_ARRAY); } - private void processAnyTypeGeneric(final String anyTypeXmlNestedArray) throws XmlPullParserException, IOException { + private void processAnyTypeGeneric(final String anyTypeXmlNestedArray) + throws XmlPullParserException, IOException { AnyTypeGeneric xml = new AnyTypeGeneric(); XmlPullParser parser = Xml.createParser(); parser.setInput(new StringReader(anyTypeXmlNestedArray)); XmlNamespaceDictionary namespaceDictionary = new XmlNamespaceDictionary(); Xml.parseElement(parser, xml, namespaceDictionary, null); assertNotNull(xml); - assertEquals(4, xml.values() - .size()); + assertEquals(4, xml.values().size()); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -340,8 +369,8 @@ private void processAnyTypeGeneric(final String anyTypeXmlNestedArray) throws Xm private static class AnyGenericType { @Key("@attr") public Object attr; - @Key - public GenericXml elem; + + @Key public GenericXml elem; } private static class SimpleTypeStringGeneric extends GenericXml { @@ -357,34 +386,28 @@ private static class SimpleTypeNumericGeneric extends GenericXml { private static class AnyTypeGeneric extends GenericXml { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key - public ValueTypeGeneric value; + + @Key public Object elem; + @Key public Object rep; + @Key public ValueTypeGeneric value; } private static class AnyTypeMissingFieldGeneric extends GenericXml { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public ValueTypeGeneric value; + + @Key public Object elem; + @Key public ValueTypeGeneric value; } private static class AnyTypeAdditionalFieldGeneric extends GenericXml { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key - public Object additionalField; - @Key - public ValueTypeGeneric value; + + @Key public Object elem; + @Key public Object rep; + @Key public Object additionalField; + @Key public ValueTypeGeneric value; } public static class ValueTypeGeneric extends GenericXml { @@ -395,20 +418,20 @@ public static class ValueTypeGeneric extends GenericXml { private static class AnyTypePrimitiveIntGeneric extends GenericXml { @Key("text()") public int value; + @Key("@attr") public int attr; - @Key - public int[] intArray; + + @Key public int[] intArray; } private static class AnyTypePrimitiveStringGeneric extends GenericXml { @Key("text()") public String value; + @Key("@attr") public String attr; - @Key - public String[] strArray; - } - + @Key public String[] strArray; + } } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java index 2d250a11d..7cb908d62 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java @@ -18,14 +18,15 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + +import com.google.api.client.util.Key; +import com.google.api.client.util.Value; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; -import com.google.api.client.util.Key; -import com.google.api.client.util.Value; /** * Tests {@link Xml}. @@ -34,19 +35,23 @@ */ public class XmlEnumTest { - private static final String XML = "ENUM_2contentrep1rep2ENUM_1"; - private static final String XML_ENUM_ELEMENT_ONLY = "ENUM_2"; - private static final String XML_ENUM_ATTRIBUTE_ONLY = ""; - private static final String XML_ENUM_INCORRECT = "ENUM_3"; - private static final String XML_ENUM_ELEMENT_ONLY_NESTED = "ENUM_2something"; - + private static final String XML = + "ENUM_2contentrep1rep2ENUM_1"; + private static final String XML_ENUM_ELEMENT_ONLY = + "ENUM_2"; + private static final String XML_ENUM_ATTRIBUTE_ONLY = + ""; + private static final String XML_ENUM_INCORRECT = + "ENUM_3"; + private static final String XML_ENUM_ELEMENT_ONLY_NESTED = + "ENUM_2something"; @Test public void testParseAnyType() throws Exception { @@ -73,17 +78,15 @@ public void testParseAnyType() throws Exception { assertEquals(XML, out.toString()); } - /** - * The purpose of this test is to parse an XML element to an objects's field. - */ + /** The purpose of this test is to parse an XML element to an objects's field. */ @Test public void testParseToEnumElementType() throws Exception { assertEquals(XML_ENUM_ELEMENT_ONLY, testStandardXml(XML_ENUM_ELEMENT_ONLY)); } /** - * The purpose of this test is to parse an XML element to an objects's field, whereas - * there are additional nested elements in the tag. + * The purpose of this test is to parse an XML element to an objects's field, whereas there are + * additional nested elements in the tag. */ @Test public void testParseToEnumElementTypeWithNestedElement() throws Exception { @@ -111,12 +114,9 @@ private String testStandardXml(final String xmlString) throws Exception { serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); return out.toString(); - } - /** - * The purpose of this test is to parse an XML attribute to an object's field. - */ + /** The purpose of this test is to parse an XML attribute to an object's field. */ @Test public void testParse_enumAttributeType() throws Exception { XmlEnumTest.AnyTypeEnumAttributeOnly xml = new XmlEnumTest.AnyTypeEnumAttributeOnly(); @@ -154,28 +154,28 @@ public void testParse_enumElementTypeIncorrect() throws Exception { } public enum AnyEnum { - @Value ENUM_1, - @Value ENUM_2 + @Value + ENUM_1, + @Value + ENUM_2 } private static class AnyType { @Key("@attr") private Object attr; - @Key - private Object elem; - @Key - private Object rep; + + @Key private Object elem; + @Key private Object rep; + @Key("@anyEnum") private XmlEnumTest.AnyEnum anyEnum; - @Key - private XmlEnumTest.AnyEnum anotherEnum; - @Key - private ValueType value; + + @Key private XmlEnumTest.AnyEnum anotherEnum; + @Key private ValueType value; } private static class AnyTypeEnumElementOnly { - @Key - private XmlEnumTest.AnyEnum elementEnum; + @Key private XmlEnumTest.AnyEnum elementEnum; } private static class AnyTypeEnumAttributeOnly { @@ -183,9 +183,7 @@ private static class AnyTypeEnumAttributeOnly { private AnyEnum attributeEnum; } - /** - * Needs to be public, this is referenced in another element. - */ + /** Needs to be public, this is referenced in another element. */ public static class ValueType { @Key("text()") private XmlEnumTest.AnyEnum content; diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java index a53c4df12..930d0de86 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java @@ -16,7 +16,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; + +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; @@ -24,9 +26,6 @@ import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; -import com.google.api.client.util.ArrayMap; -import com.google.api.client.util.Key; - /** * Tests Lists of various data types parsed in {@link Xml}. @@ -35,26 +34,30 @@ */ public class XmlListTest { - private static final String MULTI_TYPE_WITH_CLASS_TYPE = "content1rep10rep11value1content2rep20rep21value2content3rep30rep31value3"; - private static final String MULTIPLE_STRING_ELEMENT = "rep1rep2"; - private static final String MULTIPLE_STRING_ELEMENT_IN_COLLECTION = "rep1rep2"; - private static final String MULTIPLE_INTEGER_ELEMENT = "12"; - private static final String MULTIPLE_ENUM_ELEMENT = "ENUM_1ENUM_2"; - private static final String COLLECTION_OF_ARRAY = "abcd"; + private static final String MULTI_TYPE_WITH_CLASS_TYPE = + "content1rep10rep11value1content2rep20rep21value2content3rep30rep31value3"; + private static final String MULTIPLE_STRING_ELEMENT = + "rep1rep2"; + private static final String MULTIPLE_STRING_ELEMENT_IN_COLLECTION = + "rep1rep2"; + private static final String MULTIPLE_INTEGER_ELEMENT = + "12"; + private static final String MULTIPLE_ENUM_ELEMENT = + "ENUM_1ENUM_2"; + private static final String COLLECTION_OF_ARRAY = + "abcd"; - /** - * The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */ @SuppressWarnings("unchecked") @Test public void testParseArrayTypeWithClassType() throws Exception { @@ -70,16 +73,13 @@ public void testParseArrayTypeWithClassType() throws Exception { assertEquals(3, rep.length); ArrayList> elem0 = (ArrayList>) rep[0].elem; assertEquals(1, elem0.size()); - assertEquals("content1", elem0.get(0) - .get("text()")); + assertEquals("content1", elem0.get(0).get("text()")); ArrayList> elem1 = (ArrayList>) rep[1].elem; assertEquals(1, elem1.size()); - assertEquals("content2", elem1.get(0) - .get("text()")); + assertEquals("content2", elem1.get(0).get("text()")); ArrayList> elem2 = (ArrayList>) rep[2].elem; assertEquals(1, elem2.size()); - assertEquals("content3", elem2.get(0) - .get("text()")); + assertEquals("content3", elem2.get(0).get("text()")); // serialize XmlSerializer serializer = Xml.createSerializer(); @@ -114,9 +114,7 @@ public void testParseCollectionWithClassType() throws Exception { assertEquals(MULTI_TYPE_WITH_CLASS_TYPE, out.toString()); } - /** - * The purpose of this test is to map an XML with a {@link Collection} of {@link String}. - */ + /** The purpose of this test is to map an XML with a {@link Collection} of {@link String}. */ @Test public void testParseCollectionTypeString() throws Exception { CollectionTypeString xml = new CollectionTypeString(); @@ -126,8 +124,8 @@ public void testParseCollectionTypeString() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals("rep1", xml.rep.toArray(new String[]{})[0]); - assertEquals("rep2", xml.rep.toArray(new String[]{})[1]); + assertEquals("rep1", xml.rep.toArray(new String[] {})[0]); + assertEquals("rep2", xml.rep.toArray(new String[] {})[1]); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -136,9 +134,7 @@ public void testParseCollectionTypeString() throws Exception { assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link String} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link String} objects. */ @Test public void testParseArrayTypeString() throws Exception { ArrayTypeString xml = new ArrayTypeString(); @@ -158,8 +154,8 @@ public void testParseArrayTypeString() throws Exception { assertEquals(MULTIPLE_STRING_ELEMENT, out.toString()); } /** - * The purpose of this test is to map an XML with a sub element of a {@link Collection} of - * {@link String} objects. + * The purpose of this test is to map an XML with a sub element of a {@link Collection} of {@link + * String} objects. */ @Test public void testParseAnyTypeWithACollectionString() throws Exception { @@ -190,8 +186,8 @@ public void testParseCollectionTypeInteger() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals(1, xml.rep.toArray(new Integer[]{})[0].intValue()); - assertEquals(2, xml.rep.toArray(new Integer[]{})[1].intValue()); + assertEquals(1, xml.rep.toArray(new Integer[] {})[0].intValue()); + assertEquals(2, xml.rep.toArray(new Integer[] {})[1].intValue()); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -200,9 +196,7 @@ public void testParseCollectionTypeInteger() throws Exception { assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link Integer} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link Integer} objects. */ @Test public void testParseArrayTypeInteger() throws Exception { ArrayTypeInteger xml = new ArrayTypeInteger(); @@ -222,9 +216,7 @@ public void testParseArrayTypeInteger() throws Exception { assertEquals(MULTIPLE_INTEGER_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@code int} types. - */ + /** The purpose of this test is to map an XML with an Array of {@code int} types. */ @Test public void testParseArrayTypeInt() throws Exception { ArrayTypeInt xml = new ArrayTypeInt(); @@ -256,8 +248,8 @@ public void testParseCollectionTypeWithEnum() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[0]); - assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[]{})[1]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_1, xml.rep.toArray(new XmlEnumTest.AnyEnum[] {})[0]); + assertEquals(XmlEnumTest.AnyEnum.ENUM_2, xml.rep.toArray(new XmlEnumTest.AnyEnum[] {})[1]); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -266,9 +258,7 @@ public void testParseCollectionTypeWithEnum() throws Exception { assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); } - /** - * The purpose of this test is to map an XML with an Array of {@link Enum} objects. - */ + /** The purpose of this test is to map an XML with an Array of {@link Enum} objects. */ @Test public void testParseArrayTypeWithEnum() throws Exception { ArrayTypeEnum xml = new ArrayTypeEnum(); @@ -288,9 +278,7 @@ public void testParseArrayTypeWithEnum() throws Exception { assertEquals(MULTIPLE_ENUM_ELEMENT, out.toString()); } - /** - * The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. - */ + /** The purpose is to have an Array of {@link java.lang.reflect.ParameterizedType} elements. */ @Test public void testParseToArrayOfArrayMaps() throws Exception { ArrayOfArrayMapsType xml = new ArrayOfArrayMapsType(); @@ -328,14 +316,14 @@ public void testParseToCollectionOfArrayMaps() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); // check type assertEquals(2, xml.rep.size()); - assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getValue(0)); - assertEquals("a", xml.rep.toArray(new ArrayMap[]{})[0].getKey(0)); - assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getValue(1)); - assertEquals("b", xml.rep.toArray(new ArrayMap[]{})[0].getKey(1)); - assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getValue(0)); - assertEquals("c", xml.rep.toArray(new ArrayMap[]{})[1].getKey(0)); - assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getValue(1)); - assertEquals("d", xml.rep.toArray(new ArrayMap[]{})[1].getKey(1)); + assertEquals("a", xml.rep.toArray(new ArrayMap[] {})[0].getValue(0)); + assertEquals("a", xml.rep.toArray(new ArrayMap[] {})[0].getKey(0)); + assertEquals("b", xml.rep.toArray(new ArrayMap[] {})[0].getValue(1)); + assertEquals("b", xml.rep.toArray(new ArrayMap[] {})[0].getKey(1)); + assertEquals("c", xml.rep.toArray(new ArrayMap[] {})[1].getValue(0)); + assertEquals("c", xml.rep.toArray(new ArrayMap[] {})[1].getKey(0)); + assertEquals("d", xml.rep.toArray(new ArrayMap[] {})[1].getValue(1)); + assertEquals("d", xml.rep.toArray(new ArrayMap[] {})[1].getKey(1)); // serialize XmlSerializer serializer = Xml.createSerializer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); @@ -345,66 +333,51 @@ public void testParseToCollectionOfArrayMaps() throws Exception { } private static class CollectionOfArrayMapsType { - @Key - public Collection> rep; + @Key public Collection> rep; } private static class ArrayOfArrayMapsType { - @Key - public ArrayMap[] rep; + @Key public ArrayMap[] rep; } private static class ArrayWithClassType { - @Key - public XmlTest.AnyType[] rep; + @Key public XmlTest.AnyType[] rep; } private static class CollectionWithClassType { - @Key - public Collection rep; + @Key public Collection rep; } - /** - * Needs to be public, this is referenced in another element. - */ + /** Needs to be public, this is referenced in another element. */ public static class CollectionTypeString { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeString { - @Key - public String[] rep; + @Key public String[] rep; } private static class AnyTypeWithCollectionString { - @Key - public CollectionTypeString coll; + @Key public CollectionTypeString coll; } private static class CollectionTypeInteger { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeInteger { - @Key - public Integer[] rep; + @Key public Integer[] rep; } private static class ArrayTypeInt { - @Key - public int[] rep; + @Key public int[] rep; } private static class CollectionTypeEnum { - @Key - public Collection rep; + @Key public Collection rep; } private static class ArrayTypeEnum { - @Key - public XmlEnumTest.AnyEnum[] rep; + @Key public XmlEnumTest.AnyEnum[] rep; } - } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java index 4c03f7028..569477010 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java @@ -14,14 +14,14 @@ package com.google.api.client.xml; -import java.io.StringWriter; -import java.util.Collection; -import java.util.TreeSet; -import org.xmlpull.v1.XmlSerializer; import com.google.api.client.util.Key; import com.google.api.client.xml.atom.Atom; import com.google.common.collect.ImmutableMap; +import java.io.StringWriter; +import java.util.Collection; +import java.util.TreeSet; import junit.framework.TestCase; +import org.xmlpull.v1.XmlSerializer; /** * Tests {@link XmlNamespaceDictionary}. @@ -30,21 +30,22 @@ */ public class XmlNamespaceDictionaryTest extends TestCase { - private static final String EXPECTED = "OneTwo"; - private static final String EXPECTED_EMPTY_MAP = ""; - private static final String EXPECTED_EMPTY_MAP_NS_UNDECLARED = ""; - private static final String EXPECTED_EMPTY_MAP_ATOM_NS = ""; - private static final String EXPECTED_UNKNOWN_NS = "One" + - "Two"; - - public XmlNamespaceDictionaryTest() { - } + private static final String EXPECTED = + "OneTwo"; + private static final String EXPECTED_EMPTY_MAP = + ""; + private static final String EXPECTED_EMPTY_MAP_NS_UNDECLARED = + ""; + private static final String EXPECTED_EMPTY_MAP_ATOM_NS = + ""; + private static final String EXPECTED_UNKNOWN_NS = + "One" + + "Two"; + + public XmlNamespaceDictionaryTest() {} public XmlNamespaceDictionaryTest(String name) { super(name); @@ -52,8 +53,7 @@ public XmlNamespaceDictionaryTest(String name) { public void testSet() { XmlNamespaceDictionary dictionary = new XmlNamespaceDictionary(); - dictionary.set("", "http://www.w3.org/2005/Atom") - .set("gd", "http://schemas.google.com/g/2005"); + dictionary.set("", "http://www.w3.org/2005/Atom").set("gd", "http://schemas.google.com/g/2005"); assertEquals("http://www.w3.org/2005/Atom", dictionary.getUriForAlias("")); assertEquals("", dictionary.getAliasForUri("http://www.w3.org/2005/Atom")); dictionary.set("", "http://www.w3.org/2006/Atom"); @@ -71,12 +71,11 @@ public void testSet() { dictionary.set(null, null); assertEquals("http://schemas.google.com/g/2005", dictionary.getUriForAlias("foo")); dictionary.set("foo", null); - assertTrue(dictionary.getAliasToUriMap() - .isEmpty()); - dictionary.set("foo", "http://schemas.google.com/g/2005") + assertTrue(dictionary.getAliasToUriMap().isEmpty()); + dictionary + .set("foo", "http://schemas.google.com/g/2005") .set(null, "http://schemas.google.com/g/2005"); - assertTrue(dictionary.getAliasToUriMap() - .isEmpty()); + assertTrue(dictionary.getAliasToUriMap().isEmpty()); } public void testSerialize() throws Exception { @@ -195,8 +194,7 @@ public void testSerialize_unknown() throws Exception { } public static class Entry implements Comparable { - @Key - public String title; + @Key public String title; @Key("@gd:etag") public String etag; @@ -215,7 +213,5 @@ public int compareTo(Entry other) { public static class Feed { @Key("entry") public Collection entries; - } - } diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java index 0462a2c3b..b1345f15c 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java @@ -19,6 +19,9 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + +import com.google.api.client.util.ArrayMap; +import com.google.api.client.util.Key; import java.io.ByteArrayOutputStream; import java.io.StringReader; import java.util.ArrayList; @@ -27,8 +30,6 @@ import org.junit.Test; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; -import com.google.api.client.util.ArrayMap; -import com.google.api.client.util.Key; /** * Tests {@link Xml}. @@ -38,51 +39,60 @@ */ public class XmlTest { - private static final String SIMPLE_XML = "test"; private static final String SIMPLE_XML_NUMERIC = "1"; private static final String START_WITH_TEXT = "start_with_text"; - private static final String MISSING_END_ELEMENT = "" + - "missing_end_element"; - private static final String START_WITH_END_ELEMENT = "

            start_with_end_elemtn"; - private static final String START_WITH_END_ELEMENT_NESTED = "

            start_with_end_element_nested
            "; - private static final String ANY_TYPE_XML = "contentrep1rep2" + - "content"; - private static final String ANY_TYPE_MISSING_XML = "contentcontent"; - private static final String ANY_TYPE_XML_PRIMITIVE_INT = "112" + - ""; - private static final String ANY_TYPE_XML_PRIMITIVE_STR = "1+11+12" + - "+1"; - private static final String NESTED_NS = "2011-08-09T04:38" + - ":14.017Z"; - private static final String NESTED_NS_SERIALIZED = "2011-08-09T04:38:14.017Z"; - private static final String INF_TEST = "-INFINF-INFINF" + - ""; - private static final String ALL_TYPE = ""; - private static final String ALL_TYPE_WITH_DATA = "" + - "ENUM_1ENUM_2Title

            Test

            112str1arr1arr2
            "; - private static final String ANY_TYPE_XML_NESTED_ARRAY = "content

            rep1

            rep2

            rep3

            rep4

            content
            "; + private static final String MISSING_END_ELEMENT = + "" + "missing_end_element"; + private static final String START_WITH_END_ELEMENT = + "

            start_with_end_elemtn"; + private static final String START_WITH_END_ELEMENT_NESTED = + "

            start_with_end_element_nested
            "; + private static final String ANY_TYPE_XML = + "contentrep1rep2" + + "content"; + private static final String ANY_TYPE_MISSING_XML = + "contentcontent"; + private static final String ANY_TYPE_XML_PRIMITIVE_INT = + "112" + + ""; + private static final String ANY_TYPE_XML_PRIMITIVE_STR = + "1+11+12" + + "+1"; + private static final String NESTED_NS = + "2011-08-09T04:38" + + ":14.017Z"; + private static final String NESTED_NS_SERIALIZED = + "2011-08-09T04:38:14.017Z"; + private static final String INF_TEST = + "-INFINF-INFINF" + + ""; + private static final String ALL_TYPE = + ""; + private static final String ALL_TYPE_WITH_DATA = + "" + + "ENUM_1ENUM_2Title

            Test

            112str1arr1arr2
            "; + private static final String ANY_TYPE_XML_NESTED_ARRAY = + "content

            rep1

            rep2

            rep3

            rep4

            content
            "; /** - * The purpose of this test is to map a single element to a single field of a - * destination object. In this case the object mapped is a {@link String}; no namespace used. + * The purpose of this test is to map a single element to a single field of a destination object. + * In this case the object mapped is a {@link String}; no namespace used. */ @Test public void testParseSimpleTypeAsValueString() throws Exception { @@ -102,9 +112,8 @@ public void testParseSimpleTypeAsValueString() throws Exception { } /** - * The purpose of this test is to map a single element to a single field of a - * destination object. In this is it is not an object but a {@code int}. no namespace - * used. + * The purpose of this test is to map a single element to a single field of a destination object. + * In this is it is not an object but a {@code int}. no namespace used. */ @Test public void testParseSimpleTypeAsValueInteger() throws Exception { @@ -123,9 +132,7 @@ public void testParseSimpleTypeAsValueInteger() throws Exception { assertEquals("1", out.toString()); } - /** - * Negative test to check for text without a start-element. - */ + /** Negative test to check for text without a start-element. */ @Test public void testWithTextFail() throws Exception { SimpleTypeString xml = new SimpleTypeString(); @@ -136,15 +143,14 @@ public void testWithTextFail() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); fail(); } catch (final Exception e) { - assertEquals("only whitespace content allowed before start tag and not s (position: " + - "START_DOCUMENT seen s... @1:22)", e.getMessage() - .trim()); + assertEquals( + "only whitespace content allowed before start tag and not s (position: " + + "START_DOCUMENT seen s... @1:22)", + e.getMessage().trim()); } } - /** - * Negative test to check for missing end-element. - */ + /** Negative test to check for missing end-element. */ @Test public void testWithMissingEndElementFail() throws Exception { SimpleTypeString xml = new SimpleTypeString(); @@ -155,16 +161,15 @@ public void testWithMissingEndElementFail() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); fail(); } catch (final Exception e) { - assertEquals("no more data available - expected end tag
            to close start tag from line 1, parser stopped on START_TAG seen ...missing_end_element... @1:54", e.getMessage() - .trim()); + assertEquals( + "no more data available - expected end tag to close start tag from line 1, parser stopped on START_TAG seen ...missing_end_element... @1:54", + e.getMessage().trim()); } } - /** - * Negative test with that start with a end-element. - */ + /** Negative test with that start with a end-element. */ @Test public void testWithEndElementStarting() throws Exception { SimpleTypeString xml = new SimpleTypeString(); @@ -175,15 +180,14 @@ public void testWithEndElementStarting() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); fail(); } catch (final Exception e) { - assertEquals("expected start tag name and not / (position: START_DOCUMENT seen must match start tag name from line 1 (position:" + - " START_TAG seen ...

            ... @1:39)", e.getMessage() - .trim()); + assertEquals( + "end tag name

            must match start tag name from line 1 (position:" + + " START_TAG seen ...

            ... @1:39)", + e.getMessage().trim()); } } - /** - * Negative test that maps a string to an integer and causes an exception. - */ + /** Negative test that maps a string to an integer and causes an exception. */ @Test public void testFailMappingOfDataType() throws Exception { SimpleTypeNumeric xml = new SimpleTypeNumeric(); @@ -213,8 +216,7 @@ public void testFailMappingOfDataType() throws Exception { Xml.parseElement(parser, xml, namespaceDictionary, null); fail(); } catch (final Exception e) { - assertEquals("For input string: \"test\"", e.getMessage() - .trim()); + assertEquals("For input string: \"test\"", e.getMessage().trim()); } } @@ -306,8 +308,8 @@ public void testParseToAnyTypeWithNullDestination() throws Exception { } /** - * The purpose of this test is to see, if parsing works with a {@link Xml.CustomizeParser}. - * The XML will be mapped to {@link AnyType}. + * The purpose of this test is to see, if parsing works with a {@link Xml.CustomizeParser}. The + * XML will be mapped to {@link AnyType}. */ @Test public void testParseAnyTypeWithCustomParser() throws Exception { @@ -330,9 +332,9 @@ public void testParseAnyTypeWithCustomParser() throws Exception { } /** - * The purpose of this test it to parse elements which will be mapped to a - * {@link javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, - * elements and element arrays. + * The purpose of this test it to parse elements which will be mapped to a {@link + * javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, elements + * and element arrays. */ @Test public void testParseToAnyTypePrimitiveInt() throws Exception { @@ -355,9 +357,9 @@ public void testParseToAnyTypePrimitiveInt() throws Exception { } /** - * The purpose of this test it to parse elements which will be mapped to a Java - * {@link javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, - * elements and element arrays. + * The purpose of this test it to parse elements which will be mapped to a Java {@link + * javax.lang.model.type.PrimitiveType}. Therefore {@code int}s are mapped to attributes, elements + * and element arrays. */ @Test public void testParseToAnyTypeStringOnly() throws Exception { @@ -379,9 +381,7 @@ public void testParseToAnyTypeStringOnly() throws Exception { assertEquals(ANY_TYPE_XML_PRIMITIVE_STR, out.toString()); } - /** - * The purpose of this test is to map nested elements with a namespace attribute. - */ + /** The purpose of this test is to map nested elements with a namespace attribute. */ @Test public void testParseOfNestedNs() throws Exception { XmlPullParser parser = Xml.createParser(); @@ -399,8 +399,8 @@ public void testParseOfNestedNs() throws Exception { } /** - * The purpose of this test is to map the infinity values of both {@code doubles} and - * {@code floats}. + * The purpose of this test is to map the infinity values of both {@code doubles} and {@code + * floats}. */ @Test public void testParseInfiniteValues() throws Exception { @@ -446,8 +446,9 @@ public void testParseEmptyElements() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); serializer.setOutput(out, "UTF-8"); namespaceDictionary.serialize(serializer, "any", xml); - assertEquals("0", out.toString()); + assertEquals( + "0", + out.toString()); } /** @@ -513,16 +514,24 @@ public void testParseAnyTypeWithNestedElementArrayMap() throws Exception { assertTrue(xml.value.content instanceof String); assertEquals(1, ((Collection) xml.elem).size()); assertEquals(2, ((Collection) xml.rep).size()); - assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[]{})[0].size()); - assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[]{})[1].size()); - assertEquals("rep1", - ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[0].get("p")).toArray(new ArrayMap[]{})[0].getValue(0)); - assertEquals("rep2", - ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[0].get("p")).toArray(new ArrayMap[]{})[1].getValue(0)); - assertEquals("rep3", - ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[1].get("p")).toArray(new ArrayMap[]{})[0].getValue(0)); - assertEquals("rep4", - ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[]{})[1].get("p")).toArray(new ArrayMap[]{})[1].getValue(0)); + assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[] {})[0].size()); + assertEquals(1, ((Collection) xml.rep).toArray(new ArrayMap[] {})[1].size()); + assertEquals( + "rep1", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[] {})[0].get("p")) + .toArray(new ArrayMap[] {})[0].getValue(0)); + assertEquals( + "rep2", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[] {})[0].get("p")) + .toArray(new ArrayMap[] {})[1].getValue(0)); + assertEquals( + "rep3", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[] {})[1].get("p")) + .toArray(new ArrayMap[] {})[0].getValue(0)); + assertEquals( + "rep4", + ((ArrayList) ((ArrayList) xml.rep).toArray(new ArrayMap[] {})[1].get("p")) + .toArray(new ArrayMap[] {})[1].getValue(0)); // serialize XmlSerializer serializer = Xml.createSerializer(); @@ -545,34 +554,28 @@ public static class SimpleTypeNumeric { public static class AnyType { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key - public ValueType value; + + @Key public Object elem; + @Key public Object rep; + @Key public ValueType value; } public static class AnyTypeMissingField { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public ValueType value; + + @Key public Object elem; + @Key public ValueType value; } public static class AnyTypeAdditionalField { @Key("@attr") public Object attr; - @Key - public Object elem; - @Key - public Object rep; - @Key - public Object additionalField; - @Key - public ValueType value; + + @Key public Object elem; + @Key public Object rep; + @Key public Object additionalField; + @Key public ValueType value; } public static class ValueType { @@ -583,45 +586,36 @@ public static class ValueType { public static class AnyTypePrimitiveInt { @Key("text()") public int value; + @Key("@attr") public int attr; - @Key - public int[] intArray; + + @Key public int[] intArray; } public static class AnyTypePrimitiveString { @Key("text()") public String value; + @Key("@attr") public String attr; - @Key - public String[] strArray; + + @Key public String[] strArray; } private static class AnyTypeInf { - @Key - public double dblInfNeg; - @Key - public double dblInfPos; - @Key - public float fltInfNeg; - @Key - public float fltInfPos; + @Key public double dblInfNeg; + @Key public double dblInfPos; + @Key public float fltInfNeg; + @Key public float fltInfPos; } private static class AllType { - @Key - public int integer; - @Key - public String str; - @Key - public GenericXml genericXml; - @Key - public XmlEnumTest.AnyEnum[] anyEnum; - @Key - public String[] stringArray; - @Key - public List integerCollection; + @Key public int integer; + @Key public String str; + @Key public GenericXml genericXml; + @Key public XmlEnumTest.AnyEnum[] anyEnum; + @Key public String[] stringArray; + @Key public List integerCollection; } } - diff --git a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java index 46fcabd45..fdd9a768e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java @@ -17,16 +17,13 @@ import com.google.api.client.util.Charsets; import com.google.api.client.util.IOUtils; import com.google.api.client.util.StreamingContent; - import java.io.IOException; import java.nio.charset.Charset; /** * Abstract implementation of an HTTP content with typical options. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.5 * @author Yaniv Inbar @@ -41,7 +38,7 @@ public abstract class AbstractHttpContent implements HttpContent { /** * @param mediaType Media type string (for example "type/subtype") this content represents or - * {@code null} to leave out. Can also contain parameters like {@code "charset=utf-8"} + * {@code null} to leave out. Can also contain parameters like {@code "charset=utf-8"} * @since 1.10 */ protected AbstractHttpContent(String mediaType) { @@ -79,10 +76,8 @@ public final HttpMediaType getMediaType() { /** * Sets the media type to use for the Content-Type header, or {@code null} if unspecified. * - *

            - * This will also overwrite any previously set parameter of the media type (for example - * {@code "charset"}), and therefore might change other properties as well. - *

            + *

            This will also overwrite any previously set parameter of the media type (for example {@code + * "charset"}), and therefore might change other properties as well. * * @since 1.10 */ @@ -98,7 +93,8 @@ public AbstractHttpContent setMediaType(HttpMediaType mediaType) { */ protected final Charset getCharset() { return mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 : mediaType.getCharsetParameter(); + ? Charsets.ISO_8859_1 + : mediaType.getCharsetParameter(); } public String getType() { @@ -108,10 +104,8 @@ public String getType() { /** * Computes and returns the content length or less than zero if not known. * - *

            - * Subclasses may override, but by default this computes the length by calling - * {@link #computeLength(HttpContent)}. - *

            + *

            Subclasses may override, but by default this computes the length by calling {@link + * #computeLength(HttpContent)}. */ protected long computeLength() throws IOException { return computeLength(this); @@ -129,7 +123,6 @@ public boolean retrySupported() { * * @param content HTTP content * @return computed content length or {@code -1} if retry is not supported - * * @since 1.14 */ public static long computeLength(HttpContent content) throws IOException { diff --git a/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java b/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java index 29a37d984..789fab5ec 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java @@ -16,7 +16,6 @@ import com.google.api.client.util.ByteStreams; import com.google.api.client.util.IOUtils; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -24,17 +23,15 @@ /** * Serializes HTTP request content from an input stream into an output stream. * - *

            - * The {@link #type} field is required. Subclasses should implement the {@link #getLength()}, + *

            The {@link #type} field is required. Subclasses should implement the {@link #getLength()}, * {@link #getInputStream()}, and {@link #retrySupported()} for their specific type of input stream. * By default, all content is read from the input stream. If instead you want to limit the maximum - * amount of content read from the input stream, you may use - * {@link ByteStreams#limit(InputStream, long)}. - *

            + * amount of content read from the input stream, you may use {@link ByteStreams#limit(InputStream, + * long)}. * *

            - * Implementations don't need to be thread-safe. - *

            + * + *

            Implementations don't need to be thread-safe. * * @since 1.4 * @author moshenko@google.com (Jacob Moshenko) @@ -45,8 +42,8 @@ public abstract class AbstractInputStreamContent implements HttpContent { private String type; /** - * Whether the input stream should be closed at the end of {@link #writeTo}. Default is - * {@code true}. + * Whether the input stream should be closed at the end of {@link #writeTo}. Default is {@code + * true}. */ private boolean closeInputStream = true; @@ -59,10 +56,10 @@ public AbstractInputStreamContent(String type) { } /** - * Return an input stream for the specific implementation type of - * {@link AbstractInputStreamContent}. If the specific implementation will return {@code true} for - * {@link #retrySupported()} this should be a factory function which will create a new - * {@link InputStream} from the source data whenever invoked. + * Return an input stream for the specific implementation type of {@link + * AbstractInputStreamContent}. If the specific implementation will return {@code true} for {@link + * #retrySupported()} this should be a factory function which will create a new {@link + * InputStream} from the source data whenever invoked. * * @since 1.7 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java index d06304011..704c9f85a 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java +++ b/google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java @@ -15,48 +15,41 @@ package com.google.api.client.http; import com.google.api.client.util.Beta; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Strategy interface to control back off between retry attempts. * * @since 1.7 * @author Ravi Mistry * @deprecated (scheduled to be removed in 1.18) Use {@link HttpBackOffUnsuccessfulResponseHandler} - * instead. + * instead. */ @Deprecated @Beta public interface BackOffPolicy { - /** - * Value indicating that no more retries should be made, see {@link #getNextBackOffMillis()}. - */ + /** Value indicating that no more retries should be made, see {@link #getNextBackOffMillis()}. */ public static final long STOP = -1L; /** * Determines if back off is required based on the specified status code. * - *

            - * Implementations may want to back off on server or product-specific errors. - *

            + *

            Implementations may want to back off on server or product-specific errors. * * @param statusCode HTTP status code */ public boolean isBackOffRequired(int statusCode); - /** - * Reset Back off counters (if any) in an implementation-specific fashion. - */ + /** Reset Back off counters (if any) in an implementation-specific fashion. */ public void reset(); /** * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is * returned, no retries should be made. * - * This method should be used as follows: + *

            This method should be used as follows: * *

                *  long backoffTime = backoffPolicy.getNextBackoffMs();
            @@ -65,10 +58,10 @@ public interface BackOffPolicy {
                *  } else {
                *    // Retry after backoffTime.
                *  }
            -   *
            + * * * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no - * more retries should be made + * more retries should be made */ public long getNextBackOffMillis() throws IOException; } diff --git a/google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java b/google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java index 8da4bd985..0e55cea4c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java +++ b/google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java @@ -15,19 +15,16 @@ package com.google.api.client.http; import com.google.api.client.util.Preconditions; - import java.io.IOException; /** * Basic authentication HTTP request initializer as specified in Basic Authentication Scheme * - *

            - * Implementation is immutable and thread-safe. It can be used as either an HTTP request initializer - * or an HTTP request execute interceptor. {@link #initialize(HttpRequest)} only sets itself as the - * interceptor. Authentication is actually done in {@link #intercept(HttpRequest)}, which is - * implemented using {@link HttpHeaders#setBasicAuthentication(String, String)}. - *

            + *

            Implementation is immutable and thread-safe. It can be used as either an HTTP request + * initializer or an HTTP request execute interceptor. {@link #initialize(HttpRequest)} only sets + * itself as the interceptor. Authentication is actually done in {@link #intercept(HttpRequest)}, + * which is implemented using {@link HttpHeaders#setBasicAuthentication(String, String)}. * * @since 1.7 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java b/google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java index cf4166934..bd934fb5d 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java @@ -16,7 +16,6 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.StringUtils; - import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -24,21 +23,17 @@ * Concrete implementation of {@link AbstractInputStreamContent} that generates repeatable input * streams based on the contents of byte array. * - *

            - * Sample use: - *

            + *

            Sample use: * *

              * 
            -  static void setJsonContent(HttpRequest request, byte[] json) {
            -    request.setContent(new ByteArrayContent("application/json", json));
            -  }
            + * static void setJsonContent(HttpRequest request, byte[] json) {
            + * request.setContent(new ByteArrayContent("application/json", json));
            + * }
              * 
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.4 * @author moshenko@google.com (Jacob Moshenko) @@ -78,8 +73,12 @@ public ByteArrayContent(String type, byte[] array) { public ByteArrayContent(String type, byte[] array, int offset, int length) { super(type); this.byteArray = Preconditions.checkNotNull(array); - Preconditions.checkArgument(offset >= 0 && length >= 0 && offset + length <= array.length, - "offset %s, length %s, array length %s", offset, length, array.length); + Preconditions.checkArgument( + offset >= 0 && length >= 0 && offset + length <= array.length, + "offset %s, length %s, array length %s", + offset, + length, + array.length); this.offset = offset; this.length = length; } @@ -87,15 +86,14 @@ public ByteArrayContent(String type, byte[] array, int offset, int length) { /** * Returns a new instance with the UTF-8 encoding (using {@link StringUtils#getBytesUtf8(String)}) * of the given content string. - *

            - * Sample use: - *

            + * + *

            Sample use: * *

                * 
            -  static void setJsonContent(HttpRequest request, String json) {
            -    request.setContent(ByteArrayContent.fromString("application/json", json));
            -  }
            +   * static void setJsonContent(HttpRequest request, String json) {
            +   * request.setContent(ByteArrayContent.fromString("application/json", json));
            +   * }
                * 
                * 
            * diff --git a/google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java b/google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java index 7dad5881d..492c4cb2a 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java @@ -21,12 +21,10 @@ * Empty HTTP content of length zero just to force {@link HttpRequest#execute()} to add the header * {@code Content-Length: 0}. * - *

            - * Note that there is no {@code Content-Length} header if the HTTP request content is {@code null} . - * However, when making a request like PUT or POST without a {@code Content-Length} header, some - * servers may respond with a {@code 411 Length Required} error. Specifying the - * {@code Content-Length: 0} header may work around that problem. - *

            + *

            Note that there is no {@code Content-Length} header if the HTTP request content is {@code + * null} . However, when making a request like PUT or POST without a {@code Content-Length} header, + * some servers may respond with a {@code 411 Length Required} error. Specifying the {@code + * Content-Length: 0} header may work around that problem. * * @since 1.11 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java index 90e8d0058..2384c8a89 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java +++ b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java @@ -17,41 +17,34 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.ExponentialBackOff; import com.google.api.client.util.NanoClock; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Implementation of {@link BackOffPolicy} that increases the back off period for each retry attempt * using a randomization function that grows exponentially. * - *

            - * {@link #getNextBackOffMillis()} is calculated using the following formula: + *

            {@link #getNextBackOffMillis()} is calculated using the following formula: * *

              * randomized_interval =
              *     retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
              * 
            + * * In other words {@link #getNextBackOffMillis()} will range between the randomization factor * percentage below and above the retry interval. For example, using 2 seconds as the base retry * interval and 0.5 as the randomization factor, the actual back off period used in the next retry * attempt will be between 1 and 3 seconds. - *

            * - *

            - * Note: max_interval caps the retry_interval and not the randomized_interval. - *

            + *

            Note: max_interval caps the retry_interval and not the randomized_interval. * - *

            - * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the - * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past + * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning {@link + * BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. * - *

            - * Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default - * multiplier is 1.5 and the default max_interval is 1 minute. For 10 requests the sequence will be - * (values in seconds) and assuming we go over the max_elapsed_time on the 10th request: + *

            Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, + * default multiplier is 1.5 and the default max_interval is 1 minute. For 10 requests the sequence + * will be (values in seconds) and assuming we go over the max_elapsed_time on the 10th request: * *

              * request#     retry_interval     randomized_interval
            @@ -67,24 +60,19 @@
              * 9            12.807              [6.403, 19.210]
              * 10           19.210              {@link BackOffPolicy#STOP}
              * 
            - *

            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.7 * @author Ravi Mistry * @deprecated (scheduled to be removed in 1.18). Use {@link HttpBackOffUnsuccessfulResponseHandler} - * with {@link ExponentialBackOff} instead. + * with {@link ExponentialBackOff} instead. */ @Beta @Deprecated public class ExponentialBackOffPolicy implements BackOffPolicy { - /** - * The default initial interval value in milliseconds (0.5 seconds). - */ + /** The default initial interval value in milliseconds (0.5 seconds). */ public static final int DEFAULT_INITIAL_INTERVAL_MILLIS = ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS; @@ -95,20 +83,14 @@ public class ExponentialBackOffPolicy implements BackOffPolicy { public static final double DEFAULT_RANDOMIZATION_FACTOR = ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR; - /** - * The default multiplier value (1.5 which is 50% increase per back off). - */ + /** The default multiplier value (1.5 which is 50% increase per back off). */ public static final double DEFAULT_MULTIPLIER = ExponentialBackOff.DEFAULT_MULTIPLIER; - /** - * The default maximum back off time in milliseconds (1 minute). - */ + /** The default maximum back off time in milliseconds (1 minute). */ public static final int DEFAULT_MAX_INTERVAL_MILLIS = ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS; - /** - * The default maximum elapsed time in milliseconds (15 minutes). - */ + /** The default maximum elapsed time in milliseconds (15 minutes). */ public static final int DEFAULT_MAX_ELAPSED_TIME_MILLIS = ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS; @@ -118,12 +100,13 @@ public class ExponentialBackOffPolicy implements BackOffPolicy { /** * Creates an instance of ExponentialBackOffPolicy using default values. To override the defaults * use {@link #builder}. + * *

              - *
            • {@code initialIntervalMillis} is defaulted to {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}
            • - *
            • {@code randomizationFactor} is defaulted to {@link #DEFAULT_RANDOMIZATION_FACTOR}
            • - *
            • {@code multiplier} is defaulted to {@link #DEFAULT_MULTIPLIER}
            • - *
            • {@code maxIntervalMillis} is defaulted to {@link #DEFAULT_MAX_INTERVAL_MILLIS}
            • - *
            • {@code maxElapsedTimeMillis} is defaulted in {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}
            • + *
            • {@code initialIntervalMillis} is defaulted to {@link #DEFAULT_INITIAL_INTERVAL_MILLIS} + *
            • {@code randomizationFactor} is defaulted to {@link #DEFAULT_RANDOMIZATION_FACTOR} + *
            • {@code multiplier} is defaulted to {@link #DEFAULT_MULTIPLIER} + *
            • {@code maxIntervalMillis} is defaulted to {@link #DEFAULT_MAX_INTERVAL_MILLIS} + *
            • {@code maxElapsedTimeMillis} is defaulted in {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS} *
            */ public ExponentialBackOffPolicy() { @@ -132,7 +115,6 @@ public ExponentialBackOffPolicy() { /** * @param builder builder - * * @since 1.14 */ protected ExponentialBackOffPolicy(Builder builder) { @@ -142,15 +124,11 @@ protected ExponentialBackOffPolicy(Builder builder) { /** * Determines if back off is required based on the specified status code. * - *

            - * The idea is that the servers are only temporarily unavailable, and they should not be + *

            The idea is that the servers are only temporarily unavailable, and they should not be * overwhelmed when they are trying to get back up. - *

            * - *

            - * The default implementation requires back off for 500 and 503 status codes. Subclasses may + *

            The default implementation requires back off for 500 and 503 status codes. Subclasses may * override if different status codes are required. - *

            */ public boolean isBackOffRequired(int statusCode) { switch (statusCode) { @@ -162,9 +140,7 @@ public boolean isBackOffRequired(int statusCode) { } } - /** - * Sets the interval back to the initial retry interval and restarts the timer. - */ + /** Sets the interval back to the initial retry interval and restarts the timer. */ public final void reset() { exponentialBackOff.reset(); } @@ -173,25 +149,19 @@ public final void reset() { * Gets the number of milliseconds to wait before retrying an HTTP request. If {@link #STOP} is * returned, no retries should be made. * - *

            - * This method calculates the next back off interval using the formula: randomized_interval = + *

            This method calculates the next back off interval using the formula: randomized_interval = * retry_interval +/- (randomization_factor * retry_interval) - *

            * - *

            - * Subclasses may override if a different algorithm is required. - *

            + *

            Subclasses may override if a different algorithm is required. * * @return the number of milliseconds to wait when backing off requests, or {@link #STOP} if no - * more retries should be made + * more retries should be made */ public long getNextBackOffMillis() throws IOException { return exponentialBackOff.nextBackOffMillis(); } - /** - * Returns the initial retry interval in milliseconds. - */ + /** Returns the initial retry interval in milliseconds. */ public final int getInitialIntervalMillis() { return exponentialBackOff.getInitialIntervalMillis(); } @@ -199,25 +169,19 @@ public final int getInitialIntervalMillis() { /** * Returns the randomization factor to use for creating a range around the retry interval. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            */ public final double getRandomizationFactor() { return exponentialBackOff.getRandomizationFactor(); } - /** - * Returns the current retry interval in milliseconds. - */ + /** Returns the current retry interval in milliseconds. */ public final int getCurrentIntervalMillis() { return exponentialBackOff.getCurrentIntervalMillis(); } - /** - * Returns the value to multiply the current interval with for each retry attempt. - */ + /** Returns the value to multiply the current interval with for each retry attempt. */ public final double getMultiplier() { return exponentialBackOff.getMultiplier(); } @@ -233,11 +197,9 @@ public final int getMaxIntervalMillis() { /** * Returns the maximum elapsed time in milliseconds. * - *

            - * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past the - * max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning - * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past + * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning {@link + * BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. */ public final int getMaxElapsedTimeMillis() { return exponentialBackOff.getMaxElapsedTimeMillis(); @@ -247,28 +209,22 @@ public final int getMaxElapsedTimeMillis() { * Returns the elapsed time in milliseconds since an {@link ExponentialBackOffPolicy} instance is * created and is reset when {@link #reset()} is called. * - *

            - * The elapsed time is computed using {@link System#nanoTime()}. - *

            + *

            The elapsed time is computed using {@link System#nanoTime()}. */ public final long getElapsedTimeMillis() { return exponentialBackOff.getElapsedTimeMillis(); } - /** - * Returns an instance of a new builder. - */ + /** Returns an instance of a new builder. */ public static Builder builder() { return new Builder(); } /** - * {@link Beta}
            + * {@link Beta}
            * Builder for {@link ExponentialBackOffPolicy}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.7 */ @@ -279,8 +235,7 @@ public static class Builder { /** Exponential back-off builder. */ final ExponentialBackOff.Builder exponentialBackOffBuilder = new ExponentialBackOff.Builder(); - protected Builder() { - } + protected Builder() {} /** Builds a new instance of {@link ExponentialBackOffPolicy}. */ public ExponentialBackOffPolicy build() { @@ -288,21 +243,19 @@ public ExponentialBackOffPolicy build() { } /** - * Returns the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. + * Returns the initial retry interval in milliseconds. The default value is {@link + * #DEFAULT_INITIAL_INTERVAL_MILLIS}. */ public final int getInitialIntervalMillis() { return exponentialBackOffBuilder.getInitialIntervalMillis(); } /** - * Sets the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. + * Sets the initial retry interval in milliseconds. The default value is {@link + * #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setInitialIntervalMillis(int initialIntervalMillis) { exponentialBackOffBuilder.setInitialIntervalMillis(initialIntervalMillis); @@ -313,15 +266,11 @@ public Builder setInitialIntervalMillis(int initialIntervalMillis) { * Returns the randomization factor to use for creating a range around the retry interval. The * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public final double getRandomizationFactor() { return exponentialBackOffBuilder.getRandomizationFactor(); @@ -329,18 +278,14 @@ public final double getRandomizationFactor() { /** * Sets the randomization factor to use for creating a range around the retry interval. The - * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range - * {@code 0 <= randomizationFactor < 1}. + * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range {@code 0 <= + * randomizationFactor < 1}. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setRandomizationFactor(double randomizationFactor) { exponentialBackOffBuilder.setRandomizationFactor(randomizationFactor); @@ -359,10 +304,8 @@ public final double getMultiplier() { * Sets the value to multiply the current interval with for each retry attempt. The default * value is {@link #DEFAULT_MULTIPLIER}. Must be {@code >= 1}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMultiplier(double multiplier) { exponentialBackOffBuilder.setMultiplier(multiplier); @@ -371,8 +314,8 @@ public Builder setMultiplier(double multiplier) { /** * Returns the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. + * reaches this value it stops increasing. The default value is {@link + * #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. */ public final int getMaxIntervalMillis() { return exponentialBackOffBuilder.getMaxIntervalMillis(); @@ -380,13 +323,11 @@ public final int getMaxIntervalMillis() { /** * Sets the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. + * reaches this value it stops increasing. The default value is {@link + * #DEFAULT_MAX_INTERVAL_MILLIS}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMaxIntervalMillis(int maxIntervalMillis) { exponentialBackOffBuilder.setMaxIntervalMillis(maxIntervalMillis); @@ -394,33 +335,27 @@ public Builder setMaxIntervalMillis(int maxIntervalMillis) { } /** - * Returns the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. + * Returns the maximum elapsed time in milliseconds. The default value is {@link + * #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. * - *

            - * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past - * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + *

            If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes + * past the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            */ public final int getMaxElapsedTimeMillis() { return exponentialBackOffBuilder.getMaxElapsedTimeMillis(); } /** - * Sets the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. + * Sets the maximum elapsed time in milliseconds. The default value is {@link + * #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. * - *

            - * If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes past - * the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning + *

            If the time elapsed since an {@link ExponentialBackOffPolicy} instance is created goes + * past the max_elapsed_time then the method {@link #getNextBackOffMillis()} starts returning * {@link BackOffPolicy#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMaxElapsedTimeMillis(int maxElapsedTimeMillis) { exponentialBackOffBuilder.setMaxElapsedTimeMillis(maxElapsedTimeMillis); @@ -439,10 +374,8 @@ public final NanoClock getNanoClock() { /** * Sets the nano clock ({@link NanoClock#SYSTEM} by default). * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.14 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/FileContent.java b/google-http-client/src/main/java/com/google/api/client/http/FileContent.java index 9f1f22075..5d951c520 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/FileContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/FileContent.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.Preconditions; - import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -25,21 +24,17 @@ * Concrete implementation of {@link AbstractInputStreamContent} that generates repeatable input * streams based on the contents of a file. * - *

            - * Sample use: - *

            + *

            Sample use: * *

              * 
            -  private static void setRequestJpegContent(HttpRequest request, File jpegFile) {
            -    request.setContent(new FileContent("image/jpeg", jpegFile));
            -  }
            + * private static void setRequestJpegContent(HttpRequest request, File jpegFile) {
            + * request.setContent(new FileContent("image/jpeg", jpegFile));
            + * }
              * 
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.4 * @author moshenko@google.com (Jacob Moshenko) diff --git a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java index 07e17b3db..28574a80d 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.StreamingContent; - import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -35,16 +34,18 @@ public String getName() { public void encode(StreamingContent content, OutputStream out) throws IOException { // must not close the underlying output stream - OutputStream out2 = new BufferedOutputStream(out) { - @Override - public void close() throws IOException { - // copy implementation of super.close(), except do not close the underlying output stream - try { - flush(); - } catch (IOException ignored) { - } - } - }; + OutputStream out2 = + new BufferedOutputStream(out) { + @Override + public void close() throws IOException { + // copy implementation of super.close(), except do not close the underlying output + // stream + try { + flush(); + } catch (IOException ignored) { + } + } + }; GZIPOutputStream zipper = new GZIPOutputStream(out2); content.writeTo(zipper); // cannot call just zipper.finish() because that would cause a severe memory leak diff --git a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java index 9f70ac120..e18810c89 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java @@ -20,7 +20,6 @@ import com.google.api.client.util.escape.CharEscapers; import com.google.api.client.util.escape.Escaper; import com.google.api.client.util.escape.PercentEscaper; - import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; @@ -39,20 +38,14 @@ * the specification RFC 3986: Uniform Resource * Identifier (URI). * - *

            - * The query parameters are specified with the data key name as the parameter name, and the data + *

            The query parameters are specified with the data key name as the parameter name, and the data * value as the parameter value. Subclasses can declare fields for known query parameters using the * {@link Key} annotation. {@code null} parameter names are not allowed, but {@code null} query * values are allowed. - *

            * - *

            - * Query parameter values are parsed using {@link UrlEncodedParser#parse(String, Object)}. - *

            + *

            Query parameter values are parsed using {@link UrlEncodedParser#parse(String, Object)}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -77,36 +70,30 @@ public class GenericUrl extends GenericData { /** * Decoded path component by parts with each part separated by a {@code '/'} or {@code null} for * none, for example {@code "/m8/feeds/contacts/default/full"} is represented by {@code "", "m8", - *"feeds", "contacts", "default", "full"}. - *

            - * Use {@link #appendRawPath(String)} to append to the path, which ensures that no extra slash is - * added. - *

            + * "feeds", "contacts", "default", "full"}. + * + *

            Use {@link #appendRawPath(String)} to append to the path, which ensures that no extra slash + * is added. */ private List pathParts; /** Fragment component or {@code null} for none. */ private String fragment; - public GenericUrl() { - } + public GenericUrl() {} /** * Constructs from an encoded URL. * - *

            - * Any known query parameters with pre-defined fields as data keys will be parsed based on their - * data type. Any unrecognized query parameter will always be parsed as a string. - *

            + *

            Any known query parameters with pre-defined fields as data keys will be parsed based on + * their data type. Any unrecognized query parameter will always be parsed as a string. * - *

            - * Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * - *

            Upgrade warning: starting in version 1.18 this parses the encodedUrl using - * new URL(encodedUrl). In previous versions it used new URI(encodedUrl). - * In particular, this means that only a limited set of schemes are allowed such as "http" and - * "https", but that parsing is compliant with, at least, RFC 3986.

            + *

            Upgrade warning: starting in version 1.18 this parses the encodedUrl using new + * URL(encodedUrl). In previous versions it used new URI(encodedUrl). In particular, this means + * that only a limited set of schemes are allowed such as "http" and "https", but that parsing is + * compliant with, at least, RFC 3986. * * @param encodedUrl encoded URL, including any existing query parameters that should be parsed * @throws IllegalArgumentException if URL has a syntax error @@ -119,11 +106,11 @@ public GenericUrl(String encodedUrl) { * Constructs from a URI. * * @param uri URI - * * @since 1.14 */ public GenericUrl(URI uri) { - this(uri.getScheme(), + this( + uri.getScheme(), uri.getHost(), uri.getPort(), uri.getRawPath(), @@ -136,11 +123,11 @@ public GenericUrl(URI uri) { * Constructs from a URL. * * @param url URL - * * @since 1.14 */ public GenericUrl(URL url) { - this(url.getProtocol(), + this( + url.getProtocol(), url.getHost(), url.getPort(), url.getPath(), @@ -149,7 +136,8 @@ public GenericUrl(URL url) { url.getUserInfo()); } - private GenericUrl(String scheme, + private GenericUrl( + String scheme, String host, int port, String path, @@ -279,8 +267,8 @@ public final void setPort(int port) { } /** - * Returns the decoded path component by parts with each part separated by a {@code '/'} or - * {@code null} for none. + * Returns the decoded path component by parts with each part separated by a {@code '/'} or {@code + * null} for none. * * @since 1.5 */ @@ -289,18 +277,14 @@ public List getPathParts() { } /** - * Sets the decoded path component by parts with each part separated by a {@code '/'} or - * {@code null} for none. + * Sets the decoded path component by parts with each part separated by a {@code '/'} or {@code + * null} for none. * - *

            - * For example {@code "/m8/feeds/contacts/default/full"} is represented by {@code "", "m8", - *"feeds", "contacts", "default", "full"}. - *

            + *

            For example {@code "/m8/feeds/contacts/default/full"} is represented by {@code "", "m8", + * "feeds", "contacts", "default", "full"}. * - *

            - * Use {@link #appendRawPath(String)} to append to the path, which ensures that no extra slash is - * added. - *

            + *

            Use {@link #appendRawPath(String)} to append to the path, which ensures that no extra slash + * is added. * * @since 1.5 */ @@ -327,8 +311,8 @@ public final void setFragment(String fragment) { } /** - * Constructs the string representation of the URL, including the path specified by - * {@link #pathParts} and the query parameters specified by this generic URL. + * Constructs the string representation of the URL, including the path specified by {@link + * #pathParts} and the query parameters specified by this generic URL. */ public final String build() { return buildAuthority() + buildRelativeUrl(); @@ -337,10 +321,8 @@ public final String build() { /** * Constructs the portion of the URL containing the scheme, host and port. * - *

            - * For the URL {@code "http://example.com/something?action=add"} this method would return + *

            For the URL {@code "http://example.com/something?action=add"} this method would return * {@code "http://example.com"}. - *

            * * @return scheme://[user-info@]host[:port] * @since 1.9 @@ -364,10 +346,8 @@ public final String buildAuthority() { /** * Constructs the portion of the URL beginning at the rooted path. * - *

            - * For the URL {@code "http://example.com/something?action=add"} this method would return + *

            For the URL {@code "http://example.com/something?action=add"} this method would return * {@code "/something?action=add"}. - *

            * * @return path with with leading '/' if the path is non-empty, query parameters and fragment * @since 1.9 @@ -390,12 +370,9 @@ public final String buildRelativeUrl() { /** * Constructs the URI based on the string representation of the URL from {@link #build()}. * - *

            - * Any {@link URISyntaxException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link URISyntaxException} is wrapped in an {@link IllegalArgumentException}. * * @return new URI instance - * * @since 1.14 */ public final URI toURI() { @@ -405,12 +382,9 @@ public final URI toURI() { /** * Constructs the URL based on the string representation of the URL from {@link #build()}. * - *

            - * Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * * @return new URL instance - * * @since 1.14 */ public final URL toURL() { @@ -421,12 +395,9 @@ public final URL toURL() { * Constructs the URL based on {@link URL#URL(URL, String)} with this URL representation from * {@link #toURL()} and a relative url. * - *

            - * Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * * @return new URL instance - * * @since 1.14 */ public final URL toURL(String relativeUrl) { @@ -477,8 +448,8 @@ public Collection getAll(String name) { /** * Returns the raw encoded path computed from the {@link #pathParts}. * - * @return raw encoded path computed from the {@link #pathParts} or {@code null} if - * {@link #pathParts} is {@code null} + * @return raw encoded path computed from the {@link #pathParts} or {@code null} if {@link + * #pathParts} is {@code null} */ public String getRawPath() { List pathParts = this.pathParts; @@ -502,11 +473,10 @@ public void setRawPath(String encodedPath) { /** * Appends the given raw encoded path to the current {@link #pathParts}, setting field only if it * is {@code null} or empty. - *

            - * The last part of the {@link #pathParts} is merged with the first part of the path parts + * + *

            The last part of the {@link #pathParts} is merged with the first part of the path parts * computed from the given encoded path. Thus, if the current raw encoded path is {@code "a"}, and * the given encoded path is {@code "b"}, then the resulting raw encoded path is {@code "ab"}. - *

            * * @param encodedPath raw encoded path or {@code null} to ignore */ @@ -526,11 +496,11 @@ public void appendRawPath(String encodedPath) { /** * Returns the decoded path parts for the given encoded path. * - * @param encodedPath slash-prefixed encoded path, for example - * {@code "/m8/feeds/contacts/default/full"} + * @param encodedPath slash-prefixed encoded path, for example {@code + * "/m8/feeds/contacts/default/full"} * @return decoded path parts, with each part assumed to be preceded by a {@code '/'}, for example - * {@code "", "m8", "feeds", "contacts", "default", "full"}, or {@code null} for - * {@code null} or {@code ""} input + * {@code "", "m8", "feeds", "contacts", "default", "full"}, or {@code null} for {@code null} + * or {@code ""} input */ public static List toPathParts(String encodedPath) { if (encodedPath == null || encodedPath.length() == 0) { @@ -567,9 +537,7 @@ private void appendRawPathFromParts(StringBuilder buf) { } } - /** - * Adds query parameters from the provided entrySet into the buffer. - */ + /** Adds query parameters from the provided entrySet into the buffer. */ static void addQueryParams(Set> entrySet, StringBuilder buf) { // (similar to UrlEncodedContent) boolean first = true; @@ -607,9 +575,7 @@ private static boolean appendParam(boolean first, StringBuilder buf, String name /** * Returns the URI for the given encoded URL. * - *

            - * Any {@link URISyntaxException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link URISyntaxException} is wrapped in an {@link IllegalArgumentException}. * * @param encodedUrl encoded URL * @return URI @@ -625,9 +591,7 @@ private static URI toURI(String encodedUrl) { /** * Returns the URI for the given encoded URL. * - *

            - * Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. - *

            + *

            Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * * @param encodedUrl encoded URL * @return URL diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java index 35fca7346..253cc613e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java @@ -19,35 +19,26 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; import com.google.api.client.util.Sleeper; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * {@link HttpIOExceptionHandler} implementation with {@link BackOff}. * - *

            - * It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST create a - * new instance of {@link HttpBackOffIOExceptionHandler} with a new instance of {@link BackOff} for - * each instance of {@link HttpRequest}. - *

            + *

            It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST + * create a new instance of {@link HttpBackOffIOExceptionHandler} with a new instance of {@link + * BackOff} for each instance of {@link HttpRequest}. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  request.setIOExceptionHandler(new HttpBackOffIOExceptionHandler(new ExponentialBackOff());
            + * request.setIOExceptionHandler(new HttpBackOffIOExceptionHandler(new ExponentialBackOff());
              * 
            * - *

            - * Note: Implementation doesn't call {@link BackOff#reset} at all, since it expects a new - * {@link BackOff} instance. - *

            + *

            Note: Implementation doesn't call {@link BackOff#reset} at all, since it expects a new {@link + * BackOff} instance. * - *

            - * Implementation is not thread-safe - *

            + *

            Implementation is not thread-safe * * @author Eyal Peled * @since 1.15 @@ -83,14 +74,10 @@ public final Sleeper getSleeper() { /** * Sets the sleeper. * - *

            - * The default value is {@link Sleeper#DEFAULT}. - *

            + *

            The default value is {@link Sleeper#DEFAULT}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public HttpBackOffIOExceptionHandler setSleeper(Sleeper sleeper) { this.sleeper = Preconditions.checkNotNull(sleeper); @@ -100,10 +87,8 @@ public HttpBackOffIOExceptionHandler setSleeper(Sleeper sleeper) { /** * {@inheritDoc} * - *

            - * Handles the request with {@link BackOff}. That means that if back-off is required a call to + *

            Handles the request with {@link BackOff}. That means that if back-off is required a call to * {@link Sleeper#sleep(long)} will be made. - *

            */ public boolean handleIOException(HttpRequest request, boolean supportsRetry) throws IOException { if (!supportsRetry) { diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java index b9875273f..5e1ae2cc6 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java @@ -22,32 +22,24 @@ import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Back-off handler which handles an abnormal HTTP response with {@link BackOff}. * - *

            - * It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST create a - * new instance of {@link HttpBackOffUnsuccessfulResponseHandler} with a new instance of + *

            It is designed to work with only one {@link HttpRequest} at a time. As a result you MUST + * create a new instance of {@link HttpBackOffUnsuccessfulResponseHandler} with a new instance of * {@link BackOff} for each instance of {@link HttpRequest}. - *

            * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  request.setUnsuccessfulResponseHandler(
            -    new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()));
            + * request.setUnsuccessfulResponseHandler(
            + * new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff()));
              * 
            * - *

            - * Note: Implementation doesn't call {@link BackOff#reset} at all, since it expects a new - * {@link BackOff} instance. - *

            + *

            Note: Implementation doesn't call {@link BackOff#reset} at all, since it expects a new {@link + * BackOff} instance. * - *

            - * Implementation is not thread-safe - *

            + *

            Implementation is not thread-safe * * @author Eyal Peled * @since 1.15 @@ -90,14 +82,10 @@ public final BackOffRequired getBackOffRequired() { * Sets the {@link BackOffRequired} instance which determines if back-off is required based on an * abnormal HTTP response. * - *

            - * The default value is {@link BackOffRequired#ON_SERVER_ERROR}. - *

            + *

            The default value is {@link BackOffRequired#ON_SERVER_ERROR}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public HttpBackOffUnsuccessfulResponseHandler setBackOffRequired( BackOffRequired backOffRequired) { @@ -113,14 +101,10 @@ public final Sleeper getSleeper() { /** * Sets the sleeper. * - *

            - * The default value is {@link Sleeper#DEFAULT}. - *

            + *

            The default value is {@link Sleeper#DEFAULT}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public HttpBackOffUnsuccessfulResponseHandler setSleeper(Sleeper sleeper) { this.sleeper = Preconditions.checkNotNull(sleeper); @@ -151,7 +135,7 @@ public boolean handleResponse(HttpRequest request, HttpResponse response, boolea } /** - * {@link Beta}
            + * {@link Beta}
            * Interface which defines if back-off is required based on an abnormal {@link HttpResponse}. * * @author Eyal Peled @@ -163,23 +147,25 @@ public interface BackOffRequired { boolean isRequired(HttpResponse response); /** - * Back-off required implementation which returns {@code true} to every - * {@link #isRequired(HttpResponse)} call. + * Back-off required implementation which returns {@code true} to every {@link + * #isRequired(HttpResponse)} call. */ - BackOffRequired ALWAYS = new BackOffRequired() { - public boolean isRequired(HttpResponse response) { - return true; - } - }; + BackOffRequired ALWAYS = + new BackOffRequired() { + public boolean isRequired(HttpResponse response) { + return true; + } + }; /** - * Back-off required implementation which its {@link #isRequired(HttpResponse)} returns - * {@code true} if a server error occurred (5xx). + * Back-off required implementation which its {@link #isRequired(HttpResponse)} returns {@code + * true} if a server error occurred (5xx). */ - BackOffRequired ON_SERVER_ERROR = new BackOffRequired() { - public boolean isRequired(HttpResponse response) { - return response.getStatusCode() / 100 == 5; - } - }; + BackOffRequired ON_SERVER_ERROR = + new BackOffRequired() { + public boolean isRequired(HttpResponse response) { + return response.getStatusCode() / 100 == 5; + } + }; } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpContent.java b/google-http-client/src/main/java/com/google/api/client/http/HttpContent.java index e3ef37c2c..ca9c362b5 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpContent.java @@ -15,16 +15,13 @@ package com.google.api.client.http; import com.google.api.client.util.StreamingContent; - import java.io.IOException; import java.io.OutputStream; /** * Serializes HTTP request content into an output stream. * - *

            - * Implementations don't need to be thread-safe. - *

            + *

            Implementations don't need to be thread-safe. * * @since 1.0 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java index 154132d28..38702b82e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java @@ -15,16 +15,13 @@ package com.google.api.client.http; import com.google.api.client.util.StreamingContent; - import java.io.IOException; import java.io.OutputStream; /** * HTTP content encoding. * - *

            - * Implementations don't need to be thread-safe. - *

            + *

            Implementations don't need to be thread-safe. * * @since 1.14 * @author Yaniv Inbar @@ -37,11 +34,9 @@ public interface HttpEncoding { /** * Encodes the streaming content into the output stream. * - *

            - * Implementations must not close the output stream, and instead should flush the output stream. - * Some callers may assume that the the output stream has not been closed, and will fail to work - * if it has been closed. - *

            + *

            Implementations must not close the output stream, and instead should flush the output + * stream. Some callers may assume that the the output stream has not been closed, and will fail + * to work if it has been closed. * * @param content streaming content * @param out output stream diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java b/google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java index 6da9a6848..b8a83dfb4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java @@ -16,16 +16,13 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.StreamingContent; - import java.io.IOException; import java.io.OutputStream; /** * Streaming content based on an HTTP encoding. * - *

            - * Implementation is thread-safe only if the streaming content and HTTP encoding are thread-safe. - *

            + *

            Implementation is thread-safe only if the streaming content and HTTP encoding are thread-safe. * * @since 1.14 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java b/google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java index 514961784..21fc247a9 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java @@ -20,55 +20,47 @@ * HTTP request execute interceptor to intercept the start of {@link HttpRequest#execute()} before * executing the HTTP request. * - *

            - * For example, this might be used to sign a request for OAuth: - *

            + *

            For example, this might be used to sign a request for OAuth: * *

            -  public class OAuthSigner implements HttpExecuteInterceptor {
            -    public void intercept(HttpRequest request) throws IOException {
            -      // sign request...
            -    }
            -  }
            + * public class OAuthSigner implements HttpExecuteInterceptor {
            + * public void intercept(HttpRequest request) throws IOException {
            + * // sign request...
            + * }
            + * }
              * 
            * - *

            - * Sample usage with a request factory: - *

            + *

            Sample usage with a request factory: * *

            -  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            -    final OAuthSigner signer = new OAuthSigner(...);
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) {
            -        request.setInterceptor(signer);
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            + * final OAuthSigner signer = new OAuthSigner(...);
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) {
            + * request.setInterceptor(signer);
            + * }
            + * });
            + * }
              * 
            * - *

            - * More complex usage example: - *

            + *

            More complex usage example: * *

            -  public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            -    final OAuthSigner signer = new OAuthSigner(...);
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) {
            -        request.setInterceptor(new HttpExecuteInterceptor() {
            -          public void intercept(HttpRequest request) throws IOException {
            -            signer.intercept(request);
            -          }
            -        });
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            + * final OAuthSigner signer = new OAuthSigner(...);
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) {
            + * request.setInterceptor(new HttpExecuteInterceptor() {
            + * public void intercept(HttpRequest request) throws IOException {
            + * signer.intercept(request);
            + * }
            + * });
            + * }
            + * });
            + * }
              * 
            * - *

            - * Implementations should normally be thread-safe. - *

            + *

            Implementations should normally be thread-safe. * * @since 1.0 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java index cd60cd3e1..caa88c99e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java @@ -25,7 +25,6 @@ import com.google.api.client.util.StringUtils; import com.google.api.client.util.Throwables; import com.google.api.client.util.Types; - import java.io.IOException; import java.io.Writer; import java.lang.reflect.Type; @@ -45,13 +44,9 @@ * Stores HTTP headers used in an HTTP request or response, as defined in Header Field Definitions. * - *

            - * {@code null} is not allowed as a name or value of a header. Names are case-insensitive. - *

            + *

            {@code null} is not allowed as a name or value of a header. Names are case-insensitive. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -192,10 +187,8 @@ public final String getAccept() { /** * Sets the {@code "Accept"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -216,9 +209,7 @@ public final String getAcceptEncoding() { /** * Sets the {@code "Accept-Encoding"} header or {@code null} for none. * - *

            - * By default, this is {@code "gzip"}. - *

            + *

            By default, this is {@code "gzip"}. * * @since 1.5 */ @@ -248,10 +239,8 @@ public final List getAuthorizationAsList() { /** * Sets the {@code "Authorization"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -262,10 +251,8 @@ public HttpHeaders setAuthorization(String authorization) { /** * Sets the {@code "Authorization"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.13 */ @@ -286,10 +273,8 @@ public final String getCacheControl() { /** * Sets the {@code "Cache-Control"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -310,10 +295,8 @@ public final String getContentEncoding() { /** * Sets the {@code "Content-Encoding"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -334,10 +317,8 @@ public final Long getContentLength() { /** * Sets the {@code "Content-Length"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -358,10 +339,8 @@ public final String getContentMD5() { /** * Sets the {@code "Content-MD5"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -382,10 +361,8 @@ public final String getContentRange() { /** * Sets the {@code "Content-Range"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -406,10 +383,8 @@ public final String getContentType() { /** * Sets the {@code "Content-Type"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -421,9 +396,7 @@ public HttpHeaders setContentType(String contentType) { /** * Returns the first {@code "Cookie"} header or {@code null} for none. * - *

            - * See Cookie Specification. - *

            + *

            See Cookie Specification. * * @since 1.6 */ @@ -434,10 +407,8 @@ public final String getCookie() { /** * Sets the {@code "Cookie"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.6 */ @@ -458,10 +429,8 @@ public final String getDate() { /** * Sets the {@code "Date"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -482,10 +451,8 @@ public final String getETag() { /** * Sets the {@code "ETag"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -506,10 +473,8 @@ public final String getExpires() { /** * Sets the {@code "Expires"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -530,10 +495,8 @@ public final String getIfModifiedSince() { /** * Sets the {@code "If-Modified-Since"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -554,10 +517,8 @@ public final String getIfMatch() { /** * Sets the {@code "If-Match"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -578,10 +539,8 @@ public final String getIfNoneMatch() { /** * Sets the {@code "If-None-Match"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -602,10 +561,8 @@ public final String getIfUnmodifiedSince() { /** * Sets the {@code "If-Unmodified-Since"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -626,10 +583,8 @@ public final String getIfRange() { /** * Sets the {@code "If-Range"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.14 */ @@ -650,10 +605,8 @@ public final String getLastModified() { /** * Sets the {@code "Last-Modified"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -674,10 +627,8 @@ public final String getLocation() { /** * Sets the {@code "Location"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -698,10 +649,8 @@ public final String getMimeVersion() { /** * Sets the {@code "MIME-Version"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -722,10 +671,8 @@ public final String getRange() { /** * Sets the {@code "Range"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -746,10 +693,8 @@ public final String getRetryAfter() { /** * Sets the {@code "Retry-After"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -770,10 +715,8 @@ public final String getUserAgent() { /** * Sets the {@code "User-Agent"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -803,10 +746,8 @@ public final List getAuthenticateAsList() { /** * Sets the {@code "WWW-Authenticate"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -856,10 +797,8 @@ public final Long getAge() { /** * Sets the {@code "Age"} header or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.14 */ @@ -872,10 +811,8 @@ public HttpHeaders setAge(Long age) { * Sets the {@link #authorization} header as specified in Basic Authentication Scheme. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.2 */ @@ -886,13 +823,15 @@ public HttpHeaders setBasicAuthentication(String username, String password) { return setAuthorization("Basic " + encoded); } - private static void addHeader(Logger logger, + private static void addHeader( + Logger logger, StringBuilder logbuf, StringBuilder curlbuf, LowLevelHttpRequest lowLevelHttpRequest, String name, Object value, - Writer writer) throws IOException { + Writer writer) + throws IOException { // ignore nulls if (value == null || Data.isNull(value)) { return; @@ -926,12 +865,11 @@ private static void addHeader(Logger logger, } } - /** - * Returns the string header value for the given header value as an object. - */ + /** Returns the string header value for the given header value as an object. */ private static String toStringValue(Object headerValue) { return headerValue instanceof Enum - ? FieldInfo.of((Enum) headerValue).getName() : headerValue.toString(); + ? FieldInfo.of((Enum) headerValue).getName() + : headerValue.toString(); } /** @@ -941,12 +879,17 @@ private static String toStringValue(Object headerValue) { * @param logbuf log buffer or {@code null} for none * @param curlbuf log buffer for logging curl requests or {@code null} for none * @param logger logger or {@code null} for none. Logger must be specified if log buffer is - * specified + * specified * @param lowLevelHttpRequest low level HTTP request where HTTP headers will be serialized to or - * {@code null} for none + * {@code null} for none */ - static void serializeHeaders(HttpHeaders headers, StringBuilder logbuf, StringBuilder curlbuf, - Logger logger, LowLevelHttpRequest lowLevelHttpRequest) throws IOException { + static void serializeHeaders( + HttpHeaders headers, + StringBuilder logbuf, + StringBuilder curlbuf, + Logger logger, + LowLevelHttpRequest lowLevelHttpRequest) + throws IOException { serializeHeaders(headers, logbuf, curlbuf, logger, lowLevelHttpRequest, null); } @@ -956,9 +899,8 @@ static void serializeHeaders(HttpHeaders headers, StringBuilder logbuf, StringBu * @param headers HTTP headers * @param logbuf log buffer or {@code null} for none * @param logger logger or {@code null} for none. Logger must be specified if log buffer is - * specified + * specified * @param writer Writer where HTTP headers will be serialized to or {@code null} for none - * * @since 1.9 */ public static void serializeHeadersForMultipartRequests( @@ -966,17 +908,21 @@ public static void serializeHeadersForMultipartRequests( serializeHeaders(headers, logbuf, null, logger, null, writer); } - static void serializeHeaders(HttpHeaders headers, + static void serializeHeaders( + HttpHeaders headers, StringBuilder logbuf, StringBuilder curlbuf, Logger logger, LowLevelHttpRequest lowLevelHttpRequest, - Writer writer) throws IOException { + Writer writer) + throws IOException { HashSet headerNames = new HashSet(); for (Map.Entry headerEntry : headers.entrySet()) { String name = headerEntry.getKey(); - Preconditions.checkArgument(headerNames.add(name), - "multiple headers of the same name (headers are case insensitive): %s", name); + Preconditions.checkArgument( + headerNames.add(name), + "multiple headers of the same name (headers are case insensitive): %s", + name); Object value = headerEntry.getValue(); if (value != null) { // compute the display name from the declared field name to fix capitalization @@ -988,13 +934,8 @@ static void serializeHeaders(HttpHeaders headers, Class valueClass = value.getClass(); if (value instanceof Iterable || valueClass.isArray()) { for (Object repeatedValue : Types.iterableOf(value)) { - addHeader(logger, - logbuf, - curlbuf, - lowLevelHttpRequest, - displayName, - repeatedValue, - writer); + addHeader( + logger, logbuf, curlbuf, lowLevelHttpRequest, displayName, repeatedValue, writer); } } else { addHeader(logger, logbuf, curlbuf, lowLevelHttpRequest, displayName, value, writer); @@ -1011,7 +952,7 @@ static void serializeHeaders(HttpHeaders headers, * * @param response Response from which the headers are copied * @param logger {@link StringBuilder} to which logging output is added or {@code null} to disable - * logging + * logging * @since 1.10 */ public final void fromHttpResponse(LowLevelHttpResponse response, StringBuilder logger) @@ -1151,9 +1092,7 @@ public ParseHeaderState(HttpHeaders headers, StringBuilder logger) { this.arrayValueMap = new ArrayValueMap(headers); } - /** - * Finishes the parsing-process by setting all array-values. - */ + /** Finishes the parsing-process by setting all array-values. */ void finish() { arrayValueMap.setValues(); } @@ -1178,7 +1117,9 @@ void parseHeader(String headerName, String headerValue, ParseHeaderState state) // array that can handle repeating values Class rawArrayComponentType = Types.getRawArrayComponentType(context, Types.getArrayComponentType(type)); - arrayValueMap.put(fieldInfo.getField(), rawArrayComponentType, + arrayValueMap.put( + fieldInfo.getField(), + rawArrayComponentType, parseValue(rawArrayComponentType, context, headerValue)); } else if (Types.isAssignableToOrFrom( Types.getRawArrayComponentType(context, type), Iterable.class)) { diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java index 4020a136e..f37cfef5e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java @@ -16,32 +16,29 @@ import com.google.api.client.util.BackOff; import com.google.api.client.util.Beta; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Handles an {@link IOException} in an HTTP request. * - *

            - * For example, this might be used to handle an {@link IOException} with {@link BackOff} policy. - *

            + *

            For example, this might be used to handle an {@link IOException} with {@link BackOff} policy. * *

            -  public static class HttpBackOffIOExceptionHandler implements HttpIOExceptionHandler {
            -    BackOff backOff;
            -    Sleeper sleeper;
            -    public boolean handle(HttpRequest request, boolean supportsRetry) throws IOException {
            -      if (!supportsRetry) {
            -        return false;
            -      }
            -      try {
            -        return BackOffUtils.next(sleeper, backOff);
            -      } catch (InterruptedException exception) {
            -        return false;
            -      }
            -    }
            -  }
            + * public static class HttpBackOffIOExceptionHandler implements HttpIOExceptionHandler {
            + * BackOff backOff;
            + * Sleeper sleeper;
            + * public boolean handle(HttpRequest request, boolean supportsRetry) throws IOException {
            + * if (!supportsRetry) {
            + * return false;
            + * }
            + * try {
            + * return BackOffUtils.next(sleeper, backOff);
            + * } catch (InterruptedException exception) {
            + * return false;
            + * }
            + * }
            + * }
              * 
            * * @author Eyal Peled @@ -53,18 +50,16 @@ public interface HttpIOExceptionHandler { /** * Invoked when an {@link IOException} is thrown during an HTTP request. * - *

            - * There is a simple rule that one must follow: If you modify the request object or modify its + *

            There is a simple rule that one must follow: If you modify the request object or modify its * execute interceptors in a way that should resolve the error, you must return {@code true} to * issue a retry. - *

            * * @param request request object that can be read from for context or modified before retry * @param supportsRetry whether there will actually be a retry if this handler return {@code true} - * . Some handlers may want to have an effect only when there will actually be a retry - * after they handle their event (e.g. a handler that implements backoff policy). + * . Some handlers may want to have an effect only when there will actually be a retry after + * they handle their event (e.g. a handler that implements backoff policy). * @return whether or not this handler has made a change that will require the request to be - * re-sent. + * re-sent. */ boolean handleIOException(HttpRequest request, boolean supportsRetry) throws IOException; } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java b/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java index 3dc9c8245..9bab77b13 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.Preconditions; - import java.nio.charset.Charset; import java.util.Collections; import java.util.Locale; @@ -27,12 +26,10 @@ import java.util.regex.Pattern; /** - * HTTP Media-type as specified in the HTTP RFC ( - * {@link "http://tools.ietf.org/html/rfc2616#section-3.7"}). + * HTTP Media-type as specified in the HTTP RFC ( {@link + * "http://tools.ietf.org/html/rfc2616#section-3.7"}). * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Matthias Linder (mlinder) * @since 1.10 @@ -79,22 +76,39 @@ public final class HttpMediaType { // detection can be done on a per-type/parameter basis. String typeOrKey = "[^\\s/=;\"]+"; // only disallow separators String wholeParameterSection = ";.*"; - FULL_MEDIA_TYPE_REGEX = Pattern.compile( - "\\s*(" + typeOrKey + ")/(" + typeOrKey + ")" + // main type (G1)/sub type (G2) - "\\s*(" + wholeParameterSection + ")?", Pattern.DOTALL); // parameters (G3) or null + FULL_MEDIA_TYPE_REGEX = + Pattern.compile( + "\\s*(" + + typeOrKey + + ")/(" + + typeOrKey + + ")" + + // main type (G1)/sub type (G2) + "\\s*(" + + wholeParameterSection + + ")?", + Pattern.DOTALL); // parameters (G3) or null // PARAMETER_REGEX: Semi-restrictive regex matching each parameter in the parameter section. // We also allow multipart values here (http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html) // although those do not fully conform to the HTTP spec. String quotedParameterValue = "\"([^\"]*)\""; String unquotedParameterValue = "[^\\s;\"]*"; - String parameterValue = quotedParameterValue + "|" + unquotedParameterValue; - PARAMETER_REGEX = Pattern.compile("\\s*;\\s*(" + typeOrKey + ")" + // parameter key (G1) - "=(" + parameterValue + ")"); // G2 (if quoted) and else G3 + String parameterValue = quotedParameterValue + "|" + unquotedParameterValue; + PARAMETER_REGEX = + Pattern.compile( + "\\s*;\\s*(" + + typeOrKey + + ")" + + // parameter key (G1) + "=(" + + parameterValue + + ")"); // G2 (if quoted) and else G3 } /** * Initializes the {@link HttpMediaType} by setting the specified media type. + * * @param type main media type, for example {@code "text"} * @param subType sub media type, for example {@code "plain"} */ @@ -125,9 +139,7 @@ public HttpMediaType setType(String type) { return this; } - /** - * Returns the main media type, for example {@code "text"}, or {@code null} for '*'. - */ + /** Returns the main media type, for example {@code "text"}, or {@code null} for '*'. */ public String getType() { return type; } @@ -145,21 +157,17 @@ public HttpMediaType setSubType(String subType) { return this; } - /** - * Returns the sub media type, for example {@code "plain"} when using {@code "text"}. - */ + /** Returns the sub media type, for example {@code "plain"} when using {@code "text"}. */ public String getSubType() { return subType; } /** - * Sets the full media type by parsing a full content-type string, for example - * {@code "text/plain; foo=bar"}. + * Sets the full media type by parsing a full content-type string, for example {@code "text/plain; + * foo=bar"}. * - *

            - * This method will not clear existing parameters. Use {@link #clearParameters()} if this behavior - * is required. - *

            + *

            This method will not clear existing parameters. Use {@link #clearParameters()} if this + * behavior is required. * * @param combinedType full media type in the {@code "maintype/subtype; key=value"} format. */ @@ -225,9 +233,7 @@ public HttpMediaType removeParameter(String name) { return this; } - /** - * Removes all set parameters from this media type. - */ + /** Removes all set parameters from this media type. */ public void clearParameters() { cachedBuildResult = null; parameters.clear(); @@ -255,9 +261,7 @@ private static String quoteString(String unquotedString) { return "\"" + escapedString + "\""; } - /** - * Builds the full media type string which can be passed in the Content-Type header. - */ + /** Builds the full media type string which can be passed in the Content-Type header. */ public String build() { if (cachedBuildResult != null) { return cachedBuildResult; @@ -286,11 +290,12 @@ public String toString() { } /** - * Returns {@code true} if the specified media type has both the same type and subtype, or - * {@code false} if they don't match or the media type is {@code null}. + * Returns {@code true} if the specified media type has both the same type and subtype, or {@code + * false} if they don't match or the media type is {@code null}. */ public boolean equalsIgnoreParameters(HttpMediaType mediaType) { - return mediaType != null && getType().equalsIgnoreCase(mediaType.getType()) + return mediaType != null + && getType().equalsIgnoreCase(mediaType.getType()) && getSubType().equalsIgnoreCase(mediaType.getSubType()); } @@ -300,8 +305,10 @@ public boolean equalsIgnoreParameters(HttpMediaType mediaType) { */ public static boolean equalsIgnoreParameters(String mediaTypeA, String mediaTypeB) { // TODO(mlinder): Make the HttpMediaType.isSameType implementation more performant. - return (mediaTypeA == null && mediaTypeB == null) || mediaTypeA != null && mediaTypeB != null - && new HttpMediaType(mediaTypeA).equalsIgnoreParameters(new HttpMediaType(mediaTypeB)); + return (mediaTypeA == null && mediaTypeB == null) + || mediaTypeA != null + && mediaTypeB != null + && new HttpMediaType(mediaTypeA).equalsIgnoreParameters(new HttpMediaType(mediaTypeB)); } /** @@ -314,9 +321,7 @@ public HttpMediaType setCharsetParameter(Charset charset) { return this; } - /** - * Returns the specified charset or {@code null} if unset. - */ + /** Returns the specified charset or {@code null} if unset. */ public Charset getCharsetParameter() { String value = getParameter("charset"); return value == null ? null : Charset.forName(value); diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java b/google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java index 0ca55d325..34726362e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java @@ -52,6 +52,5 @@ public final class HttpMethods { /** HTTP TRACE method. */ public static final String TRACE = "TRACE"; - private HttpMethods() { - } + private HttpMethods() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 2e949625e..05d6cc906 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -22,14 +22,12 @@ import com.google.api.client.util.Sleeper; import com.google.api.client.util.StreamingContent; import com.google.api.client.util.StringUtils; - import com.google.common.util.concurrent.ThreadFactoryBuilder; import io.opencensus.common.Scope; import io.opencensus.contrib.http.util.HttpTraceAttributeConstants; import io.opencensus.trace.AttributeValue; import io.opencensus.trace.Span; import io.opencensus.trace.Tracer; - import java.io.IOException; import java.io.InputStream; import java.util.concurrent.Callable; @@ -43,9 +41,7 @@ /** * HTTP request. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -62,10 +58,9 @@ public final class HttpRequest { /** * User agent suffix for all requests. * - *

            - * Includes a {@code "(gzip)"} suffix in case the server -- as Google's servers may do -- checks - * the {@code User-Agent} header to try to detect if the client accepts gzip-encoded responses. - *

            + *

            Includes a {@code "(gzip)"} suffix in case the server -- as Google's servers may do -- + * checks the {@code User-Agent} header to try to detect if the client accepts gzip-encoded + * responses. * * @since 1.4 */ @@ -92,49 +87,39 @@ public final class HttpRequest { /** * HTTP response headers. * - *

            - * For example, this can be used if you want to use a subclass of {@link HttpHeaders} called + *

            For example, this can be used if you want to use a subclass of {@link HttpHeaders} called * MyHeaders to process the response: - *

            * *
            -  static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
            -    MyHeaders responseHeaders = new MyHeaders();
            -    request.responseHeaders = responseHeaders;
            -    HttpResponse response = request.execute();
            -    return responseHeaders.someCustomHeader;
            -  }
            +   * static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
            +   * MyHeaders responseHeaders = new MyHeaders();
            +   * request.responseHeaders = responseHeaders;
            +   * HttpResponse response = request.execute();
            +   * return responseHeaders.someCustomHeader;
            +   * }
                * 
            */ private HttpHeaders responseHeaders = new HttpHeaders(); /** * The number of retries that will be allowed to execute before the request will be terminated or - * {@code 0} to not retry requests. Retries occur as a result of either - * {@link HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles - * abnormal HTTP response or the I/O exception. + * {@code 0} to not retry requests. Retries occur as a result of either {@link + * HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles abnormal HTTP + * response or the I/O exception. */ private int numRetries = DEFAULT_NUMBER_OF_RETRIES; /** * Determines the limit to the content size that will be logged during {@link #execute()}. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to 16KB. - *

            + *

            Defaults to 16KB. */ private int contentLoggingLimit = 0x4000; @@ -165,17 +150,14 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { */ private int readTimeout = 20 * 1000; - /** - * Timeout in milliseconds to set POST/PUT data or {@code 0} for an infinite timeout. - */ + /** Timeout in milliseconds to set POST/PUT data or {@code 0} for an infinite timeout. */ private int writeTimeout = 0; /** HTTP unsuccessful (non-2XX) response handler or {@code null} for none. */ private HttpUnsuccessfulResponseHandler unsuccessfulResponseHandler; /** HTTP I/O exception handler or {@code null} for none. */ - @Beta - private HttpIOExceptionHandler ioExceptionHandler; + @Beta private HttpIOExceptionHandler ioExceptionHandler; /** HTTP response interceptor or {@code null} for none. */ private HttpResponseInterceptor responseInterceptor; @@ -186,12 +168,8 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { /** HTTP content encoding or {@code null} for none. */ private HttpEncoding encoding; - /** - * The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. - */ - @Deprecated - @Beta - private BackOffPolicy backOffPolicy; + /** The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. */ + @Deprecated @Beta private BackOffPolicy backOffPolicy; /** Whether to automatically follow redirects ({@code true} by default). */ private boolean followRedirects = true; @@ -203,19 +181,15 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { private boolean throwExceptionOnExecuteError = true; /** - * Whether to retry the request if an {@link IOException} is encountered in - * {@link LowLevelHttpRequest#execute()}. + * Whether to retry the request if an {@link IOException} is encountered in {@link + * LowLevelHttpRequest#execute()}. */ - @Deprecated - @Beta - private boolean retryOnExecuteIOException = false; + @Deprecated @Beta private boolean retryOnExecuteIOException = false; /** * Whether to not add the suffix {@link #USER_AGENT_SUFFIX} to the User-Agent header. * - *

            - * It is {@code false} by default. - *

            + *

            It is {@code false} by default. */ private boolean suppressUserAgentSuffix; @@ -226,12 +200,10 @@ static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) { private final Tracer tracer = OpenCensusUtils.getTracer(); /** - * Determines whether {@link HttpResponse#getContent()} of this request should return raw - * input stream or not. + * Determines whether {@link HttpResponse#getContent()} of this request should return raw input + * stream or not. * - *

            - * It is {@code false} by default. - *

            + *

            It is {@code false} by default. */ private boolean responseReturnRawInputStream = false; @@ -331,13 +303,13 @@ public HttpRequest setEncoding(HttpEncoding encoding) { } /** - * {@link Beta}
            + * {@link Beta}
            * Returns the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. * * @since 1.7 - * @deprecated (scheduled to be removed in 1.18). - * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new - * {@link HttpBackOffUnsuccessfulResponseHandler} instead. + * @deprecated (scheduled to be removed in 1.18). {@link + * #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new {@link + * HttpBackOffUnsuccessfulResponseHandler} instead. */ @Deprecated @Beta @@ -346,13 +318,13 @@ public BackOffPolicy getBackOffPolicy() { } /** - * {@link Beta}
            + * {@link Beta}
            * Sets the {@link BackOffPolicy} to use between retry attempts or {@code null} for none. * * @since 1.7 - * @deprecated (scheduled to be removed in 1.18). Use - * {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new - * {@link HttpBackOffUnsuccessfulResponseHandler} instead. + * @deprecated (scheduled to be removed in 1.18). Use {@link + * #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new {@link + * HttpBackOffUnsuccessfulResponseHandler} instead. */ @Deprecated @Beta @@ -364,22 +336,14 @@ public HttpRequest setBackOffPolicy(BackOffPolicy backOffPolicy) { /** * Returns the limit to the content size that will be logged during {@link #execute()}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to 16KB. - *

            + *

            Defaults to 16KB. * * @since 1.7 */ @@ -390,22 +354,14 @@ public int getContentLoggingLimit() { /** * Set the limit to the content size that will be logged during {@link #execute()}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to 16KB. - *

            + *

            Defaults to 16KB. * * @since 1.7 */ @@ -419,9 +375,7 @@ public HttpRequest setContentLoggingLimit(int contentLoggingLimit) { /** * Returns whether logging should be enabled for this request. * - *

            - * Defaults to {@code true}. - *

            + *

            Defaults to {@code true}. * * @since 1.9 */ @@ -432,9 +386,7 @@ public boolean isLoggingEnabled() { /** * Sets whether logging should be enabled for this request. * - *

            - * Defaults to {@code true}. - *

            + *

            Defaults to {@code true}. * * @since 1.9 */ @@ -455,9 +407,7 @@ public boolean isCurlLoggingEnabled() { /** * Sets whether logging in form of curl commands should be enabled for this request. * - *

            - * Defaults to {@code true}. - *

            + *

            Defaults to {@code true}. * * @since 1.11 */ @@ -480,9 +430,7 @@ public int getConnectTimeout() { * Sets the timeout in milliseconds to establish a connection or {@code 0} for an infinite * timeout. * - *

            - * By default it is 20000 (20 seconds). - *

            + *

            By default it is 20000 (20 seconds). * * @since 1.5 */ @@ -496,9 +444,7 @@ public HttpRequest setConnectTimeout(int connectTimeout) { * Returns the timeout in milliseconds to read data from an established connection or {@code 0} * for an infinite timeout. * - *

            - * By default it is 20000 (20 seconds). - *

            + *

            By default it is 20000 (20 seconds). * * @since 1.5 */ @@ -521,9 +467,7 @@ public HttpRequest setReadTimeout(int readTimeout) { /** * Returns the timeout in milliseconds to send POST/PUT data or {@code 0} for an infinite timeout. * - *

            - * By default it is 0 (infinite). - *

            + *

            By default it is 0 (infinite). * * @since 1.27 */ @@ -554,9 +498,7 @@ public HttpHeaders getHeaders() { /** * Sets the HTTP request headers. * - *

            - * By default, this is a new unmodified instance of {@link HttpHeaders}. - *

            + *

            By default, this is a new unmodified instance of {@link HttpHeaders}. * * @since 1.5 */ @@ -577,22 +519,18 @@ public HttpHeaders getResponseHeaders() { /** * Sets the HTTP response headers. * - *

            - * By default, this is a new unmodified instance of {@link HttpHeaders}. - *

            + *

            By default, this is a new unmodified instance of {@link HttpHeaders}. * - *

            - * For example, this can be used if you want to use a subclass of {@link HttpHeaders} called + *

            For example, this can be used if you want to use a subclass of {@link HttpHeaders} called * MyHeaders to process the response: - *

            * *
            -  static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
            -    MyHeaders responseHeaders = new MyHeaders();
            -    request.responseHeaders = responseHeaders;
            -    HttpResponse response = request.execute();
            -    return responseHeaders.someCustomHeader;
            -  }
            +   * static String executeAndGetValueOfSomeCustomHeader(HttpRequest request) {
            +   * MyHeaders responseHeaders = new MyHeaders();
            +   * request.responseHeaders = responseHeaders;
            +   * HttpResponse response = request.execute();
            +   * return responseHeaders.someCustomHeader;
            +   * }
                * 
            * * @since 1.5 @@ -644,7 +582,7 @@ public HttpRequest setUnsuccessfulResponseHandler( } /** - * {@link Beta}
            + * {@link Beta}
            * Returns the HTTP I/O exception handler or {@code null} for none. * * @since 1.15 @@ -655,7 +593,7 @@ public HttpIOExceptionHandler getIOExceptionHandler() { } /** - * {@link Beta}
            + * {@link Beta}
            * Sets the HTTP I/O exception handler or {@code null} for none. * * @since 1.15 @@ -687,10 +625,9 @@ public HttpRequest setResponseInterceptor(HttpResponseInterceptor responseInterc /** * Returns the number of retries that will be allowed to execute before the request will be - * terminated or {@code 0} to not retry requests. Retries occur as a result of either - * {@link HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles - * abnormal HTTP response or the I/O exception. - * + * terminated or {@code 0} to not retry requests. Retries occur as a result of either {@link + * HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles abnormal HTTP + * response or the I/O exception. * * @since 1.5 */ @@ -700,13 +637,11 @@ public int getNumberOfRetries() { /** * Sets the number of retries that will be allowed to execute before the request will be - * terminated or {@code 0} to not retry requests. Retries occur as a result of either - * {@link HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles - * abnormal HTTP response or the I/O exception. + * terminated or {@code 0} to not retry requests. Retries occur as a result of either {@link + * HttpUnsuccessfulResponseHandler} or {@link HttpIOExceptionHandler} which handles abnormal HTTP + * response or the I/O exception. * - *

            - * The default value is {@link #DEFAULT_NUMBER_OF_RETRIES}. - *

            + *

            The default value is {@link #DEFAULT_NUMBER_OF_RETRIES}. * * @since 1.5 */ @@ -720,9 +655,7 @@ public HttpRequest setNumberOfRetries(int numRetries) { * Sets the {@link ObjectParser} used to parse the response to this request or {@code null} for * none. * - *

            - * This parser will be preferred over any registered HttpParser. - *

            + *

            This parser will be preferred over any registered HttpParser. * * @since 1.10 */ @@ -752,9 +685,7 @@ public boolean getFollowRedirects() { /** * Sets whether to follow redirects automatically. * - *

            - * The default value is {@code true}. - *

            + *

            The default value is {@code true}. * * @since 1.6 */ @@ -777,9 +708,7 @@ public boolean getThrowExceptionOnExecuteError() { * Sets whether to throw an exception at the end of {@link #execute()} on a HTTP error code * (non-2XX) after all retries and response handlers have been exhausted. * - *

            - * The default value is {@code true}. - *

            + *

            The default value is {@code true}. * * @since 1.7 */ @@ -789,13 +718,13 @@ public HttpRequest setThrowExceptionOnExecuteError(boolean throwExceptionOnExecu } /** - * {@link Beta}
            - * Returns whether to retry the request if an {@link IOException} is encountered in - * {@link LowLevelHttpRequest#execute()}. + * {@link Beta}
            + * Returns whether to retry the request if an {@link IOException} is encountered in {@link + * LowLevelHttpRequest#execute()}. * * @since 1.9 - * @deprecated (scheduled to be removed in 1.18) Use - * {@link #setIOExceptionHandler(HttpIOExceptionHandler)} instead. + * @deprecated (scheduled to be removed in 1.18) Use {@link + * #setIOExceptionHandler(HttpIOExceptionHandler)} instead. */ @Deprecated @Beta @@ -804,17 +733,15 @@ public boolean getRetryOnExecuteIOException() { } /** - * {@link Beta}
            - * Sets whether to retry the request if an {@link IOException} is encountered in - * {@link LowLevelHttpRequest#execute()}. + * {@link Beta}
            + * Sets whether to retry the request if an {@link IOException} is encountered in {@link + * LowLevelHttpRequest#execute()}. * - *

            - * The default value is {@code false}. - *

            + *

            The default value is {@code false}. * * @since 1.9 - * @deprecated (scheduled to be removed in 1.18) Use - * {@link #setIOExceptionHandler(HttpIOExceptionHandler)} instead. + * @deprecated (scheduled to be removed in 1.18) Use {@link + * #setIOExceptionHandler(HttpIOExceptionHandler)} instead. */ @Deprecated @Beta @@ -835,9 +762,7 @@ public boolean getSuppressUserAgentSuffix() { /** * Sets whether to not add the suffix {@link #USER_AGENT_SUFFIX} to the User-Agent header. * - *

            - * The default value is {@code false}. - *

            + *

            The default value is {@code false}. * * @since 1.11 */ @@ -857,12 +782,9 @@ public boolean getResponseReturnRawInputStream() { } /** - * Sets whether {@link HttpResponse#getContent()} should return raw input stream for this - * request. + * Sets whether {@link HttpResponse#getContent()} should return raw input stream for this request. * - *

            - * The default value is {@code false}. - *

            + *

            The default value is {@code false}. * * @since 1.29 */ @@ -874,43 +796,35 @@ public HttpRequest setResponseReturnRawInputStream(boolean responseReturnRawInpu /** * Execute the HTTP request and returns the HTTP response. * - *

            - * Note that regardless of the returned status code, the HTTP response content has not been parsed - * yet, and must be parsed by the calling code. - *

            + *

            Note that regardless of the returned status code, the HTTP response content has not been + * parsed yet, and must be parsed by the calling code. * - *

            - * Note that when calling to this method twice or more, the state of this HTTP request object + *

            Note that when calling to this method twice or more, the state of this HTTP request object * isn't cleared, so the request will continue where it was left. For example, the state of the * {@link HttpUnsuccessfulResponseHandler} attached to this HTTP request will remain the same as * it was left after last execute. - *

            * - *

            - * Almost all details of the request and response are logged if {@link Level#CONFIG} is loggable. - * The only exception is the value of the {@code Authorization} header which is only logged if - * {@link Level#ALL} is loggable. - *

            + *

            Almost all details of the request and response are logged if {@link Level#CONFIG} is + * loggable. The only exception is the value of the {@code Authorization} header which is only + * logged if {@link Level#ALL} is loggable. * - *

            - * Callers should call {@link HttpResponse#disconnect} when the returned HTTP response object is - * no longer needed. However, {@link HttpResponse#disconnect} does not have to be called if the + *

            Callers should call {@link HttpResponse#disconnect} when the returned HTTP response object + * is no longer needed. However, {@link HttpResponse#disconnect} does not have to be called if the * response stream is properly closed. Example usage: - *

            * *
            -     HttpResponse response = request.execute();
            -     try {
            -       // process the HTTP response object
            -     } finally {
            -       response.disconnect();
            -     }
            +   * HttpResponse response = request.execute();
            +   * try {
            +   * // process the HTTP response object
            +   * } finally {
            +   * response.disconnect();
            +   * }
                * 
            * - * @return HTTP response for an HTTP success response (or HTTP error response if - * {@link #getThrowExceptionOnExecuteError()} is {@code false}) - * @throws HttpResponseException for an HTTP error response (only if - * {@link #getThrowExceptionOnExecuteError()} is {@code true}) + * @return HTTP response for an HTTP success response (or HTTP error response if {@link + * #getThrowExceptionOnExecuteError()} is {@code false}) + * @throws HttpResponseException for an HTTP error response (only if {@link + * #getThrowExceptionOnExecuteError()} is {@code true}) * @see HttpResponse#isSuccessStatusCode() */ @SuppressWarnings("deprecation") @@ -928,10 +842,11 @@ public HttpResponse execute() throws IOException { Preconditions.checkNotNull(requestMethod); Preconditions.checkNotNull(url); - Span span = tracer - .spanBuilder(OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE) - .setRecordEvents(OpenCensusUtils.isRecordEvent()) - .startSpan(); + Span span = + tracer + .spanBuilder(OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE) + .setRecordEvents(OpenCensusUtils.isRecordEvent()) + .startSpan(); do { span.addAnnotation("retry #" + (numRetries - retriesRemaining)); // Cleanup any unneeded response from a previous iteration @@ -962,8 +877,11 @@ public HttpResponse execute() throws IOException { if (loggable) { logbuf = new StringBuilder(); logbuf.append("-------------- REQUEST --------------").append(StringUtils.LINE_SEPARATOR); - logbuf.append(requestMethod) - .append(' ').append(urlString).append(StringUtils.LINE_SEPARATOR); + logbuf + .append(requestMethod) + .append(' ') + .append(urlString) + .append(StringUtils.LINE_SEPARATOR); // setup curl logging if (curlLoggingEnabled) { @@ -1003,8 +921,9 @@ public HttpResponse execute() throws IOException { final String contentType = content.getType(); // log content if (loggable) { - streamingContent = new LoggingStreamingContent( - streamingContent, HttpTransport.LOGGER, Level.CONFIG, contentLoggingLimit); + streamingContent = + new LoggingStreamingContent( + streamingContent, HttpTransport.LOGGER, Level.CONFIG, contentLoggingLimit); } // encoding if (encoding == null) { @@ -1091,8 +1010,9 @@ public HttpResponse execute() throws IOException { } } } catch (IOException e) { - if (!retryOnExecuteIOException && (ioExceptionHandler == null - || !ioExceptionHandler.handleIOException(this, retryRequest))) { + if (!retryOnExecuteIOException + && (ioExceptionHandler == null + || !ioExceptionHandler.handleIOException(this, retryRequest))) { throw e; } // Save the exception in case the retries do not work and we need to re-throw it later. @@ -1120,7 +1040,8 @@ public HttpResponse execute() throws IOException { if (handleRedirect(response.getStatusCode(), response.getHeaders())) { // The unsuccessful request's error could not be handled and it is a redirect request. errorHandled = true; - } else if (retryRequest && backOffPolicy != null + } else if (retryRequest + && backOffPolicy != null && backOffPolicy.isBackOffRequired(response.getStatusCode())) { // The unsuccessful request's error could not be handled and should be backed off // before retrying @@ -1179,7 +1100,7 @@ public HttpResponse execute() throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Executes this request asynchronously in a single separate thread using the supplied executor. * * @param executor executor to run the asynchronous request @@ -1188,18 +1109,20 @@ public HttpResponse execute() throws IOException { */ @Beta public Future executeAsync(Executor executor) { - FutureTask future = new FutureTask(new Callable() { + FutureTask future = + new FutureTask( + new Callable() { - public HttpResponse call() throws Exception { - return execute(); - } - }); + public HttpResponse call() throws Exception { + return execute(); + } + }); executor.execute(future); return future; } /** - * {@link Beta}
            + * {@link Beta}
            * Executes this request asynchronously using {@link #executeAsync(Executor)} in a single separate * thread using {@link Executors#newFixedThreadPool(1)}. * @@ -1216,24 +1139,21 @@ public Future executeAsync() { * Sets up this request object to handle the necessary redirect if redirects are turned on, it is * a redirect status code and the header has a location. * - *

            - * When the status code is {@code 303} the method on the request is changed to a GET as per the + *

            When the status code is {@code 303} the method on the request is changed to a GET as per the * RFC2616 specification. On a redirect, it also removes the {@code "Authorization"} and all * {@code "If-*"} request headers. - *

            * - *

            - * Upgrade warning: When handling a status code of 303, {@link #handleRedirect(int, HttpHeaders)} - * now correctly removes any content from the body of the new request, as GET requests should not - * have content. It did not do this in prior version 1.16. - *

            + *

            Upgrade warning: When handling a status code of 303, {@link #handleRedirect(int, + * HttpHeaders)} now correctly removes any content from the body of the new request, as GET + * requests should not have content. It did not do this in prior version 1.16. * * @return whether the redirect was successful * @since 1.11 */ public boolean handleRedirect(int statusCode, HttpHeaders responseHeaders) { String redirectLocation = responseHeaders.getLocation(); - if (getFollowRedirects() && HttpStatusCodes.isRedirect(statusCode) + if (getFollowRedirects() + && HttpStatusCodes.isRedirect(statusCode) && redirectLocation != null) { // resolve the redirect location relative to the current location setUrl(new GenericUrl(url.toURL(redirectLocation))); diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java index 8f5ec2550..a14058c8b 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java @@ -16,23 +16,20 @@ import java.io.IOException; - /** * Thread-safe light-weight HTTP request factory layer on top of the HTTP transport that has an * optional {@link HttpRequestInitializer HTTP request initializer} for initializing requests. * - *

            - * For example, to use a particular authorization header across all requests, use: - *

            + *

            For example, to use a particular authorization header across all requests, use: * *

            -  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) throws IOException {
            -        request.getHeaders().setAuthorization("...");
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) throws IOException {
            + * request.getHeaders().setAuthorization("...");
            + * }
            + * });
            + * }
              * 
            * * @since 1.4 @@ -67,9 +64,7 @@ public HttpTransport getTransport() { /** * Returns the HTTP request initializer or {@code null} for none. * - *

            - * This initializer is invoked before setting its method, URL, or content. - *

            + *

            This initializer is invoked before setting its method, URL, or content. * * @since 1.5 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java index c0f854558..4ee946907 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java @@ -19,47 +19,39 @@ /** * HTTP request initializer. * - *

            - * For example, this might be used to disable request timeouts: - *

            + *

            For example, this might be used to disable request timeouts: * *

            -  public class DisableTimeout implements HttpRequestInitializer {
            -    public void initialize(HttpRequest request) {
            -      request.setConnectTimeout(0);
            -      request.setReadTimeout(0);
            -    }
            -  }
            + * public class DisableTimeout implements HttpRequestInitializer {
            + * public void initialize(HttpRequest request) {
            + * request.setConnectTimeout(0);
            + * request.setReadTimeout(0);
            + * }
            + * }
              * 
            * - *

            - * Sample usage with a request factory: - *

            + *

            Sample usage with a request factory: * *

            -  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            -    return transport.createRequestFactory(new DisableTimeout());
            -  }
            + * public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            + * return transport.createRequestFactory(new DisableTimeout());
            + * }
              * 
            * - *

            - * More complex usage example: - *

            + *

            More complex usage example: * *

            -  public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            -    final DisableTimeout disableTimeout = new DisableTimeout();
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) {
            -        disableTimeout.initialize(request);
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            + * final DisableTimeout disableTimeout = new DisableTimeout();
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) {
            + * disableTimeout.initialize(request);
            + * }
            + * });
            + * }
              * 
            * - *

            - * Implementations should normally be thread-safe. - *

            + *

            Implementations should normally be thread-safe. * * @since 1.4 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 01aea6d83..90c3812f0 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -19,7 +19,6 @@ import com.google.api.client.util.LoggingInputStream; import com.google.api.client.util.Preconditions; import com.google.api.client.util.StringUtils; - import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.IOException; @@ -34,24 +33,20 @@ /** * HTTP response. * - *

            - * Callers should call {@link #disconnect} when the HTTP response object is no longer needed. + *

            Callers should call {@link #disconnect} when the HTTP response object is no longer needed. * However, {@link #disconnect} does not have to be called if the response stream is properly * closed. Example usage: - *

            * *
            -   HttpResponse response = request.execute();
            -   try {
            -     // process the HTTP response object
            -   } finally {
            -     response.disconnect();
            -   }
            + * HttpResponse response = request.execute();
            + * try {
            + * // process the HTTP response object
            + * } finally {
            + * response.disconnect();
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -88,31 +83,21 @@ public final class HttpResponse { /** * Determines the limit to the content size that will be logged during {@link #getContent()}. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to {@link HttpRequest#getContentLoggingLimit()}. - *

            + *

            Defaults to {@link HttpRequest#getContentLoggingLimit()}. */ private int contentLoggingLimit; /** * Determines whether logging should be enabled on this response. * - *

            - * Defaults to {@link HttpRequest#isLoggingEnabled()}. - *

            + *

            Defaults to {@link HttpRequest#isLoggingEnabled()}. */ private boolean loggingEnabled; @@ -169,22 +154,14 @@ public final class HttpResponse { /** * Returns the limit to the content size that will be logged during {@link #getContent()}. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to {@link HttpRequest#getContentLoggingLimit()}. - *

            + *

            Defaults to {@link HttpRequest#getContentLoggingLimit()}. * * @since 1.7 */ @@ -195,22 +172,14 @@ public int getContentLoggingLimit() { /** * Set the limit to the content size that will be logged during {@link #getContent()}. * - *

            - * Content will only be logged if {@link #isLoggingEnabled} is {@code true}. - *

            + *

            Content will only be logged if {@link #isLoggingEnabled} is {@code true}. * - *

            - * If the content size is greater than this limit then it will not be logged. - *

            + *

            If the content size is greater than this limit then it will not be logged. * - *

            - * Can be set to {@code 0} to disable content logging. This is useful for example if content has - * sensitive data such as authentication information. - *

            + *

            Can be set to {@code 0} to disable content logging. This is useful for example if content + * has sensitive data such as authentication information. * - *

            - * Defaults to {@link HttpRequest#getContentLoggingLimit()}. - *

            + *

            Defaults to {@link HttpRequest#getContentLoggingLimit()}. * * @since 1.7 */ @@ -224,9 +193,7 @@ public HttpResponse setContentLoggingLimit(int contentLoggingLimit) { /** * Returns whether logging should be enabled on this response. * - *

            - * Defaults to {@link HttpRequest#isLoggingEnabled()}. - *

            + *

            Defaults to {@link HttpRequest#isLoggingEnabled()}. * * @since 1.9 */ @@ -237,9 +204,7 @@ public boolean isLoggingEnabled() { /** * Sets whether logging should be enabled on this response. * - *

            - * Defaults to {@link HttpRequest#isLoggingEnabled()}. - *

            + *

            Defaults to {@link HttpRequest#isLoggingEnabled()}. * * @since 1.9 */ @@ -286,8 +251,8 @@ public HttpHeaders getHeaders() { } /** - * Returns whether received a successful HTTP status code {@code >= 200 && < 300} (see - * {@link #getStatusCode()}). + * Returns whether received a successful HTTP status code {@code >= 200 && < 300} (see {@link + * #getStatusCode()}). * * @since 1.5 */ @@ -333,22 +298,22 @@ public HttpRequest getRequest() { /** * Returns the content of the HTTP response. - *

            - * The result is cached, so subsequent calls will be fast. - *

            - * Callers should call {@link InputStream#close} after the returned {@link InputStream} is no + * + *

            The result is cached, so subsequent calls will be fast. + * + *

            Callers should call {@link InputStream#close} after the returned {@link InputStream} is no * longer needed. Example usage: * *

            -     InputStream is = response.getContent();
            -     try {
            -       // Process the input stream..
            -     } finally {
            -       is.close();
            -     }
            +   * InputStream is = response.getContent();
            +   * try {
            +   * // Process the input stream..
            +   * } finally {
            +   * is.close();
            +   * }
                * 
            - *

            - * {@link HttpResponse#disconnect} does not have to be called if the content is closed. + * + *

            {@link HttpResponse#disconnect} does not have to be called if the content is closed. * * @return input stream content of the HTTP response or {@code null} for none * @throws IOException I/O exception @@ -363,15 +328,17 @@ public InputStream getContent() throws IOException { try { // gzip encoding (wrap content with GZipInputStream) String contentEncoding = this.contentEncoding; - if (!returnRawInputStream && contentEncoding != null && contentEncoding - .contains("gzip")) { + if (!returnRawInputStream + && contentEncoding != null + && contentEncoding.contains("gzip")) { lowLevelResponseContent = new GZIPInputStream(lowLevelResponseContent); } // logging (wrap content with LoggingInputStream) Logger logger = HttpTransport.LOGGER; if (loggingEnabled && logger.isLoggable(Level.CONFIG)) { - lowLevelResponseContent = new LoggingInputStream( - lowLevelResponseContent, logger, Level.CONFIG, contentLoggingLimit); + lowLevelResponseContent = + new LoggingInputStream( + lowLevelResponseContent, logger, Level.CONFIG, contentLoggingLimit); } content = lowLevelResponseContent; contentProcessed = true; @@ -392,30 +359,23 @@ public InputStream getContent() throws IOException { /** * Writes the content of the HTTP response into the given destination output stream. * - *

            - * Sample usage: + *

            Sample usage: * *

            -     HttpRequest request = requestFactory.buildGetRequest(
            -         new GenericUrl("https://www.google.com/images/srpr/logo3w.png"));
            -     OutputStream outputStream = new FileOutputStream(new File("/tmp/logo3w.png"));
            -     try {
            -       HttpResponse response = request.execute();
            -       response.download(outputStream);
            -     } finally {
            -       outputStream.close();
            -     }
            -    
            - * - *

            - * - *

            - * This method closes the content of the HTTP response from {@link #getContent()}. - *

            - * - *

            - * This method does not close the given output stream. - *

            + * HttpRequest request = requestFactory.buildGetRequest( + * new GenericUrl("https://www.google.com/images/srpr/logo3w.png")); + * OutputStream outputStream = new FileOutputStream(new File("/tmp/logo3w.png")); + * try { + * HttpResponse response = request.execute(); + * response.download(outputStream); + * } finally { + * outputStream.close(); + * } + * + * + *

            This method closes the content of the HTTP response from {@link #getContent()}. + * + *

            This method does not close the given output stream. * * @param outputStream destination output stream * @throws IOException I/O exception @@ -426,9 +386,7 @@ public void download(OutputStream outputStream) throws IOException { IOUtils.copy(inputStream, outputStream); } - /** - * Closes the content of the HTTP response from {@link #getContent()}, ignoring any content. - */ + /** Closes the content of the HTTP response from {@link #getContent()}, ignoring any content. */ public void ignore() throws IOException { InputStream content = getContent(); if (content != null) { @@ -437,8 +395,8 @@ public void ignore() throws IOException { } /** - * Close the HTTP response content using {@link #ignore}, and disconnect using - * {@link LowLevelHttpResponse#disconnect()}. + * Close the HTTP response content using {@link #ignore}, and disconnect using {@link + * LowLevelHttpResponse#disconnect()}. * * @since 1.4 */ @@ -451,9 +409,7 @@ public void disconnect() throws IOException { * Parses the content of the HTTP response from {@link #getContent()} and reads it into a data * class of key/value pairs using the parser returned by {@link HttpRequest#getParser()}. * - *

            - * Reference: http://tools.ietf.org/html/rfc2616#section-4.3 - *

            + *

            Reference: http://tools.ietf.org/html/rfc2616#section-4.3 * * @return parsed data class or {@code null} for no content */ @@ -470,7 +426,8 @@ public T parseAs(Class dataClass) throws IOException { */ private boolean hasMessageBody() throws IOException { int statusCode = getStatusCode(); - if (getRequest().getRequestMethod().equals(HttpMethods.HEAD) || statusCode / 100 == 1 + if (getRequest().getRequestMethod().equals(HttpMethods.HEAD) + || statusCode / 100 == 1 || statusCode == HttpStatusCodes.STATUS_CODE_NO_CONTENT || statusCode == HttpStatusCodes.STATUS_CODE_NOT_MODIFIED) { ignore(); @@ -496,17 +453,13 @@ public Object parseAs(Type dataType) throws IOException { /** * Parses the content of the HTTP response from {@link #getContent()} and reads it into a string. * - *

            - * Since this method returns {@code ""} for no content, a simpler check for no content is to check - * if {@link #getContent()} is {@code null}. - *

            + *

            Since this method returns {@code ""} for no content, a simpler check for no content is to + * check if {@link #getContent()} is {@code null}. * - *

            - * All content is read from the input content stream rather than being limited by the + *

            All content is read from the input content stream rather than being limited by the * Content-Length. For the character set, it follows the specification by parsing the "charset" * parameter of the Content-Type header or by default {@code "ISO-8859-1"} if the parameter is * missing. - *

            * * @return parsed string or {@code ""} for no content * @throws IOException I/O exception @@ -522,13 +475,14 @@ public String parseAsString() throws IOException { } /** - * Returns the {@link Charset} specified in the Content-Type of this response or the - * {@code "ISO-8859-1"} charset as a default. + * Returns the {@link Charset} specified in the Content-Type of this response or the {@code + * "ISO-8859-1"} charset as a default. * * @since 1.10 - * */ + */ public Charset getContentCharset() { return mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 : mediaType.getCharsetParameter(); + ? Charsets.ISO_8859_1 + : mediaType.getCharsetParameter(); } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java index 6526ac2d6..6e5349e18 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java @@ -16,15 +16,12 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.StringUtils; - import java.io.IOException; /** * Exception thrown when an error status code is detected in an HTTP response. * - *

            - * Implementation is not thread safe. - *

            + *

            Implementation is not thread safe. * * @since 1.0 * @author Yaniv Inbar @@ -49,17 +46,15 @@ public class HttpResponseException extends IOException { * Constructor that constructs a detail message from the given HTTP response that includes the * status code, status message and HTTP response content. * - *

            - * Callers of this constructor should call {@link HttpResponse#disconnect} after - * {@link HttpResponseException} is instantiated. Example usage: - *

            + *

            Callers of this constructor should call {@link HttpResponse#disconnect} after {@link + * HttpResponseException} is instantiated. Example usage: * *

            -     try {
            -       throw new HttpResponseException(response);
            -     } finally {
            -       response.disconnect();
            -     }
            +   * try {
            +   * throw new HttpResponseException(response);
            +   * } finally {
            +   * response.disconnect();
            +   * }
                * 
            * * @param response HTTP response @@ -70,7 +65,6 @@ public HttpResponseException(HttpResponse response) { /** * @param builder builder - * * @since 1.14 */ protected HttpResponseException(Builder builder) { @@ -82,8 +76,8 @@ protected HttpResponseException(Builder builder) { } /** - * Returns whether received a successful HTTP status code {@code >= 200 && < 300} (see - * {@link #getStatusCode()}). + * Returns whether received a successful HTTP status code {@code >= 200 && < 300} (see {@link + * #getStatusCode()}). * * @since 1.7 */ @@ -130,10 +124,7 @@ public final String getContent() { /** * Builder. * - *

            - * Implementation is not thread safe. - *

            - * + *

            Implementation is not thread safe. * * @since 1.14 */ @@ -165,9 +156,7 @@ public Builder(int statusCode, String statusMessage, HttpHeaders headers) { setHeaders(headers); } - /** - * @param response HTTP response - */ + /** @param response HTTP response */ public Builder(HttpResponse response) { this(response.getStatusCode(), response.getStatusMessage(), response.getHeaders()); // content @@ -198,10 +187,8 @@ public final String getMessage() { /** * Sets the detail message to use or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMessage(String message) { this.message = message; @@ -216,10 +203,8 @@ public final int getStatusCode() { /** * Sets the HTTP status code or {@code 0} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setStatusCode(int statusCode) { Preconditions.checkArgument(statusCode >= 0); @@ -235,10 +220,8 @@ public final String getStatusMessage() { /** * Sets the HTTP status message or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; @@ -253,10 +236,8 @@ public HttpHeaders getHeaders() { /** * Sets the HTTP response headers. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setHeaders(HttpHeaders headers) { this.headers = Preconditions.checkNotNull(headers); @@ -271,10 +252,8 @@ public final String getContent() { /** * Sets the HTTP response content or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setContent(String content) { this.content = content; diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java index 0873399b1..a37b0b1b1 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java @@ -20,62 +20,54 @@ * HTTP response interceptor to intercept the end of {@link HttpRequest#execute()} before returning * a successful response or throwing an exception for an unsuccessful response. * - *

            - * For example, this might be used to add a simple timer on requests: - *

            + *

            For example, this might be used to add a simple timer on requests: * *

            -  public static class TimerResponseInterceptor implements HttpResponseInterceptor {
            -
            -    private final long startTime = System.nanoTime();
            -
            -    public void interceptResponse(HttpResponse response) {
            -      long elapsedNanos = System.nanoTime() - startTime;
            -      System.out.println("elapsed seconds: " + TimeUnit.NANOSECONDS.toSeconds(elapsedNanos) + "s");
            -    }
            -  }
            + * public static class TimerResponseInterceptor implements HttpResponseInterceptor {
            + *
            + * private final long startTime = System.nanoTime();
            + *
            + * public void interceptResponse(HttpResponse response) {
            + * long elapsedNanos = System.nanoTime() - startTime;
            + * System.out.println("elapsed seconds: " + TimeUnit.NANOSECONDS.toSeconds(elapsedNanos) + "s");
            + * }
            + * }
              * 
            * - *

            - * Sample usage with a request factory: - *

            + *

            Sample usage with a request factory: * *

            -  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -
            -      {@literal @}Override
            -      public void initialize(HttpRequest request) {
            -        request.setResponseInterceptor(new TimerResponseInterceptor());
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + *
            + * {@literal @}Override
            + * public void initialize(HttpRequest request) {
            + * request.setResponseInterceptor(new TimerResponseInterceptor());
            + * }
            + * });
            + * }
              * 
            * - *

            - * More complex usage example: - *

            + *

            More complex usage example: * *

            -  public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            -    final HttpResponseInterceptor responseInterceptor = new TimerResponseInterceptor();
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -
            -      public void initialize(HttpRequest request) {
            -        request.setResponseInterceptor(new HttpResponseInterceptor() {
            -
            -          public void interceptResponse(HttpResponse response) throws IOException {
            -            responseInterceptor.interceptResponse(response);
            -          }
            -        });
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            + * final HttpResponseInterceptor responseInterceptor = new TimerResponseInterceptor();
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + *
            + * public void initialize(HttpRequest request) {
            + * request.setResponseInterceptor(new HttpResponseInterceptor() {
            + *
            + * public void interceptResponse(HttpResponse response) throws IOException {
            + * responseInterceptor.interceptResponse(response);
            + * }
            + * });
            + * }
            + * });
            + * }
              * 
            * - *

            - * Implementations should normally be thread-safe. - *

            + *

            Implementations should normally be thread-safe. * * @author Yaniv Inbar * @since 1.13 @@ -86,12 +78,10 @@ public interface HttpResponseInterceptor { * Invoked at the end of {@link HttpRequest#execute()} before returning a successful response or * throwing an exception for an unsuccessful response. * - *

            - * Do not read from the content stream unless you intend to throw an exception. Otherwise, it + *

            Do not read from the content stream unless you intend to throw an exception. Otherwise, it * would prevent the caller of {@link HttpRequest#execute()} to be able to read the stream from * {@link HttpResponse#getContent()}. If you intend to throw an exception, you should parse the * response, or alternatively pass the response as part of the exception. - *

            * * @param response HTTP response */ 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 0dd63ca2b..1f46eaadc 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 @@ -26,16 +26,10 @@ public class HttpStatusCodes { /** Status code for a successful request. */ public static final int STATUS_CODE_OK = 200; - /** - * Status code for a successful request that has been fulfilled - * to create a new resource. - */ + /** Status code for a successful request that has been fulfilled to create a new resource. */ public static final int STATUS_CODE_CREATED = 201; - /** - * Status code for a successful request that has been received - * but not yet acted upon. - */ + /** Status code for a successful request that has been received but not yet acted upon. */ public static final int STATUS_CODE_ACCEPTED = 202; /** @@ -75,15 +69,15 @@ public class HttpStatusCodes { /** Status code for a server that has not found anything matching the Request-URI. */ public static final int STATUS_CODE_NOT_FOUND = 404; - /** - * Status code for a method specified in the Request-Line is not allowed for the resource - * identified by the Request-URI. - * */ + /** + * Status code for a method specified in the Request-Line is not allowed for the resource + * identified by the Request-URI. + */ public static final int STATUS_CODE_METHOD_NOT_ALLOWED = 405; - + /** Status code for a request that could not be completed due to a resource conflict. */ public static final int STATUS_CODE_CONFLICT = 409; - + /** Status code for a request for which one of the conditions it was made under has failed. */ public static final int STATUS_CODE_PRECONDITION_FAILED = 412; @@ -114,8 +108,8 @@ public static boolean isSuccess(int statusCode) { } /** - * Returns whether the given HTTP response status code is a redirect code - * {@code 301, 302, 303, 307}. + * Returns whether the given HTTP response status code is a redirect code {@code 301, 302, 303, + * 307}. * * @since 1.11 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java index 5fa036f7b..d8b858c8e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java @@ -21,59 +21,49 @@ /** * Thread-safe abstract HTTP transport. * - *

            - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the HTTP transport. - *

            * - *

            - * The recommended concrete implementation HTTP transport library to use depends on what environment - * you are running in: - *

            - *
              - *
            • Google App Engine: use - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}. - *
                - *
              • {@code com.google.api.client.apache.ApacheHttpTransport} doesn't work on App Engine because - * the Apache HTTP Client opens its own sockets (though in theory there are ways to hack it to work - * on App Engine that might work).
              • - *
              • {@code com.google.api.client.javanet.NetHttpTransport} is discouraged due to a bug in the App - * Engine SDK itself in how it parses HTTP headers in the response.
              • - *
              - *
            • - *
            • Android: - *
                - *
              • For maximum backwards compatibility with older SDK's use {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp} (read its JavaDoc for details). - *
              • - *
              • If your application is targeting Gingerbread (SDK 2.3) or higher, simply use - * {@code com.google.api.client.javanet.NetHttpTransport}.
              • - *
              - *
            • - *
            • Other Java environments + *

              The recommended concrete implementation HTTP transport library to use depends on what + * environment you are running in: + * *

                - *
              • {@code com.google.api.client.googleapis.javanet.GoogleNetHttpTransport} is included in - * google-api-cient 1.22.0, so easy to include.
              • - *
              • {@code com.google.api.client.javanet.NetHttpTransport} is based on the HttpURLConnection - * built into the Java SDK, so it used to be the preferred choice.
              • - *
              • {@code com.google.api.client.apache.ApacheHttpTransport} is a good choice for users of the - * Apache HTTP Client, especially if you need some of the configuration options available in that - * library.
              • - *
              - *
            • + *
            • Google App Engine: use {@code + * com.google.api.client.extensions.appengine.http.UrlFetchTransport}. + *
                + *
              • {@code com.google.api.client.apache.ApacheHttpTransport} doesn't work on App Engine + * because the Apache HTTP Client opens its own sockets (though in theory there are ways + * to hack it to work on App Engine that might work). + *
              • {@code com.google.api.client.javanet.NetHttpTransport} is discouraged due to a bug in + * the App Engine SDK itself in how it parses HTTP headers in the response. + *
              + *
            • Android: + *
                + *
              • For maximum backwards compatibility with older SDK's use {@code + * newCompatibleTransport} from {@code + * com.google.api.client.extensions.android.http.AndroidHttp} (read its JavaDoc for + * details). + *
              • If your application is targeting Gingerbread (SDK 2.3) or higher, simply use {@code + * com.google.api.client.javanet.NetHttpTransport}. + *
              + *
            • Other Java environments + *
                + *
              • {@code com.google.api.client.googleapis.javanet.GoogleNetHttpTransport} is included + * in google-api-cient 1.22.0, so easy to include. + *
              • {@code com.google.api.client.javanet.NetHttpTransport} is based on the + * HttpURLConnection built into the Java SDK, so it used to be the preferred choice. + *
              • {@code com.google.api.client.apache.ApacheHttpTransport} is a good choice for users + * of the Apache HTTP Client, especially if you need some of the configuration options + * available in that library. + *
              *
            * - *

            - * Some HTTP transports do not support all HTTP methods. Use {@link #supportsMethod(String)} to + *

            Some HTTP transports do not support all HTTP methods. Use {@link #supportsMethod(String)} to * check if a certain HTTP method is supported. Calling {@link #buildRequest()} on a method that is * not supported will result in an {@link IllegalArgumentException}. - *

            * - *

            - * Subclasses should override {@link #supportsMethod(String)} and - * {@link #buildRequest(String, String)} to build requests and specify which HTTP methods are - * supported. - *

            + *

            Subclasses should override {@link #supportsMethod(String)} and {@link #buildRequest(String, + * String)} to build requests and specify which HTTP methods are supported. * * @since 1.0 * @author Yaniv Inbar @@ -86,8 +76,10 @@ public abstract class HttpTransport { * All valid request methods as specified in {@link #supportsMethod(String)}, sorted in ascending * alphabetical order. */ - private static final String[] SUPPORTED_METHODS = - {HttpMethods.DELETE, HttpMethods.GET, HttpMethods.POST, HttpMethods.PUT}; + private static final String[] SUPPORTED_METHODS = { + HttpMethods.DELETE, HttpMethods.GET, HttpMethods.POST, HttpMethods.PUT + }; + static { Arrays.sort(SUPPORTED_METHODS); } @@ -126,10 +118,8 @@ HttpRequest buildRequest() { /** * Returns whether a specified HTTP method is supported by this transport. * - *

            - * Default implementation returns true if and only if the request method is {@code "DELETE"}, + *

            Default implementation returns true if and only if the request method is {@code "DELETE"}, * {@code "GET"}, {@code "POST"}, or {@code "PUT"}. Subclasses should override. - *

            * * @param method HTTP method * @throws IOException I/O exception @@ -157,6 +147,5 @@ public boolean supportsMethod(String method) throws IOException { * @throws IOException I/O exception * @since 1.4 */ - public void shutdown() throws IOException { - } + public void shutdown() throws IOException {} } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java index ec0eb4b1b..0a6fc6f7c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java @@ -19,56 +19,50 @@ /** * Interface which handles abnormal HTTP responses (in other words not 2XX). * - *

            - * For example, this might be used to refresh an OAuth 2 token: - *

            + *

            For example, this might be used to refresh an OAuth 2 token: * *

            -  public static class RefreshTokenHandler implements HttpUnsuccessfulResponseHandler {
            -    public boolean handleResponse(
            -        HttpRequest request, HttpResponse response, boolean retrySupported) throws IOException {
            -      if (response.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED) {
            -        refreshToken();
            -      }
            -      return false;
            -    }
            -  }
            + * public static class RefreshTokenHandler implements HttpUnsuccessfulResponseHandler {
            + * public boolean handleResponse(
            + * HttpRequest request, HttpResponse response, boolean retrySupported) throws IOException {
            + * if (response.getStatusCode() == HttpStatusCodes.STATUS_CODE_UNAUTHORIZED) {
            + * refreshToken();
            + * }
            + * return false;
            + * }
            + * }
              * 
            * - *

            - * Sample usage with a request factory: - *

            + *

            Sample usage with a request factory: * *

            -  public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            -    final RefreshTokenHandler handler = new RefreshTokenHandler();
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) {
            -        request.setUnsuccessfulResponseHandler(handler);
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
            + * final RefreshTokenHandler handler = new RefreshTokenHandler();
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) {
            + * request.setUnsuccessfulResponseHandler(handler);
            + * }
            + * });
            + * }
              * 
            * - *

            - * More complex usage example: - *

            + *

            More complex usage example: * *

            -  public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            -    final RefreshTokenHandler handler = new RefreshTokenHandler();
            -    return transport.createRequestFactory(new HttpRequestInitializer() {
            -      public void initialize(HttpRequest request) {
            -        request.setUnsuccessfulResponseHandler(new HttpUnsuccessfulResponseHandler() {
            -          public boolean handleResponse(
            -              HttpRequest request, HttpResponse response, boolean retrySupported)
            -              throws IOException {
            -            return handler.handleResponse(request, response, retrySupported);
            -          }
            -        });
            -      }
            -    });
            -  }
            + * public static HttpRequestFactory createRequestFactory2(HttpTransport transport) {
            + * final RefreshTokenHandler handler = new RefreshTokenHandler();
            + * return transport.createRequestFactory(new HttpRequestInitializer() {
            + * public void initialize(HttpRequest request) {
            + * request.setUnsuccessfulResponseHandler(new HttpUnsuccessfulResponseHandler() {
            + * public boolean handleResponse(
            + * HttpRequest request, HttpResponse response, boolean retrySupported)
            + * throws IOException {
            + * return handler.handleResponse(request, response, retrySupported);
            + * }
            + * });
            + * }
            + * });
            + * }
              * 
            * * @author moshenko@google.com (Jacob Moshenko) @@ -79,20 +73,21 @@ public interface HttpUnsuccessfulResponseHandler { /** * Handler that will be invoked when an abnormal response is received. There are a few simple * rules that one must follow: + * *
              - *
            • If you modify the request object or modify its execute interceptors in a way that should - * resolve the error, you must return true to issue a retry.
            • - *
            • Do not read from the content stream, this will prevent the eventual end user from having - * access to it.
            • + *
            • If you modify the request object or modify its execute interceptors in a way that should + * resolve the error, you must return true to issue a retry. + *
            • Do not read from the content stream, this will prevent the eventual end user from having + * access to it. *
            * * @param request Request object that can be read from for context or modified before retry * @param response Response to process * @param supportsRetry Whether there will actually be a retry if this handler return {@code - * true}. Some handlers may want to have an effect only when there will actually be a retry - * after they handle their event (e.g. a handler that implements exponential backoff). + * true}. Some handlers may want to have an effect only when there will actually be a retry + * after they handle their event (e.g. a handler that implements exponential backoff). * @return Whether or not this handler has made a change that will require the request to be - * re-sent. + * re-sent. */ boolean handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry) throws IOException; diff --git a/google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java b/google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java index e026e3349..14ee7d259 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.Preconditions; - import java.io.InputStream; import java.io.OutputStream; @@ -25,24 +24,19 @@ * be re-opened and retried. If you have a stream that it is possible to recreate please create a * new subclass of {@link AbstractInputStreamContent}. * - *

            - * The input stream is guaranteed to be closed at the end of {@link #writeTo(OutputStream)}. - *

            + *

            The input stream is guaranteed to be closed at the end of {@link #writeTo(OutputStream)}. * - *

            - * Sample use with a URL: + *

            Sample use with a URL: * *

              * 
            -  private static void setRequestJpegContent(HttpRequest request, URL jpegUrl) throws IOException {
            -    request.setContent(new InputStreamContent("image/jpeg", jpegUrl.openStream()));
            -  }
            + * private static void setRequestJpegContent(HttpRequest request, URL jpegUrl) throws IOException {
            + * request.setContent(new InputStreamContent("image/jpeg", jpegUrl.openStream()));
            + * }
              * 
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -79,10 +73,8 @@ public boolean retrySupported() { /** * Sets whether or not retry is supported. Defaults to {@code false}. * - *

            - * Should be set to {@code true} if {@link #getInputStream} is called to reset to the original + *

            Should be set to {@code true} if {@link #getInputStream} is called to reset to the original * position of the input stream. - *

            * * @since 1.7 */ @@ -109,9 +101,7 @@ public InputStreamContent setCloseInputStream(boolean closeInputStream) { /** * Sets the content length or less than zero if not known. * - *

            - * Defaults to {@code -1}. - *

            + *

            Defaults to {@code -1}. * * @since 1.5 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java index 36e6c3c22..b13e2a040 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java @@ -15,21 +15,16 @@ package com.google.api.client.http; import com.google.api.client.util.StreamingContent; - import java.io.IOException; /** * Low-level HTTP request. * - *

            - * This allows providing a different implementation of the HTTP request that is more compatible with - * the Java environment used. - *

            + *

            This allows providing a different implementation of the HTTP request that is more compatible + * with the Java environment used. * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -51,10 +46,8 @@ public abstract class LowLevelHttpRequest { /** * Adds a header to the HTTP request. * - *

            - * Note that multiple headers of the same name need to be supported, in which case - * {@link #addHeader} will be called for each instance of the header. - *

            + *

            Note that multiple headers of the same name need to be supported, in which case {@link + * #addHeader} will be called for each instance of the header. * * @param name header name * @param value header value @@ -64,9 +57,7 @@ public abstract class LowLevelHttpRequest { /** * Sets the content length or less than zero if not known. * - *

            - * Default value is {@code -1}. - *

            + *

            Default value is {@code -1}. * * @throws IOException I/O exception * @since 1.14 @@ -128,8 +119,7 @@ public final String getContentType() { * @throws IOException I/O exception * @since 1.14 */ - public final void setStreamingContent(StreamingContent streamingContent) - throws IOException { + public final void setStreamingContent(StreamingContent streamingContent) throws IOException { this.streamingContent = streamingContent; } @@ -145,34 +135,28 @@ public final StreamingContent getStreamingContent() { /** * Sets the connection and read timeouts. * - *

            - * Default implementation does nothing, but subclasses should normally override. - *

            + *

            Default implementation does nothing, but subclasses should normally override. * * @param connectTimeout timeout in milliseconds to establish a connection or {@code 0} for an - * infinite timeout + * infinite timeout * @param readTimeout Timeout in milliseconds to read data from an established connection or - * {@code 0} for an infinite timeout + * {@code 0} for an infinite timeout * @throws IOException I/O exception * @since 1.4 */ - public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - } + public void setTimeout(int connectTimeout, int readTimeout) throws IOException {} /** * Sets the write timeout for POST/PUT requests. * - *

            - * Default implementation does nothing, but subclasses should normally override. - *

            + *

            Default implementation does nothing, but subclasses should normally override. * * @param writeTimeout timeout in milliseconds to establish a connection or {@code 0} for an - * infinite timeout + * infinite timeout * @throws IOException I/O exception * @since 1.27 */ - public void setWriteTimeout(int writeTimeout) throws IOException { - } + public void setWriteTimeout(int writeTimeout) throws IOException {} /** Executes the request and returns a low-level HTTP response object. */ public abstract LowLevelHttpResponse execute() throws IOException; diff --git a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java index 94e444ebd..c4e86ffec 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java @@ -20,15 +20,11 @@ /** * Low-level HTTP response. * - *

            - * This allows providing a different implementation of the HTTP response that is more compatible + *

            This allows providing a different implementation of the HTTP response that is more compatible * with the Java environment used. - *

            * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -63,10 +59,8 @@ public abstract class LowLevelHttpResponse { /** * Returns the number of HTTP response headers. * - *

            - * Note that multiple headers of the same name need to be supported, in which case each header + *

            Note that multiple headers of the same name need to be supported, in which case each header * value is treated as a separate header. - *

            */ public abstract int getHeaderCount() throws IOException; @@ -83,6 +77,5 @@ public abstract class LowLevelHttpResponse { * @throws IOException I/O exception * @since 1.4 */ - public void disconnect() throws IOException { - } + public void disconnect() throws IOException {} } diff --git a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java index 7108ebeee..4fdc0b586 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java @@ -16,7 +16,6 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.StreamingContent; - import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; @@ -32,15 +31,11 @@ * and RFC 2046: Multipurpose Internet * Mail Extensions: The Multipart/mixed (primary) subtype. * - *

            - * By default the media type is {@code "multipart/related; boundary=__END_OF_PART__"}, but this may - * be customized by calling {@link #setMediaType(HttpMediaType)}, {@link #getMediaType()}, or + *

            By default the media type is {@code "multipart/related; boundary=__END_OF_PART__"}, but this + * may be customized by calling {@link #setMediaType(HttpMediaType)}, {@link #getMediaType()}, or * {@link #setBoundary(String)}. - *

            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 * @author Yaniv Inbar @@ -66,7 +61,8 @@ public void writeTo(OutputStream out) throws IOException { if (part.headers != null) { headers.fromHttpHeaders(part.headers); } - headers.setContentEncoding(null) + headers + .setContentEncoding(null) .setUserAgent(null) .setContentType(null) .setContentLength(null) @@ -141,10 +137,8 @@ public final Collection getParts() { /** * Adds an HTTP multipart part. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MultipartContent addPart(Part part) { parts.add(Preconditions.checkNotNull(part)); @@ -154,10 +148,8 @@ public MultipartContent addPart(Part part) { /** * Sets the parts of the HTTP multipart request. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MultipartContent setParts(Collection parts) { this.parts = new ArrayList(parts); @@ -168,10 +160,8 @@ public MultipartContent setParts(Collection parts) { * Sets the HTTP content parts of the HTTP multipart request, where each part is assumed to have * no HTTP headers and no encoding. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MultipartContent setContentParts(Collection contentParts) { this.parts = new ArrayList(contentParts.size()); @@ -189,14 +179,10 @@ public final String getBoundary() { /** * Sets the boundary string to use. * - *

            - * Defaults to {@code "END_OF_PART"}. - *

            + *

            Defaults to {@code "END_OF_PART"}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MultipartContent setBoundary(String boundary) { getMediaType().setParameter("boundary", Preconditions.checkNotNull(boundary)); @@ -206,9 +192,7 @@ public MultipartContent setBoundary(String boundary) { /** * Single part of a multi-part request. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. */ public static final class Part { @@ -225,9 +209,7 @@ public Part() { this(null); } - /** - * @param content HTTP content or {@code null} for none - */ + /** @param content HTTP content or {@code null} for none */ public Part(HttpContent content) { this(null, content); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java index 1de900725..e7ecd3dc0 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java @@ -17,7 +17,6 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; import com.google.common.annotations.VisibleForTesting; - import com.google.common.collect.ImmutableList; import io.opencensus.contrib.http.util.HttpPropagationUtil; import io.opencensus.trace.BlankSpan; @@ -29,14 +28,13 @@ import io.opencensus.trace.Tracer; import io.opencensus.trace.Tracing; import io.opencensus.trace.propagation.TextFormat; - import java.util.concurrent.atomic.AtomicLong; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; /** - * {@link Beta}
            + * {@link Beta}
            * Utilities for Census monitoring and tracing. * * @author Hailong Wen @@ -47,9 +45,7 @@ public class OpenCensusUtils { private static final Logger logger = Logger.getLogger(OpenCensusUtils.class.getName()); - /** - * Span name for tracing {@link HttpRequest#execute()}. - */ + /** Span name for tracing {@link HttpRequest#execute()}. */ public static final String SPAN_NAME_HTTP_REQUEST_EXECUTE = "Sent." + HttpRequest.class.getName() + ".execute"; @@ -59,36 +55,24 @@ public class OpenCensusUtils { */ private static final Tracer tracer = Tracing.getTracer(); - /** - * Sequence id generator for message event. - */ + /** Sequence id generator for message event. */ private static final AtomicLong idGenerator = new AtomicLong(); - /** - * Whether spans should be recorded locally. Defaults to true. - */ + /** Whether spans should be recorded locally. Defaults to true. */ private static volatile boolean isRecordEvent = true; - /** - * {@link TextFormat} used in tracing context propagation. - */ - @Nullable - @VisibleForTesting - static volatile TextFormat propagationTextFormat = null; + /** {@link TextFormat} used in tracing context propagation. */ + @Nullable @VisibleForTesting static volatile TextFormat propagationTextFormat = null; - /** - * {@link TextFormat.Setter} for {@link #propagationTextFormat}. - */ - @Nullable - @VisibleForTesting - static volatile TextFormat.Setter propagationTextFormatSetter = null; + /** {@link TextFormat.Setter} for {@link #propagationTextFormat}. */ + @Nullable @VisibleForTesting static volatile TextFormat.Setter propagationTextFormatSetter = null; /** * Sets the {@link TextFormat} used in context propagation. * *

            This API allows users of google-http-client to specify other text format, or disable context * propagation by setting it to {@code null}. It should be used along with {@link - * #setPropagationTextFormatSetter} for setting purpose.

            + * #setPropagationTextFormatSetter} for setting purpose. * * @param textFormat the text format. */ @@ -101,7 +85,7 @@ public static void setPropagationTextFormat(@Nullable TextFormat textFormat) { * *

            This API allows users of google-http-client to specify other text format setter, or disable * context propagation by setting it to {@code null}. It should be used along with {@link - * #setPropagationTextFormat} for setting purpose.

            + * #setPropagationTextFormat} for setting purpose. * * @param textFormatSetter the {@code TextFormat.Setter} for the text format. */ @@ -112,7 +96,7 @@ public static void setPropagationTextFormatSetter(@Nullable TextFormat.Setter te /** * Sets whether spans should be recorded locally. * - *

            This API allows users of google-http-client to turn on/off local span collection.

            + *

            This API allows users of google-http-client to turn on/off local span collection. * * @param recordEvent record span locally if true. */ @@ -231,22 +215,23 @@ static void recordMessageEvent(Span span, long size, Type eventType) { if (size < 0) { size = 0; } - MessageEvent event = MessageEvent - .builder(eventType, idGenerator.getAndIncrement()) - .setUncompressedMessageSize(size) - .build(); + MessageEvent event = + MessageEvent.builder(eventType, idGenerator.getAndIncrement()) + .setUncompressedMessageSize(size) + .build(); span.addMessageEvent(event); } static { try { propagationTextFormat = HttpPropagationUtil.getCloudTraceFormat(); - propagationTextFormatSetter = new TextFormat.Setter() { - @Override - public void put(HttpHeaders carrier, String key, String value) { - carrier.set(key, value); - } - }; + propagationTextFormatSetter = + new TextFormat.Setter() { + @Override + public void put(HttpHeaders carrier, String key, String value) { + carrier.set(key, value); + } + }; } catch (Exception e) { logger.log( Level.WARNING, "Cannot initialize default OpenCensus HTTP propagation text format.", e); @@ -257,8 +242,7 @@ public void put(HttpHeaders carrier, String key, String value) { .getSampledSpanStore() .registerSpanNamesForCollection(ImmutableList.of(SPAN_NAME_HTTP_REQUEST_EXECUTE)); } catch (Exception e) { - logger.log( - Level.WARNING, "Cannot register default OpenCensus span names for collection.", e); + logger.log(Level.WARNING, "Cannot register default OpenCensus span names for collection.", e); } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java index 433fb9d39..f3e7d63d1 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java @@ -20,7 +20,6 @@ import com.google.api.client.util.Types; import com.google.api.client.util.escape.CharEscapers; import com.google.common.base.Splitter; - import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; @@ -30,49 +29,26 @@ /** * Expands URI Templates. * - * This Class supports Level 1 templates and all Level 4 composite templates as described in: - * RFC 6570. + *

            This Class supports Level 1 templates and all Level 4 composite templates as described in: RFC 6570. * - * Specifically, for the variables: - * var := "value" - * list := ["red", "green", "blue"] - * keys := [("semi", ";"),("dot", "."),("comma", ",")] + *

            Specifically, for the variables: var := "value" list := ["red", "green", "blue"] keys := + * [("semi", ";"),("dot", "."),("comma", ",")] * - * The following templates results in the following expansions: - * {var} -> value - * {list} -> red,green,blue - * {list*} -> red,green,blue - * {keys} -> semi,%3B,dot,.,comma,%2C - * {keys*} -> semi=%3B,dot=.,comma=%2C - * {+list} -> red,green,blue - * {+list*} -> red,green,blue - * {+keys} -> semi,;,dot,.,comma,, - * {+keys*} -> semi=;,dot=.,comma=, - * {#list} -> #red,green,blue - * {#list*} -> #red,green,blue - * {#keys} -> #semi,;,dot,.,comma,, - * {#keys*} -> #semi=;,dot=.,comma=, - * X{.list} -> X.red,green,blue - * X{.list*} -> X.red.green.blue - * X{.keys} -> X.semi,%3B,dot,.,comma,%2C - * X{.keys*} -> X.semi=%3B.dot=..comma=%2C - * {/list} -> /red,green,blue - * {/list*} -> /red/green/blue - * {/keys} -> /semi,%3B,dot,.,comma,%2C - * {/keys*} -> /semi=%3B/dot=./comma=%2C - * {;list} -> ;list=red,green,blue - * {;list*} -> ;list=red;list=green;list=blue - * {;keys} -> ;keys=semi,%3B,dot,.,comma,%2C - * {;keys*} -> ;semi=%3B;dot=.;comma=%2C - * {?list} -> ?list=red,green,blue - * {?list*} -> ?list=red&list=green&list=blue - * {?keys} -> ?keys=semi,%3B,dot,.,comma,%2C - * {?keys*} -> ?semi=%3B&dot=.&comma=%2C - * {&list} -> &list=red,green,blue - * {&list*} -> &list=red&list=green&list=blue - * {&keys} -> &keys=semi,%3B,dot,.,comma,%2C - * {&keys*} -> &semi=%3B&dot=.&comma=%2C - * {?var,list} -> ?var=value&list=red,green,blue + *

            The following templates results in the following expansions: {var} -> value {list} -> + * red,green,blue {list*} -> red,green,blue {keys} -> semi,%3B,dot,.,comma,%2C {keys*} -> + * semi=%3B,dot=.,comma=%2C {+list} -> red,green,blue {+list*} -> red,green,blue {+keys} -> + * semi,;,dot,.,comma,, {+keys*} -> semi=;,dot=.,comma=, {#list} -> #red,green,blue {#list*} -> + * #red,green,blue {#keys} -> #semi,;,dot,.,comma,, {#keys*} -> #semi=;,dot=.,comma=, X{.list} -> + * X.red,green,blue X{.list*} -> X.red.green.blue X{.keys} -> X.semi,%3B,dot,.,comma,%2C X{.keys*} + * -> X.semi=%3B.dot=..comma=%2C {/list} -> /red,green,blue {/list*} -> /red/green/blue {/keys} -> + * /semi,%3B,dot,.,comma,%2C {/keys*} -> /semi=%3B/dot=./comma=%2C {;list} -> ;list=red,green,blue + * {;list*} -> ;list=red;list=green;list=blue {;keys} -> ;keys=semi,%3B,dot,.,comma,%2C {;keys*} -> + * ;semi=%3B;dot=.;comma=%2C {?list} -> ?list=red,green,blue {?list*} -> + * ?list=red&list=green&list=blue {?keys} -> ?keys=semi,%3B,dot,.,comma,%2C {?keys*} -> + * ?semi=%3B&dot=.&comma=%2C {&list} -> &list=red,green,blue {&list*} -> + * &list=red&list=green&list=blue {&keys} -> &keys=semi,%3B,dot,.,comma,%2C {&keys*} -> + * &semi=%3B&dot=.&comma=%2C {?var,list} -> ?var=value&list=red,green,blue * * @since 1.6 * @author Ravi Mistry @@ -88,9 +64,7 @@ public class UriTemplate { private static final String COMPOSITE_NON_EXPLODE_JOINER = ","; - /** - * Contains information on how to output a composite value. - */ + /** Contains information on how to output a composite value. */ private enum CompositeOutput { /** Reserved expansion. */ @@ -125,16 +99,20 @@ private enum CompositeOutput { /** * @param propertyPrefix The prefix of a parameter or {@code null} for none. In {+var} the - * prefix is '+' + * prefix is '+' * @param outputPrefix The string that should be prefixed to the expanded template. * @param explodeJoiner The delimiter used to join composite values. - * @param requiresVarAssignment Denotes whether or not the expanded template should contain - * an assignment with the variable. - * @param reservedExpansion Reserved expansion allows pct-encoded triplets and characters in - * the reserved set. + * @param requiresVarAssignment Denotes whether or not the expanded template should contain an + * assignment with the variable. + * @param reservedExpansion Reserved expansion allows pct-encoded triplets and characters in the + * reserved set. */ - CompositeOutput(Character propertyPrefix, String outputPrefix, String explodeJoiner, - boolean requiresVarAssignment, boolean reservedExpansion) { + CompositeOutput( + Character propertyPrefix, + String outputPrefix, + String explodeJoiner, + boolean requiresVarAssignment, + boolean reservedExpansion) { this.propertyPrefix = propertyPrefix; this.outputPrefix = Preconditions.checkNotNull(outputPrefix); this.explodeJoiner = Preconditions.checkNotNull(explodeJoiner); @@ -145,22 +123,18 @@ private enum CompositeOutput { } } - /** - * Returns the string that should be prefixed to the expanded template. - */ + /** Returns the string that should be prefixed to the expanded template. */ String getOutputPrefix() { return outputPrefix; } - /** - * Returns the delimiter used to join composite values. - */ + /** Returns the delimiter used to join composite values. */ String getExplodeJoiner() { return explodeJoiner; } /** - * Returns whether or not the expanded template should contain an assignment with the variable. + * Returns whether or not the expanded template should contain an assignment with the variable. */ boolean requiresVarAssignment() { return requiresVarAssignment; @@ -175,11 +149,10 @@ int getVarNameStartIndex() { } /** - * Encodes the specified value. If reserved expansion is turned on then - * pct-encoded triplets and characters are allowed in the reserved set. + * Encodes the specified value. If reserved expansion is turned on then pct-encoded triplets and + * characters are allowed in the reserved set. * * @param value The string to be encoded. - * * @return The encoded string. */ String getEncodedValue(String value) { @@ -206,9 +179,7 @@ static CompositeOutput getCompositeOutput(String propertyName) { /** * Constructs a new {@code Map} from an {@code Object}. * - *

            - * There are no null values in the returned map. - *

            + *

            There are no null values in the returned map. */ private static Map getMap(Object obj) { // Using a LinkedHashMap to maintain the original order of insertions. This is done to help @@ -226,28 +197,24 @@ private static Map getMap(Object obj) { /** * Expands templates in a URI template that is relative to a base URL. * - *

            - * If the URI template starts with a "/" the raw path from the base URL is stripped out. If the + *

            If the URI template starts with a "/" the raw path from the base URL is stripped out. If the * URI template is a full URL then it is used instead of the base URL. - *

            * - *

            - * Supports Level 1 templates and all Level 4 composite templates as described in: - * RFC 6570. - *

            + *

            Supports Level 1 templates and all Level 4 composite templates as described in: RFC 6570. * * @param baseUrl The base URL which the URI component is relative to. * @param uriTemplate URI component. It may contain one or more sequences of the form "{name}", - * where "name" must be a key in variableMap. + * where "name" must be a key in variableMap. * @param parameters an object with parameters designated by Key annotations. If the template has - * no variable references, parameters may be {@code null}. + * no variable references, parameters may be {@code null}. * @param addUnusedParamsAsQueryParams If true then parameters that do not match the template are - * appended to the expanded template as query parameters. + * appended to the expanded template as query parameters. * @return The expanded template * @since 1.7 */ - public static String expand(String baseUrl, String uriTemplate, Object parameters, - boolean addUnusedParamsAsQueryParams) { + public static String expand( + String baseUrl, String uriTemplate, Object parameters, boolean addUnusedParamsAsQueryParams) { String pathUri; if (uriTemplate.startsWith("/")) { // Remove the base path from the base URL. @@ -265,22 +232,20 @@ public static String expand(String baseUrl, String uriTemplate, Object parameter /** * Expands templates in a URI. * - *

            - * Supports Level 1 templates and all Level 4 composite templates as described in: - * RFC 6570. - *

            + *

            Supports Level 1 templates and all Level 4 composite templates as described in: RFC 6570. * * @param pathUri URI component. It may contain one or more sequences of the form "{name}", where - * "name" must be a key in variableMap + * "name" must be a key in variableMap * @param parameters an object with parameters designated by Key annotations. If the template has - * no variable references, parameters may be {@code null}. + * no variable references, parameters may be {@code null}. * @param addUnusedParamsAsQueryParams If true then parameters that do not match the template are - * appended to the expanded template as query parameters. + * appended to the expanded template as query parameters. * @return The expanded template * @since 1.6 */ - public static String expand(String pathUri, Object parameters, - boolean addUnusedParamsAsQueryParams) { + public static String expand( + String pathUri, Object parameters, boolean addUnusedParamsAsQueryParams) { Map variableMap = getMap(parameters); StringBuilder pathBuf = new StringBuilder(); int cur = 0; @@ -308,8 +273,8 @@ public static String expand(String pathUri, Object parameters, String template = templateIterator.next(); boolean containsExplodeModifier = template.endsWith("*"); - int varNameStartIndex = templateIterator.nextIndex() == 1 - ? compositeOutput.getVarNameStartIndex() : 0; + int varNameStartIndex = + templateIterator.nextIndex() == 1 ? compositeOutput.getVarNameStartIndex() : 0; int varNameEndIndex = template.length(); if (containsExplodeModifier) { // The expression contains an explode modifier '*' at the end, update end index. @@ -366,9 +331,8 @@ private static String getSimpleValue(String name, String value, CompositeOutput } /** - * Expand the template of a composite list property. - * Eg: If d := ["red", "green", "blue"] - * then {/d*} is expanded to "/red/green/blue" + * Expand the template of a composite list property. Eg: If d := ["red", "green", "blue"] then + * {/d*} is expanded to "/red/green/blue" * * @param varName The name of the variable the value corresponds to. Eg: "d" * @param iterator The iterator over list values. Eg: ["red", "green", "blue"] @@ -378,8 +342,11 @@ private static String getSimpleValue(String name, String value, CompositeOutput * @return The expanded list template * @throws IllegalArgumentException if the required list path parameter is empty */ - private static String getListPropertyValue(String varName, Iterator iterator, - boolean containsExplodeModifier, CompositeOutput compositeOutput) { + private static String getListPropertyValue( + String varName, + Iterator iterator, + boolean containsExplodeModifier, + CompositeOutput compositeOutput) { if (!iterator.hasNext()) { return ""; } @@ -408,9 +375,8 @@ private static String getListPropertyValue(String varName, Iterator iterator, } /** - * Expand the template of a composite map property. - * Eg: If d := [("semi", ";"),("dot", "."),("comma", ",")] - * then {/d*} is expanded to "/semi=%3B/dot=./comma=%2C" + * Expand the template of a composite map property. Eg: If d := [("semi", ";"),("dot", + * "."),("comma", ",")] then {/d*} is expanded to "/semi=%3B/dot=./comma=%2C" * * @param varName The name of the variable the value corresponds to. Eg: "d" * @param map The map property value. Eg: [("semi", ";"),("dot", "."),("comma", ",")] @@ -420,8 +386,11 @@ private static String getListPropertyValue(String varName, Iterator iterator, * @return The expanded map template * @throws IllegalArgumentException if the required list path parameter is map */ - private static String getMapPropertyValue(String varName, Map map, - boolean containsExplodeModifier, CompositeOutput compositeOutput) { + private static String getMapPropertyValue( + String varName, + Map map, + boolean containsExplodeModifier, + CompositeOutput compositeOutput) { if (map.isEmpty()) { return ""; } @@ -440,7 +409,7 @@ private static String getMapPropertyValue(String varName, Map ma } } for (Iterator> mapIterator = map.entrySet().iterator(); - mapIterator.hasNext();) { + mapIterator.hasNext(); ) { Map.Entry entry = mapIterator.next(); String encodedKey = compositeOutput.getEncodedValue(entry.getKey()); String encodedValue = compositeOutput.getEncodedValue(entry.getValue().toString()); diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java index 79741670a..eb6428b18 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java @@ -19,7 +19,6 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.Types; import com.google.api.client.util.escape.CharEscapers; - import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; @@ -29,23 +28,19 @@ import java.util.Map; /** - * Implements support for HTTP form content encoding serialization of type - * {@code application/x-www-form-urlencoded} as specified in the HTML 4.0 Specification. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  static void setContent(HttpRequest request, Object item) {
            -    request.setContent(new UrlEncodedContent(item));
            -  }
            + * static void setContent(HttpRequest request, Object item) {
            + * request.setContent(new UrlEncodedContent(item));
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -55,9 +50,7 @@ public class UrlEncodedContent extends AbstractHttpContent { /** Key name/value data. */ private Object data; - /** - * @param data key name/value data - */ + /** @param data key name/value data */ public UrlEncodedContent(Object data) { super(UrlEncodedParser.MEDIA_TYPE); setData(data); @@ -101,10 +94,8 @@ public final Object getData() { /** * Sets the key name/value data. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.5 */ @@ -120,8 +111,8 @@ public UrlEncodedContent setData(Object data) { * * @param request HTTP request * @return URL-encoded content - * @throws ClassCastException if the HTTP request has a content defined that is not - * {@link UrlEncodedContent} + * @throws ClassCastException if the HTTP request has a content defined that is not {@link + * UrlEncodedContent} * @since 1.7 */ public static UrlEncodedContent getContent(HttpRequest request) { @@ -147,8 +138,9 @@ private static boolean appendParam(boolean first, Writer writer, String name, Ob writer.write("&"); } writer.write(name); - String stringValue = CharEscapers.escapeUri( - value instanceof Enum ? FieldInfo.of((Enum) value).getName() : value.toString()); + String stringValue = + CharEscapers.escapeUri( + value instanceof Enum ? FieldInfo.of((Enum) value).getName() : value.toString()); if (stringValue.length() != 0) { writer.write("="); writer.write(stringValue); diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java index 52209740b..cd5e8a63a 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java @@ -25,7 +25,6 @@ import com.google.api.client.util.Throwables; import com.google.api.client.util.Types; import com.google.api.client.util.escape.CharEscapers; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; @@ -42,27 +41,21 @@ import java.util.Map; /** - * Implements support for HTTP form content encoding parsing of type - * {@code application/x-www-form-urlencoded} as specified in the HTML 4.0 * Specification. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * - *

            - * The data is parsed using {@link #parse(String, Object)}. - *

            + *

            The data is parsed using {@link #parse(String, Object)}. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -   static void setParser(HttpTransport transport) {
            -     transport.addParser(new UrlEncodedParser());
            -   }
            + * static void setParser(HttpTransport transport) {
            + * transport.addParser(new UrlEncodedParser());
            + * }
              * 
            * * @since 1.0 @@ -104,24 +97,20 @@ public static void parse(String content, Object data) { * Parses the given URL-encoded content into the given data object of data key name/value pairs, * including support for repeating data key names. * - *

            - * Declared fields of a "primitive" type (as defined by {@link Data#isPrimitive(Type)} are parsed - * using {@link Data#parsePrimitiveValue(Type, String)} where the {@link Class} parameter is the - * declared field class. Declared fields of type {@link Collection} are used to support repeating - * data key names, so each member of the collection is an additional data key value. They are - * parsed the same as "primitive" fields, except that the generic type parameter of the collection - * is used as the {@link Class} parameter. - *

            + *

            Declared fields of a "primitive" type (as defined by {@link Data#isPrimitive(Type)} are + * parsed using {@link Data#parsePrimitiveValue(Type, String)} where the {@link Class} parameter + * is the declared field class. Declared fields of type {@link Collection} are used to support + * repeating data key names, so each member of the collection is an additional data key value. + * They are parsed the same as "primitive" fields, except that the generic type parameter of the + * collection is used as the {@link Class} parameter. * - *

            - * If there is no declared field for an input parameter name, it will be ignored unless the input - * {@code data} parameter is a {@link Map}. If it is a map, the parameter value will be stored - * either as a string, or as a {@link ArrayList}<String> in the case of repeated parameters. - *

            + *

            If there is no declared field for an input parameter name, it will be ignored unless the + * input {@code data} parameter is a {@link Map}. If it is a map, the parameter value will be + * stored either as a string, or as a {@link ArrayList}<String> in the case of repeated + * parameters. * * @param reader URL-encoded reader * @param data data key name/value pairs - * * @since 1.14 */ public static void parse(Reader reader, Object data) throws IOException { @@ -135,11 +124,12 @@ public static void parse(Reader reader, Object data) throws IOException { StringWriter nameWriter = new StringWriter(); StringWriter valueWriter = new StringWriter(); boolean readingName = true; - mainLoop: while (true) { + mainLoop: + while (true) { int read = reader.read(); switch (read) { case -1: - // falls through + // falls through case '&': // parse name/value pair String name = CharEscapers.decodeUri(nameWriter.toString()); @@ -155,7 +145,9 @@ public static void parse(Reader reader, Object data) throws IOException { // array that can handle repeating values Class rawArrayComponentType = Types.getRawArrayComponentType(context, Types.getArrayComponentType(type)); - arrayValueMap.put(fieldInfo.getField(), rawArrayComponentType, + arrayValueMap.put( + fieldInfo.getField(), + rawArrayComponentType, parseValue(rawArrayComponentType, context, stringValue)); } else if (Types.isAssignableToOrFrom( Types.getRawArrayComponentType(context, type), Iterable.class)) { diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java index f498b7150..230d9b0f5 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java @@ -23,9 +23,7 @@ import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpRequestBase; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; @@ -46,14 +44,14 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - requestConfig.setConnectionRequestTimeout(connectTimeout) - .setSocketTimeout(readTimeout); + requestConfig.setConnectionRequestTimeout(connectTimeout).setSocketTimeout(readTimeout); } @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, + Preconditions.checkArgument( + request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java index 50e74dc87..946f5e718 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java @@ -61,20 +61,16 @@ /** * Thread-safe HTTP transport based on the Apache HTTP Client library. * - *

            - * Implementation is thread-safe, as long as any parameter modification to the - * {@link #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum - * efficiency, applications should use a single globally-shared instance of the HTTP transport. - *

            + *

            Implementation is thread-safe, as long as any parameter modification to the {@link + * #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum efficiency, + * applications should use a single globally-shared instance of the HTTP transport. * - *

            - * Default settings are specified in {@link #newDefaultHttpClient()}. Use the - * {@link #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. + *

            Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link + * #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. * Alternatively, use {@link #ApacheHttpTransport()} and change the {@link #getHttpClient()}. Please * read the Apache HTTP * Client connection management tutorial for more complex configuration options. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -87,9 +83,7 @@ public final class ApacheHttpTransport extends HttpTransport { /** * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. * - *

            - * Use {@link Builder} to modify HTTP client options. - *

            + *

            Use {@link Builder} to modify HTTP client options. * * @since 1.3 */ @@ -100,25 +94,22 @@ public ApacheHttpTransport() { /** * Constructor that allows an alternative Apache HTTP client to be used. * - *

            - * Note that a few settings are overridden: - *

            + *

            Note that a few settings are overridden: + * *

              - *
            • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with - * {@link HttpVersion#HTTP_1_1}.
            • - *
            • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}.
            • - *
            • {@link ConnManagerParams#setTimeout} and {@link HttpConnectionParams#setConnectionTimeout} - * are set on each request based on {@link HttpRequest#getConnectTimeout()}.
            • - *
            • {@link HttpConnectionParams#setSoTimeout} is set on each request based on - * {@link HttpRequest#getReadTimeout()}.
            • + *
            • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with {@link + * HttpVersion#HTTP_1_1}. + *
            • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}. + *
            • {@link ConnManagerParams#setTimeout} and {@link + * HttpConnectionParams#setConnectionTimeout} are set on each request based on {@link + * HttpRequest#getConnectTimeout()}. + *
            • {@link HttpConnectionParams#setSoTimeout} is set on each request based on {@link + * HttpRequest#getReadTimeout()}. *
            * - *

            - * Use {@link Builder} for a more user-friendly way to modify the HTTP client options. - *

            + *

            Use {@link Builder} for a more user-friendly way to modify the HTTP client options. * * @param httpClient Apache HTTP client to use - * * @since 1.6 */ public ApacheHttpTransport(HttpClient httpClient) { @@ -132,22 +123,21 @@ public ApacheHttpTransport(HttpClient httpClient) { } /** - * Creates a new instance of the Apache HTTP client that is used by the - * {@link #ApacheHttpTransport()} constructor. + * Creates a new instance of the Apache HTTP client that is used by the {@link + * #ApacheHttpTransport()} constructor. + * + *

            Use this constructor if you want to customize the default Apache HTTP client. Settings: * - *

            - * Use this constructor if you want to customize the default Apache HTTP client. Settings: - *

            *
              - *
            • The client connection manager is set to {@link ThreadSafeClientConnManager}.
            • - *
            • The socket buffer size is set to 8192 using - * {@link HttpConnectionParams#setSocketBufferSize}.
            • - *
            • - *
            • The route planner uses {@link ProxySelectorRoutePlanner} with - * {@link ProxySelector#getDefault()}, which uses the proxy settings from system - * properties.
            • + *
            • The client connection manager is set to {@link ThreadSafeClientConnManager}. + *
            • The socket buffer size is set to 8192 using {@link + * HttpConnectionParams#setSocketBufferSize}. + *
            • The route planner uses {@link ProxySelectorRoutePlanner} with {@link + * ProxySelector#getDefault()}, which uses the proxy settings from system + * properties. *
            * * @return new instance of the Apache HTTP client @@ -171,13 +161,13 @@ static HttpParams newDefaultHttpParams() { } /** - * Creates a new instance of the Apache HTTP client that is used by the - * {@link #ApacheHttpTransport()} constructor. + * Creates a new instance of the Apache HTTP client that is used by the {@link + * #ApacheHttpTransport()} constructor. * * @param socketFactory SSL socket factory * @param params HTTP parameters - * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or - * {@code null} for {@link DefaultHttpRoutePlanner} + * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code + * null} for {@link DefaultHttpRoutePlanner} * @return new instance of the Apache HTTP client */ static DefaultHttpClient newDefaultHttpClient( @@ -246,9 +236,7 @@ public HttpClient getHttpClient() { /** * Builder for {@link ApacheHttpTransport}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.13 */ @@ -261,27 +249,23 @@ public static final class Builder { private HttpParams params = newDefaultHttpParams(); /** - * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for - * {@link DefaultHttpRoutePlanner}. + * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for {@link + * DefaultHttpRoutePlanner}. */ private ProxySelector proxySelector = ProxySelector.getDefault(); /** - * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use - * {@link #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. + * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use {@link + * #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. * - *

            - * By default it is {@code null}, which uses the proxy settings from By default it is {@code null}, which uses the proxy settings from system * properties. - *

            * - *

            - * For example: - *

            + *

            For example: * *

            -       setProxy(new HttpHost("127.0.0.1", 8080))
            +     * setProxy(new HttpHost("127.0.0.1", 8080))
                  * 
            */ public Builder setProxy(HttpHost proxy) { @@ -296,11 +280,9 @@ public Builder setProxy(HttpHost proxy) { * Sets the HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for * {@link DefaultHttpRoutePlanner}. * - *

            - * By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from system * properties. - *

            */ public Builder setProxySelector(ProxySelector proxySelector) { this.proxySelector = proxySelector; @@ -312,16 +294,14 @@ public Builder setProxySelector(ProxySelector proxySelector) { /** * Sets the SSL socket factory based on root certificates in a Java KeyStore. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
            +     * trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
                  * 
            * * @param keyStoreStream input stream to the key store (closed at the end of this method in a - * finally block) + * finally block) * @param storePass password protecting the key store file * @since 1.14 */ @@ -336,12 +316,10 @@ public Builder trustCertificatesFromJavaKeyStore(InputStream keyStoreStream, Str * Sets the SSL socket factory based root certificates generated from the specified stream using * {@link CertificateFactory#generateCertificates(InputStream)}. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromStream(new FileInputStream("certs.pem"));
            +     * trustCertificatesFromStream(new FileInputStream("certs.pem"));
                  * 
            * * @param certificateStream certificate stream @@ -360,8 +338,7 @@ public Builder trustCertificatesFromStream(InputStream certificateStream) * Sets the SSL socket factory based on a root certificate trust store. * * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} - * or {@link SecurityUtils#loadKeyStoreFromCertificates}) - * + * or {@link SecurityUtils#loadKeyStoreFromCertificates}) * @since 1.14 */ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityException { @@ -371,15 +348,13 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce } /** - * {@link Beta}
            - * Disables validating server SSL certificates by setting the SSL socket factory using - * {@link SslUtils#trustAllSSLContext()} for the SSL context and - * {@link SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. + * {@link Beta}
            + * Disables validating server SSL certificates by setting the SSL socket factory using {@link + * SslUtils#trustAllSSLContext()} for the SSL context and {@link + * SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. * - *

            - * Be careful! Disabling certificate validation is dangerous and should only be done in testing - * environments. - *

            + *

            Be careful! Disabling certificate validation is dangerous and should only be done in + * testing environments. */ @Beta public Builder doNotValidateCertificate() throws GeneralSecurityException { diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java index 293f8a908..343b35c50 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java @@ -21,9 +21,7 @@ import java.io.OutputStream; import org.apache.http.entity.AbstractHttpEntity; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ContentEntity extends AbstractHttpEntity { /** Content length or less than zero if not known. */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java b/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java index 3d507371b..18d9ebc58 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java @@ -37,11 +37,10 @@ final class SSLSocketFactoryExtension extends SSLSocketFactory { /** Wrapped Java SSL socket factory. */ private final javax.net.ssl.SSLSocketFactory socketFactory; - /** - * @param sslContext SSL context - */ - SSLSocketFactoryExtension(SSLContext sslContext) throws KeyManagementException, - UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { + /** @param sslContext SSL context */ + SSLSocketFactoryExtension(SSLContext sslContext) + throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, + KeyStoreException { super((KeyStore) null); socketFactory = sslContext.getSocketFactory(); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java index e0f5be089..0c2c23b4f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java @@ -18,6 +18,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.http.apache; - diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java index 49479303b..2ee5a718b 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java @@ -4,9 +4,7 @@ import java.net.HttpURLConnection; import java.net.URL; -/** - * Given a {@link URL} instance, produces an {@link HttpURLConnection}. - */ +/** Given a {@link URL} instance, produces an {@link HttpURLConnection}. */ public interface ConnectionFactory { /** diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java index 9bca36848..d4151261d 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java @@ -19,8 +19,8 @@ public DefaultConnectionFactory() { /** * @param proxy HTTP proxy or {@code null} to use the proxy settings from - * system properties + * href="http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html"> + * system properties */ public DefaultConnectionFactory(Proxy proxy) { this.proxy = proxy; diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java index 58850b794..e497f882c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java @@ -17,7 +17,6 @@ import com.google.api.client.http.LowLevelHttpRequest; import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.Preconditions; - import com.google.api.client.util.StreamingContent; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; @@ -32,17 +31,13 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class NetHttpRequest extends LowLevelHttpRequest { private final HttpURLConnection connection; private int writeTimeout; - /** - * @param connection HTTP URL connection - */ + /** @param connection HTTP URL connection */ NetHttpRequest(HttpURLConnection connection) { this.connection = connection; this.writeTimeout = 0; @@ -172,13 +167,14 @@ private void writeContentToOutputStream(final OutputWriter outputWriter, final O } else { // do it with timeout final StreamingContent content = getStreamingContent(); - final Callable writeContent = new Callable() { - @Override - public Boolean call() throws IOException { - outputWriter.write(out, content); - return Boolean.TRUE; - } - }; + final Callable writeContent = + new Callable() { + @Override + public Boolean call() throws IOException { + outputWriter.write(out, content); + return Boolean.TRUE; + } + }; final ExecutorService executor = Executors.newSingleThreadExecutor(); final Future future = executor.submit(new FutureTask(writeContent), null); diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java index 3580957c1..7114f6391 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java @@ -15,7 +15,6 @@ package com.google.api.client.http.javanet; import com.google.api.client.http.LowLevelHttpResponse; - import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; @@ -60,28 +59,22 @@ public int getStatusCode() { /** * {@inheritDoc} * - *

            - * Returns {@link HttpURLConnection#getInputStream} when it doesn't throw {@link IOException}, + *

            Returns {@link HttpURLConnection#getInputStream} when it doesn't throw {@link IOException}, * otherwise it returns {@link HttpURLConnection#getErrorStream}. - *

            * - *

            - * Upgrade warning: in prior version 1.16 {@link #getContent()} returned - * {@link HttpURLConnection#getInputStream} only when the status code was successful. Starting - * with version 1.17 it returns {@link HttpURLConnection#getInputStream} when it doesn't throw - * {@link IOException}, otherwise it returns {@link HttpURLConnection#getErrorStream} - *

            + *

            Upgrade warning: in prior version 1.16 {@link #getContent()} returned {@link + * HttpURLConnection#getInputStream} only when the status code was successful. Starting with + * version 1.17 it returns {@link HttpURLConnection#getInputStream} when it doesn't throw {@link + * IOException}, otherwise it returns {@link HttpURLConnection#getErrorStream} * - *

            - * Upgrade warning: in versions prior to 1.20 {@link #getContent()} returned - * {@link HttpURLConnection#getInputStream()} or {@link HttpURLConnection#getErrorStream()}, both - * of which silently returned -1 for read() calls when the connection got closed in the middle - * of receiving a response. This is highly likely a bug from JDK's {@link HttpURLConnection}. - * Since version 1.20, the bytes read off the wire will be checked and an {@link IOException} will - * be thrown if the response is not fully delivered when the connection is closed by server for + *

            Upgrade warning: in versions prior to 1.20 {@link #getContent()} returned {@link + * HttpURLConnection#getInputStream()} or {@link HttpURLConnection#getErrorStream()}, both of + * which silently returned -1 for read() calls when the connection got closed in the middle of + * receiving a response. This is highly likely a bug from JDK's {@link HttpURLConnection}. Since + * version 1.20, the bytes read off the wire will be checked and an {@link IOException} will be + * thrown if the response is not fully delivered when the connection is closed by server for * whatever reason, e.g., server restarts. Note though that this is a best-effort check: when the * response is chunk encoded, we have to rely on the underlying HTTP library to behave correctly. - *

            */ @Override public InputStream getContent() throws IOException { @@ -162,7 +155,9 @@ public SizeValidatingInputStream(InputStream in) { /** * java.io.InputStream#read(byte[], int, int) swallows IOException thrown from read() so we have * to override it. - * @see "http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/io/InputStream.java#185" + * + * @see + * "http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/io/InputStream.java#185" */ @Override public int read(byte[] b, int off, int len) throws IOException { @@ -206,8 +201,11 @@ private void throwIfFalseEOF() throws IOException { // // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 for details. if (bytesRead != 0 && bytesRead < contentLength) { - throw new IOException("Connection closed prematurely: bytesRead = " + bytesRead - + ", Content-Length = " + contentLength); + throw new IOException( + "Connection closed prematurely: bytesRead = " + + bytesRead + + ", Content-Length = " + + contentLength); } } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java index b0f751c07..3ba4eb676 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java @@ -38,22 +38,16 @@ /** * Thread-safe HTTP low-level transport based on the {@code java.net} package. * - *

            - * Users should consider modifying the keep alive property on {@link NetHttpTransport} to control + *

            Users should consider modifying the keep alive property on {@link NetHttpTransport} to control * whether the socket should be returned to a pool of connected sockets. More information is * available here. - *

            * - *

            - * We honor the default global caching behavior. To change the default behavior use - * {@link HttpURLConnection#setDefaultUseCaches(boolean)}. - *

            + *

            We honor the default global caching behavior. To change the default behavior use {@link + * HttpURLConnection#setDefaultUseCaches(boolean)}. * - *

            - * Implementation is thread-safe. For maximum efficiency, applications should use a single + *

            Implementation is thread-safe. For maximum efficiency, applications should use a single * globally-shared instance of the HTTP transport. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -61,22 +55,26 @@ public final class NetHttpTransport extends HttpTransport { private static Proxy defaultProxy() { return new Proxy( - Proxy.Type.HTTP, new InetSocketAddress( - System.getProperty("https.proxyHost"), - Integer.parseInt(System.getProperty("https.proxyPort")))); + Proxy.Type.HTTP, + new InetSocketAddress( + System.getProperty("https.proxyHost"), + Integer.parseInt(System.getProperty("https.proxyPort")))); } /** * All valid request methods as specified in {@link HttpURLConnection#setRequestMethod}, sorted in * ascending alphabetical order. */ - private static final String[] SUPPORTED_METHODS = {HttpMethods.DELETE, - HttpMethods.GET, - HttpMethods.HEAD, - HttpMethods.OPTIONS, - HttpMethods.POST, - HttpMethods.PUT, - HttpMethods.TRACE}; + private static final String[] SUPPORTED_METHODS = { + HttpMethods.DELETE, + HttpMethods.GET, + HttpMethods.HEAD, + HttpMethods.OPTIONS, + HttpMethods.POST, + HttpMethods.PUT, + HttpMethods.TRACE + }; + static { Arrays.sort(SUPPORTED_METHODS); } @@ -95,9 +93,7 @@ Proxy.Type.HTTP, new InetSocketAddress( /** * Constructor with the default behavior. * - *

            - * Instead use {@link Builder} to modify behavior. - *

            + *

            Instead use {@link Builder} to modify behavior. */ public NetHttpTransport() { this((ConnectionFactory) null, null, null); @@ -105,8 +101,8 @@ public NetHttpTransport() { /** * @param proxy HTTP proxy or {@code null} to use the proxy settings from - * system properties + * href="http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html"> + * system properties * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default */ @@ -117,15 +113,16 @@ public NetHttpTransport() { /** * @param connectionFactory factory to produce connections from {@link URL}s; if {@code null} then - * {@link DefaultConnectionFactory} is used + * {@link DefaultConnectionFactory} is used * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default * @since 1.20 */ - NetHttpTransport(ConnectionFactory connectionFactory, - SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) { - this.connectionFactory = - getConnectionFactory(connectionFactory); + NetHttpTransport( + ConnectionFactory connectionFactory, + SSLSocketFactory sslSocketFactory, + HostnameVerifier hostnameVerifier) { + this.connectionFactory = getConnectionFactory(connectionFactory); this.sslSocketFactory = sslSocketFactory; this.hostnameVerifier = hostnameVerifier; } @@ -168,9 +165,7 @@ protected NetHttpRequest buildRequest(String method, String url) throws IOExcept /** * Builder for {@link NetHttpTransport}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.13 */ @@ -200,12 +195,10 @@ public static final class Builder { * href="http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html">system * properties. * - *

            - * For example: - *

            + *

            For example: * *

            -       setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8080)))
            +     * setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8080)))
                  * 
            */ public Builder setProxy(Proxy proxy) { @@ -217,10 +210,8 @@ public Builder setProxy(Proxy proxy) { * Sets the {@link ConnectionFactory} or {@code null} to use a {@link DefaultConnectionFactory}. * This value is ignored if the {@link #setProxy} has been called with a non-null value. * - *

            - * If you wish to use a {@link Proxy}, it should be included in your {@link ConnectionFactory} - * implementation. - *

            + *

            If you wish to use a {@link Proxy}, it should be included in your {@link + * ConnectionFactory} implementation. * * @since 1.20 */ @@ -232,16 +223,14 @@ public Builder setConnectionFactory(ConnectionFactory connectionFactory) { /** * Sets the SSL socket factory based on root certificates in a Java KeyStore. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
            +     * trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
                  * 
            * * @param keyStoreStream input stream to the key store (closed at the end of this method in a - * finally block) + * finally block) * @param storePass password protecting the key store file * @since 1.14 */ @@ -256,12 +245,10 @@ public Builder trustCertificatesFromJavaKeyStore(InputStream keyStoreStream, Str * Sets the SSL socket factory based root certificates generated from the specified stream using * {@link CertificateFactory#generateCertificates(InputStream)}. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    trustCertificatesFromStream(new FileInputStream("certs.pem"));
            +     * trustCertificatesFromStream(new FileInputStream("certs.pem"));
                  * 
            * * @param certificateStream certificate stream @@ -280,7 +267,7 @@ public Builder trustCertificatesFromStream(InputStream certificateStream) * Sets the SSL socket factory based on a root certificate trust store. * * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} - * or {@link SecurityUtils#loadKeyStoreFromCertificates}) + * or {@link SecurityUtils#loadKeyStoreFromCertificates}) * @since 1.14 */ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityException { @@ -290,15 +277,13 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce } /** - * {@link Beta}
            - * Disables validating server SSL certificates by setting the SSL socket factory using - * {@link SslUtils#trustAllSSLContext()} for the SSL context and - * {@link SslUtils#trustAllHostnameVerifier()} for the host name verifier. + * {@link Beta}
            + * Disables validating server SSL certificates by setting the SSL socket factory using {@link + * SslUtils#trustAllSSLContext()} for the SSL context and {@link + * SslUtils#trustAllHostnameVerifier()} for the host name verifier. * - *

            - * Be careful! Disabling certificate validation is dangerous and should only be done in testing - * environments. - *

            + *

            Be careful! Disabling certificate validation is dangerous and should only be done in + * testing environments. */ @Beta public Builder doNotValidateCertificate() throws GeneralSecurityException { diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java index a40555024..48ae2ba7f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java @@ -18,6 +18,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.http.javanet; - diff --git a/google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java b/google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java index 29e743f59..04c2cf5c1 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java @@ -20,28 +20,23 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonGenerator; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.OutputStream; /** * Serializes JSON HTTP content based on the data key/value mapping object for an item. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            - *
            -  static void setContent(HttpRequest request, Object data) {
            -    request.setContent(new JsonHttpContent(new JacksonFactory(), data));
            -  }
            + * 
            + * static void setContent(HttpRequest request, Object data) {
            + * request.setContent(new JsonHttpContent(new JacksonFactory(), data));
            + * }
              * 
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -118,10 +113,8 @@ public final String getWrapperKey() { /** * Sets the wrapper key for the JSON content or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.14 */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/json/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/json/package-info.java index b89d35e3f..e46e9e069 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/json/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/http/json/package-info.java @@ -18,6 +18,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.http.json; - diff --git a/google-http-client/src/main/java/com/google/api/client/http/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/package-info.java index 93b6fcb08..a689ea9b7 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/http/package-info.java @@ -19,6 +19,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.http; - diff --git a/google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java index 581c0ed2f..83a30293b 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java @@ -15,23 +15,18 @@ package com.google.api.client.json; import com.google.api.client.util.Beta; - import java.lang.reflect.Field; import java.util.Collection; /** - * {@link Beta}
            + * {@link Beta}
            * Customizes the behavior of a JSON parser. * - *

            - * All methods have a default trivial implementation, so subclasses need only implement the methods - * whose behavior needs customization. - *

            + *

            All methods have a default trivial implementation, so subclasses need only implement the + * methods whose behavior needs customization. * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -39,18 +34,13 @@ @Beta public class CustomizeJsonParser { - /** - * Returns whether to stop parsing at the given key of the given context object. - */ + /** Returns whether to stop parsing at the given key of the given context object. */ public boolean stopAt(Object context, String key) { return false; } - /** - * Called when the given unrecognized key is encountered in the given context object. - */ - public void handleUnrecognizedKey(Object context, String key) { - } + /** Called when the given unrecognized key is encountered in the given context object. */ + public void handleUnrecognizedKey(Object context, String key) {} /** * Returns a new instance value for the given field in the given context object for a JSON array diff --git a/google-http-client/src/main/java/com/google/api/client/json/GenericJson.java b/google-http-client/src/main/java/com/google/api/client/json/GenericJson.java index 40452e1f7..88faab2d3 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/GenericJson.java +++ b/google-http-client/src/main/java/com/google/api/client/json/GenericJson.java @@ -17,22 +17,18 @@ import com.google.api.client.util.GenericData; import com.google.api.client.util.Key; import com.google.api.client.util.Throwables; - import java.io.IOException; import java.util.concurrent.ConcurrentMap; /** * Generic JSON data that stores all unknown key name/value pairs. * - *

            - * Subclasses can declare fields for known data keys using the {@link Key} annotation. Each field + *

            Subclasses can declare fields for known data keys using the {@link Key} annotation. Each field * can be of any visibility (private, package private, protected, or public) and must not be static. * {@code null} unknown data key names are not allowed, but {@code null} data values are allowed. * - *

            - * Implementation is not thread-safe. For a thread-safe choice instead use an implementation of + *

            Implementation is not thread-safe. For a thread-safe choice instead use an implementation of * {@link ConcurrentMap}. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -73,8 +69,8 @@ public String toString() { } /** - * Returns a pretty-printed serialized JSON string representation or {@link #toString()} if - * {@link #getFactory()} is {@code null}. + * Returns a pretty-printed serialized JSON string representation or {@link #toString()} if {@link + * #getFactory()} is {@code null}. * * @since 1.6 */ diff --git a/google-http-client/src/main/java/com/google/api/client/json/Json.java b/google-http-client/src/main/java/com/google/api/client/json/Json.java index fcc722513..b0e4581f5 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/Json.java +++ b/google-http-client/src/main/java/com/google/api/client/json/Json.java @@ -25,10 +25,8 @@ public class Json { /** * {@code "application/json; charset=utf-8"} media type used as a default for JSON parsing. * - *

            - * Use {@link com.google.api.client.http.HttpMediaType#equalsIgnoreParameters} for comparing + *

            Use {@link com.google.api.client.http.HttpMediaType#equalsIgnoreParameters} for comparing * media types. - *

            * * @since 1.10 */ diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java b/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java index 849808414..b92a55a9c 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java @@ -15,7 +15,6 @@ package com.google.api.client.json; import com.google.api.client.util.Charsets; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -27,10 +26,8 @@ /** * Abstract low-level JSON factory. * - *

            - * Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. - *

            * * @since 1.3 * @author Yaniv Inbar @@ -51,7 +48,7 @@ public abstract class JsonFactory { * * @param in input stream * @param charset charset in which the input stream is encoded or {@code null} to let the parser - * detect the charset + * detect the charset * @return new instance of a low-level JSON parser * @since 1.10 */ @@ -102,8 +99,8 @@ public final JsonObjectParser createJsonObjectParser() { } /** - * Returns a serialized JSON string representation for the given item using - * {@link JsonGenerator#serialize(Object)}. + * Returns a serialized JSON string representation for the given item using {@link + * JsonGenerator#serialize(Object)}. * * @param item data key/value pairs * @return serialized JSON string representation @@ -113,14 +110,12 @@ public final String toString(Object item) throws IOException { } /** - * Returns a pretty-printed serialized JSON string representation for the given item using - * {@link JsonGenerator#serialize(Object)} with {@link JsonGenerator#enablePrettyPrint()}. + * Returns a pretty-printed serialized JSON string representation for the given item using {@link + * JsonGenerator#serialize(Object)} with {@link JsonGenerator#enablePrettyPrint()}. * - *

            - * The specifics of how the JSON representation is made pretty is implementation dependent, and - * should not be relied on. However, it is assumed to be legal, and in fact differs from - * {@link #toString(Object)} only by adding whitespace that does not change its meaning. - *

            + *

            The specifics of how the JSON representation is made pretty is implementation dependent, and + * should not be relied on. However, it is assumed to be legal, and in fact differs from {@link + * #toString(Object)} only by adding whitespace that does not change its meaning. * * @param item data key/value pairs * @return serialized JSON string representation @@ -143,8 +138,8 @@ public final byte[] toByteArray(Object item) throws IOException { } /** - * Returns a serialized JSON string representation for the given item using - * {@link JsonGenerator#serialize(Object)}. + * Returns a serialized JSON string representation for the given item using {@link + * JsonGenerator#serialize(Object)}. * * @param item data key/value pairs * @param pretty whether to return a pretty representation @@ -179,7 +174,7 @@ private ByteArrayOutputStream toByteStream(Object item, boolean pretty) throws I * * @param value JSON string value * @param destinationClass destination class that has an accessible default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.4 */ @@ -191,13 +186,11 @@ public final T fromString(String value, Class destinationClass) throws IO * Parse and close an input stream as a JSON object, array, or value into a new instance of the * given destination class using {@link JsonParser#parseAndClose(Class)}. * - *

            - * Tries to detect the charset of the input stream automatically. - *

            + *

            Tries to detect the charset of the input stream automatically. * * @param inputStream JSON value in an input stream * @param destinationClass destination class that has an accessible default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.7 */ @@ -213,7 +206,7 @@ public final T fromInputStream(InputStream inputStream, Class destination * @param inputStream JSON value in an input stream * @param charset Charset in which the stream is encoded * @param destinationClass destination class that has an accessible default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.10 */ @@ -228,7 +221,7 @@ public final T fromInputStream( * * @param reader JSON value in a reader * @param destinationClass destination class that has an accessible default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.7 */ diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java b/google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java index 717a1a58d..2d1003390 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java @@ -21,7 +21,6 @@ import com.google.api.client.util.GenericData; import com.google.api.client.util.Preconditions; import com.google.api.client.util.Types; - import java.io.Closeable; import java.io.Flushable; import java.io.IOException; @@ -33,10 +32,8 @@ /** * Abstract low-level JSON serializer. * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            * * @since 1.3 * @author Yaniv Inbar @@ -141,8 +138,9 @@ private void serialize(boolean isJsonString, Object value) throws IOException { writeBoolean((Boolean) value); } else if (value instanceof DateTime) { writeString(((DateTime) value).toStringRfc3339()); - } else if ((value instanceof Iterable || valueClass.isArray()) && - !(value instanceof Map) && !(value instanceof GenericData)) { + } else if ((value instanceof Iterable || valueClass.isArray()) + && !(value instanceof Map) + && !(value instanceof GenericData)) { writeStartArray(); for (Object o : Types.iterableOf(value)) { serialize(isJsonString, o); @@ -182,15 +180,11 @@ private void serialize(boolean isJsonString, Object value) throws IOException { /** * Requests that the output be pretty printed (by default it is not). * - *

            - * Default implementation does nothing, but implementations may override to provide actual pretty - * printing. - *

            + *

            Default implementation does nothing, but implementations may override to provide actual + * pretty printing. * * @throws IOException possible I/O exception (unused in default implementation) - * * @since 1.6 */ - public void enablePrettyPrint() throws IOException { - } + public void enablePrettyPrint() throws IOException {} } diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java index 2d6951e14..dc3d43611 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java @@ -17,7 +17,6 @@ import com.google.api.client.util.ObjectParser; import com.google.api.client.util.Preconditions; import com.google.api.client.util.Sets; - import java.io.IOException; import java.io.InputStream; import java.io.Reader; @@ -31,19 +30,15 @@ /** * Parses JSON data into an data class of key/value pairs. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            - *
            -  static void setParser(HttpRequest request) {
            -    request.setParser(new JsonObjectParser(new JacksonFactory()));
            -  }
            + * 
            + * static void setParser(HttpRequest request) {
            + * request.setParser(new JsonObjectParser(new JacksonFactory()));
            + * }
              * 
              * 
            * @@ -58,16 +53,13 @@ public class JsonObjectParser implements ObjectParser { /** Wrapper keys for the JSON content or empty for none. */ private final Set wrapperKeys; - /** - * @param jsonFactory JSON factory - */ + /** @param jsonFactory JSON factory */ public JsonObjectParser(JsonFactory jsonFactory) { this(new Builder(jsonFactory)); } /** * @param builder builder - * * @since 1.14 */ protected JsonObjectParser(Builder builder) { @@ -124,8 +116,10 @@ private void initializeParser(JsonParser parser) throws IOException { boolean failed = true; try { String match = parser.skipToKey(wrapperKeys); - Preconditions.checkArgument(match != null && parser.getCurrentToken() != JsonToken.END_OBJECT, - "wrapper key(s) not found: %s", wrapperKeys); + Preconditions.checkArgument( + match != null && parser.getCurrentToken() != JsonToken.END_OBJECT, + "wrapper key(s) not found: %s", + wrapperKeys); failed = false; } finally { if (failed) { @@ -137,9 +131,7 @@ private void initializeParser(JsonParser parser) throws IOException { /** * Builder. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 */ @@ -151,9 +143,7 @@ public static class Builder { /** Wrapper keys for the JSON content or empty for none. */ Collection wrapperKeys = Sets.newHashSet(); - /** - * @param jsonFactory JSON factory - */ + /** @param jsonFactory JSON factory */ public Builder(JsonFactory jsonFactory) { this.jsonFactory = Preconditions.checkNotNull(jsonFactory); } @@ -176,10 +166,8 @@ public final Collection getWrapperKeys() { /** * Sets the wrapper keys for the JSON content. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setWrapperKeys(Collection wrapperKeys) { this.wrapperKeys = wrapperKeys; diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index e91c71306..75972a16c 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -23,7 +23,6 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.Sets; import com.google.api.client.util.Types; - import java.io.Closeable; import java.io.IOException; import java.lang.reflect.Field; @@ -44,19 +43,17 @@ import java.util.concurrent.locks.ReentrantLock; /** - * Abstract low-level JSON parser. See - * + * Abstract low-level JSON parser. See * https://developers.google.com/api-client-library/java/google-http-java-client/json * - *

            - * Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily + *

            Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. - *

            - *

            + * *

            - * If a JSON map is encountered while using a destination class of type Map, then an - * {@link ArrayMap} is used by default for the parsed values. - *

            + * + *

            If a JSON map is encountered while using a destination class of type Map, then an {@link + * ArrayMap} is used by default for the parsed values. * * @since 1.3 * @author Yaniv Inbar @@ -97,15 +94,15 @@ public abstract class JsonParser implements Closeable { public abstract String getCurrentName() throws IOException; /** - * Skips to the matching {@link JsonToken#END_ARRAY} if current token is - * {@link JsonToken#START_ARRAY}, the matching {@link JsonToken#END_OBJECT} if the current token - * is {@link JsonToken#START_OBJECT}, else does nothing. + * Skips to the matching {@link JsonToken#END_ARRAY} if current token is {@link + * JsonToken#START_ARRAY}, the matching {@link JsonToken#END_OBJECT} if the current token is + * {@link JsonToken#START_OBJECT}, else does nothing. */ public abstract JsonParser skipChildren() throws IOException; /** - * Returns a textual representation of the current token or {@code null} if - * {@link #getCurrentToken()} is {@code null}. + * Returns a textual representation of the current token or {@code null} if {@link + * #getCurrentToken()} is {@code null}. */ public abstract String getText() throws IOException; @@ -141,7 +138,7 @@ public abstract class JsonParser implements Closeable { * * @param destination class * @param destinationClass destination class that has a public default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.15 */ @@ -150,13 +147,13 @@ public final T parseAndClose(Class destinationClass) throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON object, array, or value into a new instance of the given destination class using * {@link JsonParser#parse(Class, CustomizeJsonParser)}, and then closes the parser. * * @param destination class * @param destinationClass destination class that has a public default constructor to use to - * create a new instance + * create a new instance * @param customizeParser optional parser customizer or {@code null} for none * @return new instance of the parsed destination class */ @@ -173,12 +170,10 @@ public final T parseAndClose(Class destinationClass, CustomizeJsonParser /** * Skips the values of all keys in the current object until it finds the given key. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. After this method ends, the current token will either be the - * {@link JsonToken#END_OBJECT} of the current object if the key is not found, or the value of the - * key that was found. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. After this method ends, the current token will either be the {@link + * JsonToken#END_OBJECT} of the current object if the key is not found, or the value of the key + * that was found. * * @param keyToFind key to find */ @@ -189,12 +184,10 @@ public final void skipToKey(String keyToFind) throws IOException { /** * Skips the values of all keys in the current object until it finds one of the given keys. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. After this method ends, the current token will either be the - * {@link JsonToken#END_OBJECT} of the current object if no matching key is found, or the value of - * the key that was found. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. After this method ends, the current token will either be the {@link + * JsonToken#END_OBJECT} of the current object if no matching key is found, or the value of the + * key that was found. * * @param keysToFind set of keys to look for * @return name of the first matching key found or {@code null} if no match was found @@ -229,13 +222,11 @@ private JsonToken startParsing() throws IOException { * Starts parsing an object or array by making sure the parser points to an object field name, * first array value or end of object or array. * - *

            - * If the parser is at the start of input, {@link #nextToken()} is called. The current token must - * then be {@link JsonToken#START_OBJECT}, {@link JsonToken#END_OBJECT}, - * {@link JsonToken#START_ARRAY}, {@link JsonToken#END_ARRAY}, or {@link JsonToken#FIELD_NAME}. - * For an object only, after the method is called, the current token must be either - * {@link JsonToken#FIELD_NAME} or {@link JsonToken#END_OBJECT}. - *

            + *

            If the parser is at the start of input, {@link #nextToken()} is called. The current token + * must then be {@link JsonToken#START_OBJECT}, {@link JsonToken#END_OBJECT}, {@link + * JsonToken#START_ARRAY}, {@link JsonToken#END_ARRAY}, or {@link JsonToken#FIELD_NAME}. For an + * object only, after the method is called, the current token must be either {@link + * JsonToken#FIELD_NAME} or {@link JsonToken#END_OBJECT}. */ private JsonToken startParsingObjectOrArray() throws IOException { JsonToken currentToken = startParsing(); @@ -259,10 +250,8 @@ private JsonToken startParsingObjectOrArray() throws IOException { * Parse a JSON Object from the given JSON parser -- which is closed after parsing completes -- * into the given destination object. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. * * @param destination destination object * @since 1.15 @@ -272,14 +261,12 @@ public final void parseAndClose(Object destination) throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON Object from the given JSON parser -- which is closed after parsing completes -- * into the given destination object, optionally using the given parser customizer. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. * * @param destination destination object * @param customizeParser optional parser customizer or {@code null} for none @@ -297,15 +284,13 @@ public final void parseAndClose(Object destination, CustomizeJsonParser customiz /** * Parse a JSON object, array, or value into a new instance of the given destination class. * - *

            - * If it parses an object, after this method ends, the current token will be the object's ending - * {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current token - * will be the array's ending {@link JsonToken#END_ARRAY}. - *

            + *

            If it parses an object, after this method ends, the current token will be the object's + * ending {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current + * token will be the array's ending {@link JsonToken#END_ARRAY}. * * @param destination class * @param destinationClass destination class that has a public default constructor to use to - * create a new instance + * create a new instance * @return new instance of the parsed destination class * @since 1.15 */ @@ -314,19 +299,17 @@ public final T parse(Class destinationClass) throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON object, array, or value into a new instance of the given destination class, * optionally using the given parser customizer. * - *

            - * If it parses an object, after this method ends, the current token will be the object's ending - * {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current token - * will be the array's ending {@link JsonToken#END_ARRAY}. - *

            + *

            If it parses an object, after this method ends, the current token will be the object's + * ending {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current + * token will be the array's ending {@link JsonToken#END_ARRAY}. * * @param destination class * @param destinationClass destination class that has a public default constructor to use to - * create a new instance + * create a new instance * @param customizeParser optional parser customizer or {@code null} for none * @return new instance of the parsed destination class */ @@ -341,11 +324,9 @@ public final T parse(Class destinationClass, CustomizeJsonParser customiz /** * Parse a JSON object, array, or value into a new instance of the given destination class. * - *

            - * If it parses an object, after this method ends, the current token will be the object's ending - * {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current token - * will be the array's ending {@link JsonToken#END_ARRAY}. - *

            + *

            If it parses an object, after this method ends, the current token will be the object's + * ending {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current + * token will be the array's ending {@link JsonToken#END_ARRAY}. * * @param dataType Type into which the JSON should be parsed * @param close {@code true} if {@link #close()} should be called after parsing @@ -357,15 +338,13 @@ public Object parse(Type dataType, boolean close) throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON object, array, or value into a new instance of the given destination class, * optionally using the given parser customizer. * - *

            - * If it parses an object, after this method ends, the current token will be the object's ending - * {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current token - * will be the array's ending {@link JsonToken#END_ARRAY}. - *

            + *

            If it parses an object, after this method ends, the current token will be the object's + * ending {@link JsonToken#END_OBJECT}. If it parses an array, after this method ends, the current + * token will be the array's ending {@link JsonToken#END_ARRAY}. * * @param dataType Type into which the JSON should be parsed * @param close {@code true} if {@link #close()} should be called after parsing @@ -391,11 +370,9 @@ public Object parse(Type dataType, boolean close, CustomizeJsonParser customizeP /** * Parse a JSON object from the given JSON parser into the given destination object. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. After this method ends, the current token will be the - * {@link JsonToken#END_OBJECT} of the current object. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. After this method ends, the current token will be the {@link + * JsonToken#END_OBJECT} of the current object. * * @param destination destination object * @since 1.15 @@ -405,15 +382,13 @@ public final void parse(Object destination) throws IOException { } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON object from the given JSON parser into the given destination object, optionally * using the given parser customizer. * - *

            - * Before this method is called, the parser must either point to the start or end of a JSON object - * or to a field name. After this method ends, the current token will be the - * {@link JsonToken#END_OBJECT} of the current object. - *

            + *

            Before this method is called, the parser must either point to the start or end of a JSON + * object or to a field name. After this method ends, the current token will be the {@link + * JsonToken#END_OBJECT} of the current object. * * @param destination destination object * @param customizeParser optional parser customizer or {@code null} for none @@ -431,7 +406,7 @@ public final void parse(Object destination, CustomizeJsonParser customizeParser) * * @param context destination context stack (possibly empty) * @param destination destination object instance or {@code null} for none (for example empty - * context stack) + * context stack) * @param customizeParser optional parser customizer or {@code null} for none */ private void parse( @@ -449,7 +424,11 @@ private void parse( // using parseMap. @SuppressWarnings("unchecked") Map destinationMap = (Map) destination; - parseMap(null, destinationMap, Types.getMapValueParameter(destinationClass), context, + parseMap( + null, + destinationMap, + Types.getMapValueParameter(destinationClass), + context, customizeParser); return; } @@ -470,12 +449,9 @@ private void parse( Field field = fieldInfo.getField(); int contextSize = context.size(); context.add(field.getGenericType()); - Object fieldValue = parseValue(field, - fieldInfo.getGenericType(), - context, - destination, - customizeParser, - true); + Object fieldValue = + parseValue( + field, fieldInfo.getGenericType(), context, destination, customizeParser, true); context.remove(contextSize); fieldInfo.setValue(destination, fieldValue); } else if (isGenericData) { @@ -498,9 +474,9 @@ private void parse( * the given destination collection. * * @param destinationCollectionClass class of destination collection (must have a public default - * constructor) + * constructor) * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @since 1.15 */ public final Collection parseArrayAndClose( @@ -509,19 +485,22 @@ public final Collection parseArrayAndClose( } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON Array from the given JSON parser (which is closed after parsing completes) into * the given destination collection, optionally using the given parser customizer. * * @param destinationCollectionClass class of destination collection (must have a public default - * constructor) + * constructor) * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @param customizeParser optional parser customizer or {@code null} for none */ @Beta - public final Collection parseArrayAndClose(Class destinationCollectionClass, - Class destinationItemClass, CustomizeJsonParser customizeParser) throws IOException { + public final Collection parseArrayAndClose( + Class destinationCollectionClass, + Class destinationItemClass, + CustomizeJsonParser customizeParser) + throws IOException { try { return parseArray(destinationCollectionClass, destinationItemClass, customizeParser); } finally { @@ -535,7 +514,7 @@ public final Collection parseArrayAndClose(Class destinationCollection * * @param destinationCollection destination collection * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @since 1.15 */ public final void parseArrayAndClose( @@ -545,18 +524,21 @@ public final void parseArrayAndClose( } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON Array from the given JSON parser (which is closed after parsing completes) into * the given destination collection, optionally using the given parser customizer. * * @param destinationCollection destination collection * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @param customizeParser optional parser customizer or {@code null} for none */ @Beta - public final void parseArrayAndClose(Collection destinationCollection, - Class destinationItemClass, CustomizeJsonParser customizeParser) throws IOException { + public final void parseArrayAndClose( + Collection destinationCollection, + Class destinationItemClass, + CustomizeJsonParser customizeParser) + throws IOException { try { parseArray(destinationCollection, destinationItemClass, customizeParser); } finally { @@ -568,9 +550,9 @@ public final void parseArrayAndClose(Collection destinationCollec * Parse a JSON Array from the given JSON parser into the given destination collection. * * @param destinationCollectionClass class of destination collection (must have a public default - * constructor) + * constructor) * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @since 1.15 */ public final Collection parseArray( @@ -579,19 +561,22 @@ public final Collection parseArray( } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON Array from the given JSON parser into the given destination collection, optionally * using the given parser customizer. * * @param destinationCollectionClass class of destination collection (must have a public default - * constructor) + * constructor) * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @param customizeParser optional parser customizer or {@code null} for none */ @Beta - public final Collection parseArray(Class destinationCollectionClass, - Class destinationItemClass, CustomizeJsonParser customizeParser) throws IOException { + public final Collection parseArray( + Class destinationCollectionClass, + Class destinationItemClass, + CustomizeJsonParser customizeParser) + throws IOException { @SuppressWarnings("unchecked") Collection destinationCollection = (Collection) Data.newCollectionInstance(destinationCollectionClass); @@ -604,7 +589,7 @@ public final Collection parseArray(Class destinationCollectionClass, * * @param destinationCollection destination collection * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @since 1.15 */ public final void parseArray( @@ -614,18 +599,21 @@ public final void parseArray( } /** - * {@link Beta}
            + * {@link Beta}
            * Parse a JSON Array from the given JSON parser into the given destination collection, optionally * using the given parser customizer. * * @param destinationCollection destination collection * @param destinationItemClass class of destination collection item (must have a public default - * constructor) + * constructor) * @param customizeParser optional parser customizer or {@code null} for none */ @Beta - public final void parseArray(Collection destinationCollection, - Class destinationItemClass, CustomizeJsonParser customizeParser) throws IOException { + public final void parseArray( + Collection destinationCollection, + Class destinationItemClass, + CustomizeJsonParser customizeParser) + throws IOException { parseArray( null, destinationCollection, destinationItemClass, new ArrayList(), customizeParser); } @@ -640,18 +628,25 @@ public final void parseArray(Collection destinationCollection, * @param context destination context stack (possibly empty) * @param customizeParser optional parser customizer or {@code null} for none */ - private void parseArray(Field fieldContext, Collection destinationCollection, - Type destinationItemType, ArrayList context, CustomizeJsonParser customizeParser) + private void parseArray( + Field fieldContext, + Collection destinationCollection, + Type destinationItemType, + ArrayList context, + CustomizeJsonParser customizeParser) throws IOException { JsonToken curToken = startParsingObjectOrArray(); while (curToken != JsonToken.END_ARRAY) { @SuppressWarnings("unchecked") - T parsedValue = (T) parseValue(fieldContext, - destinationItemType, - context, - destinationCollection, - customizeParser, - true); + T parsedValue = + (T) + parseValue( + fieldContext, + destinationItemType, + context, + destinationCollection, + customizeParser, + true); destinationCollection.add(parsedValue); curToken = nextToken(); } @@ -667,8 +662,13 @@ private void parseArray(Field fieldContext, Collection destinationCollect * @param context destination context stack (possibly empty) * @param customizeParser optional parser customizer or {@code null} for none */ - private void parseMap(Field fieldContext, Map destinationMap, Type valueType, - ArrayList context, CustomizeJsonParser customizeParser) throws IOException { + private void parseMap( + Field fieldContext, + Map destinationMap, + Type valueType, + ArrayList context, + CustomizeJsonParser customizeParser) + throws IOException { JsonToken curToken = startParsingObjectOrArray(); while (curToken == JsonToken.FIELD_NAME) { String key = getText(); @@ -691,17 +691,19 @@ private void parseMap(Field fieldContext, Map destinationMap, Ty * @param valueType value type or {@code null} if not known (for example into a map) * @param context destination context stack (possibly empty) * @param destination destination object instance or {@code null} for none (for example empty - * context stack) + * context stack) * @param customizeParser customize parser or {@code null} for none * @param handlePolymorphic whether or not to check for polymorphic schema * @return parsed value */ - private final Object parseValue(Field fieldContext, + private final Object parseValue( + Field fieldContext, Type valueType, ArrayList context, Object destination, CustomizeJsonParser customizeParser, - boolean handlePolymorphic) throws IOException { + boolean handlePolymorphic) + throws IOException { valueType = Data.resolveWildcardTypeOrTypeVariable(context, valueType); // resolve a parameterized type to a class @@ -721,9 +723,12 @@ private final Object parseValue(Field fieldContext, case START_ARRAY: case END_ARRAY: boolean isArray = Types.isArray(valueType); - Preconditions.checkArgument(valueType == null || isArray || valueClass != null - && Types.isAssignableToOrFrom(valueClass, Collection.class), - "expected collection or array type but got %s", valueType); + Preconditions.checkArgument( + valueType == null + || isArray + || valueClass != null && Types.isAssignableToOrFrom(valueClass, Collection.class), + "expected collection or array type but got %s", + valueType); Collection collectionValue = null; if (customizeParser != null && fieldContext != null) { collectionValue = customizeParser.newInstanceForArray(destination, fieldContext); @@ -770,8 +775,10 @@ private final Object parseValue(Field fieldContext, context.add(valueType); } if (isMap && !GenericData.class.isAssignableFrom(valueClass)) { - Type subValueType = Map.class.isAssignableFrom(valueClass) - ? Types.getMapValueParameter(valueType) : null; + Type subValueType = + Map.class.isAssignableFrom(valueClass) + ? Types.getMapValueParameter(valueType) + : null; if (subValueType != null) { @SuppressWarnings("unchecked") Map destinationMap = (Map) newInstance; @@ -809,9 +816,12 @@ private final Object parseValue(Field fieldContext, return parser.parseValue(fieldContext, typeClass, context, null, null, false); case VALUE_TRUE: case VALUE_FALSE: - Preconditions.checkArgument(valueType == null || valueClass == boolean.class - || valueClass != null && valueClass.isAssignableFrom(Boolean.class), - "expected type Boolean or boolean but got %s", valueType); + Preconditions.checkArgument( + valueType == null + || valueClass == boolean.class + || valueClass != null && valueClass.isAssignableFrom(Boolean.class), + "expected type Boolean or boolean but got %s", + valueType); return token == JsonToken.VALUE_TRUE ? Boolean.TRUE : Boolean.FALSE; case VALUE_NUMBER_FLOAT: case VALUE_NUMBER_INT: @@ -844,22 +854,24 @@ private final Object parseValue(Field fieldContext, } throw new IllegalArgumentException("expected numeric type but got " + valueType); case VALUE_STRING: - //TODO(user): Maybe refactor this method in multiple mini-methods for readability? + // TODO(user): Maybe refactor this method in multiple mini-methods for readability? String text = getText().trim().toLowerCase(Locale.US); // If we are expecting a Float / Double and the Text is NaN (case insensitive) // Then: Accept, even if the Annotation is JsonString. // Otherwise: Check that the Annotation is not JsonString. if (!(((valueClass == float.class || valueClass == Float.class) - || (valueClass == double.class || valueClass == Double.class)) - && (text.equals("nan") || text.equals("infinity") || text.equals("-infinity")))) { - Preconditions.checkArgument(valueClass == null - || !Number.class.isAssignableFrom(valueClass) || fieldContext != null - && fieldContext.getAnnotation(JsonString.class) != null, - "number field formatted as a JSON string must use the @JsonString annotation"); + || (valueClass == double.class || valueClass == Double.class)) + && (text.equals("nan") || text.equals("infinity") || text.equals("-infinity")))) { + Preconditions.checkArgument( + valueClass == null + || !Number.class.isAssignableFrom(valueClass) + || fieldContext != null && fieldContext.getAnnotation(JsonString.class) != null, + "number field formatted as a JSON string must use the @JsonString annotation"); } return Data.parsePrimitiveValue(valueType, getText()); case VALUE_NULL: - Preconditions.checkArgument(valueClass == null || !valueClass.isPrimitive(), + Preconditions.checkArgument( + valueClass == null || !valueClass.isPrimitive(), "primitive number field but found a JSON null"); if (valueClass != null && 0 != (valueClass.getModifiers() & (Modifier.ABSTRACT | Modifier.INTERFACE))) { @@ -895,13 +907,11 @@ private final Object parseValue(Field fieldContext, * Finds the {@link Field} on the given {@link Class} that has the {@link JsonPolymorphicTypeMap} * annotation, or {@code null} if there is none. * - *

            - * The class must contain exactly zero or one {@link JsonPolymorphicTypeMap} annotation. - *

            + *

            The class must contain exactly zero or one {@link JsonPolymorphicTypeMap} annotation. * * @param key The {@link Class} to search in, or {@code null} * @return The {@link Field} with the {@link JsonPolymorphicTypeMap} annotation, or {@code null} - * either if there is none or if the key is {@code null} + * either if there is none or if the key is {@code null} */ private static Field getCachedTypemapFieldFor(Class key) { if (key == null) { @@ -922,11 +932,14 @@ private static Field getCachedTypemapFieldFor(Class key) { JsonPolymorphicTypeMap typemapAnnotation = field.getAnnotation(JsonPolymorphicTypeMap.class); if (typemapAnnotation != null) { - Preconditions.checkArgument(value == null, + Preconditions.checkArgument( + value == null, "Class contains more than one field with @JsonPolymorphicTypeMap annotation: %s", key); - Preconditions.checkArgument(Data.isPrimitive(field.getType()), - "Field which has the @JsonPolymorphicTypeMap, %s, is not a supported type: %s", key, + Preconditions.checkArgument( + Data.isPrimitive(field.getType()), + "Field which has the @JsonPolymorphicTypeMap, %s, is not a supported type: %s", + key, field.getType()); value = field; // Check for duplicate typeDef keys @@ -935,8 +948,10 @@ private static Field getCachedTypemapFieldFor(Class key) { Preconditions.checkArgument( typeDefs.length > 0, "@JsonPolymorphicTypeMap must have at least one @TypeDef"); for (TypeDef typeDef : typeDefs) { - Preconditions.checkArgument(typeDefKeys.add(typeDef.key()), - "Class contains two @TypeDef annotations with identical key: %s", typeDef.key()); + Preconditions.checkArgument( + typeDefKeys.add(typeDef.key()), + "Class contains two @TypeDef annotations with identical key: %s", + typeDef.key()); } } } diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java b/google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java index 40132f332..69738d323 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java @@ -14,10 +14,8 @@ package com.google.api.client.json; - import com.google.api.client.util.Beta; import com.google.api.client.util.Data; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -25,15 +23,13 @@ import java.lang.reflect.Type; /** - * {@link Beta}
            + * {@link Beta}
            * Declares that the data type enclosing this field is polymorphic, and that the value of this field * in a heterogeneous JSON schema will determine what type the data should be parsed into. * - *

            - * A data structure must have no more than one field with this annotation present. The annotated + *

            A data structure must have no more than one field with this annotation present. The annotated * field's type must be considered "primitive" by {@link Data#isPrimitive(Type)}. The field's value * will be compared against the {@link TypeDef#key()} using {@link Object#toString()}. - *

            * * @author Nick Miceli * @since 1.16 @@ -46,9 +42,7 @@ /** The list of mappings from key value to a referenced {@link Class}. */ TypeDef[] typeDefinitions(); - /** - * Declares a mapping between a key value and a referenced class. - */ + /** Declares a mapping between a key value and a referenced class. */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface TypeDef { @@ -59,5 +53,4 @@ /** The {@link Class} that is referenced by this key value. */ Class ref(); } - } diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java index 36a2e8a44..6b93bbe21 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java @@ -22,44 +22,42 @@ /** * Use this annotation to specify that a declared numeric Java field should map to a JSON string. * - *

            - * By default declared Java numeric fields are stored as JSON numbers. For example: + *

            By default declared Java numeric fields are stored as JSON numbers. For example: * *

              * 
            -class A {
            -  @Key BigInteger value;
            -}
            + * class A {
            + * @Key BigInteger value;
            + * }
              * 
              * 
            * - * can be used for this JSON content: + * can be used for this JSON content: * *
              * 
            -{"value" : 12345768901234576890123457689012345768901234576890}
            + * {"value" : 12345768901234576890123457689012345768901234576890}
              * 
              * 
            * - * However, if instead the JSON content uses a JSON String to store the value, one needs to use the + * However, if instead the JSON content uses a JSON String to store the value, one needs to use the * {@link JsonString} annotation. For example: * *
              * 
            -class B {
            -  @Key @JsonString BigInteger value;
            -}
            + * class B {
            + * @Key @JsonString BigInteger value;
            + * }
              * 
              * 
            * - * can be used for this JSON content: + * can be used for this JSON content: * *
              * 
            -{"value" : "12345768901234576890123457689012345768901234576890"}
            + * {"value" : "12345768901234576890123457689012345768901234576890"}
              * 
              * 
            - *

            * * @since 1.3 * @author Yaniv Inbar @@ -68,5 +66,4 @@ class B { // BigDecimalString? @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) -public @interface JsonString { -} +public @interface JsonString {} diff --git a/google-http-client/src/main/java/com/google/api/client/json/package-info.java b/google-http-client/src/main/java/com/google/api/client/json/package-info.java index 47aaa0aef..4a177f57c 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/json/package-info.java @@ -20,9 +20,7 @@ * @since 1.0 * @author Yaniv Inbar */ - @ReflectionSupport(value = ReflectionSupport.Level.FULL) package com.google.api.client.json; import com.google.j2objc.annotations.ReflectionSupport; - diff --git a/google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java b/google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java index 8ca02dcec..c928a9738 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java @@ -19,12 +19,10 @@ import com.google.api.client.util.Key; /** - * {@link Beta}
            + * {@link Beta}
            * JSON-RPC 2.0 request object. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -33,26 +31,22 @@ public class JsonRpcRequest extends GenericData { /** Version of the JSON-RPC protocol which is {@code "2.0"}. */ - @Key - private final String jsonrpc = "2.0"; + @Key private final String jsonrpc = "2.0"; /** * Identifier established by the client that must be a string or a number or {@code null} for a * notification and therefore not expect to receive a response. */ - @Key - private Object id; + @Key private Object id; /** Name of the method to be invoked. */ - @Key - private String method; + @Key private String method; /** * Structured value that holds the parameter values to be used during the invocation of the method * or {@code null} for none. */ - @Key - private Object params; + @Key private Object params; /** * Returns the version of the JSON-RPC protocol which is {@code "2.0"}. diff --git a/google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java b/google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java index 66cdb447b..46ec5ba19 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * JSON-RPC 2.0 as specified in JSON-RPC 2.0 Specification * and JSON-RPC over @@ -24,4 +24,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.json.rpc2; - diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 4a15796be..4d5775c65 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -21,7 +21,6 @@ import com.google.api.client.util.Preconditions; import com.google.api.client.util.SecurityUtils; import com.google.api.client.util.StringUtils; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.GeneralSecurityException; @@ -34,7 +33,6 @@ import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.List; - import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; @@ -43,20 +41,16 @@ * JSON Web Signature * (JWS). * - *

            - * Sample usage: - *

            + *

            Sample usage: * *

            -  public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
            -    JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
            -    System.out.println(jws.getPayload());
            -  }
            + * public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
            + * JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
            + * System.out.println(jws.getPayload());
            + * }
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 (since 1.7 as com.google.api.client.auth.jsontoken.JsonWebSignature) * @author Yaniv Inbar @@ -169,10 +163,8 @@ public final String getAlgorithm() { * Sets the algorithm header parameter that identifies the cryptographic algorithm used to * secure the JWS or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setAlgorithm(String algorithm) { this.algorithm = algorithm; @@ -193,10 +185,8 @@ public final String getJwkUrl() { * for a set of JSON-encoded public keys, one of which corresponds to the key that was used to * digitally sign the JWS or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setJwkUrl(String jwkUrl) { this.jwkUrl = jwkUrl; @@ -215,10 +205,8 @@ public final String getJwk() { * Sets the JSON Web Key header parameter that is a public key that corresponds to the key used * to digitally sign the JWS or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setJwk(String jwk) { this.jwk = jwk; @@ -237,10 +225,8 @@ public final String getKeyId() { * Sets the key ID header parameter that is a hint indicating which specific key owned by the * signer should be used to validate the digital signature or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setKeyId(String keyId) { this.keyId = keyId; @@ -261,10 +247,8 @@ public final String getX509Url() { * X.509 public key certificate or certificate chain corresponding to the key used to digitally * sign the JWS or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setX509Url(String x509Url) { this.x509Url = x509Url; @@ -285,10 +269,8 @@ public final String getX509Thumbprint() { * SHA-1 thumbprint (a.k.a. digest) of the DER encoding of an X.509 certificate that can be used * to match the certificate or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setX509Thumbprint(String x509Thumbprint) { this.x509Thumbprint = x509Thumbprint; @@ -325,13 +307,11 @@ public final List getX509Certificates() { * Sets the X.509 certificate chain header parameter contains the X.509 public key certificate * corresponding to the key used to digitally sign the JWS or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * - *

            @deprecated Since release 1.19.1, replaced by - * {@link #setX509Certificates(List x509Certificates)}. + *

            @deprecated Since release 1.19.1, replaced by {@link #setX509Certificates(List + * x509Certificates)}. */ @Deprecated public Header setX509Certificate(String x509Certificate) { @@ -346,10 +326,8 @@ public Header setX509Certificate(String x509Certificate) { * or certificate chain corresponding to the key used to digitally sign the JWS or {@code null} * for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.19.1. */ @@ -372,10 +350,8 @@ public final List getCritical() { * Sets the array listing the header parameter names that define extensions that are used in the * JWS header that MUST be understood and processed or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. * * @since 1.16 */ @@ -403,10 +379,8 @@ public Header getHeader() { /** * Verifies the signature of the content. * - *

            - * Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. + *

            Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. * For any other algorithm it returns {@code false}. - *

            * * @param publicKey public key * @return whether the algorithm is recognized and it is verified @@ -424,20 +398,16 @@ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurity } /** - * {@link Beta}
            + * {@link Beta}
            * Verifies the signature of the content using the certificate chain embedded in the signature. * - *

            - * Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. + *

            Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. * For any other algorithm it returns {@code null}. - *

            * - *

            - * The leaf certificate of the certificate chain must be an SSL server certificate. - *

            + *

            The leaf certificate of the certificate chain must be an SSL server certificate. * * @param trustManager Trust manager used to verify the X509 certificate chain embedded in this - * message. + * message. * @return The signature certificate if the signature could be verified, null otherwise. * @throws GeneralSecurityException * @since 1.19.1. @@ -456,26 +426,20 @@ public final X509Certificate verifySignature(X509TrustManager trustManager) } else { return null; } - return SecurityUtils.verify(signatureAlg, trustManager, x509Certificates, signatureBytes, - signedContentBytes); + return SecurityUtils.verify( + signatureAlg, trustManager, x509Certificates, signatureBytes, signedContentBytes); } /** - * {@link Beta}
            + * {@link Beta}
            * Verifies the signature of the content using the certificate chain embedded in the signature. * - *

            - * Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. + *

            Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. * For any other algorithm it returns {@code null}. - *

            * - *

            - * The certificate chain is verified using the system default trust manager. - *

            + *

            The certificate chain is verified using the system default trust manager. * - *

            - * The leaf certificate of the certificate chain must be an SSL server certificate. - *

            + *

            The leaf certificate of the certificate chain must be an SSL server certificate. * * @return The signature certificate if the signature could be verified, null otherwise. * @throws GeneralSecurityException @@ -538,9 +502,7 @@ public static Parser parser(JsonFactory jsonFactory) { /** * JWS parser. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. */ public static final class Parser { @@ -553,9 +515,7 @@ public static final class Parser { /** Payload class to use for parsing. */ private Class payloadClass = Payload.class; - /** - * @param jsonFactory JSON factory - */ + /** @param jsonFactory JSON factory */ public Parser(JsonFactory jsonFactory) { this.jsonFactory = Preconditions.checkNotNull(jsonFactory); } @@ -628,14 +588,20 @@ public JsonWebSignature parse(String tokenString) throws IOException { * @return signed JWS string * @since 1.14 (since 1.7 as com.google.api.client.auth.jsontoken.RsaSHA256Signer) */ - public static String signUsingRsaSha256(PrivateKey privateKey, JsonFactory jsonFactory, - JsonWebSignature.Header header, JsonWebToken.Payload payload) + public static String signUsingRsaSha256( + PrivateKey privateKey, + JsonFactory jsonFactory, + JsonWebSignature.Header header, + JsonWebToken.Payload payload) throws GeneralSecurityException, IOException { - String content = Base64.encodeBase64URLSafeString(jsonFactory.toByteArray(header)) + "." - + Base64.encodeBase64URLSafeString(jsonFactory.toByteArray(payload)); + String content = + Base64.encodeBase64URLSafeString(jsonFactory.toByteArray(header)) + + "." + + Base64.encodeBase64URLSafeString(jsonFactory.toByteArray(payload)); byte[] contentBytes = StringUtils.getBytesUtf8(content); - byte[] signature = SecurityUtils.sign( - SecurityUtils.getSha256WithRsaSignatureAlgorithm(), privateKey, contentBytes); + byte[] signature = + SecurityUtils.sign( + SecurityUtils.getSha256WithRsaSignatureAlgorithm(), privateKey, contentBytes); return content + "." + Base64.encodeBase64URLSafeString(signature); } } diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java index a42aff95f..f7c19d543 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java @@ -18,16 +18,13 @@ import com.google.api.client.util.Key; import com.google.api.client.util.Objects; import com.google.api.client.util.Preconditions; - import java.util.Collections; import java.util.List; /** * JSON Web Token (JWT). * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 (since 1.7 as com.google.api.client.auth.jsontoken.JsonWebToken) * @author Yaniv Inbar @@ -60,8 +57,8 @@ public static class Header extends GenericJson { private String type; /** - * Content type header parameter used to declare structural information about the JWT or - * {@code null} for none. + * Content type header parameter used to declare structural information about the JWT or {@code + * null} for none. */ @Key("cty") private String contentType; @@ -78,10 +75,8 @@ public final String getType() { * Sets the type header parameter used to declare the type of this object or {@code null} for * none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setType(String type) { this.type = type; @@ -100,10 +95,8 @@ public final String getContentType() { * Sets the content type header parameter used to declare structural information about the JWT * or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header setContentType(String contentType) { this.contentType = contentType; @@ -143,8 +136,8 @@ public static class Payload extends GenericJson { private Long notBeforeTimeSeconds; /** - * Issued at claim that identifies the time (in seconds) at which the JWT was issued or - * {@code null} for none. + * Issued at claim that identifies the time (in seconds) at which the JWT was issued or {@code + * null} for none. */ @Key("iat") private Long issuedAtTimeSeconds; @@ -160,15 +153,13 @@ public static class Payload extends GenericJson { @Key("aud") private Object audience; - /** - * JWT ID claim that provides a unique identifier for the JWT or {@code null} for none. - */ + /** JWT ID claim that provides a unique identifier for the JWT or {@code null} for none. */ @Key("jti") private String jwtId; /** - * Type claim that is used to declare a type for the contents of this JWT Claims Set or - * {@code null} for none. + * Type claim that is used to declare a type for the contents of this JWT Claims Set or {@code + * null} for none. */ @Key("typ") private String type; @@ -192,10 +183,8 @@ public final Long getExpirationTimeSeconds() { * Sets the expiration time claim that identifies the expiration time (in seconds) on or after * which the token MUST NOT be accepted for processing or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setExpirationTimeSeconds(Long expirationTimeSeconds) { this.expirationTimeSeconds = expirationTimeSeconds; @@ -214,10 +203,8 @@ public final Long getNotBeforeTimeSeconds() { * Sets the not before claim that identifies the time (in seconds) before which the token MUST * NOT be accepted for processing or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setNotBeforeTimeSeconds(Long notBeforeTimeSeconds) { this.notBeforeTimeSeconds = notBeforeTimeSeconds; @@ -236,10 +223,8 @@ public final Long getIssuedAtTimeSeconds() { * Sets the issued at claim that identifies the time (in seconds) at which the JWT was issued or * {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setIssuedAtTimeSeconds(Long issuedAtTimeSeconds) { this.issuedAtTimeSeconds = issuedAtTimeSeconds; @@ -258,10 +243,8 @@ public final String getIssuer() { * Sets the issuer claim that identifies the principal that issued the JWT or {@code null} for * none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setIssuer(String issuer) { this.issuer = issuer; @@ -295,10 +278,8 @@ public final List getAudienceAsList() { * Sets the audience claim that identifies the audience that the JWT is intended for (should * either be a {@code String} or a {@code List}) or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setAudience(Object audience) { this.audience = audience; @@ -316,10 +297,8 @@ public final String getJwtId() { /** * Sets the JWT ID claim that provides a unique identifier for the JWT or {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setJwtId(String jwtId) { this.jwtId = jwtId; @@ -338,10 +317,8 @@ public final String getType() { * Sets the type claim that is used to declare a type for the contents of this JWT Claims Set or * {@code null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setType(String type) { this.type = type; @@ -349,21 +326,19 @@ public Payload setType(String type) { } /** - * Returns the subject claim identifying the principal that is the subject of the JWT or - * {@code null} for none. + * Returns the subject claim identifying the principal that is the subject of the JWT or {@code + * null} for none. */ public final String getSubject() { return subject; } /** - * Sets the subject claim identifying the principal that is the subject of the JWT or - * {@code null} for none. + * Sets the subject claim identifying the principal that is the subject of the JWT or {@code + * null} for none. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload setSubject(String subject) { this.subject = subject; @@ -389,10 +364,8 @@ public String toString() { /** * Returns the header. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Header getHeader() { return header; @@ -401,10 +374,8 @@ public Header getHeader() { /** * Returns the payload. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Payload getPayload() { return payload; diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java index 4b134cea0..209b5388d 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * JSON Web Token (JWT) * and JSON Web Signature * (JWS). @@ -22,4 +22,3 @@ * @author Yaniv Inbar */ package com.google.api.client.json.webtoken; - diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java b/google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java index a185fd95f..210a2fcfc 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java @@ -16,16 +16,13 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Clock; - import java.util.concurrent.atomic.AtomicLong; /** - * {@link Beta}
            + * {@link Beta}
            * A thread-safe fixed time implementation of the Clock to be used for unit testing. * - *

            - * Explicitly allows you to set the time to any arbitrary value. - *

            + *

            Explicitly allows you to set the time to any arbitrary value. * * @since 1.9 * @author mlinder@google.com (Matthias Linder) @@ -34,15 +31,14 @@ public class FixedClock implements Clock { private AtomicLong currentTime; - /** - * Initializes the FixedClock with 0 millis as start time. - */ + /** Initializes the FixedClock with 0 millis as start time. */ public FixedClock() { this(0L); } /** * Initializes the FixedClock with the specified time. + * * @param startTime time in milliseconds used for initialization. */ public FixedClock(long startTime) { @@ -51,6 +47,7 @@ public FixedClock(long startTime) { /** * Changes the time value this time provider is returning. + * * @param newTime New time in milliseconds. */ public FixedClock setTime(long newTime) { diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java b/google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java index 3c2defb40..174e2ba4b 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java @@ -18,7 +18,7 @@ import com.google.api.client.util.Beta; /** - * {@link Beta}
            + * {@link Beta}
            * Utilities and constants related to testing the HTTP library. * * @author Yaniv Inbar @@ -33,6 +33,5 @@ public final class HttpTesting { /** A simple generic URL for testing of value {@link #SIMPLE_URL}. */ public static final GenericUrl SIMPLE_GENERIC_URL = new GenericUrl(SIMPLE_URL); - private HttpTesting() { - } + private HttpTesting() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java index 24c3fe81a..94cfae90c 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java @@ -17,17 +17,14 @@ import com.google.api.client.http.HttpContent; import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.OutputStream; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link HttpContent}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.3 @@ -73,9 +70,7 @@ public final byte[] getContent() { /** * Sets the HTTP content. * - *

            - * Default value is an empty byte array. - *

            + *

            Default value is an empty byte array. * * @since 1.5 */ @@ -87,9 +82,7 @@ public MockHttpContent setContent(byte[] content) { /** * Returns the HTTP content length or {@code -1} for unknown. * - *

            - * Default value is {@code -1}. - *

            + *

            Default value is {@code -1}. * * @since 1.5 */ diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java index 2ff06731e..1f5c316e2 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java @@ -18,19 +18,16 @@ import com.google.api.client.http.LowLevelHttpRequest; import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.util.Collections; import java.util.Set; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link HttpTransport}. * - *

            - * Implementation is thread-safe. For maximum efficiency, applications should use a single + *

            Implementation is thread-safe. For maximum efficiency, applications should use a single * globally-shared instance of the HTTP transport. - *

            * * @author Yaniv Inbar * @since 1.3 @@ -42,26 +39,22 @@ public class MockHttpTransport extends HttpTransport { private Set supportedMethods; /** - * The {@link MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. If - * this field is {@code null}, {@link #buildRequest} will create a new instance - * from its arguments. - * */ + * The {@link MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. If this field is + * {@code null}, {@link #buildRequest} will create a new instance from its arguments. + */ private MockLowLevelHttpRequest lowLevelHttpRequest; /** * The {@link MockLowLevelHttpResponse} to be returned when this {@link MockHttpTransport} - * executes the associated request. Note that this field is ignored if the caller provided - * a non-{@code null} {@link MockLowLevelHttpRequest} with this {@link MockHttpTransport} - * was built. + * executes the associated request. Note that this field is ignored if the caller provided a + * non-{@code null} {@link MockLowLevelHttpRequest} with this {@link MockHttpTransport} was built. */ private MockLowLevelHttpResponse lowLevelHttpResponse; - public MockHttpTransport() { - } + public MockHttpTransport() {} /** * @param builder builder - * * @since 1.14 */ protected MockHttpTransport(Builder builder) { @@ -97,8 +90,8 @@ public final Set getSupportedMethods() { } /** - * Returns the {@link MockLowLevelHttpRequest} that is associated with this {@link Builder}, - * or {@code null} if no such instance exists. + * Returns the {@link MockLowLevelHttpRequest} that is associated with this {@link Builder}, or + * {@code null} if no such instance exists. * * @since 1.18 */ @@ -110,9 +103,8 @@ public final MockLowLevelHttpRequest getLowLevelHttpRequest() { * Returns an instance of a new builder. * *

            - * @deprecated (to be removed in the future) Use {@link Builder#Builder()} instead. - *

            * + * @deprecated (to be removed in the future) Use {@link Builder#Builder()} instead. * @since 1.5 */ @Deprecated @@ -121,12 +113,10 @@ public static Builder builder() { } /** - * {@link Beta}
            + * {@link Beta}
            * Builder for {@link MockHttpTransport}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.5 */ @@ -137,27 +127,24 @@ public static class Builder { Set supportedMethods; /** - * The {@link MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. If - * this field is {@code null}, {@link #buildRequest} will create a new instance - * from its arguments. - * */ + * The {@link MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. If this field is + * {@code null}, {@link #buildRequest} will create a new instance from its arguments. + */ MockLowLevelHttpRequest lowLevelHttpRequest; /** - * The {@link MockLowLevelHttpResponse} that should be the result of the - * {@link MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. Note - * that this field is ignored if the caller provides a {@link MockLowLevelHttpRequest} - * via {@link #setLowLevelHttpRequest}. + * The {@link MockLowLevelHttpResponse} that should be the result of the {@link + * MockLowLevelHttpRequest} to be returned by {@link #buildRequest}. Note that this field is + * ignored if the caller provides a {@link MockLowLevelHttpRequest} via {@link + * #setLowLevelHttpRequest}. */ MockLowLevelHttpResponse lowLevelHttpResponse; /** - * Constructs a new {@link Builder}. Note that this constructor was {@code protected} - * in version 1.17 and its predecessors, and was made {@code public} in version - * 1.18. + * Constructs a new {@link Builder}. Note that this constructor was {@code protected} in version + * 1.17 and its predecessors, and was made {@code public} in version 1.18. */ - public Builder() { - } + public Builder() {} /** Builds a new instance of {@link MockHttpTransport}. */ public MockHttpTransport build() { @@ -181,24 +168,25 @@ public final Builder setSupportedMethods(Set supportedMethods) { /** * Sets the {@link MockLowLevelHttpRequest} that will be returned by {@link #buildRequest}, if - * non-{@code null}. If {@code null}, {@link #buildRequest} will create a new - * {@link MockLowLevelHttpRequest} arguments. + * non-{@code null}. If {@code null}, {@link #buildRequest} will create a new {@link + * MockLowLevelHttpRequest} arguments. * - *

            Note that the user can set a low level HTTP Request only if a low level HTTP response - * has not been set on this instance. + *

            Note that the user can set a low level HTTP Request only if a low level HTTP response has + * not been set on this instance. * * @since 1.18 */ public final Builder setLowLevelHttpRequest(MockLowLevelHttpRequest lowLevelHttpRequest) { - Preconditions.checkState(lowLevelHttpResponse == null, + Preconditions.checkState( + lowLevelHttpResponse == null, "Cannnot set a low level HTTP request when a low level HTTP response has been set."); this.lowLevelHttpRequest = lowLevelHttpRequest; return this; } /** - * Returns the {@link MockLowLevelHttpRequest} that is associated with this {@link Builder}, - * or {@code null} if no such instance exists. + * Returns the {@link MockLowLevelHttpRequest} that is associated with this {@link Builder}, or + * {@code null} if no such instance exists. * * @since 1.18 */ @@ -206,29 +194,27 @@ public final MockLowLevelHttpRequest getLowLevelHttpRequest() { return lowLevelHttpRequest; } - /** - * Sets the {@link MockLowLevelHttpResponse} that will be the result when the - * {@link MockLowLevelHttpRequest} returned by {@link #buildRequest} is executed. - * Note that the response can be set only the caller has not provided a - * {@link MockLowLevelHttpRequest} via {@link #setLowLevelHttpRequest}. - * - * @throws IllegalStateException if the caller has already set a {@link LowLevelHttpRequest} - * in this instance + * Sets the {@link MockLowLevelHttpResponse} that will be the result when the {@link + * MockLowLevelHttpRequest} returned by {@link #buildRequest} is executed. Note that the + * response can be set only the caller has not provided a {@link MockLowLevelHttpRequest} via + * {@link #setLowLevelHttpRequest}. * + * @throws IllegalStateException if the caller has already set a {@link LowLevelHttpRequest} in + * this instance * @since 1.18 */ public final Builder setLowLevelHttpResponse(MockLowLevelHttpResponse lowLevelHttpResponse) { - Preconditions.checkState(lowLevelHttpRequest == null, + Preconditions.checkState( + lowLevelHttpRequest == null, "Cannot set a low level HTTP response when a low level HTTP request has been set."); this.lowLevelHttpResponse = lowLevelHttpResponse; return this; } - /** - * Returns the {@link MockLowLevelHttpResponse} that is associated with this {@link Builder}, - * or {@code null} if no such instance exists. + * Returns the {@link MockLowLevelHttpResponse} that is associated with this {@link Builder}, or + * {@code null} if no such instance exists. * * @since 1.18 */ diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java index efc68f821..b069cfb02 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java @@ -18,16 +18,13 @@ import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpUnsuccessfulResponseHandler; import com.google.api.client.util.Beta; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link HttpUnsuccessfulResponseHandler}. * - *

            - * Contains an {@link #isCalled} method that returns true if {@link #handleResponse} is called. - *

            + *

            Contains an {@link #isCalled} method that returns true if {@link #handleResponse} is called. * * @author Ravi Mistry * @since 1.6 @@ -47,9 +44,7 @@ public MockHttpUnsuccessfulResponseHandler(boolean successfullyHandleResponse) { this.successfullyHandleResponse = successfullyHandleResponse; } - /** - * Returns whether the {@link #handleResponse} method was called or not. - */ + /** Returns whether the {@link #handleResponse} method was called or not. */ public boolean isCalled() { return isCalled; } diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java index 6bdac5857..a85759138 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java @@ -20,7 +20,6 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Charsets; import com.google.api.client.util.IOUtils; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -35,12 +34,10 @@ import java.util.zip.GZIPInputStream; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link LowLevelHttpRequest}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.3 @@ -57,14 +54,11 @@ public class MockLowLevelHttpRequest extends LowLevelHttpRequest { /** * HTTP response to return from {@link #execute()}. * - *

            - * By default this is a new instance of {@link MockLowLevelHttpResponse}. - *

            + *

            By default this is a new instance of {@link MockLowLevelHttpResponse}. */ private MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - public MockLowLevelHttpRequest() { - } + public MockLowLevelHttpRequest() {} /** * @param url Request URL or {@code null} for none @@ -102,10 +96,8 @@ public String getUrl() { /** * Returns an unmodifiable view of the map of lowercase header name to values. * - *

            - * Note that unlike this method, {@link #getFirstHeaderValue(String)} and - * {@link #getHeaderValues(String)} are not case sensitive with respect to the input header name. - *

            + *

            Note that unlike this method, {@link #getFirstHeaderValue(String)} and {@link + * #getHeaderValues(String)} are not case sensitive with respect to the input header name. * * @since 1.5 */ @@ -148,9 +140,7 @@ public MockLowLevelHttpRequest setUrl(String url) { /** * Returns HTTP content as a string, taking care of any encodings of the content if necessary. * - *

            - * Returns an empty string if there is no HTTP content. - *

            + *

            Returns an empty string if there is no HTTP content. * * @since 1.12 */ @@ -172,8 +162,10 @@ public String getContentAsString() throws IOException { // determine charset parameter from content type String contentType = getContentType(); HttpMediaType mediaType = contentType != null ? new HttpMediaType(contentType) : null; - Charset charset = mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 : mediaType.getCharsetParameter(); + Charset charset = + mediaType == null || mediaType.getCharsetParameter() == null + ? Charsets.ISO_8859_1 + : mediaType.getCharsetParameter(); return out.toString(charset.name()); } @@ -189,9 +181,7 @@ public MockLowLevelHttpResponse getResponse() { /** * Sets the HTTP response to return from {@link #execute()}. * - *

            - * By default this is a new instance of {@link MockLowLevelHttpResponse}. - *

            + *

            By default this is a new instance of {@link MockLowLevelHttpResponse}. */ public MockLowLevelHttpRequest setResponse(MockLowLevelHttpResponse response) { this.response = response; diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java index 1a7f26920..f713206e3 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java @@ -19,19 +19,16 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; import com.google.api.client.util.StringUtils; - import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link LowLevelHttpResponse}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.3 @@ -81,10 +78,8 @@ public MockLowLevelHttpResponse addHeader(String name, String value) { /** * Sets the response content to the given content string. * - *

            - * If the input string is {@code null}, it will set the content to {@code null}. Else, it will use - * {@link TestableByteArrayInputStream} with the UTF-8 encoded string content. - *

            + *

            If the input string is {@code null}, it will set the content to {@code null}. Else, it will + * use {@link TestableByteArrayInputStream} with the UTF-8 encoded string content. * * @param stringContent content string or {@code null} for none */ @@ -98,13 +93,9 @@ public MockLowLevelHttpResponse setContent(String stringContent) { * Sets the response content to the given byte array. * * @param byteContent content byte array, or {@code null} for none. - * - *

            - * If the byte array is {@code null}, the method invokes {@link #setZeroContent}. - * Otherwise, {@code byteContent} is wrapped in a {@link TestableByteArrayInputStream} - * and becomes this {@link MockLowLevelHttpResponse}'s contents. - *

            - * + *

            If the byte array is {@code null}, the method invokes {@link #setZeroContent}. + * Otherwise, {@code byteContent} is wrapped in a {@link TestableByteArrayInputStream} and + * becomes this {@link MockLowLevelHttpResponse}'s contents. * @since 1.18 */ public MockLowLevelHttpResponse setContent(byte[] byteContent) { @@ -117,8 +108,8 @@ public MockLowLevelHttpResponse setContent(byte[] byteContent) { } /** - * Sets the content to {@code null} and the content length to 0. Note that - * the result will have a content length header whose value is 0. + * Sets the content to {@code null} and the content length to 0. Note that the result will have a + * content length header whose value is 0. * * @since 1.18 */ @@ -195,9 +186,7 @@ public final List getHeaderNames() { /** * Sets the list of header names of HTTP response. * - *

            - * Default value is an empty list. - *

            + *

            Default value is an empty list. * * @since 1.5 */ @@ -209,9 +198,7 @@ public MockLowLevelHttpResponse setHeaderNames(List headerNames) { /** * Returns the list of header values of HTTP response. * - *

            - * Default value is an empty list. - *

            + *

            Default value is an empty list. * * @since 1.5 */ @@ -262,9 +249,7 @@ public MockLowLevelHttpResponse setContentEncoding(String contentEncoding) { /** * Sets the content length or {@code -1} for unknown. * - *

            - * By default it is {@code -1}. - *

            + *

            By default it is {@code -1}. * * @since 1.5 */ @@ -277,9 +262,7 @@ public MockLowLevelHttpResponse setContentLength(long contentLength) { /** * Sets the status code of HTTP response. * - *

            - * Default value is {@code 200}. - *

            + *

            Default value is {@code 200}. * * @since 1.5 */ diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java b/google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java index 32e8a6617..32571a14a 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java @@ -40,12 +40,10 @@ import org.apache.http.protocol.HttpRequestExecutor; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link HttpClient} that does not actually make any network calls. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 * @author Yaniv Inbar @@ -57,12 +55,19 @@ public class MockHttpClient extends DefaultHttpClient { int responseCode; @Override - protected RequestDirector createClientRequestDirector(HttpRequestExecutor requestExec, - ClientConnectionManager conman, ConnectionReuseStrategy reustrat, - ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor httpProcessor, - HttpRequestRetryHandler retryHandler, RedirectHandler redirectHandler, - AuthenticationHandler targetAuthHandler, AuthenticationHandler proxyAuthHandler, - UserTokenHandler stateHandler, HttpParams params) { + protected RequestDirector createClientRequestDirector( + HttpRequestExecutor requestExec, + ClientConnectionManager conman, + ConnectionReuseStrategy reustrat, + ConnectionKeepAliveStrategy kastrat, + HttpRoutePlanner rouplan, + HttpProcessor httpProcessor, + HttpRequestRetryHandler retryHandler, + RedirectHandler redirectHandler, + AuthenticationHandler targetAuthHandler, + AuthenticationHandler proxyAuthHandler, + UserTokenHandler stateHandler, + HttpParams params) { return new RequestDirector() { @Beta public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java index d05325514..1ca14ca3d 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests based on the Apache HTTP Client. * * @since 1.14 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.testing.http.apache; - diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java index b59648e51..467f495f4 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java @@ -16,7 +16,6 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -30,12 +29,10 @@ import java.util.Map; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link HttpURLConnection}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.11 * @author Yaniv Inbar @@ -47,19 +44,18 @@ public class MockHttpURLConnection extends HttpURLConnection { private boolean doOutputCalled; /** - * Output stream or {@code null} to throw an {@link UnknownServiceException} when - * {@link #getOutputStream()} is called. + * Output stream or {@code null} to throw an {@link UnknownServiceException} when {@link + * #getOutputStream()} is called. */ private OutputStream outputStream = new ByteArrayOutputStream(0); /** - * The input byte array which represents the content when the status code is less then - * {@code 400}. + * The input byte array which represents the content when the status code is less then {@code + * 400}. * * @deprecated As of 1.20. Use {@link #setInputStream(InputStream)} instead. */ - @Deprecated - public static final byte[] INPUT_BUF = new byte[1]; + @Deprecated public static final byte[] INPUT_BUF = new byte[1]; /** * The error byte array which represents the content when the status code is greater or equal to @@ -67,8 +63,7 @@ public class MockHttpURLConnection extends HttpURLConnection { * * @deprecated As of 1.20. Use {@link #setErrorStream(InputStream)} instead. */ - @Deprecated - public static final byte[] ERROR_BUF = new byte[5]; + @Deprecated public static final byte[] ERROR_BUF = new byte[5]; /** The input stream. */ private InputStream inputStream = null; @@ -78,16 +73,13 @@ public class MockHttpURLConnection extends HttpURLConnection { private Map> headers = new LinkedHashMap>(); - /** - * @param u the URL or {@code null} for none - */ + /** @param u the URL or {@code null} for none */ public MockHttpURLConnection(URL u) { super(u); } @Override - public void disconnect() { - } + public void disconnect() {} @Override public boolean usingProxy() { @@ -95,8 +87,7 @@ public boolean usingProxy() { } @Override - public void connect() throws IOException { - } + public void connect() throws IOException {} @Override public int getResponseCode() throws IOException { @@ -122,12 +113,10 @@ public final boolean doOutputCalled() { } /** - * Sets the output stream or {@code null} to throw an {@link UnknownServiceException} when - * {@link #getOutputStream()} is called. + * Sets the output stream or {@code null} to throw an {@link UnknownServiceException} when {@link + * #getOutputStream()} is called. * - *

            - * By default it is {@code null}. - *

            + *

            By default it is {@code null}. */ public MockHttpURLConnection setOutputStream(OutputStream outputStream) { this.outputStream = outputStream; diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java index 501067c76..4f0934336 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests based on the {@code java.net} package. * * @since 1.11 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.testing.http.javanet; - diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java index 3fd0332d9..615dd5626 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests based on this library. * * @since 1.3 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.testing.http; - diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java index 3bdb4a9e1..eede3c00e 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java @@ -18,7 +18,6 @@ import com.google.api.client.json.JsonGenerator; import com.google.api.client.json.JsonParser; import com.google.api.client.util.Beta; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -27,12 +26,10 @@ import java.nio.charset.Charset; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link JsonFactory}. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * * @author rmistry@google.com (Ravi Mistry) * @since 1.15 (since 1.11 as com.google.api.client.testing.http.json.MockJsonFactory) diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java index 506bf1e7c..7bdd13bd4 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java @@ -17,18 +17,15 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonGenerator; import com.google.api.client.util.Beta; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link JsonGenerator}. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * * @author rmistry@google.com (Ravi Mistry) * @since 1.15 (since 1.11 as com.google.api.client.testing.http.json.MockJsonGenerator) @@ -48,70 +45,53 @@ public JsonFactory getFactory() { } @Override - public void flush() throws IOException { - } + public void flush() throws IOException {} @Override - public void close() throws IOException { - } + public void close() throws IOException {} @Override - public void writeStartArray() throws IOException { - } + public void writeStartArray() throws IOException {} @Override - public void writeEndArray() throws IOException { - } + public void writeEndArray() throws IOException {} @Override - public void writeStartObject() throws IOException { - } + public void writeStartObject() throws IOException {} @Override - public void writeEndObject() throws IOException { - } + public void writeEndObject() throws IOException {} @Override - public void writeFieldName(String name) throws IOException { - } + public void writeFieldName(String name) throws IOException {} @Override - public void writeNull() throws IOException { - } + public void writeNull() throws IOException {} @Override - public void writeString(String value) throws IOException { - } + public void writeString(String value) throws IOException {} @Override - public void writeBoolean(boolean state) throws IOException { - } + public void writeBoolean(boolean state) throws IOException {} @Override - public void writeNumber(int v) throws IOException { - } + public void writeNumber(int v) throws IOException {} @Override - public void writeNumber(long v) throws IOException { - } + public void writeNumber(long v) throws IOException {} @Override - public void writeNumber(BigInteger v) throws IOException { - } + public void writeNumber(BigInteger v) throws IOException {} @Override - public void writeNumber(float v) throws IOException { - } + public void writeNumber(float v) throws IOException {} @Override - public void writeNumber(double v) throws IOException { - } + public void writeNumber(double v) throws IOException {} @Override - public void writeNumber(BigDecimal v) throws IOException { - } + public void writeNumber(BigDecimal v) throws IOException {} @Override - public void writeNumber(String encodedValue) throws IOException { - } + public void writeNumber(String encodedValue) throws IOException {} } diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java index 096e66476..422ddd962 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java @@ -18,18 +18,15 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; import com.google.api.client.util.Beta; - import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link JsonParser}. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * * @author rmistry@google.com (Ravi Mistry) * @since 1.15 (since 1.11 as com.google.api.client.testing.http.json.MockJsonParser) diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java index 55dc1d881..b49fbbfa4 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests based on this library. * * @since 1.15 (since 1.11 as com.google.api.client.testing.http.json) @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.testing.json; - diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java index b6aeb4526..5c3457af6 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java @@ -22,7 +22,6 @@ import com.google.api.client.util.PemReader; import com.google.api.client.util.SecurityUtils; import com.google.api.client.util.StringUtils; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringReader; @@ -31,15 +30,14 @@ import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.util.List; - import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; /** - * {@link Beta}
            + * {@link Beta}
            * Test certificates. - *

            - * Contains a test certificate chain, the respective private keys and signed data. + * + *

            Contains a test certificate chain, the respective private keys and signed data. * * @since 1.19.1. */ @@ -47,7 +45,7 @@ public class TestCertificates { /** - * {@link Beta}
            + * {@link Beta}
            * Wrapper for a PEM encoded certificate providing utility routines. */ @Beta @@ -86,210 +84,214 @@ public X509TrustManager getTrustManager() throws IOException, GeneralSecurityExc /** * Test leaf certificate. + * *

                * Issuer: CN=Root
                * Subject: C=US, ST=California, L=Mountain View, O=Google Inc., CN=foo.bar.com
                * 
            */ - public static final CertData FOO_BAR_COM_CERT = new CertData( - "-----BEGIN CERTIFICATE-----\n" - + "MIIC6TCCAdECASowDQYJKoZIhvcNAQELBQAwDzENMAsGA1UEAwwEUm9vdDAeFw0x\n" - + "NDExMTgxNjU0MDNaFw0zNDExMTMxNjU0MDNaMGYxCzAJBgNVBAYTAlVTMRMwEQYD\n" - + "VQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQK\n" - + "DAtHb29nbGUgSW5jLjEUMBIGA1UEAwwLZm9vLmJhci5jb20wggEiMA0GCSqGSIb3\n" - + "DQEBAQUAA4IBDwAwggEKAoIBAQCzFVKJOkqTmyyjMHWBOrLdpYmc0EcvG3MohaV+\n" - + "UJrVrI2SDykY8YWSkTKz9BKmF8HP/GjPPDs3184Cej9b1WeyvVB8Rj3guH3oL+sJ\n" - + "T3u9V2y4zyo5xO6FWMBYEQ6X8DkGlYtTp5theYbRrXNELul4lF+LtHTCaAANRMkO\n" - + "l0NEoLa6BRhOG68gFfIAxx5lT8REE9utvPuy+rCaBHnfHOPf8pn0LSvceBijSIFo\n" - + "S3Y5crjPVjyiPAZUHWnHTFAilfHnpLBlGxpCylePQhMKrPcgvDoD9nd0LA6xYLF7\n" - + "DPXXSa8FLO+fPV8CNJCAsFuq9Rlf2Tt3SjLtWRYuh5LuctP7AgMBAAEwDQYJKoZI\n" - + "hvcNAQELBQADggEBAEsMABZl+8Rlk0hqBktsDurri4nF/07CnSBe/zUbTiYhMpr7\n" - + "VRIDlHLoe5lslLilfXzvaymcMFeH1uBxNwhf7IO7WvIwQeUHSV+rHyNygTTieO0J\n" - + "n8Hw+4SCohHAdMvD5uWEwn3Lv+W4y7OhaSbzlhVCVCnFLVKicBayUXHtdJXJICok\n" - + "R4+h/WNM7g0iKThakZOyfb8h1phy7TMTVlPFKrcVDo5m9+GhtPC4PNjGLok6r/jx\n" - + "9CIOCapIqi8fXJEOxKvilYeAYqfjWvhx00juEUBHrpCQ8wT4TA+LlI02cRz5rxW4\n" - + "FQAz1NdoG9HZDZWa+NNFTZdAmtWPJMLd+8L8sl4=\n" - + "-----END CERTIFICATE-----"); + public static final CertData FOO_BAR_COM_CERT = + new CertData( + "-----BEGIN CERTIFICATE-----\n" + + "MIIC6TCCAdECASowDQYJKoZIhvcNAQELBQAwDzENMAsGA1UEAwwEUm9vdDAeFw0x\n" + + "NDExMTgxNjU0MDNaFw0zNDExMTMxNjU0MDNaMGYxCzAJBgNVBAYTAlVTMRMwEQYD\n" + + "VQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQK\n" + + "DAtHb29nbGUgSW5jLjEUMBIGA1UEAwwLZm9vLmJhci5jb20wggEiMA0GCSqGSIb3\n" + + "DQEBAQUAA4IBDwAwggEKAoIBAQCzFVKJOkqTmyyjMHWBOrLdpYmc0EcvG3MohaV+\n" + + "UJrVrI2SDykY8YWSkTKz9BKmF8HP/GjPPDs3184Cej9b1WeyvVB8Rj3guH3oL+sJ\n" + + "T3u9V2y4zyo5xO6FWMBYEQ6X8DkGlYtTp5theYbRrXNELul4lF+LtHTCaAANRMkO\n" + + "l0NEoLa6BRhOG68gFfIAxx5lT8REE9utvPuy+rCaBHnfHOPf8pn0LSvceBijSIFo\n" + + "S3Y5crjPVjyiPAZUHWnHTFAilfHnpLBlGxpCylePQhMKrPcgvDoD9nd0LA6xYLF7\n" + + "DPXXSa8FLO+fPV8CNJCAsFuq9Rlf2Tt3SjLtWRYuh5LuctP7AgMBAAEwDQYJKoZI\n" + + "hvcNAQELBQADggEBAEsMABZl+8Rlk0hqBktsDurri4nF/07CnSBe/zUbTiYhMpr7\n" + + "VRIDlHLoe5lslLilfXzvaymcMFeH1uBxNwhf7IO7WvIwQeUHSV+rHyNygTTieO0J\n" + + "n8Hw+4SCohHAdMvD5uWEwn3Lv+W4y7OhaSbzlhVCVCnFLVKicBayUXHtdJXJICok\n" + + "R4+h/WNM7g0iKThakZOyfb8h1phy7TMTVlPFKrcVDo5m9+GhtPC4PNjGLok6r/jx\n" + + "9CIOCapIqi8fXJEOxKvilYeAYqfjWvhx00juEUBHrpCQ8wT4TA+LlI02cRz5rxW4\n" + + "FQAz1NdoG9HZDZWa+NNFTZdAmtWPJMLd+8L8sl4=\n" + + "-----END CERTIFICATE-----"); - /** - * Private key for {@code FOO_BAR_COM_CERT}. - */ + /** Private key for {@code FOO_BAR_COM_CERT}. */ public static final String FOO_BAR_COM_KEY = "-----BEGIN PRIVATE KEY-----\n" - + "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCzFVKJOkqTmyyj\n" - + "MHWBOrLdpYmc0EcvG3MohaV+UJrVrI2SDykY8YWSkTKz9BKmF8HP/GjPPDs3184C\n" - + "ej9b1WeyvVB8Rj3guH3oL+sJT3u9V2y4zyo5xO6FWMBYEQ6X8DkGlYtTp5theYbR\n" - + "rXNELul4lF+LtHTCaAANRMkOl0NEoLa6BRhOG68gFfIAxx5lT8REE9utvPuy+rCa\n" - + "BHnfHOPf8pn0LSvceBijSIFoS3Y5crjPVjyiPAZUHWnHTFAilfHnpLBlGxpCyleP\n" - + "QhMKrPcgvDoD9nd0LA6xYLF7DPXXSa8FLO+fPV8CNJCAsFuq9Rlf2Tt3SjLtWRYu\n" - + "h5LuctP7AgMBAAECggEBAJZQomue6vQEfq4nQaoL/BCBHwXp6KYIs1ti+msQ+zW4\n" - + "1Ueww/001LoWd+mGR5T0QfDy24J++vG/iSKZO884TAdCUmlNiCi0krIubmjtN17R\n" - + "H+frs3Sz8MUqnqANCSPNNgBpy32XJJvnppserK6hdcSJPb2E5bA8HTcF8oD1xDe4\n" - + "CgPK9PKL2PxrR0ofs09RLGTSdh2+rPWvvefk1x1uBfg+wHRlfvqMSKpZ3SDabjhy\n" - + "PgB21D86SlF5L1AfeqSTfQvmwMLtOpJCVjLK2WZmvdoY7kbwE416AMLxX4tw2a/l\n" - + "vzVyo2T/B0Wc3be+5m2o96TctHRH1yEK4huEOJojvBECgYEA5RloFMOnYNMZdoEf\n" - + "yl6TAPEmFD7vCYHXpSlQdFFKu988CNF5+grn9kjC7rF+JxPEYUsnNA11TFzFEfki\n" - + "Lu0uXirJH+0gQzEp/qGd2SjDANCk+kORjeOOmefbxziG/Y74rnJ1A7gZjL8Abrie\n" - + "K0mTfOk9DcgqX96PP4HXgX3+XYkCgYEAyBx28UNZoL3Dy8iquTV0VmXCOq2c5+aW\n" - + "3YS2BKP9rAPy5mWWy6PR28yduomuUu04GxHYf2yw0+0UxpPyWu8TdQHJKjLX4On7\n" - + "L+ZholvXpyqs51btsbBiRK022akh/MPnqdD9zt/RS2b1QM4yfEWN8kVE3zsMWxMP\n" - + "gBf9EH4taGMCgYBfsD3ttk65vVI8UfBiSSAjW5WpDSQwF2BnpprpCm8pizL7B+tn\n" - + "iZibIIbyxYXIcpQqgwZL0nc0vua8/A7QBNbCFCLPR+6awfUlWoGgi0rvkzXlJcWs\n" - + "uuf71oDQdAbF7yplSn8fX4ykYb6fgFLoB6InoQ+UKw+v3Th9sRC/EE3m6QKBgDBN\n" - + "RpyHwDufcoJe5m6cK3+rQk29mFEVhLblkLXgC5wYu+nG/bYbzcz7P9tF3nEf11oZ\n" - + "XaOsTaZp5IjmLyqp6I1mp/LqoNcmQz5Vop15A73S/Dc+8VLhm2auVL4HKDAF7YY8\n" - + "7vafabqEmJBS9Tav50piU/R6IUpeeHBX2frAKh+3AoGAPTLxTMMEbhZGJFs8GRP9\n" - + "fFyWZeEkf3tgUK19tAAOk3TX+O0TNvD8UouXq7Z/EUaE1mYhKPf5LbI6nbYEVll4\n" - + "mWLGd+o8FNFp6E5083O3Tgf0BI4l+sKnwpP/Sqg9BDGARTPS5taeX0SWtQ+HPYGC\n" - + "4e5m59uhN7t8tHtDVcK0/Pk=\n" - + "-----END PRIVATE KEY-----"; + + "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCzFVKJOkqTmyyj\n" + + "MHWBOrLdpYmc0EcvG3MohaV+UJrVrI2SDykY8YWSkTKz9BKmF8HP/GjPPDs3184C\n" + + "ej9b1WeyvVB8Rj3guH3oL+sJT3u9V2y4zyo5xO6FWMBYEQ6X8DkGlYtTp5theYbR\n" + + "rXNELul4lF+LtHTCaAANRMkOl0NEoLa6BRhOG68gFfIAxx5lT8REE9utvPuy+rCa\n" + + "BHnfHOPf8pn0LSvceBijSIFoS3Y5crjPVjyiPAZUHWnHTFAilfHnpLBlGxpCyleP\n" + + "QhMKrPcgvDoD9nd0LA6xYLF7DPXXSa8FLO+fPV8CNJCAsFuq9Rlf2Tt3SjLtWRYu\n" + + "h5LuctP7AgMBAAECggEBAJZQomue6vQEfq4nQaoL/BCBHwXp6KYIs1ti+msQ+zW4\n" + + "1Ueww/001LoWd+mGR5T0QfDy24J++vG/iSKZO884TAdCUmlNiCi0krIubmjtN17R\n" + + "H+frs3Sz8MUqnqANCSPNNgBpy32XJJvnppserK6hdcSJPb2E5bA8HTcF8oD1xDe4\n" + + "CgPK9PKL2PxrR0ofs09RLGTSdh2+rPWvvefk1x1uBfg+wHRlfvqMSKpZ3SDabjhy\n" + + "PgB21D86SlF5L1AfeqSTfQvmwMLtOpJCVjLK2WZmvdoY7kbwE416AMLxX4tw2a/l\n" + + "vzVyo2T/B0Wc3be+5m2o96TctHRH1yEK4huEOJojvBECgYEA5RloFMOnYNMZdoEf\n" + + "yl6TAPEmFD7vCYHXpSlQdFFKu988CNF5+grn9kjC7rF+JxPEYUsnNA11TFzFEfki\n" + + "Lu0uXirJH+0gQzEp/qGd2SjDANCk+kORjeOOmefbxziG/Y74rnJ1A7gZjL8Abrie\n" + + "K0mTfOk9DcgqX96PP4HXgX3+XYkCgYEAyBx28UNZoL3Dy8iquTV0VmXCOq2c5+aW\n" + + "3YS2BKP9rAPy5mWWy6PR28yduomuUu04GxHYf2yw0+0UxpPyWu8TdQHJKjLX4On7\n" + + "L+ZholvXpyqs51btsbBiRK022akh/MPnqdD9zt/RS2b1QM4yfEWN8kVE3zsMWxMP\n" + + "gBf9EH4taGMCgYBfsD3ttk65vVI8UfBiSSAjW5WpDSQwF2BnpprpCm8pizL7B+tn\n" + + "iZibIIbyxYXIcpQqgwZL0nc0vua8/A7QBNbCFCLPR+6awfUlWoGgi0rvkzXlJcWs\n" + + "uuf71oDQdAbF7yplSn8fX4ykYb6fgFLoB6InoQ+UKw+v3Th9sRC/EE3m6QKBgDBN\n" + + "RpyHwDufcoJe5m6cK3+rQk29mFEVhLblkLXgC5wYu+nG/bYbzcz7P9tF3nEf11oZ\n" + + "XaOsTaZp5IjmLyqp6I1mp/LqoNcmQz5Vop15A73S/Dc+8VLhm2auVL4HKDAF7YY8\n" + + "7vafabqEmJBS9Tav50piU/R6IUpeeHBX2frAKh+3AoGAPTLxTMMEbhZGJFs8GRP9\n" + + "fFyWZeEkf3tgUK19tAAOk3TX+O0TNvD8UouXq7Z/EUaE1mYhKPf5LbI6nbYEVll4\n" + + "mWLGd+o8FNFp6E5083O3Tgf0BI4l+sKnwpP/Sqg9BDGARTPS5taeX0SWtQ+HPYGC\n" + + "4e5m59uhN7t8tHtDVcK0/Pk=\n" + + "-----END PRIVATE KEY-----"; /** * Test CA Certificate. + * *
                * Issuer: CN=Root
                * Subject: CN=Root
                * 
            */ - public static final CertData CA_CERT = new CertData( - "-----BEGIN CERTIFICATE-----\n" - + "MIIC8TCCAdmgAwIBAgIJAMNI15HrGylkMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV\n" - + "BAMMBFJvb3QwHhcNMTQxMTE4MTY1NDAzWhcNMzQxMTEzMTY1NDAzWjAPMQ0wCwYD\n" - + "VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzeUNc4bS\n" - + "WHhOTU+5MQ/lOmmjQWpfBi+FJuxvoeOmQwi6frPKKsaKKYGfCTPlKE0dmrEP95bn\n" - + "i/qL5xApP17orjUe6KRtJAwFNI5EZadIfjbh/q+85C1Cp2BS2YmuZQzXZHP63yyB\n" - + "p05YcbMKwCBHXaAgYbmTTk+4+1pjNpHP6YiF2gCPvSfzokGyhbvBqnPbnTdI9w6f\n" - + "jNBYAbr/uBOTU0vK4ktzlWk5lvsm51e8vsLSqWhoHADq0AriAelU4SHsSACkRUQS\n" - + "xWV0K5hzTv4ecvCbG9dskiDCwWg+uTRSoAFeZOhONL000q7Vey3DZTcLl8/O4NQV\n" - + "aZR5iAgVWlWcswIDAQABo1AwTjAdBgNVHQ4EFgQUsimlIRDcJR0ofR7oM8KwHFOH\n" - + "+sIwHwYDVR0jBBgwFoAUsimlIRDcJR0ofR7oM8KwHFOH+sIwDAYDVR0TBAUwAwEB\n" - + "/zANBgkqhkiG9w0BAQsFAAOCAQEAWQl8SmbQoBV3tjOJ8zMlcN0xOPpSSNbx0g7E\n" - + "L/dQgJpet0McW62RHlgQAOKbS3PReo2nsRB/ZRyYDu4i13ZHZ8bMsGOES4BQpz13\n" - + "mtmXg9RhsXqL0eDYfBcjjtlruUbxhnALp4VN1zVdyWAPCj0eu3MxpgMWcyn50Qmi\n" - + "JSj/Equ/lLhve/wKvjG5WhnV8uRKRuFbFct0DHAHMnZqFHcGS5So0cYnSfK5fbBR\n" - + "NelGflhpbbPp0V0aXiqinqD0Ye3OaZdFq+2rP1oC/a5/Ou4LspY3b5oD9rENdy7b\n" - + "q0KewPFtgPvUkJrJ3TzbiwvpghZ7zG26bnJ5I7uc4y1VujqaOA==\n" - + "-----END CERTIFICATE-----"); + public static final CertData CA_CERT = + new CertData( + "-----BEGIN CERTIFICATE-----\n" + + "MIIC8TCCAdmgAwIBAgIJAMNI15HrGylkMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV\n" + + "BAMMBFJvb3QwHhcNMTQxMTE4MTY1NDAzWhcNMzQxMTEzMTY1NDAzWjAPMQ0wCwYD\n" + + "VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzeUNc4bS\n" + + "WHhOTU+5MQ/lOmmjQWpfBi+FJuxvoeOmQwi6frPKKsaKKYGfCTPlKE0dmrEP95bn\n" + + "i/qL5xApP17orjUe6KRtJAwFNI5EZadIfjbh/q+85C1Cp2BS2YmuZQzXZHP63yyB\n" + + "p05YcbMKwCBHXaAgYbmTTk+4+1pjNpHP6YiF2gCPvSfzokGyhbvBqnPbnTdI9w6f\n" + + "jNBYAbr/uBOTU0vK4ktzlWk5lvsm51e8vsLSqWhoHADq0AriAelU4SHsSACkRUQS\n" + + "xWV0K5hzTv4ecvCbG9dskiDCwWg+uTRSoAFeZOhONL000q7Vey3DZTcLl8/O4NQV\n" + + "aZR5iAgVWlWcswIDAQABo1AwTjAdBgNVHQ4EFgQUsimlIRDcJR0ofR7oM8KwHFOH\n" + + "+sIwHwYDVR0jBBgwFoAUsimlIRDcJR0ofR7oM8KwHFOH+sIwDAYDVR0TBAUwAwEB\n" + + "/zANBgkqhkiG9w0BAQsFAAOCAQEAWQl8SmbQoBV3tjOJ8zMlcN0xOPpSSNbx0g7E\n" + + "L/dQgJpet0McW62RHlgQAOKbS3PReo2nsRB/ZRyYDu4i13ZHZ8bMsGOES4BQpz13\n" + + "mtmXg9RhsXqL0eDYfBcjjtlruUbxhnALp4VN1zVdyWAPCj0eu3MxpgMWcyn50Qmi\n" + + "JSj/Equ/lLhve/wKvjG5WhnV8uRKRuFbFct0DHAHMnZqFHcGS5So0cYnSfK5fbBR\n" + + "NelGflhpbbPp0V0aXiqinqD0Ye3OaZdFq+2rP1oC/a5/Ou4LspY3b5oD9rENdy7b\n" + + "q0KewPFtgPvUkJrJ3TzbiwvpghZ7zG26bnJ5I7uc4y1VujqaOA==\n" + + "-----END CERTIFICATE-----"); - /** - * Private key for {@code CA_CERT}. - */ + /** Private key for {@code CA_CERT}. */ public static final String CA_KEY = "-----BEGIN PRIVATE KEY-----\n" - + "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDN5Q1zhtJYeE5N\n" - + "T7kxD+U6aaNBal8GL4Um7G+h46ZDCLp+s8oqxoopgZ8JM+UoTR2asQ/3lueL+ovn\n" - + "ECk/XuiuNR7opG0kDAU0jkRlp0h+NuH+r7zkLUKnYFLZia5lDNdkc/rfLIGnTlhx\n" - + "swrAIEddoCBhuZNOT7j7WmM2kc/piIXaAI+9J/OiQbKFu8Gqc9udN0j3Dp+M0FgB\n" - + "uv+4E5NTS8riS3OVaTmW+ybnV7y+wtKpaGgcAOrQCuIB6VThIexIAKRFRBLFZXQr\n" - + "mHNO/h5y8Jsb12ySIMLBaD65NFKgAV5k6E40vTTSrtV7LcNlNwuXz87g1BVplHmI\n" - + "CBVaVZyzAgMBAAECggEANfRuP/X2rURpkIzxxM+bjGEebQgI+r/9LqQK5OuZKDvj\n" - + "U0yeD/OTRSk4mdrFlHgQ5/a6bnFXIDF59AUiKf8fDnfRL7nW9/lGa+1UMydRMfID\n" - + "6w/2efz6WI4/Z85SqxxgXWyfM1igaU14k+MNUCelS/2oPrO4zG7L1OJs2WIAj/vE\n" - + "HnndSBa3rvTXmY37JclkChFokG0svuZMmaXWG1JI6JziSsvO4YZAYvZ10yCvbFzZ\n" - + "iczMCyyGhRcUeG3wbVDK0lPp5f1jKtyfuQtR2uFhdRHUk2+cMY6s/o3hgdW5b/z9\n" - + "Yddyw28tC6/uECHJs8dsmNM4hPc+n2+wCVwB9HbSMQKBgQD3V640Tv5UWiHM4lGq\n" - + "pSdUViNsLgDLmNplWLB0aRbBgTsJLGlzI1sGqSEydlZORYZT4GBdLmTJdumBGBAn\n" - + "4FxfyyAVjjn8WjYo9ocyMrIGLFKF3EvSyx4opsOX6QOyuyzdDhzt+BkY66Zb0Bgl\n" - + "lzUQ4S6hhvvEQc5COiNmTuDT/QKBgQDVGfpp8yBamTyRgGQWTwRqIQuJC2QHOrhV\n" - + "OKQ7NwMyMObyML0ZQm2SCu+Oo0qsMxz8Ix6sNtnJfxZxpUYCLG3HWc6EfaGT1hDR\n" - + "EgWsdl9J/xP/KwgSzHuSqZTCuNQRTg/XbNfjXnMHy8UaTBL+0jHLAnmvczBrSnEM\n" - + "r8RgkjoabwKBgQCkuklz3vQ1O33tVQEs1Cc4XNHkl1LCRb+V5ZZHQUH9h9LIjkKA\n" - + "gxh5fCR21icuo9ENhY7IIEDRiBeFeYAw/pSm28I3eOyXa4FMkLuDrA2yXMxtCEWb\n" - + "Utl4G3CCeJaU72G2q1KLDkOwvCikVxft2SFnZ4FF5H9CuszigJPY7EmCBQKBgD+/\n" - + "fra1IWeY0ZKhOs+loadx7TZ47tpuyXfM8uw337/i+yNWSytEQOzgUptz48GxpKkU\n" - + "hHd2DR6G4xrqGxBJZCmvhuUBhBVqgytX3dSisIy9PqkloUumWg0cp8C8c8wdcwW5\n" - + "rLd6qKSbY4IjYcdS78xQGEDRD5n48eqepftRowoHAoGBAMdJ5/QwIymaTBhblYiL\n" - + "nvzZZ6kvxqId+JF93skZJ4NdQ346CVcWWbjTwO/oaJ9ri3MsWY18t4uSIYeYyaCa\n" - + "5dqQo3nObq2jqxFby92GWSNrwape2FvRGzJ7hnr44EkxUlQPeICod84RI/1mdOM8\n" - + "E+VTo/KjRA8P2ogks9bltd6f\n" - + "-----END PRIVATE KEY-----"; + + "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDN5Q1zhtJYeE5N\n" + + "T7kxD+U6aaNBal8GL4Um7G+h46ZDCLp+s8oqxoopgZ8JM+UoTR2asQ/3lueL+ovn\n" + + "ECk/XuiuNR7opG0kDAU0jkRlp0h+NuH+r7zkLUKnYFLZia5lDNdkc/rfLIGnTlhx\n" + + "swrAIEddoCBhuZNOT7j7WmM2kc/piIXaAI+9J/OiQbKFu8Gqc9udN0j3Dp+M0FgB\n" + + "uv+4E5NTS8riS3OVaTmW+ybnV7y+wtKpaGgcAOrQCuIB6VThIexIAKRFRBLFZXQr\n" + + "mHNO/h5y8Jsb12ySIMLBaD65NFKgAV5k6E40vTTSrtV7LcNlNwuXz87g1BVplHmI\n" + + "CBVaVZyzAgMBAAECggEANfRuP/X2rURpkIzxxM+bjGEebQgI+r/9LqQK5OuZKDvj\n" + + "U0yeD/OTRSk4mdrFlHgQ5/a6bnFXIDF59AUiKf8fDnfRL7nW9/lGa+1UMydRMfID\n" + + "6w/2efz6WI4/Z85SqxxgXWyfM1igaU14k+MNUCelS/2oPrO4zG7L1OJs2WIAj/vE\n" + + "HnndSBa3rvTXmY37JclkChFokG0svuZMmaXWG1JI6JziSsvO4YZAYvZ10yCvbFzZ\n" + + "iczMCyyGhRcUeG3wbVDK0lPp5f1jKtyfuQtR2uFhdRHUk2+cMY6s/o3hgdW5b/z9\n" + + "Yddyw28tC6/uECHJs8dsmNM4hPc+n2+wCVwB9HbSMQKBgQD3V640Tv5UWiHM4lGq\n" + + "pSdUViNsLgDLmNplWLB0aRbBgTsJLGlzI1sGqSEydlZORYZT4GBdLmTJdumBGBAn\n" + + "4FxfyyAVjjn8WjYo9ocyMrIGLFKF3EvSyx4opsOX6QOyuyzdDhzt+BkY66Zb0Bgl\n" + + "lzUQ4S6hhvvEQc5COiNmTuDT/QKBgQDVGfpp8yBamTyRgGQWTwRqIQuJC2QHOrhV\n" + + "OKQ7NwMyMObyML0ZQm2SCu+Oo0qsMxz8Ix6sNtnJfxZxpUYCLG3HWc6EfaGT1hDR\n" + + "EgWsdl9J/xP/KwgSzHuSqZTCuNQRTg/XbNfjXnMHy8UaTBL+0jHLAnmvczBrSnEM\n" + + "r8RgkjoabwKBgQCkuklz3vQ1O33tVQEs1Cc4XNHkl1LCRb+V5ZZHQUH9h9LIjkKA\n" + + "gxh5fCR21icuo9ENhY7IIEDRiBeFeYAw/pSm28I3eOyXa4FMkLuDrA2yXMxtCEWb\n" + + "Utl4G3CCeJaU72G2q1KLDkOwvCikVxft2SFnZ4FF5H9CuszigJPY7EmCBQKBgD+/\n" + + "fra1IWeY0ZKhOs+loadx7TZ47tpuyXfM8uw337/i+yNWSytEQOzgUptz48GxpKkU\n" + + "hHd2DR6G4xrqGxBJZCmvhuUBhBVqgytX3dSisIy9PqkloUumWg0cp8C8c8wdcwW5\n" + + "rLd6qKSbY4IjYcdS78xQGEDRD5n48eqepftRowoHAoGBAMdJ5/QwIymaTBhblYiL\n" + + "nvzZZ6kvxqId+JF93skZJ4NdQ346CVcWWbjTwO/oaJ9ri3MsWY18t4uSIYeYyaCa\n" + + "5dqQo3nObq2jqxFby92GWSNrwape2FvRGzJ7hnr44EkxUlQPeICod84RI/1mdOM8\n" + + "E+VTo/KjRA8P2ogks9bltd6f\n" + + "-----END PRIVATE KEY-----"; /** * CA certificate signed with a bogus key. + * *
                * Issuer: CN=Root
                * Subject: CN=Root
                * 
            */ - public static final CertData BOGUS_CA_CERT = new CertData( - "-----BEGIN CERTIFICATE-----\n" - + "MIIC8TCCAdmgAwIBAgIJAP2af/EIgk6oMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV\n" - + "BAMMBFJvb3QwHhcNMTQxMTE5MTEwNDMyWhcNMzQxMTE0MTEwNDMyWjAPMQ0wCwYD\n" - + "VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtPB0EtUf\n" - + "aVS9LRljaL4NTYp0tJooMrRTI4ht4ixIv7m6XTSbxVjOtY0228ZPWeUE/3wduezW\n" - + "1rWNU4Uh4ezW0rw9CmW6m2zsMjjGwjY4A5ctMRDlgQtxzfHSPWPtTixtBr3YpdcP\n" - + "mg9xVIYvSHZ+fA3x5dRFRxdNidVrndVINzUoaoD9hZ/sgCKg9c2hdDSO9prrTpXD\n" - + "yatgLZ8LsFJO94HrkfFsQqquwxxvpixyWtjWUpnO28jnbDRC0ADOp/WZQ8exOP+a\n" - + "XUcrHdIsC0RcB6csnM6EarfwEm1jnBwDi37Rxk2BFiBYyzEbCrn7M6QY/DQrZJbw\n" - + "9gzSIvT2+5OvawIDAQABo1AwTjAdBgNVHQ4EFgQUYo97/In/SDI+pKRTSrSVhPyq\n" - + "5UQwHwYDVR0jBBgwFoAUYo97/In/SDI+pKRTSrSVhPyq5UQwDAYDVR0TBAUwAwEB\n" - + "/zANBgkqhkiG9w0BAQsFAAOCAQEABuUZ+sF4QD8H+PHvJLz+3+puXYvvE2IpcC65\n" - + "RQznp5iq5Rs4oGJvYwyD1bVUbCNz1IoyB9Lfo5QmSuyV1JybalBZ9FCDzZunBT3O\n" - + "4Tr6KfziVPHat3vYMNzzJY/IU3u6uLDmqm1J6qoSBkq4yL1AaHFon2j9gT3FXvVk\n" - + "7f1DjztAplWQBC4ScepJbiIRJkLxThDmM2g1xKUtZ6LlPL5J5CmXutzWbV5YS1eo\n" - + "uVrDRTmXr4wLzpcURWWB2gbPc0l7+1TfvTydVEp7YqN1EhvNmvsejiQCy+4Cq/D1\n" - + "m4rBV4SLLaHstTQNqcK1djxy2FbpYD7j5Himdc0oUeYif9gZ9g==\n" - + "-----END CERTIFICATE-----\n"); + public static final CertData BOGUS_CA_CERT = + new CertData( + "-----BEGIN CERTIFICATE-----\n" + + "MIIC8TCCAdmgAwIBAgIJAP2af/EIgk6oMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV\n" + + "BAMMBFJvb3QwHhcNMTQxMTE5MTEwNDMyWhcNMzQxMTE0MTEwNDMyWjAPMQ0wCwYD\n" + + "VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtPB0EtUf\n" + + "aVS9LRljaL4NTYp0tJooMrRTI4ht4ixIv7m6XTSbxVjOtY0228ZPWeUE/3wduezW\n" + + "1rWNU4Uh4ezW0rw9CmW6m2zsMjjGwjY4A5ctMRDlgQtxzfHSPWPtTixtBr3YpdcP\n" + + "mg9xVIYvSHZ+fA3x5dRFRxdNidVrndVINzUoaoD9hZ/sgCKg9c2hdDSO9prrTpXD\n" + + "yatgLZ8LsFJO94HrkfFsQqquwxxvpixyWtjWUpnO28jnbDRC0ADOp/WZQ8exOP+a\n" + + "XUcrHdIsC0RcB6csnM6EarfwEm1jnBwDi37Rxk2BFiBYyzEbCrn7M6QY/DQrZJbw\n" + + "9gzSIvT2+5OvawIDAQABo1AwTjAdBgNVHQ4EFgQUYo97/In/SDI+pKRTSrSVhPyq\n" + + "5UQwHwYDVR0jBBgwFoAUYo97/In/SDI+pKRTSrSVhPyq5UQwDAYDVR0TBAUwAwEB\n" + + "/zANBgkqhkiG9w0BAQsFAAOCAQEABuUZ+sF4QD8H+PHvJLz+3+puXYvvE2IpcC65\n" + + "RQznp5iq5Rs4oGJvYwyD1bVUbCNz1IoyB9Lfo5QmSuyV1JybalBZ9FCDzZunBT3O\n" + + "4Tr6KfziVPHat3vYMNzzJY/IU3u6uLDmqm1J6qoSBkq4yL1AaHFon2j9gT3FXvVk\n" + + "7f1DjztAplWQBC4ScepJbiIRJkLxThDmM2g1xKUtZ6LlPL5J5CmXutzWbV5YS1eo\n" + + "uVrDRTmXr4wLzpcURWWB2gbPc0l7+1TfvTydVEp7YqN1EhvNmvsejiQCy+4Cq/D1\n" + + "m4rBV4SLLaHstTQNqcK1djxy2FbpYD7j5Himdc0oUeYif9gZ9g==\n" + + "-----END CERTIFICATE-----\n"); /** - * A test JWS signature. - *

            - * The signed JSON is the following message: + * A test JWS signature. + * + *

            The signed JSON is the following message: + * *

                * {"foo":"bar"}
                * 
            + * * The message is signed using {@code FOO_BAR_COM_KEY}. */ public static final String JWS_SIGNATURE = "eyJhbGciOiJSUzI1NiIsIng1YyI6WyJNSUlDNlRDQ0FkRUNBU293RFFZSktvWklo" - + "dmNOQVFFTEJRQXdEekVOTUFzR0ExVUVBd3dFVW05dmREQWVGdzB4TkRFeE1UZ3hO" - + "alUwTUROYUZ3MHpOREV4TVRNeE5qVTBNRE5hTUdZeEN6QUpCZ05WQkFZVEFsVlRN" - + "Uk13RVFZRFZRUUlEQXBEWVd4cFptOXlibWxoTVJZd0ZBWURWUVFIREExTmIzVnVk" - + "R0ZwYmlCV2FXVjNNUlF3RWdZRFZRUUtEQXRIYjI5bmJHVWdTVzVqTGpFVU1CSUdB" - + "MVVFQXd3TFptOXZMbUpoY2k1amIyMHdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFB" - + "NElCRHdBd2dnRUtBb0lCQVFDekZWS0pPa3FUbXl5ak1IV0JPckxkcFltYzBFY3ZH" - + "M01vaGFWK1VKclZySTJTRHlrWThZV1NrVEt6OUJLbUY4SFAvR2pQUERzMzE4NENl" - + "ajliMVdleXZWQjhSajNndUgzb0wrc0pUM3U5VjJ5NHp5bzV4TzZGV01CWUVRNlg4" - + "RGtHbFl0VHA1dGhlWWJSclhORUx1bDRsRitMdEhUQ2FBQU5STWtPbDBORW9MYTZC" - + "UmhPRzY4Z0ZmSUF4eDVsVDhSRUU5dXR2UHV5K3JDYUJIbmZIT1BmOHBuMExTdmNl" - + "QmlqU0lGb1MzWTVjcmpQVmp5aVBBWlVIV25IVEZBaWxmSG5wTEJsR3hwQ3lsZVBR" - + "aE1LclBjZ3ZEb0Q5bmQwTEE2eFlMRjdEUFhYU2E4RkxPK2ZQVjhDTkpDQXNGdXE5" - + "UmxmMlR0M1NqTHRXUll1aDVMdWN0UDdBZ01CQUFFd0RRWUpLb1pJaHZjTkFRRUxC" - + "UUFEZ2dFQkFFc01BQlpsKzhSbGswaHFCa3RzRHVycmk0bkYvMDdDblNCZS96VWJU" - + "aVloTXByN1ZSSURsSExvZTVsc2xMaWxmWHp2YXltY01GZUgxdUJ4TndoZjdJTzdX" - + "dkl3UWVVSFNWK3JIeU55Z1RUaWVPMEpuOEh3KzRTQ29oSEFkTXZENXVXRXduM0x2" - + "K1c0eTdPaGFTYnpsaFZDVkNuRkxWS2ljQmF5VVhIdGRKWEpJQ29rUjQraC9XTk03" - + "ZzBpS1RoYWtaT3lmYjhoMXBoeTdUTVRWbFBGS3JjVkRvNW05K0dodFBDNFBOakdM" - + "b2s2ci9qeDlDSU9DYXBJcWk4ZlhKRU94S3ZpbFllQVlxZmpXdmh4MDBqdUVVQkhy" - + "cENROHdUNFRBK0xsSTAyY1J6NXJ4VzRGUUF6MU5kb0c5SFpEWldhK05ORlRaZEFt" - + "dFdQSk1MZCs4TDhzbDQ9IiwiTUlJQzhUQ0NBZG1nQXdJQkFnSUpBTU5JMTVIckd5" - + "bGtNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1BOHhEVEFMQmdOVkJBTU1CRkp2YjNRd0ho" - + "Y05NVFF4TVRFNE1UWTFOREF6V2hjTk16UXhNVEV6TVRZMU5EQXpXakFQTVEwd0N3" - + "WURWUVFEREFSU2IyOTBNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1J" - + "SUJDZ0tDQVFFQXplVU5jNGJTV0hoT1RVKzVNUS9sT21talFXcGZCaStGSnV4dm9l" - + "T21Rd2k2ZnJQS0tzYUtLWUdmQ1RQbEtFMGRtckVQOTVibmkvcUw1eEFwUDE3b3Jq" - + "VWU2S1J0SkF3Rk5JNUVaYWRJZmpiaC9xKzg1QzFDcDJCUzJZbXVaUXpYWkhQNjN5" - + "eUJwMDVZY2JNS3dDQkhYYUFnWWJtVFRrKzQrMXBqTnBIUDZZaUYyZ0NQdlNmem9r" - + "R3loYnZCcW5QYm5UZEk5dzZmak5CWUFici91Qk9UVTB2SzRrdHpsV2s1bHZzbTUx" - + "ZTh2c0xTcVdob0hBRHEwQXJpQWVsVTRTSHNTQUNrUlVRU3hXVjBLNWh6VHY0ZWN2" - + "Q2JHOWRza2lEQ3dXZyt1VFJTb0FGZVpPaE9OTDAwMHE3VmV5M0RaVGNMbDgvTzRO" - + "UVZhWlI1aUFnVldsV2Nzd0lEQVFBQm8xQXdUakFkQmdOVkhRNEVGZ1FVc2ltbElS" - + "RGNKUjBvZlI3b004S3dIRk9IK3NJd0h3WURWUjBqQkJnd0ZvQVVzaW1sSVJEY0pS" - + "MG9mUjdvTThLd0hGT0grc0l3REFZRFZSMFRCQVV3QXdFQi96QU5CZ2txaGtpRzl3" - + "MEJBUXNGQUFPQ0FRRUFXUWw4U21iUW9CVjN0ak9KOHpNbGNOMHhPUHBTU05ieDBn" - + "N0VML2RRZ0pwZXQwTWNXNjJSSGxnUUFPS2JTM1BSZW8ybnNSQi9aUnlZRHU0aTEz" - + "WkhaOGJNc0dPRVM0QlFwejEzbXRtWGc5UmhzWHFMMGVEWWZCY2pqdGxydVVieGhu" - + "QUxwNFZOMXpWZHlXQVBDajBldTNNeHBnTVdjeW41MFFtaUpTai9FcXUvbExodmUv" - + "d0t2akc1V2huVjh1UktSdUZiRmN0MERIQUhNblpxRkhjR1M1U28wY1luU2ZLNWZi" - + "QlJOZWxHZmxocGJiUHAwVjBhWGlxaW5xRDBZZTNPYVpkRnErMnJQMW9DL2E1L091" - + "NExzcFkzYjVvRDlyRU5keTdicTBLZXdQRnRnUHZVa0pySjNUemJpd3ZwZ2haN3pH" - + "MjZibko1STd1YzR5MVZ1anFhT0E9PSJdfQ.eyJmb28iOiJiYXIifQ.eWzIsJF4PE" - + "xQap9HK6Vlz8DGlgGwoiLCtyOEK0Bfu_yHTAZeApn5rh6Uzfx06Gv6eHdM34YL_t" - + "gLRb4bjuZVA8xvQ9uHNs8UtpBIOiUcagzvtKyyfCofk5U5sNb54GgVVYxa6p4A1O" - + "bdJv1jjlUOnzR8keX5LsAM4Ia7xeqiFh0GER4l0ulVChy_bSn0IeNiKFW7HKcxtc" - + "GO_zZTtlv4HiifuyPSk_ar2IDX1w599KXniVcWkQ_W1zcp5YuPDw8mIQDVCH2uQY" - + "7qs2ejdZj5LIgIz4CbQ0wg53rlwE7DDQM6MNUgZLnzNmMSMfFrpE7_PQyxe2qJCs" - + "ucHODzEHX4Tg"; + + "dmNOQVFFTEJRQXdEekVOTUFzR0ExVUVBd3dFVW05dmREQWVGdzB4TkRFeE1UZ3hO" + + "alUwTUROYUZ3MHpOREV4TVRNeE5qVTBNRE5hTUdZeEN6QUpCZ05WQkFZVEFsVlRN" + + "Uk13RVFZRFZRUUlEQXBEWVd4cFptOXlibWxoTVJZd0ZBWURWUVFIREExTmIzVnVk" + + "R0ZwYmlCV2FXVjNNUlF3RWdZRFZRUUtEQXRIYjI5bmJHVWdTVzVqTGpFVU1CSUdB" + + "MVVFQXd3TFptOXZMbUpoY2k1amIyMHdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFB" + + "NElCRHdBd2dnRUtBb0lCQVFDekZWS0pPa3FUbXl5ak1IV0JPckxkcFltYzBFY3ZH" + + "M01vaGFWK1VKclZySTJTRHlrWThZV1NrVEt6OUJLbUY4SFAvR2pQUERzMzE4NENl" + + "ajliMVdleXZWQjhSajNndUgzb0wrc0pUM3U5VjJ5NHp5bzV4TzZGV01CWUVRNlg4" + + "RGtHbFl0VHA1dGhlWWJSclhORUx1bDRsRitMdEhUQ2FBQU5STWtPbDBORW9MYTZC" + + "UmhPRzY4Z0ZmSUF4eDVsVDhSRUU5dXR2UHV5K3JDYUJIbmZIT1BmOHBuMExTdmNl" + + "QmlqU0lGb1MzWTVjcmpQVmp5aVBBWlVIV25IVEZBaWxmSG5wTEJsR3hwQ3lsZVBR" + + "aE1LclBjZ3ZEb0Q5bmQwTEE2eFlMRjdEUFhYU2E4RkxPK2ZQVjhDTkpDQXNGdXE5" + + "UmxmMlR0M1NqTHRXUll1aDVMdWN0UDdBZ01CQUFFd0RRWUpLb1pJaHZjTkFRRUxC" + + "UUFEZ2dFQkFFc01BQlpsKzhSbGswaHFCa3RzRHVycmk0bkYvMDdDblNCZS96VWJU" + + "aVloTXByN1ZSSURsSExvZTVsc2xMaWxmWHp2YXltY01GZUgxdUJ4TndoZjdJTzdX" + + "dkl3UWVVSFNWK3JIeU55Z1RUaWVPMEpuOEh3KzRTQ29oSEFkTXZENXVXRXduM0x2" + + "K1c0eTdPaGFTYnpsaFZDVkNuRkxWS2ljQmF5VVhIdGRKWEpJQ29rUjQraC9XTk03" + + "ZzBpS1RoYWtaT3lmYjhoMXBoeTdUTVRWbFBGS3JjVkRvNW05K0dodFBDNFBOakdM" + + "b2s2ci9qeDlDSU9DYXBJcWk4ZlhKRU94S3ZpbFllQVlxZmpXdmh4MDBqdUVVQkhy" + + "cENROHdUNFRBK0xsSTAyY1J6NXJ4VzRGUUF6MU5kb0c5SFpEWldhK05ORlRaZEFt" + + "dFdQSk1MZCs4TDhzbDQ9IiwiTUlJQzhUQ0NBZG1nQXdJQkFnSUpBTU5JMTVIckd5" + + "bGtNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1BOHhEVEFMQmdOVkJBTU1CRkp2YjNRd0ho" + + "Y05NVFF4TVRFNE1UWTFOREF6V2hjTk16UXhNVEV6TVRZMU5EQXpXakFQTVEwd0N3" + + "WURWUVFEREFSU2IyOTBNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1J" + + "SUJDZ0tDQVFFQXplVU5jNGJTV0hoT1RVKzVNUS9sT21talFXcGZCaStGSnV4dm9l" + + "T21Rd2k2ZnJQS0tzYUtLWUdmQ1RQbEtFMGRtckVQOTVibmkvcUw1eEFwUDE3b3Jq" + + "VWU2S1J0SkF3Rk5JNUVaYWRJZmpiaC9xKzg1QzFDcDJCUzJZbXVaUXpYWkhQNjN5" + + "eUJwMDVZY2JNS3dDQkhYYUFnWWJtVFRrKzQrMXBqTnBIUDZZaUYyZ0NQdlNmem9r" + + "R3loYnZCcW5QYm5UZEk5dzZmak5CWUFici91Qk9UVTB2SzRrdHpsV2s1bHZzbTUx" + + "ZTh2c0xTcVdob0hBRHEwQXJpQWVsVTRTSHNTQUNrUlVRU3hXVjBLNWh6VHY0ZWN2" + + "Q2JHOWRza2lEQ3dXZyt1VFJTb0FGZVpPaE9OTDAwMHE3VmV5M0RaVGNMbDgvTzRO" + + "UVZhWlI1aUFnVldsV2Nzd0lEQVFBQm8xQXdUakFkQmdOVkhRNEVGZ1FVc2ltbElS" + + "RGNKUjBvZlI3b004S3dIRk9IK3NJd0h3WURWUjBqQkJnd0ZvQVVzaW1sSVJEY0pS" + + "MG9mUjdvTThLd0hGT0grc0l3REFZRFZSMFRCQVV3QXdFQi96QU5CZ2txaGtpRzl3" + + "MEJBUXNGQUFPQ0FRRUFXUWw4U21iUW9CVjN0ak9KOHpNbGNOMHhPUHBTU05ieDBn" + + "N0VML2RRZ0pwZXQwTWNXNjJSSGxnUUFPS2JTM1BSZW8ybnNSQi9aUnlZRHU0aTEz" + + "WkhaOGJNc0dPRVM0QlFwejEzbXRtWGc5UmhzWHFMMGVEWWZCY2pqdGxydVVieGhu" + + "QUxwNFZOMXpWZHlXQVBDajBldTNNeHBnTVdjeW41MFFtaUpTai9FcXUvbExodmUv" + + "d0t2akc1V2huVjh1UktSdUZiRmN0MERIQUhNblpxRkhjR1M1U28wY1luU2ZLNWZi" + + "QlJOZWxHZmxocGJiUHAwVjBhWGlxaW5xRDBZZTNPYVpkRnErMnJQMW9DL2E1L091" + + "NExzcFkzYjVvRDlyRU5keTdicTBLZXdQRnRnUHZVa0pySjNUemJpd3ZwZ2haN3pH" + + "MjZibko1STd1YzR5MVZ1anFhT0E9PSJdfQ.eyJmb28iOiJiYXIifQ.eWzIsJF4PE" + + "xQap9HK6Vlz8DGlgGwoiLCtyOEK0Bfu_yHTAZeApn5rh6Uzfx06Gv6eHdM34YL_t" + + "gLRb4bjuZVA8xvQ9uHNs8UtpBIOiUcagzvtKyyfCofk5U5sNb54GgVVYxa6p4A1O" + + "bdJv1jjlUOnzR8keX5LsAM4Ia7xeqiFh0GER4l0ulVChy_bSn0IeNiKFW7HKcxtc" + + "GO_zZTtlv4HiifuyPSk_ar2IDX1w599KXniVcWkQ_W1zcp5YuPDw8mIQDVCH2uQY" + + "7qs2ejdZj5LIgIz4CbQ0wg53rlwE7DDQM6MNUgZLnzNmMSMfFrpE7_PQyxe2qJCs" + + "ucHODzEHX4Tg"; private static JsonWebSignature jsonWebSignature = null; @@ -307,8 +309,8 @@ public static JsonWebSignature getJsonWebSignature() throws IOException { int secondDot = JWS_SIGNATURE.indexOf('.', firstDot + 1); byte[] signatureBytes = Base64.decodeBase64(JWS_SIGNATURE.substring(secondDot + 1)); byte[] signedContentBytes = StringUtils.getBytesUtf8(JWS_SIGNATURE.substring(0, secondDot)); - JsonWebSignature signature = new JsonWebSignature( - header, payload, signatureBytes, signedContentBytes); + JsonWebSignature signature = + new JsonWebSignature(header, payload, signatureBytes, signedContentBytes); jsonWebSignature = signature; } return jsonWebSignature; diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java index d5fd7da84..893f89883 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests for JSON WebToken. * * @since 1.19.1 diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java b/google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java index 5d223f866..0229cd26b 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java @@ -16,13 +16,12 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.Lists; - import java.util.List; import java.util.logging.Handler; import java.util.logging.LogRecord; /** - * {@link Beta}
            + * {@link Beta}
            * Logging handler that stores log records. * * @author Yaniv Inbar @@ -40,12 +39,10 @@ public void publish(LogRecord record) { } @Override - public void flush() { - } + public void flush() {} @Override - public void close() throws SecurityException { - } + public void close() throws SecurityException {} /** Returns a new instance of a list of published record messages. */ public List messages() { diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java b/google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java index ba68370ad..cf036a83f 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java @@ -17,16 +17,13 @@ import com.google.api.client.util.BackOff; import com.google.api.client.util.Beta; import com.google.api.client.util.Preconditions; - import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link BackOff} that always returns a fixed number. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.15 @@ -58,10 +55,8 @@ public long nextBackOffMillis() throws IOException { /** * Sets the fixed back-off milliseconds (defaults to {@code 0}). * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MockBackOff setBackOffMillis(long backOffMillis) { Preconditions.checkArgument(backOffMillis == STOP || backOffMillis >= 0); @@ -72,10 +67,8 @@ public MockBackOff setBackOffMillis(long backOffMillis) { /** * Sets the maximum number of tries before returning {@link #STOP} (defaults to {@code 10}). * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public MockBackOff setMaxTries(int maxTries) { Preconditions.checkArgument(maxTries >= 0); diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java b/google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java index 0ac4afb11..dc8fff418 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java @@ -18,12 +18,10 @@ import com.google.api.client.util.Sleeper; /** - * {@link Beta}
            + * {@link Beta}
            * Mock for {@link Sleeper}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.15 diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java b/google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java index 29a39f31e..ca58c38b4 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java @@ -16,7 +16,6 @@ import com.google.api.client.util.Beta; import com.google.api.client.util.SecurityUtils; - import java.security.GeneralSecurityException; import java.security.KeyFactory; import java.security.interfaces.RSAPrivateKey; @@ -26,7 +25,7 @@ import java.security.spec.X509EncodedKeySpec; /** - * {@link Beta}
            + * {@link Beta}
            * Utilities and constants related to testing the library {@code util} package. * * @since 1.14 @@ -35,60 +34,62 @@ @Beta public final class SecurityTestUtils { - private static final byte[] ENCODED_PRIVATE_KEY = {48, -126, 2, 118, 2, 1, 0, 48, 13, 6, 9, 42, - -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, 96, 48, -126, 2, 92, 2, 1, 0, 2, -127, -127, - 0, -89, 33, 8, -124, 110, -60, 89, 8, -62, 69, 120, 95, -59, -43, 13, -18, 123, 29, -31, 13, - -80, -76, 109, -62, -79, 2, 104, -94, 76, 59, -73, -26, 99, 123, -57, -92, -100, 116, 50, -25, - 96, 53, 124, 95, 76, -59, -84, 70, 27, 0, 72, -63, 84, -77, -2, -107, -66, -32, -119, 27, -95, - 54, -44, -89, 1, 71, 44, 7, -55, 126, 5, -78, 87, -105, -114, 65, -19, 58, -78, -95, 0, 118, 83, - 76, -88, 2, -21, 127, 64, 74, -103, -114, -127, -70, -81, -127, 125, -37, 21, 113, 20, -102, 46, - -37, -111, -97, 97, -127, 32, 87, -80, 105, 18, -19, 107, -73, -50, -97, 11, -23, -59, -107, - -107, 83, -25, 15, -93, -21, 2, 3, 1, 0, 1, 2, -127, -128, 45, -34, -104, 26, -40, -41, -44, - -29, -35, -123, -7, -110, -73, -106, 80, -5, -118, 24, -38, 66, -54, -93, -54, -104, 43, -62, - -48, 122, -14, -41, 85, 18, -53, 109, 22, -113, 44, 77, -116, 7, 10, -43, -61, 43, -40, -61, 76, - 19, -11, -89, 47, 80, -72, 113, -86, 70, -23, 27, 113, 37, -1, 42, 48, 84, -80, 30, 86, 36, - -124, -22, 79, -44, 87, -40, 31, -41, -44, -16, -74, 85, 61, -122, -22, 10, -31, 78, 92, -123, - -77, 12, -80, 62, -52, 68, -46, -17, 67, 124, -78, -23, -105, -77, -2, 89, -16, -12, -56, -51, - 26, 102, 46, 39, -61, -13, -79, -65, -5, 126, 70, 29, 31, 104, -109, 65, -23, -69, 23, -7, 2, - 65, 0, -42, 18, 101, 10, -21, 37, 107, -3, -114, -29, -40, 76, 107, -122, 40, 8, -58, -32, -12, - 55, -4, -61, -66, 91, -56, -50, 78, -124, 11, -49, -62, -121, -56, 70, -92, 90, 32, -112, 49, - 26, -99, 113, 44, 26, 42, -99, -40, -123, 17, 93, 114, 125, 35, -118, -32, 125, -64, 61, 58, - -58, -105, -105, -39, 93, 2, 65, 0, -57, -36, -22, -107, -42, -79, 0, -118, 121, -76, 120, 52, - 110, 127, 115, 68, -86, -4, 96, -50, 72, -60, -57, 125, 57, 21, -81, -44, 25, 112, -75, 83, 57, - -55, 61, 24, 28, -112, -103, -8, 120, 110, -52, -108, -41, -76, -96, 87, -117, 69, 0, 64, 26, 4, - 122, 13, 6, -106, 112, -51, -1, 79, 117, -25, 2, 64, 127, 68, 60, 81, -5, 110, 41, -1, 122, 93, - -74, -113, -24, 52, -65, -60, 72, 8, 32, -24, -48, 26, -57, 38, -26, 0, -48, -24, -21, -28, -66, - 47, -33, 63, 48, 34, 108, -51, -116, -125, -40, 42, 26, 32, 12, 73, -1, 25, 77, 51, -109, 7, 22, - -124, 79, -26, 50, -51, -76, 13, -80, -66, 19, -7, 2, 65, 0, -90, 99, -20, 68, -4, -84, -11, - -105, 83, -123, -124, -63, -103, -16, -81, 101, 78, -72, -72, 91, 100, -57, -74, -111, 49, 18, - 54, 4, -19, 125, 32, -24, 125, -26, 100, -33, -117, 0, 115, -65, 33, 124, -107, 3, -95, -91, - 118, 12, 12, 29, 80, -3, 12, -20, 7, 52, -118, -12, 122, 75, 117, -81, -112, -89, 2, 64, 93, - -21, -52, -110, -54, -9, 79, -123, 105, 125, -56, 75, -77, -26, 125, -123, -69, 62, -2, 79, 8, - 72, -76, -67, 5, 33, -121, 1, -42, -17, 29, 69, -20, -68, -26, -23, 95, -7, -70, -50, -10, 58, - 16, -15, -89, -24, -121, -14, -72, -127, -89, -63, 66, 7, 77, -89, -54, -95, -90, 45, -44, -118, - 69, -1}; + private static final byte[] ENCODED_PRIVATE_KEY = { + 48, -126, 2, 118, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, + 96, 48, -126, 2, 92, 2, 1, 0, 2, -127, -127, 0, -89, 33, 8, -124, 110, -60, 89, 8, -62, 69, 120, + 95, -59, -43, 13, -18, 123, 29, -31, 13, -80, -76, 109, -62, -79, 2, 104, -94, 76, 59, -73, -26, + 99, 123, -57, -92, -100, 116, 50, -25, 96, 53, 124, 95, 76, -59, -84, 70, 27, 0, 72, -63, 84, + -77, -2, -107, -66, -32, -119, 27, -95, 54, -44, -89, 1, 71, 44, 7, -55, 126, 5, -78, 87, -105, + -114, 65, -19, 58, -78, -95, 0, 118, 83, 76, -88, 2, -21, 127, 64, 74, -103, -114, -127, -70, + -81, -127, 125, -37, 21, 113, 20, -102, 46, -37, -111, -97, 97, -127, 32, 87, -80, 105, 18, -19, + 107, -73, -50, -97, 11, -23, -59, -107, -107, 83, -25, 15, -93, -21, 2, 3, 1, 0, 1, 2, -127, + -128, 45, -34, -104, 26, -40, -41, -44, -29, -35, -123, -7, -110, -73, -106, 80, -5, -118, 24, + -38, 66, -54, -93, -54, -104, 43, -62, -48, 122, -14, -41, 85, 18, -53, 109, 22, -113, 44, 77, + -116, 7, 10, -43, -61, 43, -40, -61, 76, 19, -11, -89, 47, 80, -72, 113, -86, 70, -23, 27, 113, + 37, -1, 42, 48, 84, -80, 30, 86, 36, -124, -22, 79, -44, 87, -40, 31, -41, -44, -16, -74, 85, + 61, -122, -22, 10, -31, 78, 92, -123, -77, 12, -80, 62, -52, 68, -46, -17, 67, 124, -78, -23, + -105, -77, -2, 89, -16, -12, -56, -51, 26, 102, 46, 39, -61, -13, -79, -65, -5, 126, 70, 29, 31, + 104, -109, 65, -23, -69, 23, -7, 2, 65, 0, -42, 18, 101, 10, -21, 37, 107, -3, -114, -29, -40, + 76, 107, -122, 40, 8, -58, -32, -12, 55, -4, -61, -66, 91, -56, -50, 78, -124, 11, -49, -62, + -121, -56, 70, -92, 90, 32, -112, 49, 26, -99, 113, 44, 26, 42, -99, -40, -123, 17, 93, 114, + 125, 35, -118, -32, 125, -64, 61, 58, -58, -105, -105, -39, 93, 2, 65, 0, -57, -36, -22, -107, + -42, -79, 0, -118, 121, -76, 120, 52, 110, 127, 115, 68, -86, -4, 96, -50, 72, -60, -57, 125, + 57, 21, -81, -44, 25, 112, -75, 83, 57, -55, 61, 24, 28, -112, -103, -8, 120, 110, -52, -108, + -41, -76, -96, 87, -117, 69, 0, 64, 26, 4, 122, 13, 6, -106, 112, -51, -1, 79, 117, -25, 2, 64, + 127, 68, 60, 81, -5, 110, 41, -1, 122, 93, -74, -113, -24, 52, -65, -60, 72, 8, 32, -24, -48, + 26, -57, 38, -26, 0, -48, -24, -21, -28, -66, 47, -33, 63, 48, 34, 108, -51, -116, -125, -40, + 42, 26, 32, 12, 73, -1, 25, 77, 51, -109, 7, 22, -124, 79, -26, 50, -51, -76, 13, -80, -66, 19, + -7, 2, 65, 0, -90, 99, -20, 68, -4, -84, -11, -105, 83, -123, -124, -63, -103, -16, -81, 101, + 78, -72, -72, 91, 100, -57, -74, -111, 49, 18, 54, 4, -19, 125, 32, -24, 125, -26, 100, -33, + -117, 0, 115, -65, 33, 124, -107, 3, -95, -91, 118, 12, 12, 29, 80, -3, 12, -20, 7, 52, -118, + -12, 122, 75, 117, -81, -112, -89, 2, 64, 93, -21, -52, -110, -54, -9, 79, -123, 105, 125, -56, + 75, -77, -26, 125, -123, -69, 62, -2, 79, 8, 72, -76, -67, 5, 33, -121, 1, -42, -17, 29, 69, + -20, -68, -26, -23, 95, -7, -70, -50, -10, 58, 16, -15, -89, -24, -121, -14, -72, -127, -89, + -63, 66, 7, 77, -89, -54, -95, -90, 45, -44, -118, 69, -1 + }; - private static final byte[] ENCODED_PUBLIC_KEY = {48, -127, -97, 48, 13, 6, 9, 42, -122, 72, -122, - -9, 13, 1, 1, 1, 5, 0, 3, -127, -115, 0, 48, -127, -119, 2, -127, -127, 0, -89, 33, 8, -124, - 110, -60, 89, 8, -62, 69, 120, 95, -59, -43, 13, -18, 123, 29, -31, 13, -80, -76, 109, -62, -79, - 2, 104, -94, 76, 59, -73, -26, 99, 123, -57, -92, -100, 116, 50, -25, 96, 53, 124, 95, 76, -59, - -84, 70, 27, 0, 72, -63, 84, -77, -2, -107, -66, -32, -119, 27, -95, 54, -44, -89, 1, 71, 44, 7, - -55, 126, 5, -78, 87, -105, -114, 65, -19, 58, -78, -95, 0, 118, 83, 76, -88, 2, -21, 127, 64, - 74, -103, -114, -127, -70, -81, -127, 125, -37, 21, 113, 20, -102, 46, -37, -111, -97, 97, -127, - 32, 87, -80, 105, 18, -19, 107, -73, -50, -97, 11, -23, -59, -107, -107, 83, -25, 15, -93, -21, - 2, 3, 1, 0, 1}; + private static final byte[] ENCODED_PUBLIC_KEY = { + 48, -127, -97, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 3, -127, -115, 0, 48, + -127, -119, 2, -127, -127, 0, -89, 33, 8, -124, 110, -60, 89, 8, -62, 69, 120, 95, -59, -43, 13, + -18, 123, 29, -31, 13, -80, -76, 109, -62, -79, 2, 104, -94, 76, 59, -73, -26, 99, 123, -57, + -92, -100, 116, 50, -25, 96, 53, 124, 95, 76, -59, -84, 70, 27, 0, 72, -63, 84, -77, -2, -107, + -66, -32, -119, 27, -95, 54, -44, -89, 1, 71, 44, 7, -55, 126, 5, -78, 87, -105, -114, 65, -19, + 58, -78, -95, 0, 118, 83, 76, -88, 2, -21, 127, 64, 74, -103, -114, -127, -70, -81, -127, 125, + -37, 21, 113, 20, -102, 46, -37, -111, -97, 97, -127, 32, 87, -80, 105, 18, -19, 107, -73, -50, + -97, 11, -23, -59, -107, -107, 83, -25, 15, -93, -21, 2, 3, 1, 0, 1 + }; /** - * Returns a new copy of a sample encoded RSA private key that matches - * {@link #newEncodedRsaPublicKeyBytes()}. + * Returns a new copy of a sample encoded RSA private key that matches {@link + * #newEncodedRsaPublicKeyBytes()}. */ public static byte[] newEncodedRsaPrivateKeyBytes() { return ENCODED_PRIVATE_KEY.clone(); } /** - * Returns a new copy of a sample encoded public key that matches - * {@link #newEncodedRsaPrivateKeyBytes()}. + * Returns a new copy of a sample encoded public key that matches {@link + * #newEncodedRsaPrivateKeyBytes()}. */ public static byte[] newEncodedRsaPublicKeyBytes() { return ENCODED_PUBLIC_KEY.clone(); @@ -108,6 +109,5 @@ public static RSAPublicKey newRsaPublicKey() throws GeneralSecurityException { return (RSAPublicKey) keyFactory.generatePublic(keySpec); } - private SecurityTestUtils() { - } + private SecurityTestUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java index 4ee176576..270925a8f 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java @@ -15,12 +15,11 @@ package com.google.api.client.testing.util; import com.google.api.client.util.Beta; - import java.io.ByteArrayInputStream; import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Testable extension for a byte array input stream. * * @author Yaniv Inbar @@ -49,9 +48,7 @@ public TestableByteArrayInputStream(byte buf[], int offset, int length) { /** * {@inheritDoc} * - *

            - * Overriding is supported, but overriding method must call the super implementation. - *

            + *

            Overriding is supported, but overriding method must call the super implementation. */ @Override public void close() throws IOException { diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java index d1cbe25be..d8daee198 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java @@ -15,12 +15,11 @@ package com.google.api.client.testing.util; import com.google.api.client.util.Beta; - import java.io.ByteArrayOutputStream; import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Testable extension for a byte array output stream. * * @author Yaniv Inbar @@ -35,9 +34,7 @@ public class TestableByteArrayOutputStream extends ByteArrayOutputStream { /** * {@inheritDoc} * - *

            - * Overriding is supported, but overriding method must call the super implementation. - *

            + *

            Overriding is supported, but overriding method must call the super implementation. */ @Override public void close() throws IOException { diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java b/google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java index 55fe90904..de6f5502a 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java @@ -13,7 +13,7 @@ */ /** - * {@link com.google.api.client.util.Beta}
            + * {@link com.google.api.client.util.Beta}
            * Testing utilities used for writing tests based on this library. * * @since 1.14 @@ -21,4 +21,3 @@ */ @com.google.api.client.util.Beta package com.google.api.client.testing.util; - diff --git a/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java b/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java index 079c8ff22..f5a0aa7b0 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java @@ -25,22 +25,17 @@ /** * Memory-efficient map of keys to values with list-style random-access semantics. * - *

            - * Supports null keys and values. Conceptually, the keys and values are stored in a simpler array in - * order to minimize memory use and provide for fast access to a key/value at a certain index (for - * example {@link #getKey(int)}). However, traditional mapping operations like {@link #get(Object)} - * and {@link #put(Object, Object)} are slower because they need to look up all key/value pairs in - * the worst case. - *

            + *

            Supports null keys and values. Conceptually, the keys and values are stored in a simpler array + * in order to minimize memory use and provide for fast access to a key/value at a certain index + * (for example {@link #getKey(int)}). However, traditional mapping operations like {@link + * #get(Object)} and {@link #put(Object, Object)} are slower because they need to look up all + * key/value pairs in the worst case. * - *

            - * Implementation is not thread-safe. For a thread-safe choice instead use an implementation of + *

            Implementation is not thread-safe. For a thread-safe choice instead use an implementation of * {@link ConcurrentMap}. - *

            * * @param the type of keys maintained by this map * @param the type of mapped values - * * @since 1.0 * @author Yaniv Inbar */ @@ -71,8 +66,8 @@ public static ArrayMap create(int initialCapacity) { * Returns a new instance of an array map of the given key value pairs in alternating order. For * example: {@code ArrayMap map = ArrayMap.of("key1", "value1", "key2", "value2", * ...);}. - *

            - * WARNING: there is no compile-time checking of the {@code keyValuePairs} parameter to ensure + * + *

            WARNING: there is no compile-time checking of the {@code keyValuePairs} parameter to ensure * that the keys or values have the correct type, so if the wrong type is passed in, any problems * will occur at runtime. Also, there is no checking that the keys are unique, which the caller * must ensure is true. @@ -116,10 +111,10 @@ public final V getValue(int index) { /** * Sets the key/value mapping at the given index, overriding any existing key/value mapping. - *

            - * There is no checking done to ensure that the key does not already exist. Therefore, this method - * is dangerous to call unless the caller can be certain the key does not already exist in the - * map. + * + *

            There is no checking done to ensure that the key does not already exist. Therefore, this + * method is dangerous to call unless the caller can be certain the key does not already exist in + * the map. * * @return previous value or {@code null} for none * @throws IndexOutOfBoundsException if index is negative @@ -224,9 +219,7 @@ public final void trim() { setDataCapacity(this.size << 1); } - /** - * Ensures that the capacity of the internal arrays is at least a given capacity. - */ + /** Ensures that the capacity of the internal arrays is at least a given capacity. */ public final void ensureCapacity(int minCapacity) { if (minCapacity < 0) { throw new IndexOutOfBoundsException(); @@ -276,9 +269,7 @@ private V valueAtDataIndex(int dataIndex) { return result; } - /** - * Returns the data index of the given key or {@code -2} if there is no such key. - */ + /** Returns the data index of the given key or {@code -2} if there is no such key. */ private int getDataIndexOfKey(Object key) { int dataSize = this.size << 1; Object[] data = this.data; diff --git a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java index 99d3c71aa..07119ab96 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java @@ -22,23 +22,17 @@ * Collects the array values of a key/value data object, writing the fields or map values only after * all values have been collected. * - *

            - * The typical application for this is when parsing JSON or XML when the value type is known to be - * an array. It stores the values in a collection during the parsing, and only when the parsing of - * an object is finished does it convert the collection into an array and stores it. - *

            + *

            The typical application for this is when parsing JSON or XML when the value type is known to + * be an array. It stores the values in a collection during the parsing, and only when the parsing + * of an object is finished does it convert the collection into an array and stores it. * - *

            - * Use {@link #put(String, Class, Object)} when the destination object is a map with string keys and - * whose values accept an array of objects. Use {@link #put(Field, Class, Object)} when setting the - * value of a field using reflection, assuming its type accepts an array of objects. One can + *

            Use {@link #put(String, Class, Object)} when the destination object is a map with string keys + * and whose values accept an array of objects. Use {@link #put(Field, Class, Object)} when setting + * the value of a field using reflection, assuming its type accepts an array of objects. One can * potentially use both {@code put} methods for example on an instance of {@link GenericData}. - *

            * - *

            - * Implementation is not thread-safe. For a thread-safe choice instead use an implementation of + *

            Implementation is not thread-safe. For a thread-safe choice instead use an implementation of * {@link ConcurrentMap}. - *

            * * @since 1.4 * @author Yaniv Inbar @@ -54,9 +48,7 @@ static class ArrayValue { /** Values to be stored in the array. */ final ArrayList values = new ArrayList(); - /** - * @param componentType array component type - */ + /** @param componentType array component type */ ArrayValue(Class componentType) { this.componentType = componentType; } @@ -87,7 +79,7 @@ void addValue(Class componentType, Object value) { /** * @param destination destination object whose fields must be set, or destination map whose values - * must be set + * must be set */ public ArrayValueMap(Object destination) { this.destination = destination; diff --git a/google-http-client/src/main/java/com/google/api/client/util/BackOff.java b/google-http-client/src/main/java/com/google/api/client/util/BackOff.java index 8f02134e7..a48c2a570 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/BackOff.java +++ b/google-http-client/src/main/java/com/google/api/client/util/BackOff.java @@ -34,17 +34,15 @@ public interface BackOff { * Gets the number of milliseconds to wait before retrying the operation or {@link #STOP} to * indicate that no retries should be made. * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -   long backOffMillis = backoff.nextBackOffMillis();
            -   if (backOffMillis == Backoff.STOP) {
            -     // do not retry operation
            -   } else {
            -     // sleep for backOffMillis milliseconds and retry operation
            -   }
            +   * long backOffMillis = backoff.nextBackOffMillis();
            +   * if (backOffMillis == Backoff.STOP) {
            +   * // do not retry operation
            +   * } else {
            +   * // sleep for backOffMillis milliseconds and retry operation
            +   * }
                * 
            */ long nextBackOffMillis() throws IOException; @@ -53,27 +51,27 @@ public interface BackOff { * Fixed back-off policy whose back-off time is always zero, meaning that the operation is retried * immediately without waiting. */ - BackOff ZERO_BACKOFF = new BackOff() { + BackOff ZERO_BACKOFF = + new BackOff() { - public void reset() throws IOException { - } + public void reset() throws IOException {} - public long nextBackOffMillis() throws IOException { - return 0; - } - }; + public long nextBackOffMillis() throws IOException { + return 0; + } + }; /** * Fixed back-off policy that always returns {@code #STOP} for {@link #nextBackOffMillis()}, * meaning that the operation should not be retried. */ - BackOff STOP_BACKOFF = new BackOff() { + BackOff STOP_BACKOFF = + new BackOff() { - public void reset() throws IOException { - } + public void reset() throws IOException {} - public long nextBackOffMillis() throws IOException { - return STOP; - } - }; + public long nextBackOffMillis() throws IOException { + return STOP; + } + }; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java b/google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java index 543060820..8ad9d0ccf 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java @@ -17,7 +17,7 @@ import java.io.IOException; /** - * {@link Beta}
            + * {@link Beta}
            * Utilities for {@link BackOff}. * * @since 1.15 @@ -30,15 +30,13 @@ public final class BackOffUtils { * Runs the next iteration of the back-off policy, and returns whether to continue to retry the * operation. * - *

            - * If {@code true}, it will call {@link Sleeper#sleep(long)} with the specified number of + *

            If {@code true}, it will call {@link Sleeper#sleep(long)} with the specified number of * milliseconds from {@link BackOff#nextBackOffMillis()}. - *

            * * @param sleeper sleeper * @param backOff back-off policy - * @return whether to continue to back off; in other words, whether - * {@link BackOff#nextBackOffMillis()} did not return {@link BackOff#STOP} + * @return whether to continue to back off; in other words, whether {@link + * BackOff#nextBackOffMillis()} did not return {@link BackOff#STOP} * @throws InterruptedException if any thread has interrupted the current thread */ public static boolean next(Sleeper sleeper, BackOff backOff) @@ -51,6 +49,5 @@ public static boolean next(Sleeper sleeper, BackOff backOff) return true; } - private BackOffUtils() { - } + private BackOffUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Base64.java b/google-http-client/src/main/java/com/google/api/client/util/Base64.java index ac3650f0a..305ab688c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Base64.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Base64.java @@ -30,7 +30,7 @@ public class Base64 { * * @param binaryData binary data to encode or {@code null} for {@code null} result * @return byte[] containing Base64 characters in their UTF-8 representation or {@code null} for - * {@code null} input + * {@code null} input */ public static byte[] encodeBase64(byte[] binaryData) { return StringUtils.getBytesUtf8(encodeBase64String(binaryData)); @@ -46,14 +46,13 @@ public static String encodeBase64String(byte[] binaryData) { return BaseEncoding.base64().encode(binaryData); } - /** * Encodes binary data using a URL-safe variation of the base64 algorithm but does not chunk the * output. The url-safe variation emits - and _ instead of + and / characters. * * @param binaryData binary data to encode or {@code null} for {@code null} result * @return byte[] containing Base64 characters in their UTF-8 representation or {@code null} for - * {@code null} input + * {@code null} input */ public static byte[] encodeBase64URLSafe(byte[] binaryData) { return StringUtils.getBytesUtf8(encodeBase64URLSafeString(binaryData)); @@ -71,8 +70,8 @@ public static String encodeBase64URLSafeString(byte[] binaryData) { } /** - * Decodes Base64 data into octets. Note that this method handles both URL-safe and - * non-URL-safe base 64 encoded inputs. + * Decodes Base64 data into octets. Note that this method handles both URL-safe and non-URL-safe + * base 64 encoded inputs. * * @param base64Data Byte array containing Base64 data or {@code null} for {@code null} result * @return Array containing decoded data or {@code null} for {@code null} input @@ -99,6 +98,5 @@ public static byte[] decodeBase64(String base64String) { } } - private Base64() { - } + private Base64() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Beta.java b/google-http-client/src/main/java/com/google/api/client/util/Beta.java index 2ac456c75..c5f6e3d1b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Beta.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Beta.java @@ -21,40 +21,35 @@ /** * Use this annotation to indicate that a public API (class, method or field) is beta. * - *

            - * Beta API is subject to incompatible changes or removal in the future. It may also mean - * that the server features it depends on are potentially subject to breakage at any time. - *

            + *

            Beta API is subject to incompatible changes or removal in the future. It may also mean that + * the server features it depends on are potentially subject to breakage at any time. * - *

            - * That API is exempt from any compatibility guarantees made by its containing library. Read + *

            That API is exempt from any compatibility guarantees made by its containing library. Read * carefully the JavaDoc of the API bearing this annotation for better understanding of the risk. - *

            * - *

            - * To provide a smoother upgrade path when we make incompatible changes to beta API, - * whenever possible we try to deprecate the old beta API in the first minor release, and - * then remove it in the second minor release. - *

            + *

            To provide a smoother upgrade path when we make incompatible changes to beta API, whenever + * possible we try to deprecate the old beta API in the first minor release, and then remove it in + * the second minor release. * - *

            - * It is generally inadvisable for other non-beta libraries to use beta API from - * this library. The problem is that other libraries don't have control over the version of this - * library being used in client applications, and if the wrong version of this library is used, it - * has the potential to break client applications. - *

            + *

            It is generally inadvisable for other non-beta libraries to use beta API from this library. + * The problem is that other libraries don't have control over the version of this library being + * used in client applications, and if the wrong version of this library is used, it has the + * potential to break client applications. * - *

            - * You may use the google-http-client-findbugs plugin to find usages of API bearing this annotation. - *

            + *

            You may use the google-http-client-findbugs plugin to find usages of API bearing this + * annotation. * * @since 1.15 * @author Eyal Peled */ -@Target(value = { - ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, - ElementType.TYPE, ElementType.PACKAGE}) +@Target( + value = { + ElementType.ANNOTATION_TYPE, + ElementType.CONSTRUCTOR, + ElementType.FIELD, + ElementType.METHOD, + ElementType.TYPE, + ElementType.PACKAGE + }) @Documented -public @interface Beta { - -} +public @interface Beta {} diff --git a/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java index 6ec69a488..24939307d 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java @@ -20,9 +20,7 @@ /** * Streaming content whose source is a byte array. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.14 * @author Yaniv Inbar @@ -38,9 +36,7 @@ public class ByteArrayStreamingContent implements StreamingContent { /** Length of bytes to read from byte array. */ private final int length; - /** - * @param byteArray byte array content - */ + /** @param byteArray byte array content */ public ByteArrayStreamingContent(byte[] byteArray) { this(byteArray, 0, byteArray.length); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java b/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java index 7c3a4c3e7..00f7702cb 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java @@ -22,10 +22,8 @@ /** * Provides utility methods for working with byte arrays and I/O streams. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.io.ByteStreams}. The + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.io.ByteStreams}. The * implementation must match as closely as possible to Guava's implementation. - *

            * * @since 1.14 * @author Yaniv Inbar @@ -145,24 +143,18 @@ public long skip(long n) throws IOException { /** * Reads some bytes from an input stream and stores them into the buffer array {@code b}. * - *

            - * This method blocks until {@code len} bytes of input data have been read into the array, or end - * of file is detected. The number of bytes read is returned, possibly zero. Does not close the - * stream. - *

            + *

            This method blocks until {@code len} bytes of input data have been read into the array, or + * end of file is detected. The number of bytes read is returned, possibly zero. Does not close + * the stream. * - *

            - * A caller can detect EOF if the number of bytes read is less than {@code len}. All subsequent + *

            A caller can detect EOF if the number of bytes read is less than {@code len}. All subsequent * calls on the same stream will return zero. - *

            * - *

            - * If {@code b} is null, a {@code NullPointerException} is thrown. If {@code off} is negative, or - * {@code len} is negative, or {@code off+len} is greater than the length of the array {@code b}, - * then an {@code IndexOutOfBoundsException} is thrown. If {@code len} is zero, then no bytes are - * read. Otherwise, the first byte read is stored into element {@code b[off]}, the next one into - * {@code b[off+1]}, and so on. The number of bytes read is, at most, equal to {@code len}. - *

            + *

            If {@code b} is null, a {@code NullPointerException} is thrown. If {@code off} is negative, + * or {@code len} is negative, or {@code off+len} is greater than the length of the array {@code + * b}, then an {@code IndexOutOfBoundsException} is thrown. If {@code len} is zero, then no bytes + * are read. Otherwise, the first byte read is stored into element {@code b[off]}, the next one + * into {@code b[off+1]}, and so on. The number of bytes read is, at most, equal to {@code len}. * * @param in the input stream to read from * @param b the buffer into which the data is read @@ -187,6 +179,5 @@ public static int read(InputStream in, byte[] b, int off, int len) throws IOExce return total; } - private ByteStreams() { - } + private ByteStreams() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Charsets.java b/google-http-client/src/main/java/com/google/api/client/util/Charsets.java index 322fb9fc1..ecc460dec 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Charsets.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Charsets.java @@ -20,10 +20,8 @@ * Contains constant definitions for some standard {@link Charset} instances that are guaranteed to * be supported by all Java platform implementations. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.base.Charsets}. The + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.base.Charsets}. The * implementation must match as closely as possible to Guava's implementation. - *

            * * @since 1.14 * @author Yaniv Inbar @@ -36,6 +34,5 @@ public final class Charsets { /** ISO-8859-1 charset. */ public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); - private Charsets() { - } + private Charsets() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java b/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java index 16c71dda7..4fe7c891b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java @@ -29,9 +29,7 @@ /** * Computes class information to determine data key name/value pairs associated with the class. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -150,8 +148,8 @@ public boolean isEnum() { } /** - * Returns an unmodifiable sorted set (with any possible {@code null} member first) of - * {@link FieldInfo#getName() names}. + * Returns an unmodifiable sorted set (with any possible {@code null} member first) of {@link + * FieldInfo#getName() names}. */ public Collection getNames() { return names; @@ -163,11 +161,15 @@ private ClassInfo(Class srcClass, boolean ignoreCase) { Preconditions.checkArgument( !ignoreCase || !srcClass.isEnum(), "cannot ignore case on an enum: " + srcClass); // name set has a special comparator to keep null first - TreeSet nameSet = new TreeSet(new Comparator() { - public int compare(String s0, String s1) { - return Objects.equal(s0, s1) ? 0 : s0 == null ? -1 : s1 == null ? 1 : s0.compareTo(s1); - } - }); + TreeSet nameSet = + new TreeSet( + new Comparator() { + public int compare(String s0, String s1) { + return Objects.equal(s0, s1) + ? 0 + : s0 == null ? -1 : s1 == null ? 1 : s0.compareTo(s1); + } + }); // iterate over declared fields for (Field field : srcClass.getDeclaredFields()) { FieldInfo fieldInfo = FieldInfo.of(field); @@ -179,7 +181,8 @@ public int compare(String s0, String s1) { fieldName = fieldName.toLowerCase(Locale.US).intern(); } FieldInfo conflictingFieldInfo = nameToFieldInfoMap.get(fieldName); - Preconditions.checkArgument(conflictingFieldInfo == null, + Preconditions.checkArgument( + conflictingFieldInfo == null, "two fields have the same %sname <%s>: %s and %s", ignoreCase ? "case-insensitive " : "", fieldName, @@ -200,17 +203,18 @@ public int compare(String s0, String s1) { } } } - names = nameSet.isEmpty() ? Collections.emptyList() : Collections.unmodifiableList( - new ArrayList(nameSet)); + names = + nameSet.isEmpty() + ? Collections.emptyList() + : Collections.unmodifiableList(new ArrayList(nameSet)); } /** * Returns an unmodifiable collection of the {@code FieldInfo}s for this class, without any * guarantee of order. * - *

            - * If you need sorted order, instead use {@link #getNames()} with {@link #getFieldInfo(String)}. - *

            + *

            If you need sorted order, instead use {@link #getNames()} with {@link + * #getFieldInfo(String)}. * * @since 1.16 */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/Clock.java b/google-http-client/src/main/java/com/google/api/client/util/Clock.java index d1d18b88f..61242dc76 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Clock.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Clock.java @@ -17,10 +17,8 @@ /** * Clock which can be used to get the amount of elapsed milliseconds in system time. * - *

            - * The default system implementation can be accessed at {@link #SYSTEM}. Alternative implementations - * may be used for testing. - *

            + *

            The default system implementation can be accessed at {@link #SYSTEM}. Alternative + * implementations may be used for testing. * * @since 1.9 * @author mlinder@google.com (Matthias Linder) @@ -33,12 +31,13 @@ public interface Clock { long currentTimeMillis(); /** - * Provides the default System implementation of a Clock by using - * {@link System#currentTimeMillis()}. + * Provides the default System implementation of a Clock by using {@link + * System#currentTimeMillis()}. */ - Clock SYSTEM = new Clock() { - public long currentTimeMillis() { - return System.currentTimeMillis(); - } - }; + Clock SYSTEM = + new Clock() { + public long currentTimeMillis() { + return System.currentTimeMillis(); + } + }; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Collections2.java b/google-http-client/src/main/java/com/google/api/client/util/Collections2.java index ee565c62b..5cd920446 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Collections2.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Collections2.java @@ -19,10 +19,8 @@ /** * Static utility methods pertaining to {@link Collection} instances. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Collections2}. The - * implementation must match as closely as possible to Guava's implementation. - *

            + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Collections2}. + * The implementation must match as closely as possible to Guava's implementation. * * @since 1.14 * @author Yaniv Inbar @@ -34,6 +32,5 @@ static Collection cast(Iterable iterable) { return (Collection) iterable; } - private Collections2() { - } + private Collections2() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Data.java b/google-http-client/src/main/java/com/google/api/client/util/Data.java index d4b67e02c..88b294cea 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Data.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Data.java @@ -83,6 +83,7 @@ public class Data { /** Cache of the magic null object for the given Java class. */ private static final ConcurrentHashMap, Object> NULL_CACHE = new ConcurrentHashMap, Object>(); + static { // special cases for some primitives NULL_CACHE.put(Boolean.class, NULL_BOOLEAN); @@ -159,17 +160,15 @@ public static boolean isNull(Object object) { * Returns the map to use for the given data that is treated as a map from string key to some * value. * - *

            - * If the input is {@code null}, it returns an empty map. If the input is a map, it simply returns - * the input. Otherwise, it will create a map view using reflection that is backed by the object, - * so that any changes to the map will be reflected on the object. The map keys of that map view - * are based on the {@link Key} annotation, and null is not a possible map value, although the - * magic null instance is possible (see {@link #nullOf(Class)} and {@link #isNull(Object)}). - * Iteration order of the data keys is based on the sorted (ascending) key names of the declared - * fields. Note that since the map view is backed by the object, and that the object may change, - * many methods in the map view must recompute the field values using reflection, for example - * {@link Map#size()} must check the number of non-null fields. - *

            + *

            If the input is {@code null}, it returns an empty map. If the input is a map, it simply + * returns the input. Otherwise, it will create a map view using reflection that is backed by the + * object, so that any changes to the map will be reflected on the object. The map keys of that + * map view are based on the {@link Key} annotation, and null is not a possible map value, + * although the magic null instance is possible (see {@link #nullOf(Class)} and {@link + * #isNull(Object)}). Iteration order of the data keys is based on the sorted (ascending) key + * names of the declared fields. Note that since the map view is backed by the object, and that + * the object may change, many methods in the map view must recompute the field values using + * reflection, for example {@link Map#size()} must check the number of non-null fields. * * @param data any key value data, represented by an object or a map, or {@code null} * @return key/value map to use @@ -190,16 +189,14 @@ public static Map mapOf(Object data) { /** * Returns a deep clone of the given key/value data, such that the result is a completely * independent copy. - *

            - * This should not be used directly in the implementation of {@code Object.clone()}. Instead use - * {@link #deepCopy(Object, Object)} for that purpose. - *

            - *

            - * Final fields cannot be changed and therefore their value won't be copied. - *

            + * + *

            This should not be used directly in the implementation of {@code Object.clone()}. Instead + * use {@link #deepCopy(Object, Object)} for that purpose. + * + *

            Final fields cannot be changed and therefore their value won't be copied. * * @param data key/value data object or map to clone or {@code null} for a {@code null} return - * value + * value * @return deep clone or {@code null} for {@code null} input */ @SuppressWarnings("unchecked") @@ -236,30 +233,27 @@ public static T clone(T data) { * Makes a deep copy of the given source object into the destination object that is assumed to be * constructed using {@code Object.clone()}. * - *

            - * Example usage of this method in {@code Object.clone()}: - *

            + *

            Example usage of this method in {@code Object.clone()}: * *

            -  @Override
            -  public MyObject clone() {
            -    try {
            -      @SuppressWarnings("unchecked")
            -      MyObject result = (MyObject) super.clone();
            -      Data.deepCopy(this, result);
            -      return result;
            -    } catch (CloneNotSupportedException e) {
            -      throw new IllegalStateException(e);
            -    }
            -  }
            +   * @Override
            +   * public MyObject clone() {
            +   * try {
            +   * @SuppressWarnings("unchecked")
            +   * MyObject result = (MyObject) super.clone();
            +   * Data.deepCopy(this, result);
            +   * return result;
            +   * } catch (CloneNotSupportedException e) {
            +   * throw new IllegalStateException(e);
            +   * }
            +   * }
                * 
            - *

            - * Final fields cannot be changed and therefore their value won't be copied. - *

            + * + *

            Final fields cannot be changed and therefore their value won't be copied. * * @param src source object * @param dest destination object of identical type as source object, and any contained arrays - * must be the same length + * must be the same length */ public static void deepCopy(Object src, Object dest) { Class srcClass = src.getClass(); @@ -332,12 +326,10 @@ public static void deepCopy(Object src, Object dest) { * Returns whether the given type is one of the supported primitive classes like number and * date/time, or is a wildcard of one. * - *

            - * A primitive class is any class for whom {@link Class#isPrimitive()} is true, as well as any - * classes of type: {@link Character}, {@link String}, {@link Integer}, {@link Long}, - * {@link Short}, {@link Byte}, {@link Float}, {@link Double}, {@link BigInteger}, - * {@link BigDecimal}, {@link Boolean}, and {@link DateTime}. - *

            + *

            A primitive class is any class for whom {@link Class#isPrimitive()} is true, as well as any + * classes of type: {@link Character}, {@link String}, {@link Integer}, {@link Long}, {@link + * Short}, {@link Byte}, {@link Float}, {@link Double}, {@link BigInteger}, {@link BigDecimal}, + * {@link Boolean}, and {@link DateTime}. * * @param type type or {@code null} for {@code false} result * @return whether it is a primitive @@ -351,16 +343,24 @@ public static boolean isPrimitive(Type type) { return false; } Class typeClass = (Class) type; - return typeClass.isPrimitive() || typeClass == Character.class || typeClass == String.class - || typeClass == Integer.class || typeClass == Long.class || typeClass == Short.class - || typeClass == Byte.class || typeClass == Float.class || typeClass == Double.class - || typeClass == BigInteger.class || typeClass == BigDecimal.class - || typeClass == DateTime.class || typeClass == Boolean.class; + return typeClass.isPrimitive() + || typeClass == Character.class + || typeClass == String.class + || typeClass == Integer.class + || typeClass == Long.class + || typeClass == Short.class + || typeClass == Byte.class + || typeClass == Float.class + || typeClass == Double.class + || typeClass == BigInteger.class + || typeClass == BigDecimal.class + || typeClass == DateTime.class + || typeClass == Boolean.class; } /** - * Returns whether to given value is {@code null} or its class is primitive as defined by - * {@link Data#isPrimitive(Type)}. + * Returns whether to given value is {@code null} or its class is primitive as defined by {@link + * Data#isPrimitive(Type)}. */ public static boolean isValueOfPrimitiveType(Object fieldValue) { return fieldValue == null || Data.isPrimitive(fieldValue.getClass()); @@ -368,29 +368,27 @@ public static boolean isValueOfPrimitiveType(Object fieldValue) { /** * Parses the given string value based on the given primitive type. - *

            - * Types are parsed as follows: - *

            + * + *

            Types are parsed as follows: + * *

              - *
            • {@link Void}: null
            • - *
            • {@code null} or is assignable from {@link String} (like {@link Object}): no parsing
            • - *
            • {@code char} or {@link Character}: {@link String#charAt(int) String.charAt}(0) (requires - * length to be exactly 1)
            • - *
            • {@code boolean} or {@link Boolean}: {@link Boolean#valueOf(String)}
            • - *
            • {@code byte} or {@link Byte}: {@link Byte#valueOf(String)}
            • - *
            • {@code short} or {@link Short}: {@link Short#valueOf(String)}
            • - *
            • {@code int} or {@link Integer}: {@link Integer#valueOf(String)}
            • - *
            • {@code long} or {@link Long}: {@link Long#valueOf(String)}
            • - *
            • {@code float} or {@link Float}: {@link Float#valueOf(String)}
            • - *
            • {@code double} or {@link Double}: {@link Double#valueOf(String)}
            • - *
            • {@link BigInteger}: {@link BigInteger#BigInteger(String) BigInteger(String)}
            • - *
            • {@link BigDecimal}: {@link BigDecimal#BigDecimal(String) BigDecimal(String)}
            • - *
            • {@link DateTime}: {@link DateTime#parseRfc3339(String)}
            • + *
            • {@link Void}: null + *
            • {@code null} or is assignable from {@link String} (like {@link Object}): no parsing + *
            • {@code char} or {@link Character}: {@link String#charAt(int) String.charAt}(0) (requires + * length to be exactly 1) + *
            • {@code boolean} or {@link Boolean}: {@link Boolean#valueOf(String)} + *
            • {@code byte} or {@link Byte}: {@link Byte#valueOf(String)} + *
            • {@code short} or {@link Short}: {@link Short#valueOf(String)} + *
            • {@code int} or {@link Integer}: {@link Integer#valueOf(String)} + *
            • {@code long} or {@link Long}: {@link Long#valueOf(String)} + *
            • {@code float} or {@link Float}: {@link Float#valueOf(String)} + *
            • {@code double} or {@link Double}: {@link Double#valueOf(String)} + *
            • {@link BigInteger}: {@link BigInteger#BigInteger(String) BigInteger(String)} + *
            • {@link BigDecimal}: {@link BigDecimal#BigDecimal(String) BigDecimal(String)} + *
            • {@link DateTime}: {@link DateTime#parseRfc3339(String)} *
            * - *

            - * Note that this may not be the right behavior for some use cases. - *

            + *

            Note that this may not be the right behavior for some use cases. * * @param type primitive type or {@code null} to parse as a string * @param stringValue string value to parse or {@code null} for {@code null} result @@ -403,7 +401,8 @@ public static Object parsePrimitiveValue(Type type, String stringValue) { if (primitiveClass == Void.class) { return null; } - if (stringValue == null || primitiveClass == null + if (stringValue == null + || primitiveClass == null || primitiveClass.isAssignableFrom(String.class)) { return stringValue; } @@ -446,8 +445,8 @@ public static Object parsePrimitiveValue(Type type, String stringValue) { } if (primitiveClass.isEnum()) { if (!ClassInfo.of(primitiveClass).names.contains(stringValue)) { - throw new IllegalArgumentException(String.format("given enum name %s not part of " + - "enumeration", stringValue)); + throw new IllegalArgumentException( + String.format("given enum name %s not part of " + "enumeration", stringValue)); } @SuppressWarnings({"unchecked", "rawtypes"}) Enum result = ClassInfo.of(primitiveClass).getFieldInfo(stringValue).enumValue(); @@ -459,15 +458,16 @@ public static Object parsePrimitiveValue(Type type, String stringValue) { /** * Returns a new collection instance for the given type. - *

            - * Creates a new collection instance specified for the first input collection class that matches - * as follows: + * + *

            Creates a new collection instance specified for the first input collection class that + * matches as follows: + * *

              - *
            • {@code null} or an array or assignable from {@link ArrayList} (like {@link List} or - * {@link Collection} or {@link Object}): returns an {@link ArrayList}
            • - *
            • assignable from {@link HashSet}: returns a {@link HashSet}
            • - *
            • assignable from {@link TreeSet}: returns a {@link TreeSet}
            • - *
            • else: calls {@link Types#newInstance(Class)}
            • + *
            • {@code null} or an array or assignable from {@link ArrayList} (like {@link List} or + * {@link Collection} or {@link Object}): returns an {@link ArrayList} + *
            • assignable from {@link HashSet}: returns a {@link HashSet} + *
            • assignable from {@link TreeSet}: returns a {@link TreeSet} + *
            • else: calls {@link Types#newInstance(Class)} *
            * * @param type type or {@code null} for {@link ArrayList}. @@ -482,8 +482,10 @@ public static Collection newCollectionInstance(Type type) { type = ((ParameterizedType) type).getRawType(); } Class collectionClass = type instanceof Class ? (Class) type : null; - if (type == null || type instanceof GenericArrayType || collectionClass != null - && (collectionClass.isArray() || collectionClass.isAssignableFrom(ArrayList.class))) { + if (type == null + || type instanceof GenericArrayType + || collectionClass != null + && (collectionClass.isArray() || collectionClass.isAssignableFrom(ArrayList.class))) { return new ArrayList(); } if (collectionClass == null) { @@ -502,14 +504,14 @@ public static Collection newCollectionInstance(Type type) { /** * Returns a new instance of a map based on the given field class. - *

            - * Creates a new map instance specified for the first input map class that matches as follows: - *

            + * + *

            Creates a new map instance specified for the first input map class that matches as follows: + * *

              - *
            • {@code null} or assignable from {@link ArrayMap} (like {@link Map} or {@link Object}): - * returns an {@link ArrayMap}
            • - *
            • assignable from {@link TreeMap} (like {@link SortedMap}): returns a {@link TreeMap}
            • - *
            • else: calls {@link Types#newInstance(Class)}
            • + *
            • {@code null} or assignable from {@link ArrayMap} (like {@link Map} or {@link Object}): + * returns an {@link ArrayMap} + *
            • assignable from {@link TreeMap} (like {@link SortedMap}): returns a {@link TreeMap} + *
            • else: calls {@link Types#newInstance(Class)} *
            * * @param mapClass field class @@ -533,10 +535,10 @@ public static Map newMapInstance(Class mapClass) { * resolved. * * @param context context list, ordering from least specific to most specific type context, for - * example container class and then its field + * example container class and then its field * @param type type or {@code null} for {@code null} result * @return resolved type (which may be class, parameterized type, or generic array type, but not - * wildcard type or type variable) or {@code null} for {@code null} input + * wildcard type or type variable) or {@code null} for {@code null} input */ public static Type resolveWildcardTypeOrTypeVariable(List context, Type type) { // first deal with a wildcard, e.g. ? extends Number diff --git a/google-http-client/src/main/java/com/google/api/client/util/DataMap.java b/google-http-client/src/main/java/com/google/api/client/util/DataMap.java index 3432c1827..a858bf1db 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DataMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DataMap.java @@ -22,8 +22,8 @@ import java.util.NoSuchElementException; /** - * Map that uses {@link ClassInfo} to parse the key/value pairs into a map for use in - * {@link Data#mapOf(Object)}. + * Map that uses {@link ClassInfo} to parse the key/value pairs into a map for use in {@link + * Data#mapOf(Object)}. * * @author Yaniv Inbar */ @@ -37,9 +37,7 @@ final class DataMap extends AbstractMap { /** Object's class info. */ final ClassInfo classInfo; - /** - * @param object object being reflected - */ + /** @param object object being reflected */ DataMap(Object object, boolean ignoreCase) { this.object = object; classInfo = ClassInfo.of(object.getClass(), ignoreCase); @@ -117,8 +115,8 @@ public boolean isEmpty() { final class EntryIterator implements Iterator> { /** - * Next index into key names array computed in {@link #hasNext()} or {@code -1} before - * {@link #hasNext()} has been called. + * Next index into key names array computed in {@link #hasNext()} or {@code -1} before {@link + * #hasNext()} has been called. */ private int nextKeyIndex = -1; @@ -180,16 +178,14 @@ public void remove() { /** * Entry in the reflection map. - *

            - * Null key or value is not allowed. - *

            + * + *

            Null key or value is not allowed. */ final class Entry implements Map.Entry { /** - * Current field value, possibly modified only by {@link #setValue(Object)}. As specified - * {@link java.util.Map.Entry}, behavior is undefined if the field value is modified by other - * means. + * Current field value, possibly modified only by {@link #setValue(Object)}. As specified {@link + * java.util.Map.Entry}, behavior is undefined if the field value is modified by other means. */ private Object fieldValue; diff --git a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java index 0417b4282..bd071b327 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java @@ -27,9 +27,7 @@ * Immutable representation of a date with an optional time and an optional time zone based on RFC 3339. * - *

            - * Implementation is immutable and therefore thread-safe. - *

            + *

            Implementation is immutable and therefore thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -41,18 +39,18 @@ public final class DateTime implements Serializable { private static final TimeZone GMT = TimeZone.getTimeZone("GMT"); /** Regular expression for parsing RFC3339 date/times. */ - private static final Pattern RFC3339_PATTERN = Pattern.compile( - "^(\\d{4})-(\\d{2})-(\\d{2})" // yyyy-MM-dd - + "([Tt](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d+)?)?" // 'T'HH:mm:ss.milliseconds - + "([Zz]|([+-])(\\d{2}):(\\d{2}))?"); // 'Z' or time zone shift HH:mm following '+' or '-' + private static final Pattern RFC3339_PATTERN = + Pattern.compile( + "^(\\d{4})-(\\d{2})-(\\d{2})" // yyyy-MM-dd + + "([Tt](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d+)?)?" // 'T'HH:mm:ss.milliseconds + + "([Zz]|([+-])(\\d{2}):(\\d{2}))?"); // 'Z' or time zone shift HH:mm following '+' or + // '-' /** * Date/time value expressed as the number of ms since the Unix epoch. * - *

            - * If the time zone is specified, this value is normalized to UTC, so to format this date/time + *

            If the time zone is specified, this value is normalized to UTC, so to format this date/time * value, the time zone shift has to be applied. - *

            */ private final long value; @@ -75,10 +73,8 @@ public DateTime(Date date, TimeZone zone) { /** * Instantiates {@link DateTime} from the number of milliseconds since the Unix epoch. * - *

            - * The time zone is interpreted as {@code TimeZone.getDefault()}, which may vary with + *

            The time zone is interpreted as {@code TimeZone.getDefault()}, which may vary with * implementation. - *

            * * @param value number of milliseconds since the Unix epoch (January 1, 1970, 00:00:00 GMT) */ @@ -89,10 +85,8 @@ public DateTime(long value) { /** * Instantiates {@link DateTime} from a {@link Date}. * - *

            - * The time zone is interpreted as {@code TimeZone.getDefault()}, which may vary with + *

            The time zone is interpreted as {@code TimeZone.getDefault()}, which may vary with * implementation. - *

            * * @param value date and time */ @@ -118,7 +112,7 @@ public DateTime(long value, int tzShift) { * @param dateOnly specifies if this should represent a date-only value * @param value number of milliseconds since the Unix epoch (January 1, 1970, 00:00:00 GMT) * @param tzShift time zone, represented by the number of minutes off of UTC, or {@code null} for - * {@code TimeZone.getDefault()}. + * {@code TimeZone.getDefault()}. */ public DateTime(boolean dateOnly, long value, Integer tzShift) { this.dateOnly = dateOnly; @@ -131,14 +125,12 @@ public DateTime(boolean dateOnly, long value, Integer tzShift) { * Instantiates {@link DateTime} from an RFC 3339 * date/time value. * - *

            - * Upgrade warning: in prior version 1.17, this method required milliseconds to be exactly 3 + *

            Upgrade warning: in prior version 1.17, this method required milliseconds to be exactly 3 * digits (if included), and did not throw an exception for all types of invalid input values, but * starting in version 1.18, the parsing done by this method has become more strict to enforce - * that only valid RFC3339 strings are entered, and if not, it throws a - * {@link NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of + * that only valid RFC3339 strings are entered, and if not, it throws a {@link + * NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of * milliseconds digits is now allowed. - *

            * * @param value an RFC 3339 date/time value. * @since 1.11 @@ -156,10 +148,8 @@ public DateTime(String value) { /** * Returns the date/time value expressed as the number of milliseconds since the Unix epoch. * - *

            - * If the time zone is specified, this value is normalized to UTC, so to format this date/time + *

            If the time zone is specified, this value is normalized to UTC, so to format this date/time * value, the time zone shift has to be applied. - *

            * * @since 1.5 */ @@ -240,10 +230,8 @@ public String toString() { /** * {@inheritDoc} * - *

            - * A check is added that the time zone is the same. If you ONLY want to check equality of time + *

            A check is added that the time zone is the same. If you ONLY want to check equality of time * value, check equality on the {@link #getValue()}. - *

            */ @Override public boolean equals(Object o) { @@ -265,24 +253,20 @@ public int hashCode() { /** * Parses an RFC3339 date/time value. * - *

            - * Upgrade warning: in prior version 1.17, this method required milliseconds to be exactly 3 + *

            Upgrade warning: in prior version 1.17, this method required milliseconds to be exactly 3 * digits (if included), and did not throw an exception for all types of invalid input values, but * starting in version 1.18, the parsing done by this method has become more strict to enforce - * that only valid RFC3339 strings are entered, and if not, it throws a - * {@link NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of + * that only valid RFC3339 strings are entered, and if not, it throws a {@link + * NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of * milliseconds digits is now allowed. - *

            * - *

            - * For the date-only case, the time zone is ignored and the hourOfDay, minute, second, and + *

            For the date-only case, the time zone is ignored and the hourOfDay, minute, second, and * millisecond parameters are set to zero. - *

            * * @param str Date/time string in RFC3339 format * @throws NumberFormatException if {@code str} doesn't match the RFC3339 standard format; an - * exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it - * contains a time zone shift but no time. + * exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it contains a + * time zone shift but no time. */ public static DateTime parseRfc3339(String str) throws NumberFormatException { Matcher matcher = RFC3339_PATTERN.matcher(str); @@ -303,8 +287,10 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException { Integer tzShiftInteger = null; if (isTzShiftGiven && !isTimeGiven) { - throw new NumberFormatException("Invalid date/time format, cannot specify time zone shift" + - " without specifying time: " + str); + throw new NumberFormatException( + "Invalid date/time format, cannot specify time zone shift" + + " without specifying time: " + + str); } if (isTimeGiven) { @@ -328,8 +314,9 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException { if (Character.toUpperCase(tzShiftRegexGroup.charAt(0)) == 'Z') { tzShift = 0; } else { - tzShift = Integer.parseInt(matcher.group(11)) * 60 // time zone shift HH - + Integer.parseInt(matcher.group(12)); // time zone shift mm + tzShift = + Integer.parseInt(matcher.group(11)) * 60 // time zone shift HH + + Integer.parseInt(matcher.group(12)); // time zone shift mm if (matcher.group(10).charAt(0) == '-') { // time zone shift + or - tzShift = -tzShift; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java index c949b6f23..12e744542 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java @@ -20,56 +20,44 @@ * Implementation of {@link BackOff} that increases the back off period for each retry attempt using * a randomization function that grows exponentially. * - *

            - * {@link #nextBackOffMillis()} is calculated using the following formula: - *

            + *

            {@link #nextBackOffMillis()} is calculated using the following formula: * *

            -   randomized_interval =
            -       retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
            + * randomized_interval =
            + * retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor])
              * 
            * - *

            - * In other words {@link #nextBackOffMillis()} will range between the randomization factor + *

            In other words {@link #nextBackOffMillis()} will range between the randomization factor * percentage below and above the retry interval. For example, using 2 seconds as the base retry * interval and 0.5 as the randomization factor, the actual back off period used in the next retry * attempt will be between 1 and 3 seconds. - *

            * - *

            - * Note: max_interval caps the retry_interval and not the randomized_interval. - *

            + *

            Note: max_interval caps the retry_interval and not the randomized_interval. * - *

            - * If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the - * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning - * {@link BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the + * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning {@link + * BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. * - *

            - * Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default - * multiplier is 1.5 and the default max_interval is 1 minute. For 10 tries the sequence will be - * (values in seconds) and assuming we go over the max_elapsed_time on the 10th try: - *

            + *

            Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, + * default multiplier is 1.5 and the default max_interval is 1 minute. For 10 tries the sequence + * will be (values in seconds) and assuming we go over the max_elapsed_time on the 10th try: * *

            -   request#     retry_interval     randomized_interval
            -
            -   1             0.5                [0.25,   0.75]
            -   2             0.75               [0.375,  1.125]
            -   3             1.125              [0.562,  1.687]
            -   4             1.687              [0.8435, 2.53]
            -   5             2.53               [1.265,  3.795]
            -   6             3.795              [1.897,  5.692]
            -   7             5.692              [2.846,  8.538]
            -   8             8.538              [4.269, 12.807]
            -   9            12.807              [6.403, 19.210]
            -   10           19.210              {@link BackOff#STOP}
            + * request#     retry_interval     randomized_interval
            + *
            + * 1             0.5                [0.25,   0.75]
            + * 2             0.75               [0.375,  1.125]
            + * 3             1.125              [0.562,  1.687]
            + * 4             1.687              [0.8435, 2.53]
            + * 5             2.53               [1.265,  3.795]
            + * 6             3.795              [1.897,  5.692]
            + * 7             5.692              [2.846,  8.538]
            + * 8             8.538              [4.269, 12.807]
            + * 9            12.807              [6.403, 19.210]
            + * 10           19.210              {@link BackOff#STOP}
              * 
            * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @since 1.15 * @author Ravi Mistry @@ -103,10 +91,8 @@ public class ExponentialBackOff implements BackOff { /** * The randomization factor to use for creating a range around the retry interval. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            */ private final double randomizationFactor; @@ -126,8 +112,8 @@ public class ExponentialBackOff implements BackOff { long startTimeNanos; /** - * The maximum elapsed time after instantiating {@link ExponentialBackOff} or calling - * {@link #reset()} after which {@link #nextBackOffMillis()} returns {@link BackOff#STOP}. + * The maximum elapsed time after instantiating {@link ExponentialBackOff} or calling {@link + * #reset()} after which {@link #nextBackOffMillis()} returns {@link BackOff#STOP}. */ private final int maxElapsedTimeMillis; @@ -137,25 +123,21 @@ public class ExponentialBackOff implements BackOff { /** * Creates an instance of ExponentialBackOffPolicy using default values. * - *

            - * To override the defaults use {@link Builder}. - *

            + *

            To override the defaults use {@link Builder}. * *

              - *
            • {@code initialIntervalMillis} defaults to {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}
            • - *
            • {@code randomizationFactor} defaults to {@link #DEFAULT_RANDOMIZATION_FACTOR}
            • - *
            • {@code multiplier} defaults to {@link #DEFAULT_MULTIPLIER}
            • - *
            • {@code maxIntervalMillis} defaults to {@link #DEFAULT_MAX_INTERVAL_MILLIS}
            • - *
            • {@code maxElapsedTimeMillis} defaults in {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}
            • + *
            • {@code initialIntervalMillis} defaults to {@link #DEFAULT_INITIAL_INTERVAL_MILLIS} + *
            • {@code randomizationFactor} defaults to {@link #DEFAULT_RANDOMIZATION_FACTOR} + *
            • {@code multiplier} defaults to {@link #DEFAULT_MULTIPLIER} + *
            • {@code maxIntervalMillis} defaults to {@link #DEFAULT_MAX_INTERVAL_MILLIS} + *
            • {@code maxElapsedTimeMillis} defaults in {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS} *
            */ public ExponentialBackOff() { this(new Builder()); } - /** - * @param builder builder - */ + /** @param builder builder */ protected ExponentialBackOff(Builder builder) { initialIntervalMillis = builder.initialIntervalMillis; randomizationFactor = builder.randomizationFactor; @@ -180,14 +162,10 @@ public final void reset() { /** * {@inheritDoc} * - *

            - * This method calculates the next back off interval using the formula: randomized_interval = + *

            This method calculates the next back off interval using the formula: randomized_interval = * retry_interval +/- (randomization_factor * retry_interval) - *

            * - *

            - * Subclasses may override if a different algorithm is required. - *

            + *

            Subclasses may override if a different algorithm is required. */ public long nextBackOffMillis() throws IOException { // Make sure we have not gone over the maximum elapsed time. @@ -224,25 +202,19 @@ public final int getInitialIntervalMillis() { /** * Returns the randomization factor to use for creating a range around the retry interval. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            */ public final double getRandomizationFactor() { return randomizationFactor; } - /** - * Returns the current retry interval in milliseconds. - */ + /** Returns the current retry interval in milliseconds. */ public final int getCurrentIntervalMillis() { return currentIntervalMillis; } - /** - * Returns the value to multiply the current interval with for each retry attempt. - */ + /** Returns the value to multiply the current interval with for each retry attempt. */ public final double getMultiplier() { return multiplier; } @@ -258,11 +230,9 @@ public final int getMaxIntervalMillis() { /** * Returns the maximum elapsed time in milliseconds. * - *

            - * If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the - * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning - * {@link BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the + * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning {@link + * BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. */ public final int getMaxElapsedTimeMillis() { return maxElapsedTimeMillis; @@ -272,17 +242,13 @@ public final int getMaxElapsedTimeMillis() { * Returns the elapsed time in milliseconds since an {@link ExponentialBackOff} instance is * created and is reset when {@link #reset()} is called. * - *

            - * The elapsed time is computed using {@link System#nanoTime()}. - *

            + *

            The elapsed time is computed using {@link System#nanoTime()}. */ public final long getElapsedTimeMillis() { return (nanoClock.nanoTime() - startTimeNanos) / 1000000; } - /** - * Increments the current interval by multiplying it with the multiplier. - */ + /** Increments the current interval by multiplying it with the multiplier. */ private void incrementCurrentInterval() { // Check for overflow, if overflow is detected set the current interval to the max interval. if (currentIntervalMillis >= maxIntervalMillis / multiplier) { @@ -295,9 +261,7 @@ private void incrementCurrentInterval() { /** * Builder for {@link ExponentialBackOff}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. */ public static class Builder { @@ -307,10 +271,8 @@ public static class Builder { /** * The randomization factor to use for creating a range around the retry interval. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            */ double randomizationFactor = DEFAULT_RANDOMIZATION_FACTOR; @@ -325,16 +287,15 @@ public static class Builder { /** * The maximum elapsed time in milliseconds after instantiating {@link ExponentialBackOff} or - * calling {@link #reset()} after which {@link #nextBackOffMillis()} returns - * {@link BackOff#STOP}. + * calling {@link #reset()} after which {@link #nextBackOffMillis()} returns {@link + * BackOff#STOP}. */ int maxElapsedTimeMillis = DEFAULT_MAX_ELAPSED_TIME_MILLIS; /** Nano clock. */ NanoClock nanoClock = NanoClock.SYSTEM; - public Builder() { - } + public Builder() {} /** Builds a new instance of {@link ExponentialBackOff}. */ public ExponentialBackOff build() { @@ -342,21 +303,19 @@ public ExponentialBackOff build() { } /** - * Returns the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. + * Returns the initial retry interval in milliseconds. The default value is {@link + * #DEFAULT_INITIAL_INTERVAL_MILLIS}. */ public final int getInitialIntervalMillis() { return initialIntervalMillis; } /** - * Sets the initial retry interval in milliseconds. The default value is - * {@link #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. + * Sets the initial retry interval in milliseconds. The default value is {@link + * #DEFAULT_INITIAL_INTERVAL_MILLIS}. Must be {@code > 0}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setInitialIntervalMillis(int initialIntervalMillis) { this.initialIntervalMillis = initialIntervalMillis; @@ -367,15 +326,11 @@ public Builder setInitialIntervalMillis(int initialIntervalMillis) { * Returns the randomization factor to use for creating a range around the retry interval. The * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public final double getRandomizationFactor() { return randomizationFactor; @@ -383,18 +338,14 @@ public final double getRandomizationFactor() { /** * Sets the randomization factor to use for creating a range around the retry interval. The - * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range - * {@code 0 <= randomizationFactor < 1}. + * default value is {@link #DEFAULT_RANDOMIZATION_FACTOR}. Must fall in the range {@code 0 <= + * randomizationFactor < 1}. * - *

            - * A randomization factor of 0.5 results in a random period ranging between 50% below and 50% + *

            A randomization factor of 0.5 results in a random period ranging between 50% below and 50% * above the retry interval. - *

            * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setRandomizationFactor(double randomizationFactor) { this.randomizationFactor = randomizationFactor; @@ -413,10 +364,8 @@ public final double getMultiplier() { * Sets the value to multiply the current interval with for each retry attempt. The default * value is {@link #DEFAULT_MULTIPLIER}. Must be {@code >= 1}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMultiplier(double multiplier) { this.multiplier = multiplier; @@ -425,8 +374,8 @@ public Builder setMultiplier(double multiplier) { /** * Returns the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. + * reaches this value it stops increasing. The default value is {@link + * #DEFAULT_MAX_INTERVAL_MILLIS}. Must be {@code >= initialInterval}. */ public final int getMaxIntervalMillis() { return maxIntervalMillis; @@ -434,13 +383,11 @@ public final int getMaxIntervalMillis() { /** * Sets the maximum value of the back off period in milliseconds. Once the current interval - * reaches this value it stops increasing. The default value is - * {@link #DEFAULT_MAX_INTERVAL_MILLIS}. + * reaches this value it stops increasing. The default value is {@link + * #DEFAULT_MAX_INTERVAL_MILLIS}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMaxIntervalMillis(int maxIntervalMillis) { this.maxIntervalMillis = maxIntervalMillis; @@ -448,33 +395,27 @@ public Builder setMaxIntervalMillis(int maxIntervalMillis) { } /** - * Returns the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. + * Returns the maximum elapsed time in milliseconds. The default value is {@link + * #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. * - *

            - * If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the - * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning - * {@link BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the + * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning {@link + * BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. */ public final int getMaxElapsedTimeMillis() { return maxElapsedTimeMillis; } /** - * Sets the maximum elapsed time in milliseconds. The default value is - * {@link #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. + * Sets the maximum elapsed time in milliseconds. The default value is {@link + * #DEFAULT_MAX_ELAPSED_TIME_MILLIS}. Must be {@code > 0}. * - *

            - * If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the - * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning - * {@link BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. - *

            + *

            If the time elapsed since an {@link ExponentialBackOff} instance is created goes past the + * max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning {@link + * BackOff#STOP}. The elapsed time can be reset by calling {@link #reset()}. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setMaxElapsedTimeMillis(int maxElapsedTimeMillis) { this.maxElapsedTimeMillis = maxElapsedTimeMillis; @@ -489,10 +430,8 @@ public final NanoClock getNanoClock() { /** * Sets the nano clock ({@link NanoClock#SYSTEM} by default). * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public Builder setNanoClock(NanoClock nanoClock) { this.nanoClock = Preconditions.checkNotNull(nanoClock); diff --git a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java index 7204dd872..fb3599f98 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java @@ -28,9 +28,7 @@ /** * Parses field information to determine data key name/value pair associated with the field. * - *

            - * Implementation is thread-safe. - *

            + *

            Implementation is thread-safe. * * @since 1.0 * @author Yaniv Inbar @@ -65,7 +63,7 @@ public static FieldInfo of(Enum enumValue) { * * @param field field or {@code null} for {@code null} result * @return field information or {@code null} if the field has no {@link #name} or for {@code null} - * input + * input */ public static FieldInfo of(Field field) { if (field == null) { @@ -118,16 +116,14 @@ public static FieldInfo of(Field field) { private final Field field; /** Setters Method for field */ - private final Method []setters; + private final Method[] setters; /** * Data key name associated with the field for a non-enum-constant with a {@link Key} annotation, * or data key value associated with the enum constant with a {@link Value} annotation or {@code * null} for an enum constant with a {@link NullValue} annotation. * - *

            - * This string is interned. - *

            + *

            This string is interned. */ private final String name; @@ -138,9 +134,7 @@ public static FieldInfo of(Field field) { this.setters = settersMethodForField(field); } - /** - * Creates list of setter methods for a field only in declaring class. - */ + /** Creates list of setter methods for a field only in declaring class. */ private Method[] settersMethodForField(Field field) { List methods = new ArrayList<>(); for (Method method : field.getDeclaringClass().getDeclaredMethods()) { @@ -166,9 +160,7 @@ public Field getField() { * annotation, or data key value associated with the enum constant with a {@link Value} annotation * or {@code null} for an enum constant with a {@link NullValue} annotation. * - *

            - * This string is interned. - *

            + *

            This string is interned. * * @since 1.4 */ @@ -213,17 +205,16 @@ public boolean isPrimitive() { return isPrimitive; } - /** - * Returns the value of the field in the given object instance using reflection. - */ + /** Returns the value of the field in the given object instance using reflection. */ public Object getValue(Object obj) { return getFieldValue(field, obj); } /** * Sets this field in the given object to the given value using reflection. - *

            - * If the field is final, it checks that the value being set is identical to the existing value. + * + *

            If the field is final, it checks that the value being set is identical to the existing + * value. */ public void setValue(Object obj, Object value) { if (setters.length > 0) { @@ -251,9 +242,7 @@ public > T enumValue() { return Enum.valueOf((Class) field.getDeclaringClass(), field.getName()); } - /** - * Returns the value of the given field in the given object using reflection. - */ + /** Returns the value of the given field in the given object using reflection. */ public static Object getFieldValue(Field field, Object obj) { try { return field.get(obj); @@ -264,16 +253,23 @@ public static Object getFieldValue(Field field, Object obj) { /** * Sets the given field in the given object to the given value using reflection. - *

            - * If the field is final, it checks that the value being set is identical to the existing value. + * + *

            If the field is final, it checks that the value being set is identical to the existing + * value. */ public static void setFieldValue(Field field, Object obj, Object value) { if (Modifier.isFinal(field.getModifiers())) { Object finalValue = getFieldValue(field, obj); if (value == null ? finalValue != null : !value.equals(finalValue)) { throw new IllegalArgumentException( - "expected final value <" + finalValue + "> but was <" + value + "> on " - + field.getName() + " field in " + obj.getClass().getName()); + "expected final value <" + + finalValue + + "> but was <" + + value + + "> on " + + field.getName() + + " field in " + + obj.getClass().getName()); } } else { try { diff --git a/google-http-client/src/main/java/com/google/api/client/util/GenericData.java b/google-http-client/src/main/java/com/google/api/client/util/GenericData.java index 7596a7b61..5ba12fe47 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/GenericData.java +++ b/google-http-client/src/main/java/com/google/api/client/util/GenericData.java @@ -27,21 +27,15 @@ /** * Generic data that stores all unknown data key name/value pairs. * - *

            - * Subclasses can declare fields for known data keys using the {@link Key} annotation. Each field + *

            Subclasses can declare fields for known data keys using the {@link Key} annotation. Each field * can be of any visibility (private, package private, protected, or public) and must not be static. * {@code null} unknown data key names are not allowed, but {@code null} data values are allowed. - *

            * - *

            - * Iteration order of the data keys is based on the sorted (ascending) key names of the declared + *

            Iteration order of the data keys is based on the sorted (ascending) key names of the declared * fields, followed by the iteration order of all of the unknown data key name/value pairs. - *

            * - *

            - * Implementation is not thread-safe. For a thread-safe choice instead use an implementation of + *

            Implementation is not thread-safe. For a thread-safe choice instead use an implementation of * {@link ConcurrentMap}. - *

            * * @since 1.0 * @author Yaniv Inbar @@ -56,15 +50,14 @@ public class GenericData extends AbstractMap implements Cloneabl /** Class information. */ final ClassInfo classInfo; - /** - * Constructs with case-insensitive keys. - */ + /** Constructs with case-insensitive keys. */ public GenericData() { this(EnumSet.noneOf(Flags.class)); } /** * Flags that impact behavior of generic data. + * * @since 1.10 */ public enum Flags { @@ -113,13 +106,11 @@ public final Object put(String fieldName, Object value) { /** * Sets the given field value (may be {@code null}) for the given field name. Any existing value - * for the field will be overwritten. It may be more slightly more efficient than - * {@link #put(String, Object)} because it avoids accessing the field's original value. + * for the field will be overwritten. It may be more slightly more efficient than {@link + * #put(String, Object)} because it avoids accessing the field's original value. * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public GenericData set(String fieldName, Object value) { FieldInfo fieldInfo = classInfo.getFieldInfo(fieldName); diff --git a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java index fdf64751a..9ccad9886 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java @@ -37,23 +37,19 @@ public class IOUtils { * Writes the content provided by the given source input stream into the given destination output * stream. * - *

            - * The input stream is guaranteed to be closed at the end of this method. - *

            + *

            The input stream is guaranteed to be closed at the end of this method. * - *

            - * Sample use: - *

            + *

            Sample use: * *

            -  static void copy(InputStream inputStream, File file) throws IOException {
            -    FileOutputStream out = new FileOutputStream(file);
            -    try {
            -      IOUtils.copy(inputStream, out);
            -    } finally {
            -      out.close();
            -    }
            -  }
            +   * static void copy(InputStream inputStream, File file) throws IOException {
            +   * FileOutputStream out = new FileOutputStream(file);
            +   * try {
            +   * IOUtils.copy(inputStream, out);
            +   * } finally {
            +   * out.close();
            +   * }
            +   * }
                * 
            * * @param inputStream source input stream @@ -63,24 +59,21 @@ public static void copy(InputStream inputStream, OutputStream outputStream) thro copy(inputStream, outputStream, true); } - /** * Writes the content provided by the given source input stream into the given destination output * stream, optionally closing the input stream. * - *

            - * Sample use: - *

            + *

            Sample use: * *

            -  static void copy(InputStream inputStream, File file) throws IOException {
            -    FileOutputStream out = new FileOutputStream(file);
            -    try {
            -      IOUtils.copy(inputStream, out, true);
            -    } finally {
            -      out.close();
            -    }
            -  }
            +   * static void copy(InputStream inputStream, File file) throws IOException {
            +   * FileOutputStream out = new FileOutputStream(file);
            +   * try {
            +   * IOUtils.copy(inputStream, out, true);
            +   * } finally {
            +   * out.close();
            +   * }
            +   * }
                * 
            * * @param inputStream source input stream @@ -99,11 +92,9 @@ public static void copy( } } - /** - * Computes and returns the byte content length for a streaming content by calling - * {@link StreamingContent#writeTo(OutputStream)} on a fake output stream that only counts bytes - * written. + * Computes and returns the byte content length for a streaming content by calling {@link + * StreamingContent#writeTo(OutputStream)} on a fake output stream that only counts bytes written. * * @param content streaming content */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/Joiner.java b/google-http-client/src/main/java/com/google/api/client/util/Joiner.java index a1ba8790c..3fce25e12 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Joiner.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Joiner.java @@ -20,9 +20,7 @@ * An object which joins pieces of text (specified as an array, {@link Iterable}, varargs or even a * {@link Map}) with a separator. * - *

            - * NOTE: proxy for the Guava implementation of {@link com.google.common.base.Joiner}. - *

            + *

            NOTE: proxy for the Guava implementation of {@link com.google.common.base.Joiner}. * * @since 1.14 * @author Yaniv Inbar @@ -32,16 +30,12 @@ public final class Joiner { /** Wrapped joiner. */ private final com.google.common.base.Joiner wrapped; - /** - * Returns a joiner which automatically places {@code separator} between consecutive elements. - */ + /** Returns a joiner which automatically places {@code separator} between consecutive elements. */ public static Joiner on(char separator) { return new Joiner(com.google.common.base.Joiner.on(separator)); } - /** - * @param wrapped wrapped joiner - */ + /** @param wrapped wrapped joiner */ private Joiner(com.google.common.base.Joiner wrapped) { this.wrapped = wrapped; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Key.java b/google-http-client/src/main/java/com/google/api/client/util/Key.java index e8b9dc0af..dfc0dd454 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Key.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Key.java @@ -22,24 +22,23 @@ /** * Use this annotation to specify that a field is a data key, optionally providing the data key name * to use. - *

            - * If the data key name is not specified, the default is the Java field's name. For example: - *

            + * + *

            If the data key name is not specified, the default is the Java field's name. For example: * *

            
            -  public class A {
            -
            -    // uses data key name of "dataKeyNameMatchesFieldName"
            -    @Key
            -    public String dataKeyNameMatchesFieldName;
            -
            -    // uses data key name of "some_other_name"
            -    @Key("some_other_name")
            -    private String dataKeyNameIsOverriden;
            -
            -    // not a data key
            -    private String notADataKey;
            -  }
            + * public class A {
            + *
            + * // uses data key name of "dataKeyNameMatchesFieldName"
            + * @Key
            + * public String dataKeyNameMatchesFieldName;
            + *
            + * // uses data key name of "some_other_name"
            + * @Key("some_other_name")
            + * private String dataKeyNameIsOverriden;
            + *
            + * // not a data key
            + * private String notADataKey;
            + * }
              * 
            * * @since 1.0 diff --git a/google-http-client/src/main/java/com/google/api/client/util/Lists.java b/google-http-client/src/main/java/com/google/api/client/util/Lists.java index 881bc5977..0bb52fde7 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Lists.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Lists.java @@ -22,10 +22,8 @@ /** * Static utility methods pertaining to {@link List} instances. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Lists}. The + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Lists}. The * implementation must match as closely as possible to Guava's implementation. - *

            * * @since 1.14 * @author Yaniv Inbar @@ -42,9 +40,9 @@ public static ArrayList newArrayList() { * equivalent to {@link ArrayList#ArrayList(int)}. * * @param initialArraySize the exact size of the initial backing array for the returned array list - * ({@code ArrayList} documentation calls this value the "capacity") + * ({@code ArrayList} documentation calls this value the "capacity") * @return a new, empty {@code ArrayList} which is guaranteed not to resize itself unless its size - * reaches {@code initialArraySize + 1} + * reaches {@code initialArraySize + 1} * @throws IllegalArgumentException if {@code initialArraySize} is negative */ public static ArrayList newArrayListWithCapacity(int initialArraySize) { @@ -59,7 +57,8 @@ public static ArrayList newArrayListWithCapacity(int initialArraySize) { */ public static ArrayList newArrayList(Iterable elements) { return (elements instanceof Collection) - ? new ArrayList(Collections2.cast(elements)) : newArrayList(elements.iterator()); + ? new ArrayList(Collections2.cast(elements)) + : newArrayList(elements.iterator()); } /** @@ -76,6 +75,5 @@ public static ArrayList newArrayList(Iterator elements) { return list; } - private Lists() { - } + private Lists() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java b/google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java index 318b98fa0..412486c5e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java @@ -23,15 +23,13 @@ /** * Thread-safe byte array output stream that logs what was written to it when the stream is closed. * - *

            - * Use this as a safe way to log a limited amount of content. As content is written to the stream, - * it is stored as a byte array, up to the maximum number of bytes limit that was set in the + *

            Use this as a safe way to log a limited amount of content. As content is written to the + * stream, it is stored as a byte array, up to the maximum number of bytes limit that was set in the * constructor. Note that if the maximum limit is set too high, it risks an {@link OutOfMemoryError} * on low-memory devices. This class also keeps track of the total number of bytes written, * regardless of whether they were logged. On {@link #close()}, it then logs two records to the * specified logger and logging level: the total number of bytes written, and the bounded content * logged (assuming charset "UTF-8"). Any control characters are stripped out of the content. - *

            * * @since 1.9 * @author Yaniv Inbar @@ -57,7 +55,7 @@ public class LoggingByteArrayOutputStream extends ByteArrayOutputStream { * @param logger logger * @param loggingLevel logging level * @param maximumBytesToLog maximum number of bytes to log (may be {@code 0} to avoid logging - * content) + * content) */ public LoggingByteArrayOutputStream(Logger logger, Level loggingLevel, int maximumBytesToLog) { this.logger = Preconditions.checkNotNull(logger); @@ -106,7 +104,8 @@ public synchronized void close() throws IOException { // log response content if (count != 0) { // strip out some unprintable control chars - logger.log(loggingLevel, + logger.log( + loggingLevel, toString("UTF-8").replaceAll("[\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F]", " ")); } } diff --git a/google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java b/google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java index 3076508fb..e48167a6c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java @@ -37,7 +37,7 @@ public class LoggingInputStream extends FilterInputStream { * @param logger logger * @param loggingLevel logging level * @param contentLoggingLimit maximum number of bytes to log (may be {@code 0} to avoid logging - * content) + * content) */ public LoggingInputStream( InputStream inputStream, Logger logger, Level loggingLevel, int contentLoggingLimit) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java b/google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java index bc4fd914f..731422773 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java @@ -14,7 +14,6 @@ package com.google.api.client.util; - import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -38,7 +37,7 @@ public class LoggingOutputStream extends FilterOutputStream { * @param logger logger * @param loggingLevel logging level * @param contentLoggingLimit maximum number of bytes to log (may be {@code 0} to avoid logging - * content) + * content) */ public LoggingOutputStream( OutputStream outputStream, Logger logger, Level loggingLevel, int contentLoggingLimit) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java index 53f4a4238..af4b88c36 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java @@ -23,9 +23,7 @@ * Wraps another streaming content without modifying the content, but also logging content using * {@link LoggingOutputStream}. * - *

            - * Implementation is not thread-safe. - *

            + *

            Implementation is not thread-safe. * * @author Yaniv Inbar * @since 1.14 diff --git a/google-http-client/src/main/java/com/google/api/client/util/Maps.java b/google-http-client/src/main/java/com/google/api/client/util/Maps.java index a68f226fa..3fba9f812 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Maps.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Maps.java @@ -22,10 +22,8 @@ /** * Static utility methods pertaining to {@link Map} instances. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Maps}. The + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Maps}. The * implementation must match as closely as possible to Guava's implementation. - *

            * * @since 1.14 * @author Yaniv Inbar @@ -50,6 +48,5 @@ public static , V> TreeMap newTreeMap() { return new TreeMap(); } - private Maps() { - } + private Maps() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/NanoClock.java b/google-http-client/src/main/java/com/google/api/client/util/NanoClock.java index 1736ac880..16cb6c8ae 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/NanoClock.java +++ b/google-http-client/src/main/java/com/google/api/client/util/NanoClock.java @@ -17,10 +17,8 @@ /** * Nano clock which can be used to measure elapsed time in nanoseconds. * - *

            - * The default system implementation can be accessed at {@link #SYSTEM}. Alternative implementations - * may be used for testing. - *

            + *

            The default system implementation can be accessed at {@link #SYSTEM}. Alternative + * implementations may be used for testing. * * @since 1.14 * @author Yaniv Inbar @@ -36,9 +34,10 @@ public interface NanoClock { /** * Provides the default System implementation of a nano clock by using {@link System#nanoTime()}. */ - NanoClock SYSTEM = new NanoClock() { - public long nanoTime() { - return System.nanoTime(); - } - }; + NanoClock SYSTEM = + new NanoClock() { + public long nanoTime() { + return System.nanoTime(); + } + }; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/NullValue.java b/google-http-client/src/main/java/com/google/api/client/util/NullValue.java index 4c24f6068..e09c70d3c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/NullValue.java +++ b/google-http-client/src/main/java/com/google/api/client/util/NullValue.java @@ -20,17 +20,14 @@ import java.lang.annotation.Target; /** - * Use this annotation to specify that an enum constant is the "null" data value to use for - * {@link Data#nullOf(Class)}. - *

            - * See {@link Value} for an example. - *

            + * Use this annotation to specify that an enum constant is the "null" data value to use for {@link + * Data#nullOf(Class)}. + * + *

            See {@link Value} for an example. * * @since 1.4 * @author Yaniv Inbar */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) -public @interface NullValue { - -} +public @interface NullValue {} diff --git a/google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java b/google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java index 929913770..548043189 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java @@ -23,9 +23,7 @@ /** * Parses a data source into the specified data type. * - *

            - * Implementations should normally be thread-safe. - *

            + *

            Implementations should normally be thread-safe. * * @author Yaniv Inbar * @since 1.10 @@ -38,7 +36,7 @@ public interface ObjectParser { * * @param in input stream which contains the data to parse * @param charset charset which should be used to decode the input stream or {@code null} if - * unknown + * unknown * @param dataClass class into which the data is parsed */ T parseAndClose(InputStream in, Charset charset, Class dataClass) throws IOException; @@ -49,7 +47,7 @@ public interface ObjectParser { * * @param in input stream which contains the data to parse * @param charset charset which should be used to decode the input stream or {@code null} if - * unknown + * unknown * @param dataType type into which the data is parsed */ Object parseAndClose(InputStream in, Charset charset, Type dataType) throws IOException; diff --git a/google-http-client/src/main/java/com/google/api/client/util/Objects.java b/google-http-client/src/main/java/com/google/api/client/util/Objects.java index 3424a0a83..ab980d948 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Objects.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Objects.java @@ -26,16 +26,14 @@ public final class Objects { * Determines whether two possibly-null objects are equal. Returns: * *

              - *
            • {@code true} if {@code a} and {@code b} are both null.
            • - *
            • {@code true} if {@code a} and {@code b} are both non-null and they are equal according to - * {@link Object#equals(Object)}.
            • - *
            • {@code false} in all other situations.
            • + *
            • {@code true} if {@code a} and {@code b} are both null. + *
            • {@code true} if {@code a} and {@code b} are both non-null and they are equal according to + * {@link Object#equals(Object)}. + *
            • {@code false} in all other situations. *
            * - *

            - * This assumes that any non-null objects passed to this function conform to the {@code equals()} - * contract. - *

            + *

            This assumes that any non-null objects passed to this function conform to the {@code + * equals()} contract. */ public static boolean equal(Object a, Object b) { return com.google.common.base.Objects.equal(a, b); @@ -44,41 +42,39 @@ public static boolean equal(Object a, Object b) { /** * Creates an instance of {@link ToStringHelper}. * - *

            - * This is helpful for implementing {@link Object#toString()}. Specification by example: - *

            + *

            This is helpful for implementing {@link Object#toString()}. Specification by example: * *

            -   // Returns "ClassName{}"
            -   Objects.toStringHelper(this)
            -       .toString();
            -
            -   // Returns "ClassName{x=1}"
            -   Objects.toStringHelper(this)
            -       .add("x", 1)
            -       .toString();
            -
            -   // Returns "MyObject{x=1}"
            -   Objects.toStringHelper("MyObject")
            -       .add("x", 1)
            -       .toString();
            -
            -   // Returns "ClassName{x=1, y=foo}"
            -   Objects.toStringHelper(this)
            -       .add("x", 1)
            -       .add("y", "foo")
            -       .toString();
            -
            -   // Returns "ClassName{x=1}"
            -   Objects.toStringHelper(this)
            -       .omitNullValues()
            -       .add("x", 1)
            -       .add("y", null)
            -       .toString();
            +   * // Returns "ClassName{}"
            +   * Objects.toStringHelper(this)
            +   * .toString();
            +   *
            +   * // Returns "ClassName{x=1}"
            +   * Objects.toStringHelper(this)
            +   * .add("x", 1)
            +   * .toString();
            +   *
            +   * // Returns "MyObject{x=1}"
            +   * Objects.toStringHelper("MyObject")
            +   * .add("x", 1)
            +   * .toString();
            +   *
            +   * // Returns "ClassName{x=1, y=foo}"
            +   * Objects.toStringHelper(this)
            +   * .add("x", 1)
            +   * .add("y", "foo")
            +   * .toString();
            +   *
            +   * // Returns "ClassName{x=1}"
            +   * Objects.toStringHelper(this)
            +   * .omitNullValues()
            +   * .add("x", 1)
            +   * .add("y", null)
            +   * .toString();
                * 
            * * @param self the object to generate the string for (typically {@code this}), used only for its - * class name + * class name */ public static ToStringHelper toStringHelper(Object self) { return new ToStringHelper(self.getClass().getSimpleName()); @@ -92,9 +88,7 @@ public static final class ToStringHelper { private ValueHolder holderTail = holderHead; private boolean omitNullValues; - /** - * @param wrapped wrapped object - */ + /** @param wrapped wrapped object */ ToStringHelper(String className) { this.className = className; } @@ -160,6 +154,5 @@ private static final class ValueHolder { } } - private Objects() { - } + private Objects() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java index b4bdbd94f..a1f06a3bc 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java +++ b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java @@ -21,32 +21,27 @@ import java.util.regex.Pattern; /** - * {@link Beta}
            + * {@link Beta}
            * PEM file reader. * - *

            - * Supports reading any PEM stream that contains Base64 encoded content stored inside - * {@code "-----BEGIN ...-----"} and {@code "-----END ...-----"} tags. Each call to - * {@link #readNextSection()} parses the next section in the PEM file. If you need a section of a - * certain title use {@link #readNextSection(String)}, for example - * {@code readNextSection("PRIVATE KEY")}. To ensure that the stream is closed properly, call - * {@link #close()} in a finally block. - *

            + *

            Supports reading any PEM stream that contains Base64 encoded content stored inside {@code + * "-----BEGIN ...-----"} and {@code "-----END ...-----"} tags. Each call to {@link + * #readNextSection()} parses the next section in the PEM file. If you need a section of a certain + * title use {@link #readNextSection(String)}, for example {@code readNextSection("PRIVATE KEY")}. + * To ensure that the stream is closed properly, call {@link #close()} in a finally block. * - *

            - * As a convenience, use {@link #readFirstSectionAndClose(Reader)} or - * {@link #readFirstSectionAndClose(Reader, String)} for the common case of only a single section in - * a PEM file (or only a single section of a given title). - *

            + *

            As a convenience, use {@link #readFirstSectionAndClose(Reader)} or {@link + * #readFirstSectionAndClose(Reader, String)} for the common case of only a single section in a PEM + * file (or only a single section of a given title). + * + *

            Limitations: * - *

            - * Limitations: *

            * *

              - *
            • Assumes the PEM file section content is not encrypted and cannot handle the case of any - * headers inside the BEGIN and END tag.
            • - *
            • It also ignores any attributes associated with any PEM file section.
            • + *
            • Assumes the PEM file section content is not encrypted and cannot handle the case of any + * headers inside the BEGIN and END tag. + *
            • It also ignores any attributes associated with any PEM file section. *
            * * @since 1.14 @@ -61,9 +56,7 @@ public final class PemReader { /** Reader. */ private BufferedReader reader; - /** - * @param reader reader - */ + /** @param reader reader */ public PemReader(Reader reader) { this.reader = new BufferedReader(reader); } @@ -101,8 +94,8 @@ public Section readNextSection(String titleToLookFor) throws IOException { Matcher m = END_PATTERN.matcher(line); if (m.matches()) { String endTitle = m.group(1); - Preconditions.checkArgument(endTitle.equals(title), - "end tag (%s) doesn't match begin tag (%s)", endTitle, title); + Preconditions.checkArgument( + endTitle.equals(title), "end tag (%s) doesn't match begin tag (%s)", endTitle, title); return new Section(title, Base64.decodeBase64(keyBuilder.toString())); } keyBuilder.append(line); @@ -141,9 +134,7 @@ public static Section readFirstSectionAndClose(Reader reader, String titleToLook /** * Closes the reader. * - *

            - * To ensure that the stream is closed properly, call {@link #close()} in a finally block. - *

            + *

            To ensure that the stream is closed properly, call {@link #close()} in a finally block. */ public void close() throws IOException { reader.close(); diff --git a/google-http-client/src/main/java/com/google/api/client/util/Preconditions.java b/google-http-client/src/main/java/com/google/api/client/util/Preconditions.java index b2ef960cd..880848289 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Preconditions.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Preconditions.java @@ -18,9 +18,7 @@ * Simple static methods to be called at the start of your own methods to verify correct arguments * and state. * - *

            - * NOTE: proxy for the Guava implementation of {@link com.google.common.base.Preconditions}. - *

            + *

            NOTE: proxy for the Guava implementation of {@link com.google.common.base.Preconditions}. * * @since 1.14 * @author Yaniv Inbar @@ -42,7 +40,7 @@ public static void checkArgument(boolean expression) { * * @param expression a boolean expression * @param errorMessage the exception message to use if the check fails; will be converted to a - * string using {@link String#valueOf(Object)} + * string using {@link String#valueOf(Object)} * @throws IllegalArgumentException if {@code expression} is false */ public static void checkArgument(boolean expression, Object errorMessage) { @@ -54,15 +52,15 @@ public static void checkArgument(boolean expression, Object errorMessage) { * * @param expression a boolean expression * @param errorMessageTemplate a template for the exception message should the check fail. The - * message is formed by replacing each {@code %s} placeholder in the template with an - * argument. These are matched by position - the first {@code %s} gets - * {@code errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted - * message in square braces. Unmatched placeholders will be left as-is. + * message is formed by replacing each {@code %s} placeholder in the template with an + * argument. These are matched by position - the first {@code %s} gets {@code + * errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted message in + * square braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message template. Arguments - * are converted to strings using {@link String#valueOf(Object)}. + * are converted to strings using {@link String#valueOf(Object)}. * @throws IllegalArgumentException if {@code expression} is false * @throws NullPointerException if the check fails and either {@code errorMessageTemplate} or - * {@code errorMessageArgs} is null (don't let this happen) + * {@code errorMessageArgs} is null (don't let this happen) */ public static void checkArgument( boolean expression, String errorMessageTemplate, Object... errorMessageArgs) { @@ -87,7 +85,7 @@ public static void checkState(boolean expression) { * * @param expression a boolean expression * @param errorMessage the exception message to use if the check fails; will be converted to a - * string using {@link String#valueOf(Object)} + * string using {@link String#valueOf(Object)} * @throws IllegalStateException if {@code expression} is false */ public static void checkState(boolean expression, Object errorMessage) { @@ -100,15 +98,15 @@ public static void checkState(boolean expression, Object errorMessage) { * * @param expression a boolean expression * @param errorMessageTemplate a template for the exception message should the check fail. The - * message is formed by replacing each {@code %s} placeholder in the template with an - * argument. These are matched by position - the first {@code %s} gets - * {@code errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted - * message in square braces. Unmatched placeholders will be left as-is. + * message is formed by replacing each {@code %s} placeholder in the template with an + * argument. These are matched by position - the first {@code %s} gets {@code + * errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted message in + * square braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message template. Arguments - * are converted to strings using {@link String#valueOf(Object)}. + * are converted to strings using {@link String#valueOf(Object)}. * @throws IllegalStateException if {@code expression} is false * @throws NullPointerException if the check fails and either {@code errorMessageTemplate} or - * {@code errorMessageArgs} is null (don't let this happen) + * {@code errorMessageArgs} is null (don't let this happen) */ public static void checkState( boolean expression, String errorMessageTemplate, Object... errorMessageArgs) { @@ -132,7 +130,7 @@ public static T checkNotNull(T reference) { * * @param reference an object reference * @param errorMessage the exception message to use if the check fails; will be converted to a - * string using {@link String#valueOf(Object)} + * string using {@link String#valueOf(Object)} * @return the non-null reference that was validated * @throws NullPointerException if {@code reference} is null */ @@ -145,12 +143,12 @@ public static T checkNotNull(T reference, Object errorMessage) { * * @param reference an object reference * @param errorMessageTemplate a template for the exception message should the check fail. The - * message is formed by replacing each {@code %s} placeholder in the template with an - * argument. These are matched by position - the first {@code %s} gets - * {@code errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted - * message in square braces. Unmatched placeholders will be left as-is. + * message is formed by replacing each {@code %s} placeholder in the template with an + * argument. These are matched by position - the first {@code %s} gets {@code + * errorMessageArgs[0]}, etc. Unmatched arguments will be appended to the formatted message in + * square braces. Unmatched placeholders will be left as-is. * @param errorMessageArgs the arguments to be substituted into the message template. Arguments - * are converted to strings using {@link String#valueOf(Object)}. + * are converted to strings using {@link String#valueOf(Object)}. * @return the non-null reference that was validated * @throws NullPointerException if {@code reference} is null */ @@ -160,6 +158,5 @@ public static T checkNotNull( reference, errorMessageTemplate, errorMessageArgs); } - private Preconditions() { - } + private Preconditions() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java index b28233c38..59d3af24e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java @@ -32,7 +32,6 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.List; - import javax.net.ssl.X509TrustManager; /** @@ -61,19 +60,16 @@ public static KeyStore getPkcs12KeyStore() throws KeyStoreException { /** * Loads a key store from a stream. * - * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    KeyStore keyStore = SecurityUtils.getJavaKeyStore();
            -    SecurityUtils.loadKeyStore(keyStore, new FileInputStream("certs.jks"), "password");
            +   * KeyStore keyStore = SecurityUtils.getJavaKeyStore();
            +   * SecurityUtils.loadKeyStore(keyStore, new FileInputStream("certs.jks"), "password");
                * 
            * * @param keyStore key store * @param keyStream input stream to the key store stream (closed at the end of this method in a - * finally block) + * finally block) * @param storePass password protecting the key store file */ public static void loadKeyStore(KeyStore keyStore, InputStream keyStream, String storePass) @@ -103,7 +99,7 @@ public static PrivateKey getPrivateKey(KeyStore keyStore, String alias, String k * * @param keyStore key store * @param keyStream input stream to the key store (closed at the end of this method in a finally - * block) + * block) * @param storePass password protecting the key store file * @param alias alias under which the key is stored * @param keyPass password protecting the key @@ -175,14 +171,18 @@ public static boolean verify( * @param signatureAlgorithm signature algorithm * @param trustManager trust manager used to verify the certificate chain * @param certChainBase64 Certificate chain used for verification. The certificates must be base64 - * encoded DER, the leaf certificate must be the first element. + * encoded DER, the leaf certificate must be the first element. * @param signatureBytes signature bytes * @param contentBytes content bytes * @return The signature certificate if the signature could be verified, null otherwise. * @since 1.19.1. */ - public static X509Certificate verify(Signature signatureAlgorithm, X509TrustManager trustManager, - List certChainBase64, byte[] signatureBytes, byte[] contentBytes) + public static X509Certificate verify( + Signature signatureAlgorithm, + X509TrustManager trustManager, + List certChainBase64, + byte[] signatureBytes, + byte[] contentBytes) throws InvalidKeyException, SignatureException { CertificateFactory certificateFactory; try { @@ -223,28 +223,24 @@ public static CertificateFactory getX509CertificateFactory() throws CertificateE } /** - * Loads a key store with certificates generated from the specified stream using - * {@link CertificateFactory#generateCertificates(InputStream)}. + * Loads a key store with certificates generated from the specified stream using {@link + * CertificateFactory#generateCertificates(InputStream)}. * - *

            - * For each certificate, {@link KeyStore#setCertificateEntry(String, Certificate)} is called with - * an alias that is the string form of incrementing non-negative integers starting with 0 (0, 1, - * 2, 3, ...). - *

            + *

            For each certificate, {@link KeyStore#setCertificateEntry(String, Certificate)} is called + * with an alias that is the string form of incrementing non-negative integers starting with 0 (0, + * 1, 2, 3, ...). * - *

            - * Example usage: - *

            + *

            Example usage: * *

            -    KeyStore keyStore = SecurityUtils.getJavaKeyStore();
            -    SecurityUtils.loadKeyStoreFromCertificates(keyStore, SecurityUtils.getX509CertificateFactory(),
            -        new FileInputStream(pemFile));
            +   * KeyStore keyStore = SecurityUtils.getJavaKeyStore();
            +   * SecurityUtils.loadKeyStoreFromCertificates(keyStore, SecurityUtils.getX509CertificateFactory(),
            +   * new FileInputStream(pemFile));
                * 
            * * @param keyStore key store (for example {@link #getJavaKeyStore()}) - * @param certificateFactory certificate factory (for example - * {@link #getX509CertificateFactory()}) + * @param certificateFactory certificate factory (for example {@link + * #getX509CertificateFactory()}) * @param certificateStream certificate stream */ public static void loadKeyStoreFromCertificates( @@ -257,6 +253,5 @@ public static void loadKeyStoreFromCertificates( } } - private SecurityUtils() { - } + private SecurityUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Sets.java b/google-http-client/src/main/java/com/google/api/client/util/Sets.java index a253874d1..f159ccb0c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Sets.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Sets.java @@ -21,10 +21,8 @@ /** * Static utility methods pertaining to {@link Set} instances. * - *

            - * NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Sets}. The + *

            NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Sets}. The * implementation must match as closely as possible to Guava's implementation. - *

            * * @since 1.14 * @author Yaniv Inbar @@ -44,6 +42,5 @@ public static > TreeSet newTreeSet() { return new TreeSet(); } - private Sets() { - } + private Sets() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Sleeper.java b/google-http-client/src/main/java/com/google/api/client/util/Sleeper.java index 94d98e8a2..bd0c0f108 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Sleeper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Sleeper.java @@ -15,12 +15,10 @@ package com.google.api.client.util; /** - * Sleeper interface to use for requesting the current thread to sleep as specified in - * {@link Thread#sleep(long)}. + * Sleeper interface to use for requesting the current thread to sleep as specified in {@link + * Thread#sleep(long)}. * - *

            - * The default implementation can be accessed at {@link #DEFAULT}. Primarily used for testing. - *

            + *

            The default implementation can be accessed at {@link #DEFAULT}. Primarily used for testing. * * @since 1.14 * @author Yaniv Inbar @@ -37,11 +35,11 @@ public interface Sleeper { void sleep(long millis) throws InterruptedException; /** Provides the default implementation based on {@link Thread#sleep(long)}. */ - Sleeper DEFAULT = new Sleeper() { - - public void sleep(long millis) throws InterruptedException { - Thread.sleep(millis); - } - }; + Sleeper DEFAULT = + new Sleeper() { + public void sleep(long millis) throws InterruptedException { + Thread.sleep(millis); + } + }; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java index eb4eb225b..d4ed4f7cf 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java @@ -19,7 +19,6 @@ import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; - import javax.net.ssl.HostnameVerifier; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -96,11 +95,10 @@ public static KeyManagerFactory getPkixKeyManagerFactory() throws NoSuchAlgorith * given trust store. * * @param sslContext SSL context (for example {@link SSLContext#getInstance}) - * @param trustStore key store for certificates to trust (for example - * {@link SecurityUtils#getJavaKeyStore()}) - * @param trustManagerFactory trust manager factory (for example - * {@link #getPkixTrustManagerFactory()}) - * + * @param trustStore key store for certificates to trust (for example {@link + * SecurityUtils#getJavaKeyStore()}) + * @param trustManagerFactory trust manager factory (for example {@link + * #getPkixTrustManagerFactory()}) * @since 1.14 */ public static SSLContext initSslContext( @@ -112,43 +110,40 @@ public static SSLContext initSslContext( } /** - * {@link Beta}
            + * {@link Beta}
            * Returns an SSL context in which all X.509 certificates are trusted. * - *

            - * Be careful! Disabling SSL certificate validation is dangerous and should only be done in + *

            Be careful! Disabling SSL certificate validation is dangerous and should only be done in * testing environments. - *

            */ @Beta public static SSLContext trustAllSSLContext() throws GeneralSecurityException { - TrustManager[] trustAllCerts = new TrustManager[] {new X509TrustManager() { + TrustManager[] trustAllCerts = + new TrustManager[] { + new X509TrustManager() { - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } + public void checkClientTrusted(X509Certificate[] chain, String authType) + throws CertificateException {} - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } + public void checkServerTrusted(X509Certificate[] chain, String authType) + throws CertificateException {} - public X509Certificate[] getAcceptedIssuers() { - return null; - } - }}; + public X509Certificate[] getAcceptedIssuers() { + return null; + } + } + }; SSLContext context = getTlsSslContext(); context.init(null, trustAllCerts, null); return context; } /** - * {@link Beta}
            + * {@link Beta}
            * Returns a verifier that trusts all host names. * - *

            - * Be careful! Disabling host name verification is dangerous and should only be done in testing + *

            Be careful! Disabling host name verification is dangerous and should only be done in testing * environments. - *

            */ @Beta public static HostnameVerifier trustAllHostnameVerifier() { @@ -160,6 +155,5 @@ public boolean verify(String arg0, SSLSession arg1) { }; } - private SslUtils() { - } + private SslUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java index a855d9c13..a2a9f600d 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java @@ -20,9 +20,7 @@ /** * Streaming content interface to write bytes to an output stream. * - *

            - * Implementations don't need to be thread-safe. - *

            + *

            Implementations don't need to be thread-safe. * * @since 1.14 * @author Yaniv Inbar @@ -32,11 +30,9 @@ public interface StreamingContent { /** * Writes the byte content to the given output stream. * - *

            - * Implementations must not close the output stream, and instead should flush the output stream. - * Some callers may assume that the the output stream has not been closed, and will fail to work - * if it has been closed. - *

            + *

            Implementations must not close the output stream, and instead should flush the output + * stream. Some callers may assume that the the output stream has not been closed, and will fail + * to work if it has been closed. * * @param out output stream */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java b/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java index 80b1273cc..dc57990ef 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java @@ -17,7 +17,6 @@ import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; - /** * Utilities for strings. * @@ -40,9 +39,9 @@ public class StringUtils { * @param string the String to encode, may be null * @return encoded bytes, or null if the input string was null * @throws IllegalStateException Thrown when the charset is missing, which should be never - * according the the Java specification. + * according the the Java specification. * @see Standard charsets + * >Standard charsets * @since 1.8 */ public static byte[] getBytesUtf8(String string) { @@ -58,9 +57,9 @@ public static byte[] getBytesUtf8(String string) { * * @param bytes The bytes to be decoded into characters * @return A new String decoded from the specified array of bytes using the UTF-8 - * charset, or null if the input byte array was null. + * charset, or null if the input byte array was null. * @throws IllegalStateException Thrown when a {@link UnsupportedEncodingException} is caught, - * which should never happen since the charset is required. + * which should never happen since the charset is required. * @since 1.8 */ public static String newStringUtf8(byte[] bytes) { @@ -70,6 +69,5 @@ public static String newStringUtf8(byte[] bytes) { return new String(bytes, StandardCharsets.UTF_8); } - private StringUtils() { - } + private StringUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Strings.java b/google-http-client/src/main/java/com/google/api/client/util/Strings.java index 9c4067285..ae3625848 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Strings.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Strings.java @@ -17,9 +17,7 @@ /** * Static utility methods pertaining to {@code String} instances. * - *

            - * NOTE: proxy for the Guava implementation of {@link com.google.common.base.Strings}. - *

            + *

            NOTE: proxy for the Guava implementation of {@link com.google.common.base.Strings}. * * @since 1.14 * @author Yaniv Inbar @@ -36,6 +34,5 @@ public static boolean isNullOrEmpty(String string) { return com.google.common.base.Strings.isNullOrEmpty(string); } - private Strings() { - } + private Strings() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Throwables.java b/google-http-client/src/main/java/com/google/api/client/util/Throwables.java index 32b01cdc8..605355b88 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Throwables.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Throwables.java @@ -17,9 +17,7 @@ /** * Static utility methods pertaining to instances of {@link Throwable}. * - *

            - * NOTE: proxy for the Guava implementation of {@link com.google.common.base.Throwables}. - *

            + *

            NOTE: proxy for the Guava implementation of {@link com.google.common.base.Throwables}. * * @since 1.14 * @author Yaniv Inbar @@ -27,48 +25,46 @@ public final class Throwables { /** - * Propagates {@code throwable} as-is if it is an instance of {@link RuntimeException} or - * {@link Error}, or else as a last resort, wraps it in a {@code RuntimeException} then - * propagates. - *

            - * This method always throws an exception. The {@code RuntimeException} return type is only for + * Propagates {@code throwable} as-is if it is an instance of {@link RuntimeException} or {@link + * Error}, or else as a last resort, wraps it in a {@code RuntimeException} then propagates. + * + *

            This method always throws an exception. The {@code RuntimeException} return type is only for * client code to make Java type system happy in case a return value is required by the enclosing * method. Example usage: - *

            * *
            -    T doSomething() {
            -      try {
            -        return someMethodThatCouldThrowAnything();
            -      } catch (IKnowWhatToDoWithThisException e) {
            -        return handle(e);
            -      } catch (Throwable t) {
            -        throw Throwables.propagate(t);
            -      }
            -    }
            -   *
            + * T doSomething() { + * try { + * return someMethodThatCouldThrowAnything(); + * } catch (IKnowWhatToDoWithThisException e) { + * return handle(e); + * } catch (Throwable t) { + * throw Throwables.propagate(t); + * } + * } + * * * @param throwable the Throwable to propagate * @return nothing will ever be returned; this return type is only for your convenience, as - * illustrated in the example above + * illustrated in the example above */ public static RuntimeException propagate(Throwable throwable) { return com.google.common.base.Throwables.propagate(throwable); } /** - * Propagates {@code throwable} exactly as-is, if and only if it is an instance of - * {@link RuntimeException} or {@link Error}. Example usage: + * Propagates {@code throwable} exactly as-is, if and only if it is an instance of {@link + * RuntimeException} or {@link Error}. Example usage: * *
            -    try {
            -      someMethodThatCouldThrowAnything();
            -    } catch (IKnowWhatToDoWithThisException e) {
            -      handle(e);
            -    } catch (Throwable t) {
            -      Throwables.propagateIfPossible(t);
            -      throw new RuntimeException("unexpected", t);
            -    }
            +   * try {
            +   * someMethodThatCouldThrowAnything();
            +   * } catch (IKnowWhatToDoWithThisException e) {
            +   * handle(e);
            +   * } catch (Throwable t) {
            +   * Throwables.propagateIfPossible(t);
            +   * throw new RuntimeException("unexpected", t);
            +   * }
                * 
            * * @param throwable throwable (may be {@code null}) @@ -80,19 +76,19 @@ public static void propagateIfPossible(Throwable throwable) { } /** - * Propagates {@code throwable} exactly as-is, if and only if it is an instance of - * {@link RuntimeException}, {@link Error}, or {@code declaredType}. Example usage: + * Propagates {@code throwable} exactly as-is, if and only if it is an instance of {@link + * RuntimeException}, {@link Error}, or {@code declaredType}. Example usage: * *
            -    try {
            -      someMethodThatCouldThrowAnything();
            -    } catch (IKnowWhatToDoWithThisException e) {
            -      handle(e);
            -    } catch (Throwable t) {
            -      Throwables.propagateIfPossible(t, OtherException.class);
            -      throw new RuntimeException("unexpected", t);
            -    }
            -   *
            + * try { + * someMethodThatCouldThrowAnything(); + * } catch (IKnowWhatToDoWithThisException e) { + * handle(e); + * } catch (Throwable t) { + * Throwables.propagateIfPossible(t, OtherException.class); + * throw new RuntimeException("unexpected", t); + * } + * * * @param throwable throwable (may be {@code null}) * @param declaredType the single checked exception type declared by the calling method @@ -102,6 +98,5 @@ public static void propagateIfPossible( com.google.common.base.Throwables.propagateIfPossible(throwable, declaredType); } - private Throwables() { - } + private Throwables() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Types.java b/google-http-client/src/main/java/com/google/api/client/util/Types.java index d977b026f..8a49b438e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Types.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Types.java @@ -14,7 +14,6 @@ package com.google.api.client.util; - import java.lang.reflect.Array; import java.lang.reflect.GenericArrayType; import java.lang.reflect.GenericDeclaration; @@ -43,11 +42,9 @@ public class Types { * Returns the parameterized type that is or extends the given type that matches the given super * class. * - *

            - * For example, if the input type is {@code HashMap} and the input super class is - * {@code Map.class}, it will return the extended parameterized type {@link Map}, but which + *

            For example, if the input type is {@code HashMap} and the input super class + * is {@code Map.class}, it will return the extended parameterized type {@link Map}, but which * retains the actual type information from the original {@code HashMap}. - *

            * * @param type class or parameterized type * @param superClass super class @@ -55,7 +52,8 @@ public class Types { */ public static ParameterizedType getSuperParameterizedType(Type type, Class superClass) { if (type instanceof Class || type instanceof ParameterizedType) { - outer: while (type != null && type != Object.class) { + outer: + while (type != null && type != Object.class) { Class rawType; if (type instanceof Class) { // type is a class @@ -73,8 +71,9 @@ public static ParameterizedType getSuperParameterizedType(Type type, Class su for (Type interfaceType : rawType.getGenericInterfaces()) { // interface type is class or parameterized type Class interfaceClass = - interfaceType instanceof Class ? (Class) interfaceType : getRawClass( - (ParameterizedType) interfaceType); + interfaceType instanceof Class + ? (Class) interfaceType + : getRawClass((ParameterizedType) interfaceType); if (superClass.isAssignableFrom(interfaceClass)) { type = interfaceType; continue outer; @@ -103,10 +102,8 @@ public static boolean isAssignableToOrFrom(Class classToCheck, Class anoth /** * Creates a new instance of the given class by invoking its default constructor. * - *

            - * The given class must be public and must have a public default constructor, and must not be an - * array or an interface or be abstract. If an enclosing class, it must be static. - *

            + *

            The given class must be public and must have a public default constructor, and must not be + * an array or an interface or be abstract. If an enclosing class, it must be static. */ public static T newInstance(Class clazz) { // TODO(yanivi): investigate "sneaky" options for allocating the class that GSON uses, like @@ -167,28 +164,27 @@ private static IllegalArgumentException handleExceptionForNewInstance( /** Returns whether the given type is an array. */ public static boolean isArray(Type type) { - return type instanceof GenericArrayType || type instanceof Class - && ((Class) type).isArray(); + return type instanceof GenericArrayType + || type instanceof Class && ((Class) type).isArray(); } /** * Returns the component type of the given array type, assuming {@link #isArray(Type)}. * - *

            - * Return type will either be class, parameterized type, generic array type, or type variable, but - * not a wildcard type. - *

            + *

            Return type will either be class, parameterized type, generic array type, or type variable, + * but not a wildcard type. * * @throws ClassCastException if {@link #isArray(Type)} is false */ public static Type getArrayComponentType(Type array) { - return array instanceof GenericArrayType ? ((GenericArrayType) array).getGenericComponentType() + return array instanceof GenericArrayType + ? ((GenericArrayType) array).getGenericComponentType() : ((Class) array).getComponentType(); } /** - * Returns the raw class for the given parameter type as defined in - * {@link ParameterizedType#getRawType()}. + * Returns the raw class for the given parameter type as defined in {@link + * ParameterizedType#getRawType()}. * * @param parameterType parameter type * @return raw class @@ -214,17 +210,15 @@ public static Type getBound(WildcardType wildcardType) { /** * Resolves the actual type of the given type variable that comes from a field type based on the * given context list. - *

            - * In case the type variable can be resolved partially, it will return the partially resolved type - * variable. - *

            + * + *

            In case the type variable can be resolved partially, it will return the partially resolved + * type variable. * * @param context context list, ordering from least specific to most specific type context, for - * example container class and then its field + * example container class and then its field * @param typeVariable type variable * @return resolved or partially resolved actual type (type variable, class, parameterized type, - * or generic array type, but not wildcard type) or {@code null} if unable to resolve at - * all + * or generic array type, but not wildcard type) or {@code null} if unable to resolve at all */ public static Type resolveTypeVariable(List context, TypeVariable typeVariable) { // determine where the type variable was declared @@ -265,11 +259,11 @@ public static Type resolveTypeVariable(List context, TypeVariable typeV } /** - * Returns the raw array component type to use -- for example for the first parameter of - * {@link Array#newInstance(Class, int)} -- for the given component type. + * Returns the raw array component type to use -- for example for the first parameter of {@link + * Array#newInstance(Class, int)} -- for the given component type. * * @param context context list, ordering from least specific to most specific type context, for - * example container class and then its field + * example container class and then its field * @param componentType array component type or {@code null} for {@code Object.class} result * @return raw array component type */ @@ -295,10 +289,8 @@ public static Class getRawArrayComponentType(List context, Type compone /** * Returns the type parameter of {@link Iterable} that is assignable from the given iterable type. * - *

            - * For example, for the type {@code ArrayList} -- or for a class that extends {@code + *

            For example, for the type {@code ArrayList} -- or for a class that extends {@code * ArrayList} -- it will return {@code Integer}. - *

            * * @param iterableType iterable type (must extend {@link Iterable}) * @return type parameter, which may be any type @@ -310,10 +302,8 @@ public static Type getIterableParameter(Type iterableType) { /** * Returns the value type parameter of {@link Map} that is assignable from the given map type. * - *

            - * For example, for the type {@code Map} -- or for a class that extends {@code + *

            For example, for the type {@code Map} -- or for a class that extends {@code * Map} -- it will return {@code Integer}. - *

            * * @param mapType map type (must extend {@link Map}) * @return type parameter, which may be any type @@ -342,10 +332,9 @@ private static Type getActualParameterAtPosition(Type type, Class superClass, /** * Returns an iterable for an input iterable or array value. * - *

            - * If the input value extends {@link Iterable}, it will just return the input value. Otherwise, it - * will return an iterable that can handle arrays of primitive and non-primitive component type. - *

            + *

            If the input value extends {@link Iterable}, it will just return the input value. Otherwise, + * it will return an iterable that can handle arrays of primitive and non-primitive component + * type. * * @param value iterable (extends {@link Iterable}) or array value * @return iterable @@ -408,6 +397,5 @@ public static Object toArray(Collection collection, Class componentType) { return collection.toArray((Object[]) Array.newInstance(componentType, collection.size())); } - private Types() { - } + private Types() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Value.java b/google-http-client/src/main/java/com/google/api/client/util/Value.java index 52f24bf6a..bce75bfa8 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Value.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Value.java @@ -22,28 +22,27 @@ /** * Use this annotation to specify that an enum constant is a string data value, optionally providing * the string data value to use. - *

            - * If the string data value is not specified, the default is the Java field's name. For example: - *

            + * + *

            If the string data value is not specified, the default is the Java field's name. For example: * *

            -  public enum A {
            -
            -    // value is "USE_FIELD_NAME"
            -    @Value
            -    USE_FIELD_NAME,
            -    
            -    // value is "specifiedValue"
            -    @Value("specifiedValue")
            -    USE_SPECIFIED_VALUE, 
            -    
            -    // value is null
            -    @NullValue
            -    NULL_VALUE
            -
            -    // not a value
            -    NOT_A_VALUE
            -  }
            + * public enum A {
            + *
            + * // value is "USE_FIELD_NAME"
            + * @Value
            + * USE_FIELD_NAME,
            + *
            + * // value is "specifiedValue"
            + * @Value("specifiedValue")
            + * USE_SPECIFIED_VALUE,
            + *
            + * // value is null
            + * @NullValue
            + * NULL_VALUE
            + *
            + * // not a value
            + * NOT_A_VALUE
            + * }
              * 
            * * @since 1.4 diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index 49470c81b..b8ed2c11b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -18,8 +18,8 @@ import java.net.URLDecoder; /** - * Utility functions for dealing with {@code CharEscaper}s, and some commonly used - * {@code CharEscaper} instances. + * Utility functions for dealing with {@code CharEscaper}s, and some commonly used {@code + * CharEscaper} instances. * * @since 1.0 */ @@ -44,32 +44,28 @@ public final class CharEscapers { * Escapes the string value so it can be safely included in URIs. For details on escaping URIs, * see RFC 3986 - section 2.4. * - *

            - * When encoding a String, the following rules apply: + *

            When encoding a String, the following rules apply: + * *

              - *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the - * same. - *
            • The special characters ".", "-", "*", and "_" remain the same. - *
            • The space character " " is converted into a plus sign "+". - *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each - * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, - * uppercase, hexadecimal representation of the byte value. + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain + * the same. + *
            • The special characters ".", "-", "*", and "_" remain the same. + *
            • The space character " " is converted into a plus sign "+". + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. *
            - *

            * - *

            - * Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. From - * RFC 3986:
            + *

            Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. + * From RFC 3986:
            * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." - *

            * - *

            - * This escaper has identical behavior to (but is potentially much faster than): + *

            This escaper has identical behavior to (but is potentially much faster than): + * *

              - *
            • {@link java.net.URLEncoder#encode(String, String)} with the encoding name "UTF-8" + *
            • {@link java.net.URLEncoder#encode(String, String)} with the encoding name "UTF-8" *
            - *

            */ public static String escapeUri(String value) { return URI_ESCAPER.escape(value); @@ -79,10 +75,8 @@ public static String escapeUri(String value) { * Percent-decodes a US-ASCII string into a Unicode string. UTF-8 encoding is used to determine * what characters are represented by any consecutive sequences of the form "%XX". * - *

            - * This replaces each occurrence of '+' with a space, ' '. So this method should not be used for - * non application/x-www-form-urlencoded strings such as host and path. - *

            + *

            This replaces each occurrence of '+' with a space, ' '. So this method should not be used + * for non application/x-www-form-urlencoded strings such as host and path. * * @param uri a percent-encoded US-ASCII string * @return a Unicode string @@ -101,36 +95,33 @@ public static String decodeUri(String uri) { * escaping URIs, see RFC 3986 - section * 2.4. * - *

            - * When encoding a String, the following rules apply: + *

            When encoding a String, the following rules apply: + * *

              - *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the - * same. - *
            • The unreserved characters ".", "-", "~", and "_" remain the same. - *
            • The general delimiters "@" and ":" remain the same. - *
            • The subdelimiters "!", "$", "&", "'", "(", ")", "*", ",", ";", and "=" remain the same. - *
            • The space character " " is converted into %20. - *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each - * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, - * uppercase, hexadecimal representation of the byte value. + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain + * the same. + *
            • The unreserved characters ".", "-", "~", and "_" remain the same. + *
            • The general delimiters "@" and ":" remain the same. + *
            • The subdelimiters "!", "$", "&", "'", "(", ")", "*", ",", ";", and "=" remain the + * same. + *
            • The space character " " is converted into %20. + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. *
            - *

            * - *

            - * Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. From - * RFC 3986:
            + *

            Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. + * From RFC 3986:
            * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." - *

            */ public static String escapeUriPath(String value) { return URI_PATH_ESCAPER.escape(value); } /** - * Escapes a URI path but retains all reserved characters, including all general delimiters. - * That is the same as {@link #escapeUriPath(String)} except that it keeps '?', '+', and '/' - * unescaped. + * Escapes a URI path but retains all reserved characters, including all general delimiters. That + * is the same as {@link #escapeUriPath(String)} except that it keeps '?', '+', and '/' unescaped. */ public static String escapeUriPathWithoutReserved(String value) { return URI_RESERVED_ESCAPER.escape(value); @@ -141,27 +132,25 @@ public static String escapeUriPathWithoutReserved(String value) { * escaping URIs, see RFC 3986 - section * 2.4. * - *

            - * When encoding a String, the following rules apply: + *

            When encoding a String, the following rules apply: + * *

              - *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the - * same. - *
            • The unreserved characters ".", "-", "~", and "_" remain the same. - *
            • The general delimiter ":" remains the same. - *
            • The subdelimiters "!", "$", "&", "'", "(", ")", "*", ",", ";", and "=" remain the same. - *
            • The space character " " is converted into %20. - *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each - * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, - * uppercase, hexadecimal representation of the byte value. + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain + * the same. + *
            • The unreserved characters ".", "-", "~", and "_" remain the same. + *
            • The general delimiter ":" remains the same. + *
            • The subdelimiters "!", "$", "&", "'", "(", ")", "*", ",", ";", and "=" remain the + * same. + *
            • The space character " " is converted into %20. + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. *
            - *

            * - *

            - * Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. From - * RFC 3986:
            + *

            Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. + * From RFC 3986:
            * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." - *

            * * @since 1.15 */ @@ -175,44 +164,36 @@ public static String escapeUriUserInfo(String value) { * values should be individually encoded. If you escape an entire query string in one pass with * this escaper, then the "=" and "&" characters used as separators will also be escaped. * - *

            - * This escaper is also suitable for escaping fragment identifiers. - *

            + *

            This escaper is also suitable for escaping fragment identifiers. + * + *

            For details on escaping URIs, see RFC 3986 - section 2.4. * - *

            - * For details on escaping URIs, see RFC - * 3986 - section 2.4. - *

            + *

            When encoding a String, the following rules apply: * - *

            - * When encoding a String, the following rules apply: *

              - *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the - * same. - *
            • The unreserved characters ".", "-", "~", and "_" remain the same. - *
            • The general delimiters "@" and ":" remain the same. - *
            • The path delimiters "/" and "?" remain the same. - *
            • The subdelimiters "!", "$", "'", "(", ")", "*", ",", and ";", remain the same. - *
            • The space character " " is converted into %20. - *
            • The equals sign "=" is converted into %3D. - *
            • The ampersand "&" is converted into %26. - *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each - * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, - * uppercase, hexadecimal representation of the byte value. + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain + * the same. + *
            • The unreserved characters ".", "-", "~", and "_" remain the same. + *
            • The general delimiters "@" and ":" remain the same. + *
            • The path delimiters "/" and "?" remain the same. + *
            • The subdelimiters "!", "$", "'", "(", ")", "*", ",", and ";", remain the same. + *
            • The space character " " is converted into %20. + *
            • The equals sign "=" is converted into %3D. + *
            • The ampersand "&" is converted into %26. + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. *
            - *

            * - *

            - * Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. From - * RFC 3986:
            + *

            Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. + * From RFC 3986:
            * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." - *

            */ public static String escapeUriQuery(String value) { return URI_QUERY_STRING_ESCAPER.escape(value); } - private CharEscapers() { - } + private CharEscapers() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java index 7c49418fb..ddf91c69b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java @@ -19,18 +19,15 @@ * (such as an XML document). Typically (but not always), the inverse process of "unescaping" the * text is performed automatically by the relevant parser. * - *

            - * For example, an XML escaper would convert the literal string {@code "Foo"} into {@code + *

            For example, an XML escaper would convert the literal string {@code "Foo"} into {@code * "Foo<Bar>"} to prevent {@code ""} from being confused with an XML tag. When the * resulting XML document is parsed, the parser API will return this text as the original literal * string {@code "Foo"}. * - *

            - * An {@code Escaper} instance is required to be stateless, and safe when used concurrently by + *

            An {@code Escaper} instance is required to be stateless, and safe when used concurrently by * multiple threads. * - *

            - * Several popular escapers are defined as constants in the class {@link CharEscapers}. + *

            Several popular escapers are defined as constants in the class {@link CharEscapers}. * * @since 1.0 */ @@ -39,20 +36,20 @@ public abstract class Escaper { /** * Returns the escaped form of a given literal string. * - *

            - * Note that this method may treat input characters differently depending on the specific escaper - * implementation. + *

            Note that this method may treat input characters differently depending on the specific + * escaper implementation. + * *

              - *
            • {@link UnicodeEscaper} handles UTF-16 - * correctly, including surrogate character pairs. If the input is badly formed the escaper should - * throw {@link IllegalArgumentException}. + *
            • {@link UnicodeEscaper} handles UTF-16 + * correctly, including surrogate character pairs. If the input is badly formed the escaper + * should throw {@link IllegalArgumentException}. *
            * * @param string the literal string to be escaped * @return the escaped form of {@code string} * @throws NullPointerException if {@code string} is null * @throws IllegalArgumentException if {@code string} contains badly formed UTF-16 or cannot be - * escaped for any other reason + * escaped for any other reason */ public abstract String escape(String string); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index 996f681b3..cedd09afb 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -19,38 +19,34 @@ * scheme. The set of safe characters (those which remain unescaped) can be specified on * construction. * - *

            - * For details on escaping URIs for use in web pages, see For details on escaping URIs for use in web pages, see RFC 3986 - section 2.4 and RFC 3986 - appendix A * - *

            - * When encoding a String, the following rules apply: + *

            When encoding a String, the following rules apply: + * *

              - *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the - * same. - *
            • Any additionally specified safe characters remain the same. - *
            • If {@code plusForSpace} was specified, the space character " " is converted into a plus sign - * "+". - *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each byte - * is then represented by the 3-character string "%XY", where "XY" is the two-digit, uppercase, - * hexadecimal representation of the byte value. + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the + * same. + *
            • Any additionally specified safe characters remain the same. + *
            • If {@code plusForSpace} was specified, the space character " " is converted into a plus + * sign "+". + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. *
            * - *

            - * RFC 2396 specifies the set of unreserved characters as "-", "_", ".", "!", "~", "*", "'", "(" and - * ")". It goes on to state: + *

            RFC 2396 specifies the set of unreserved characters as "-", "_", ".", "!", "~", "*", "'", "(" + * and ")". It goes on to state: * - *

            - * Unreserved characters can be escaped without changing the semantics of the URI, but this + *

            Unreserved characters can be escaped without changing the semantics of the URI, but this * should not be done unless the URI is being used in a context that does not allow the unescaped * character to appear. * - *

            - * For performance reasons the only currently supported character encoding of this class is UTF-8. + *

            For performance reasons the only currently supported character encoding of this class is + * UTF-8. * - *

            - * Note: This escaper produces uppercase hexadecimal sequences. From Note: This escaper produces uppercase hexadecimal sequences. From RFC 3986:
            * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." @@ -58,9 +54,7 @@ * @since 1.0 */ public class PercentEscaper extends UnicodeEscaper { - /** - * A string of safe characters that mimics the behavior of {@link java.net.URLEncoder}. - */ + /** A string of safe characters that mimics the behavior of {@link java.net.URLEncoder}. */ public static final String SAFECHARS_URLENCODER = "-_.*"; /** @@ -72,8 +66,7 @@ public class PercentEscaper extends UnicodeEscaper { /** * Contains the save characters plus all reserved characters. This happens to be the safe path - * characters plus those characters which are reserved for URI segments, namely '+', '/', and - * '?'. + * characters plus those characters which are reserved for URI segments, namely '+', '/', and '?'. */ public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "+/?"; @@ -98,9 +91,7 @@ public class PercentEscaper extends UnicodeEscaper { private static final char[] UPPER_HEX_DIGITS = "0123456789ABCDEF".toCharArray(); - /** - * If true we should convert space to the {@code +} character. - */ + /** If true we should convert space to the {@code +} character. */ private final boolean plusForSpace; /** @@ -115,7 +106,7 @@ public class PercentEscaper extends UnicodeEscaper { * character. * * @param safeChars a non null string specifying additional safe characters for this escaper (the - * ranges 0..9, a..z and A..Z are always safe and should not be specified here) + * ranges 0..9, a..z and A..Z are always safe and should not be specified here) * @param plusForSpace true if ASCII space should be escaped to {@code +} rather than {@code %20} * @throws IllegalArgumentException if any of the parameters were invalid */ @@ -196,9 +187,7 @@ public String escape(String s) { return s; } - /** - * Escapes the given Unicode code point in UTF-8. - */ + /** Escapes the given Unicode code point in UTF-8. */ @Override protected char[] escape(int cp) { // We should never get negative values here but if we do it will throw an diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java b/google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java index f54b0d208..db81b2836 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java @@ -14,12 +14,9 @@ package com.google.api.client.util.escape; -/** - * Methods factored out so that they can be emulated differently in GWT. - */ +/** Methods factored out so that they can be emulated differently in GWT. */ final class Platform { - private Platform() { - } + private Platform() {} /** Returns a thread-local 1024-char array. */ // DEST_TL.get() is not null because initialValue() below returns a non-null. @@ -33,10 +30,11 @@ static char[] charBufferFromThreadLocal() { * 1024 characters. If we grow past this we don't put it back in the threadlocal, we just keep * going and grow as needed. */ - private static final ThreadLocal DEST_TL = new ThreadLocal() { - @Override - protected char[] initialValue() { - return new char[1024]; - } - }; + private static final ThreadLocal DEST_TL = + new ThreadLocal() { + @Override + protected char[] initialValue() { + return new char[1024]; + } + }; } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java index 66b47ac1c..1fdcf4079 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java @@ -19,23 +19,19 @@ * context (such as an XML document). Typically (but not always), the inverse process of * "unescaping" the text is performed automatically by the relevant parser. * - *

            - * For example, an XML escaper would convert the literal string {@code "Foo"} into {@code + *

            For example, an XML escaper would convert the literal string {@code "Foo"} into {@code * "Foo<Bar>"} to prevent {@code ""} from being confused with an XML tag. When the * resulting XML document is parsed, the parser API will return this text as the original literal * string {@code "Foo"}. * - *

            - * As there are important reasons, including potential security issues, to handle Unicode correctly - * if you are considering implementing a new escaper you should favor using UnicodeEscaper wherever - * possible. + *

            As there are important reasons, including potential security issues, to handle Unicode + * correctly if you are considering implementing a new escaper you should favor using UnicodeEscaper + * wherever possible. * - *

            - * A {@code UnicodeEscaper} instance is required to be stateless, and safe when used concurrently by - * multiple threads. + *

            A {@code UnicodeEscaper} instance is required to be stateless, and safe when used concurrently + * by multiple threads. * - *

            - * Several popular escapers are defined as constants in the class {@link CharEscapers}. To create + *

            Several popular escapers are defined as constants in the class {@link CharEscapers}. To create * your own escapers extend this class and implement the {@link #escape(int)} method. * * @since 1.0 @@ -49,17 +45,14 @@ public abstract class UnicodeEscaper extends Escaper { * does not need to be escaped. When called as part of an escaping operation, the given code point * is guaranteed to be in the range {@code 0 <= cp <= Character#MAX_CODE_POINT}. * - *

            - * If an empty array is returned, this effectively strips the input character from the resulting - * text. + *

            If an empty array is returned, this effectively strips the input character from the + * resulting text. * - *

            - * If the character does not need to be escaped, this method should return {@code null}, rather + *

            If the character does not need to be escaped, this method should return {@code null}, rather * than an array containing the character representation of the code point. This enables the * escaping algorithm to perform more efficiently. * - *

            - * If the implementation of this method cannot correctly handle a particular code point then it + *

            If the implementation of this method cannot correctly handle a particular code point then it * should either throw an appropriate runtime exception or return a suitable replacement * character. It must never silently discard invalid input as this may constitute a security risk. * @@ -72,35 +65,31 @@ public abstract class UnicodeEscaper extends Escaper { * Scans a sub-sequence of characters from a given {@link CharSequence}, returning the index of * the next character that requires escaping. * - *

            - * Note: When implementing an escaper, it is a good idea to override this method for + *

            Note: When implementing an escaper, it is a good idea to override this method for * efficiency. The base class implementation determines successive Unicode code points and invokes * {@link #escape(int)} for each of them. If the semantics of your escaper are such that code * points in the supplementary range are either all escaped or all unescaped, this method can be * implemented more efficiently using {@link CharSequence#charAt(int)}. * - *

            - * Note however that if your escaper does not escape characters in the supplementary range, you + *

            Note however that if your escaper does not escape characters in the supplementary range, you * should either continue to validate the correctness of any surrogate characters encountered or * provide a clear warning to users that your escaper does not validate its input. * - *

            - * See {@link PercentEscaper} for an example. + *

            See {@link PercentEscaper} for an example. * * @param csq a sequence of characters * @param start the index of the first character to be scanned * @param end the index immediately after the last character to be scanned * @throws IllegalArgumentException if the scanned sub-sequence of {@code csq} contains invalid - * surrogate pairs + * surrogate pairs */ protected abstract int nextEscapeIndex(CharSequence csq, int start, int end); /** * Returns the escaped form of a given literal string. * - *

            - * If you are escaping input in arbitrary successive chunks, then it is not generally safe to use - * this method. If an input string ends with an unmatched high surrogate character, then this + *

            If you are escaping input in arbitrary successive chunks, then it is not generally safe to + * use this method. If an input string ends with an unmatched high surrogate character, then this * method will throw {@link IllegalArgumentException}. You should ensure your input is valid UTF-16 before calling this method. * @@ -118,9 +107,8 @@ public abstract class UnicodeEscaper extends Escaper { * protected to allow subclasses to override the fastpath escaping function to inline their * escaping test. * - *

            - * This method is not reentrant and may only be invoked by the top level {@link #escape(String)} - * method. + *

            This method is not reentrant and may only be invoked by the top level {@link + * #escape(String)} method. * * @param s the literal string to be escaped * @param index the index to start escaping from @@ -188,34 +176,33 @@ protected final String escapeSlow(String s, int index) { /** * Returns the Unicode code point of the character at the given index. * - *

            - * Unlike {@link Character#codePointAt(CharSequence, int)} or {@link String#codePointAt(int)} this - * method will never fail silently when encountering an invalid surrogate pair. + *

            Unlike {@link Character#codePointAt(CharSequence, int)} or {@link String#codePointAt(int)} + * this method will never fail silently when encountering an invalid surrogate pair. + * + *

            The behaviour of this method is as follows: * - *

            - * The behaviour of this method is as follows: - *

              - *
            1. If {@code index >= end}, {@link IndexOutOfBoundsException} is thrown. - *
            2. If the character at the specified index is not a surrogate, it is returned. - *
            3. If the first character was a high surrogate value, then an attempt is made to read the next - * character. *
                - *
              1. If the end of the sequence was reached, the negated value of the trailing high surrogate - * is returned. - *
              2. If the next character was a valid low surrogate, the code point value of the high/low - * surrogate pair is returned. - *
              3. If the next character was not a low surrogate value, then {@link IllegalArgumentException} - * is thrown. - *
              - *
            4. If the first character was a low surrogate value, {@link IllegalArgumentException} is - * thrown. + *
            5. If {@code index >= end}, {@link IndexOutOfBoundsException} is thrown. + *
            6. If the character at the specified index is not a surrogate, it is returned. + *
            7. If the first character was a high surrogate value, then an attempt is made to read the + * next character. + *
                + *
              1. If the end of the sequence was reached, the negated value of the trailing high + * surrogate is returned. + *
              2. If the next character was a valid low surrogate, the code point value of the + * high/low surrogate pair is returned. + *
              3. If the next character was not a low surrogate value, then {@link + * IllegalArgumentException} is thrown. + *
              + *
            8. If the first character was a low surrogate value, {@link IllegalArgumentException} is + * thrown. *
            * * @param seq the sequence of characters from which to decode the code point * @param index the index of the first character to decode * @param end the index beyond the last valid character to decode * @return the Unicode code point for the given index or the negated value of the trailing high - * surrogate character at the end of the sequence + * surrogate character at the end of the sequence */ protected static int codePointAt(CharSequence seq, int index, int end) { if (index < end) { @@ -234,11 +221,19 @@ protected static int codePointAt(CharSequence seq, int index, int end) { return Character.toCodePoint(c1, c2); } throw new IllegalArgumentException( - "Expected low surrogate but got char '" + c2 + "' with value " + (int) c2 + " at index " + "Expected low surrogate but got char '" + + c2 + + "' with value " + + (int) c2 + + " at index " + index); } else { throw new IllegalArgumentException( - "Unexpected low surrogate character '" + c1 + "' with value " + (int) c1 + " at index " + "Unexpected low surrogate character '" + + c1 + + "' with value " + + (int) c1 + + " at index " + (index - 1)); } } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java b/google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java index 35367554b..09ec250f2 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java @@ -18,6 +18,4 @@ * @since 1.0 * @author Yaniv Inbar */ - package com.google.api.client.util.escape; - diff --git a/google-http-client/src/main/java/com/google/api/client/util/package-info.java b/google-http-client/src/main/java/com/google/api/client/util/package-info.java index 1875e047e..b6c2ee331 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/util/package-info.java @@ -18,9 +18,7 @@ * @since 1.0 * @author Yaniv Inbar */ - @ReflectionSupport(value = ReflectionSupport.Level.FULL) package com.google.api.client.util; import com.google.j2objc.annotations.ReflectionSupport; - diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java index d3688ceab..00cf7cc86 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java @@ -15,7 +15,6 @@ package com.google.api.client.util.store; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.Serializable; import java.util.Collection; @@ -25,7 +24,6 @@ * Abstract data store implementation. * * @param serializable type of the mapped value - * * @author Yaniv Inbar * @since 1.16 */ @@ -49,10 +47,8 @@ protected AbstractDataStore(DataStoreFactory dataStoreFactory, String id) { /** * {@inheritDoc} * - *

            - * Overriding is only supported for the purpose of calling the super implementation and changing - * the return type, but nothing else. - *

            + *

            Overriding is only supported for the purpose of calling the super implementation and + * changing the return type, but nothing else. */ public DataStoreFactory getDataStoreFactory() { return dataStoreFactory; @@ -65,9 +61,7 @@ public final String getId() { /** * {@inheritDoc} * - *

            - * Default implementation is to call {@link #get(String)} and check if it is {@code null}. - *

            + *

            Default implementation is to call {@link #get(String)} and check if it is {@code null}. */ public boolean containsKey(String key) throws IOException { return get(key) != null; @@ -76,9 +70,7 @@ public boolean containsKey(String key) throws IOException { /** * {@inheritDoc} * - *

            - * Default implementation is to call {@link Collection#contains(Object)} on {@link #values()}. - *

            + *

            Default implementation is to call {@link Collection#contains(Object)} on {@link #values()}. */ public boolean containsValue(V value) throws IOException { return values().contains(value); @@ -87,9 +79,7 @@ public boolean containsValue(V value) throws IOException { /** * {@inheritDoc} * - *

            - * Default implementation is to check if {@link #size()} is {@code 0}. - *

            + *

            Default implementation is to check if {@link #size()} is {@code 0}. */ public boolean isEmpty() throws IOException { return size() == 0; @@ -98,9 +88,7 @@ public boolean isEmpty() throws IOException { /** * {@inheritDoc} * - *

            - * Default implementation is to call {@link Set#size()} on {@link #keySet()}. - *

            + *

            Default implementation is to call {@link Set#size()} on {@link #keySet()}. */ public int size() throws IOException { return keySet().size(); diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java index 3e4c48959..0136e5a32 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java @@ -16,7 +16,6 @@ import com.google.api.client.util.Maps; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.Serializable; import java.util.Map; @@ -39,8 +38,8 @@ public abstract class AbstractDataStoreFactory implements DataStoreFactory { private final Map> dataStoreMap = Maps.newHashMap(); /** - * Pattern to control possible values for the {@code id} parameter of - * {@link #getDataStore(String)}. + * Pattern to control possible values for the {@code id} parameter of {@link + * #getDataStore(String)}. */ private static final Pattern ID_PATTERN = Pattern.compile("\\w{1,30}"); @@ -64,9 +63,7 @@ public final DataStore getDataStore(String id) throw /** * Returns a new instance of a type-specific data store based on the given unique ID. * - *

            - * The {@link DataStore#getId()} must match the {@code id} parameter from this method. - *

            + *

            The {@link DataStore#getId()} must match the {@code id} parameter from this method. * * @param id unique ID to refer to typed data store * @param serializable type of the mapped value diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java index 863483a2b..daf796611 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java @@ -18,7 +18,6 @@ import com.google.api.client.util.Lists; import com.google.api.client.util.Maps; import com.google.api.client.util.Preconditions; - import java.io.IOException; import java.io.Serializable; import java.util.Arrays; @@ -34,7 +33,6 @@ * Abstract, thread-safe, in-memory implementation of a data store factory. * * @param serializable type of the mapped value - * * @author Yaniv Inbar */ public class AbstractMemoryDataStore extends AbstractDataStore { @@ -182,8 +180,7 @@ public int size() throws IOException { * {@link #clear()}. */ @SuppressWarnings("unused") - public void save() throws IOException { - } + public void save() throws IOException {} @Override public String toString() { diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java b/google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java index 353bb0f43..3bd9cc64a 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java @@ -14,7 +14,6 @@ package com.google.api.client.util.store; - import java.io.IOException; import java.io.Serializable; import java.util.Collection; @@ -24,12 +23,9 @@ * Stores and manages serializable data of a specific type, where the key is a string and the value * is a {@link Serializable} object. * - *

            - * {@code null} keys or values are not allowed. Implementation should be thread-safe. - *

            + *

            {@code null} keys or values are not allowed. Implementation should be thread-safe. * * @param serializable type of the mapped value - * * @author Yaniv Inbar * @since 1.16 */ @@ -56,9 +52,7 @@ public interface DataStore { /** * Returns the unmodifiable set of all stored keys. * - *

            - * Order of the keys is not specified. - *

            + *

            Order of the keys is not specified. */ Set keySet() throws IOException; diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java index 502a4c213..5d62b258c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java @@ -14,7 +14,6 @@ package com.google.api.client.util.store; - import java.io.IOException; import java.io.Serializable; @@ -22,19 +21,15 @@ * Factory for a store that manages serializable data, where the key is a string and the value is a * {@link Serializable} object. * - *

            - * Users should keep a single globally shared instance of the data store factory. Otherwise, some + *

            Users should keep a single globally shared instance of the data store factory. Otherwise, some * implementations may not share the internal copies of the data, and you'll end up with multiple * data stores by the same IDs, each living in a separate implementation. Some implementations may * also have some overhead, or may have caching implemented, and so multiple instances may defeat * that. Finally, have multiple instances may defeat the thread-safety guarantee for some * implementations. - *

            * - *

            - * Implementation should store the data in a persistent storage such as a database. Implementation - * should be thread-safe. Read the JavaDoc of the implementation for those details. - *

            + *

            Implementation should store the data in a persistent storage such as a database. + * Implementation should be thread-safe. Read the JavaDoc of the implementation for those details. * * @see MemoryDataStoreFactory * @see FileDataStoreFactory @@ -46,16 +41,13 @@ public interface DataStoreFactory { /** * Returns a type-specific data store based on the given unique ID. * - *

            - * If a data store by that ID does not already exist, it should be created now, stored for later - * access, and returned. Otherwise, if there is already a data store by that ID, it should be - * returned. The {@link DataStore#getId()} must match the {@code id} parameter from this method. - *

            + *

            If a data store by that ID does not already exist, it should be created now, stored for + * later access, and returned. Otherwise, if there is already a data store by that ID, it should + * be returned. The {@link DataStore#getId()} must match the {@code id} parameter from this + * method. * - *

            - * The ID must be at least 1 and at most 30 characters long, and must contain only alphanumeric or - * underscore characters. - *

            + *

            The ID must be at least 1 and at most 30 characters long, and must contain only alphanumeric + * or underscore characters. * * @param id unique ID to refer to typed data store * @param serializable type of the mapped value diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java b/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java index 9e5405c3d..23782cc96 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java @@ -14,7 +14,6 @@ package com.google.api.client.util.store; - import java.io.IOException; /** @@ -26,13 +25,11 @@ public final class DataStoreUtils { /** - * Returns a debug string for the given data store to be used as an implementation of - * {@link Object#toString()}. + * Returns a debug string for the given data store to be used as an implementation of {@link + * Object#toString()}. * - *

            - * Implementation iterates over {@link DataStore#keySet()}, calling {@link DataStore#get(String)} - * on each key. - *

            + *

            Implementation iterates over {@link DataStore#keySet()}, calling {@link + * DataStore#get(String)} on each key. * * @param dataStore data store * @return debug string @@ -56,6 +53,5 @@ public static String toString(DataStore dataStore) { } } - private DataStoreUtils() { - } + private DataStoreUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 229ac95e3..3ee9eb87b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -17,7 +17,6 @@ import com.google.api.client.util.IOUtils; import com.google.api.client.util.Maps; import com.google.api.client.util.Throwables; - import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -30,11 +29,9 @@ /** * Thread-safe file implementation of a credential store. * - *

            - * For security purposes, the file's permissions are set to be accessible only by the file's owner. - * Note that Java 1.5 does not support manipulating file permissions, and must be done manually or - * using the JNI. - *

            + *

            For security purposes, the file's permissions are set to be accessible only by the file's + * owner. Note that Java 1.5 does not support manipulating file permissions, and must be done + * manually or using the JNI. * * @since 1.16 * @author Yaniv Inbar @@ -46,9 +43,7 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory { /** Directory to store data. */ private final File dataDirectory; - /** - * @param dataDirectory data directory - */ + /** @param dataDirectory data directory */ public FileDataStoreFactory(File dataDirectory) throws IOException { dataDirectory = dataDirectory.getCanonicalFile(); this.dataDirectory = dataDirectory; @@ -144,8 +139,10 @@ static void setPermissionsToOwnerOnly(File file) throws IOException { // shouldn't reach this point, but just in case... throw new RuntimeException(cause); } catch (NoSuchMethodException exception) { - LOGGER.warning("Unable to set permissions for " + file - + ", likely because you are running a version of Java prior to 1.6"); + LOGGER.warning( + "Unable to set permissions for " + + file + + ", likely because you are running a version of Java prior to 1.6"); } catch (SecurityException exception) { // ignored } catch (IllegalAccessException exception) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java index f51cf2469..5b2fe9cad 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java @@ -14,17 +14,13 @@ package com.google.api.client.util.store; - - import java.io.IOException; import java.io.Serializable; /** * Thread-safe in-memory implementation of a data store factory. * - *

            - * For convenience, a default global instance is provided in {@link #getDefaultInstance()}. - *

            + *

            For convenience, a default global instance is provided in {@link #getDefaultInstance()}. * * @since 1.16 * @author Yaniv Inbar diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/package-info.java b/google-http-client/src/main/java/com/google/api/client/util/store/package-info.java index 2e9d65182..e05e7e478 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/package-info.java @@ -19,4 +19,3 @@ * @author Yaniv Inbar */ package com.google.api.client.util.store; - diff --git a/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java index 78269ae7b..93f3fa963 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java @@ -52,8 +52,6 @@ public void writeTo(OutputStream out) throws IOException { public boolean retrySupported() { return retrySupported; } - - } public void testRetrySupported() { diff --git a/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java b/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java index 5b3d62b71..a76081275 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java @@ -16,7 +16,6 @@ import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; - import junit.framework.TestCase; /** @@ -41,8 +40,9 @@ public void testConstructor() { public void testInitialize() throws Exception { BasicAuthentication auth = new BasicAuthentication(USERNAME, PASSWORD); HttpRequest request = - new MockHttpTransport().createRequestFactory().buildGetRequest( - HttpTesting.SIMPLE_GENERIC_URL); + new MockHttpTransport() + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); auth.intercept(request); assertEquals(AUTH_HEADER, request.getHeaders().getAuthorization()); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java index 501e9d70e..743fc75e1 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java @@ -14,7 +14,6 @@ package com.google.api.client.http; - import java.io.ByteArrayOutputStream; import java.io.IOException; import junit.framework.TestCase; diff --git a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java index fc9dc9bd1..5a0cb0494 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.NanoClock; - import junit.framework.TestCase; /** @@ -32,31 +31,39 @@ public ExponentialBackOffPolicyTest(String name) { public void testConstructor() { ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy(); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); assertEquals( ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, backOffPolicy.getMaxElapsedTimeMillis()); } public void testBuilder() { ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder().build(); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); assertEquals( ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + assertEquals( + ExponentialBackOffPolicy.DEFAULT_MAX_ELAPSED_TIME_MILLIS, backOffPolicy.getMaxElapsedTimeMillis()); int testInitialInterval = 1; @@ -65,13 +72,14 @@ public void testBuilder() { int testMaxInterval = 10; int testMaxElapsedTime = 900000; - backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); + backOffPolicy = + ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); @@ -87,13 +95,14 @@ public void testBackOff() throws Exception { int testMaxInterval = 5000; int testMaxElapsedTime = 900000; - ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); + ExponentialBackOffPolicy backOffPolicy = + ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); int[] expectedResults = {500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000}; for (int expected : expectedResults) { assertEquals(expected, backOffPolicy.getCurrentIntervalMillis()); @@ -110,8 +119,7 @@ static class MyNanoClock implements NanoClock { private int i = 0; private long startSeconds; - MyNanoClock() { - } + MyNanoClock() {} MyNanoClock(long startSeconds) { this.startSeconds = startSeconds; @@ -133,11 +141,12 @@ public void testBackOffOverflow() throws Exception { int testInitialInterval = Integer.MAX_VALUE / 2; double testMultiplier = 2.1; int testMaxInterval = Integer.MAX_VALUE; - ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder() - .setInitialIntervalMillis(testInitialInterval) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .build(); + ExponentialBackOffPolicy backOffPolicy = + ExponentialBackOffPolicy.builder() + .setInitialIntervalMillis(testInitialInterval) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .build(); backOffPolicy.getNextBackOffMillis(); // Assert that when an overflow is possible the current interval is set to the max interval. assertEquals(testMaxInterval, backOffPolicy.getCurrentIntervalMillis()); diff --git a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java index 8746a5c66..5ecd0f8e9 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java @@ -14,7 +14,6 @@ package com.google.api.client.http; - import com.google.api.client.testing.util.TestableByteArrayOutputStream; import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; @@ -29,8 +28,11 @@ */ public class GZipEncodingTest extends TestCase { - byte[] EXPECED_ZIPPED = new byte[] {31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, - -66, -14, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + byte[] EXPECED_ZIPPED = + new byte[] { + 31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; public void test() throws IOException { GZipEncoding encoding = new GZipEncoding(); diff --git a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java index f4a8b22a2..3ef972479 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java @@ -34,8 +34,7 @@ */ public class GenericUrlTest extends TestCase { - public GenericUrlTest() { - } + public GenericUrlTest() {} public GenericUrlTest(String name) { super(name); @@ -142,13 +141,11 @@ public void testParse_longPath() { } public static class TestUrl extends GenericUrl { - @Key - String foo; + @Key String foo; public String hidden; - public TestUrl() { - } + public TestUrl() {} public TestUrl(String encodedUrl) { super(encodedUrl); @@ -157,9 +154,13 @@ public TestUrl(String encodedUrl) { private static final String FULL = "https://user:%3Cpa&$w%40rd%3E@www.google.com:223/m8/feeds/contacts/" - + "someone=%23%25&%20%3F%3Co%3E%7B%7D@gmail.com/" - + "full?" + "foo=bar&" + "alt=json&" + "max-results=3&" + "prettyprint=true&" - + "q=Go%3D%23/%25%26%20?%3Co%3Egle#%3CD@WNL:ADING%3E"; + + "someone=%23%25&%20%3F%3Co%3E%7B%7D@gmail.com/" + + "full?" + + "foo=bar&" + + "alt=json&" + + "max-results=3&" + + "prettyprint=true&" + + "q=Go%3D%23/%25%26%20?%3Co%3Egle#%3CD@WNL:ADING%3E"; private static final List FULL_PARTS = Arrays.asList("", "m8", "feeds", "contacts", "someone=#%& ?{}@gmail.com", "full"); @@ -174,7 +175,9 @@ public void testBuild_full() { url.setPort(223); url.setPathParts(FULL_PARTS); url.set("alt", "json") - .set("max-results", 3).set("prettyprint", true).set("q", "Go=#/%& ?gle"); + .set("max-results", 3) + .set("prettyprint", true) + .set("q", "Go=#/%& ?gle"); url.foo = "bar"; url.hidden = "invisible"; url.setFragment(FRAGMENT); @@ -230,31 +233,23 @@ private void subtestFull(GenericUrl url) { public static class FieldTypesUrl extends GenericUrl { - @Key - Boolean B; + @Key Boolean B; - @Key - Double D; + @Key Double D; - @Key - Integer I; + @Key Integer I; - @Key - boolean b; + @Key boolean b; - @Key - double d; + @Key double d; - @Key - int i; + @Key int i; - @Key - String s; + @Key String s; String hidden; - FieldTypesUrl() { - } + FieldTypesUrl() {} FieldTypesUrl(String encodedUrl) { super(encodedUrl); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java index a5dd36538..7393ae318 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java @@ -33,11 +33,16 @@ public void testHandleResponse_retryFalse() throws IOException { } public void testHandleResponse_requiredFalse() throws IOException { - subsetHandleResponse(0, 0, true, new MockBackOff(), new BackOffRequired() { - public boolean isRequired(HttpResponse response) { - return false; - } - }); + subsetHandleResponse( + 0, + 0, + true, + new MockBackOff(), + new BackOffRequired() { + public boolean isRequired(HttpResponse response) { + return false; + } + }); } public void testHandleResponse_requiredTrue() throws IOException { @@ -52,8 +57,10 @@ private void subsetHandleResponse( throws IOException { // create the handler MockSleeper sleeper = new MockSleeper(); - HttpBackOffUnsuccessfulResponseHandler handler = new HttpBackOffUnsuccessfulResponseHandler( - backOff).setSleeper(sleeper).setBackOffRequired(backOffRequired); + HttpBackOffUnsuccessfulResponseHandler handler = + new HttpBackOffUnsuccessfulResponseHandler(backOff) + .setSleeper(sleeper) + .setBackOffRequired(backOffRequired); while (handler.handleResponse(null, null, retry)) { assertEquals(millis, sleeper.getLastMillis()); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java index 42fec080a..f353004a2 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java @@ -28,8 +28,11 @@ */ public class HttpEncodingStreamingContentTest extends TestCase { - byte[] EXPECED_ZIPPED = new byte[] {31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, - -66, -14, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + byte[] EXPECED_ZIPPED = + new byte[] { + 31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; public void test() throws IOException { GZipEncoding encoding = new GZipEncoding(); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java index 1112f5bc9..70f76cd32 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java @@ -34,8 +34,7 @@ */ public class HttpHeadersTest extends TestCase { - public HttpHeadersTest() { - } + public HttpHeadersTest() {} public HttpHeadersTest(String name) { super(name); @@ -50,29 +49,21 @@ public void testBasicAuthentication() { public static class MyHeaders extends HttpHeaders { - @Key - public String foo; + @Key public String foo; - @Key - Object objNum; + @Key Object objNum; - @Key - Object objList; + @Key Object objList; - @Key - long someLong; + @Key long someLong; - @Key - List list; + @Key List list; - @Key - String[] r; + @Key String[] r; - @Key - E value; + @Key E value; - @Key - E otherValue; + @Key E otherValue; } public void testSerializeHeaders() throws Exception { @@ -109,7 +100,8 @@ public void testSerializeHeaders() throws Exception { assertEquals(ImmutableList.of("b"), lowLevelRequest.getHeaderValues("a")); assertEquals(ImmutableList.of("VALUE"), lowLevelRequest.getHeaderValues("value")); assertEquals(ImmutableList.of("other"), lowLevelRequest.getHeaderValues("othervalue")); - assertEquals(ImmutableList.of(String.valueOf(Long.MAX_VALUE)), + assertEquals( + ImmutableList.of(String.valueOf(Long.MAX_VALUE)), lowLevelRequest.getHeaderValues("content-length")); HttpHeaders.serializeHeadersForMultipartRequests(myHeaders, null, null, writer); @@ -234,7 +226,8 @@ public void testHeaderStringValues() { assertEquals(ImmutableList.of("b"), myHeaders.getHeaderStringValues("a")); assertEquals(ImmutableList.of("VALUE"), myHeaders.getHeaderStringValues("value")); assertEquals(ImmutableList.of("other"), myHeaders.getHeaderStringValues("othervalue")); - assertEquals(ImmutableList.of(String.valueOf(Long.MAX_VALUE)), + assertEquals( + ImmutableList.of(String.valueOf(Long.MAX_VALUE)), myHeaders.getHeaderStringValues("content-length")); } @@ -244,8 +237,10 @@ public static class SlugHeaders extends HttpHeaders { } public void testParseAge() throws Exception { - MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse().setHeaderNames( - Arrays.asList("Age")).setHeaderValues(Arrays.asList("3456")); + MockLowLevelHttpResponse httpResponse = + new MockLowLevelHttpResponse() + .setHeaderNames(Arrays.asList("Age")) + .setHeaderValues(Arrays.asList("3456")); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.fromHttpResponse(httpResponse, null); @@ -253,9 +248,10 @@ public void testParseAge() throws Exception { } public void testFromHttpResponse_normalFlow() throws Exception { - MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse().setHeaderNames( - Arrays.asList("Content-Type", "Slug")) - .setHeaderValues(Arrays.asList("foo/bar", "123456789")); + MockLowLevelHttpResponse httpResponse = + new MockLowLevelHttpResponse() + .setHeaderNames(Arrays.asList("Content-Type", "Slug")) + .setHeaderValues(Arrays.asList("foo/bar", "123456789")); // Test the normal HttpHeaders class HttpHeaders httpHeaders = new HttpHeaders(); @@ -271,9 +267,10 @@ public void testFromHttpResponse_normalFlow() throws Exception { } public void testFromHttpResponse_doubleConvert() throws Exception { - MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse().setHeaderNames( - Arrays.asList("Content-Type", "Slug")) - .setHeaderValues(Arrays.asList("foo/bar", "123456789")); + MockLowLevelHttpResponse httpResponse = + new MockLowLevelHttpResponse() + .setHeaderNames(Arrays.asList("Content-Type", "Slug")) + .setHeaderValues(Arrays.asList("foo/bar", "123456789")); // Test the normal HttpHeaders class SlugHeaders slugHeaders = new SlugHeaders(); @@ -291,21 +288,24 @@ public void testFromHttpResponse_doubleConvert() throws Exception { public void testFromHttpResponse_clearOldValue() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.put("Foo", "oldValue"); - headers.fromHttpResponse(new MockLowLevelHttpResponse().setHeaderNames(Arrays.asList("Foo")) - .setHeaderValues(Arrays.asList("newvalue")), null); + headers.fromHttpResponse( + new MockLowLevelHttpResponse() + .setHeaderNames(Arrays.asList("Foo")) + .setHeaderValues(Arrays.asList("newvalue")), + null); assertEquals(Arrays.asList("newvalue"), headers.get("Foo")); } public static class V extends HttpHeaders { - @Key - Void v; - @Key - String s; + @Key Void v; + @Key String s; } public void testFromHttpResponse_void(String value) throws Exception { - MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse().setHeaderNames( - Arrays.asList("v", "v", "s")).setHeaderValues(Arrays.asList("ignore", "ignore2", "svalue")); + MockLowLevelHttpResponse httpResponse = + new MockLowLevelHttpResponse() + .setHeaderNames(Arrays.asList("v", "v", "s")) + .setHeaderValues(Arrays.asList("ignore", "ignore2", "svalue")); V v = new V(); v.fromHttpResponse(httpResponse, null); assertNull(v.v); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java index 80765d409..91342a144 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java @@ -76,7 +76,8 @@ public void testFromString_null() { try { new HttpMediaType(null); fail("Method did not NullPointerException"); - } catch (NullPointerException expected) {} + } catch (NullPointerException expected) { + } } public void testFromString_multipartSpec() { @@ -109,7 +110,8 @@ public void testSetMainType_invalid() { try { new HttpMediaType("text", "plain").setType("foo/bar"); fail("Method did not throw IllegalArgumentException"); - } catch (IllegalArgumentException expected) {} + } catch (IllegalArgumentException expected) { + } } public void testSetSubType() { @@ -120,7 +122,8 @@ public void testSetSubType_invalid() { try { new HttpMediaType("text", "plain").setSubType("foo/bar"); fail("Method did not throw IllegalArgumentException"); - } catch (IllegalArgumentException expected) {} + } catch (IllegalArgumentException expected) { + } } public void testSetParameter_casing() { @@ -169,10 +172,14 @@ public void testCharset() { } public void testEqualsIgnoreParameters() { - assertEquals(true, new HttpMediaType("foo/bar").equalsIgnoreParameters(new HttpMediaType("Foo/bar"))); - assertEquals(true, new HttpMediaType("foo/bar").equalsIgnoreParameters( - new HttpMediaType("foo/bar; charset=utf-8"))); - assertEquals(false, new HttpMediaType("foo/bar").equalsIgnoreParameters(new HttpMediaType("bar/foo"))); + assertEquals( + true, new HttpMediaType("foo/bar").equalsIgnoreParameters(new HttpMediaType("Foo/bar"))); + assertEquals( + true, + new HttpMediaType("foo/bar") + .equalsIgnoreParameters(new HttpMediaType("foo/bar; charset=utf-8"))); + assertEquals( + false, new HttpMediaType("foo/bar").equalsIgnoreParameters(new HttpMediaType("bar/foo"))); assertEquals(false, new HttpMediaType("foo/bar").equalsIgnoreParameters(null)); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index fc0e016ba..946f5961f 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -100,6 +100,7 @@ public void testNotSupportedByDefault() throws Exception { static class MockExecutor implements Executor { private Runnable runnable; + public void actuallyRun() { runnable.run(); } @@ -110,14 +111,13 @@ public void execute(Runnable command) { } @Deprecated - static private class MockBackOffPolicy implements BackOffPolicy { + private static class MockBackOffPolicy implements BackOffPolicy { int backOffCalls; int resetCalls; boolean returnBackOffStop; - MockBackOffPolicy() { - } + MockBackOffPolicy() {} public boolean isBackOffRequired(int statusCode) { switch (statusCode) { @@ -142,9 +142,7 @@ public long getNextBackOffMillis() { } } - /** - * Transport used for testing the redirection logic in HttpRequest. - */ + /** Transport used for testing the redirection logic in HttpRequest. */ static class RedirectTransport extends MockHttpTransport { int lowLevelExecCalls; @@ -154,31 +152,34 @@ static class RedirectTransport extends MockHttpTransport { int redirectStatusCode = HttpStatusCodes.STATUS_CODE_MOVED_PERMANENTLY; String[] expectedContent; - LowLevelHttpRequest retryableGetRequest = new MockLowLevelHttpRequest() { + LowLevelHttpRequest retryableGetRequest = + new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() throws IOException { - if (expectedContent != null) { - assertEquals(String.valueOf(lowLevelExecCalls), expectedContent[lowLevelExecCalls], - getContentAsString()); - } - lowLevelExecCalls++; - if (infiniteRedirection || lowLevelExecCalls == 1) { - // Return redirect on only the first call. - // If infiniteRedirection is true then always return the redirect status code. - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setStatusCode(redirectStatusCode); - if (!removeLocation) { - response.addHeader("Location", HttpTesting.SIMPLE_URL); + @Override + public LowLevelHttpResponse execute() throws IOException { + if (expectedContent != null) { + assertEquals( + String.valueOf(lowLevelExecCalls), + expectedContent[lowLevelExecCalls], + getContentAsString()); + } + lowLevelExecCalls++; + if (infiniteRedirection || lowLevelExecCalls == 1) { + // Return redirect on only the first call. + // If infiniteRedirection is true then always return the redirect status code. + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setStatusCode(redirectStatusCode); + if (!removeLocation) { + response.addHeader("Location", HttpTesting.SIMPLE_URL); + } + return response; + } + // Return success on the second if infiniteRedirection is False. + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setContent("{\"data\":{\"foo\":{\"v1\":{}}}}"); + return response; } - return response; - } - // Return success on the second if infiniteRedirection is False. - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setContent("{\"data\":{\"foo\":{\"v1\":{}}}}"); - return response; - } - }; + }; @Override public LowLevelHttpRequest buildRequest(String method, String url) { @@ -190,13 +191,15 @@ private void setBackOffUnsuccessfulResponseHandler( HttpRequest request, BackOff backOff, final HttpUnsuccessfulResponseHandler handler) { final HttpBackOffUnsuccessfulResponseHandler backOffHandler = new HttpBackOffUnsuccessfulResponseHandler(backOff).setSleeper(new MockSleeper()); - request.setUnsuccessfulResponseHandler(new HttpUnsuccessfulResponseHandler() { - public boolean handleResponse( - HttpRequest request, HttpResponse response, boolean supportsRetry) throws IOException { - return handler.handleResponse(request, response, supportsRetry) - || backOffHandler.handleResponse(request, response, supportsRetry); - } - }); + request.setUnsuccessfulResponseHandler( + new HttpUnsuccessfulResponseHandler() { + public boolean handleResponse( + HttpRequest request, HttpResponse response, boolean supportsRetry) + throws IOException { + return handler.handleResponse(request, response, supportsRetry) + || backOffHandler.handleResponse(request, response, supportsRetry); + } + }); } public void test301Redirect() throws Exception { @@ -308,8 +311,11 @@ public void test303Redirect() throws Exception { fakeTransport.redirectStatusCode = HttpStatusCodes.STATUS_CODE_SEE_OTHER; byte[] content = new byte[300]; Arrays.fill(content, (byte) ' '); - HttpRequest request = fakeTransport.createRequestFactory() - .buildPostRequest(new GenericUrl("http://gmail.com"), new ByteArrayContent(null, content)); + HttpRequest request = + fakeTransport + .createRequestFactory() + .buildPostRequest( + new GenericUrl("http://gmail.com"), new ByteArrayContent(null, content)); request.setRequestMethod(HttpMethods.POST); HttpResponse resp = request.execute(); @@ -353,7 +359,7 @@ public void testMissingLocationRedirect() throws Exception { Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); } - static private class FailThenSuccessBackoffTransport extends MockHttpTransport { + private static class FailThenSuccessBackoffTransport extends MockHttpTransport { public int lowLevelExecCalls; int errorStatusCode; @@ -364,26 +370,27 @@ protected FailThenSuccessBackoffTransport(int errorStatusCode, int callsBeforeSu this.callsBeforeSuccess = callsBeforeSuccess; } - public LowLevelHttpRequest retryableGetRequest = new MockLowLevelHttpRequest() { + public LowLevelHttpRequest retryableGetRequest = + new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() { - lowLevelExecCalls++; - - if (lowLevelExecCalls <= callsBeforeSuccess) { - // Return failure on the first call - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setContent("INVALID TOKEN"); - response.setStatusCode(errorStatusCode); - return response; - } - // Return success on the second - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setContent("{\"data\":{\"foo\":{\"v1\":{}}}}"); - response.setStatusCode(200); - return response; - } - }; + @Override + public LowLevelHttpResponse execute() { + lowLevelExecCalls++; + + if (lowLevelExecCalls <= callsBeforeSuccess) { + // Return failure on the first call + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setContent("INVALID TOKEN"); + response.setStatusCode(errorStatusCode); + return response; + } + // Return success on the second + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setContent("{\"data\":{\"foo\":{\"v1\":{}}}}"); + response.setStatusCode(200); + return response; + } + }; @Override public LowLevelHttpRequest buildRequest(String method, String url) { @@ -391,7 +398,7 @@ public LowLevelHttpRequest buildRequest(String method, String url) { } } - static private class FailThenSuccessConnectionErrorTransport extends MockHttpTransport { + private static class FailThenSuccessConnectionErrorTransport extends MockHttpTransport { public int lowLevelExecCalls; int callsBeforeSuccess; @@ -423,22 +430,22 @@ public LowLevelHttpResponse execute() throws IOException { } } - static private class StatusCodesTransport extends MockHttpTransport { + private static class StatusCodesTransport extends MockHttpTransport { int statusCode = 200; - public StatusCodesTransport() { - } + public StatusCodesTransport() {} - public MockLowLevelHttpRequest retryableGetRequest = new MockLowLevelHttpRequest() { + public MockLowLevelHttpRequest retryableGetRequest = + new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); - response.setStatusCode(statusCode); - return response; - } - }; + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.setStatusCode(statusCode); + return response; + } + }; @Override public LowLevelHttpRequest buildRequest(String method, String url) { @@ -724,8 +731,9 @@ public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { @Deprecated public void testBackOffMultipleCalls() throws Exception { int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); @@ -744,8 +752,9 @@ public void testBackOffMultipleCalls() throws Exception { public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); HttpRequest req = @@ -763,8 +772,9 @@ public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { @Deprecated public void testBackOffCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); @@ -786,8 +796,9 @@ public void testBackOffCallsBeyondRetryLimit() throws Exception { public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); HttpRequest req = @@ -851,8 +862,9 @@ public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Except @Deprecated public void testBackOffStop() throws Exception { int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); backOffPolicy.returnBackOffStop = true; @@ -876,8 +888,9 @@ public void testBackOffStop() throws Exception { public void testBackOffUnsucessfulResponseStop() throws Exception { int callsBeforeSuccess = 5; - FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport( - HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); + FailThenSuccessBackoffTransport fakeTransport = + new FailThenSuccessBackoffTransport( + HttpStatusCodes.STATUS_CODE_SERVER_ERROR, callsBeforeSuccess); MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); HttpRequest req = @@ -896,7 +909,6 @@ public void testBackOffUnsucessfulResponseStop() throws Exception { } public enum E { - @Value VALUE, @Value("other") @@ -905,26 +917,19 @@ public enum E { public static class MyHeaders extends HttpHeaders { - @Key - public String foo; + @Key public String foo; - @Key - Object objNum; + @Key Object objNum; - @Key - Object objList; + @Key Object objList; - @Key - List list; + @Key List list; - @Key - String[] r; + @Key String[] r; - @Key - E value; + @Key E value; - @Key - E otherValue; + @Key E otherValue; } public void testExecute_headerSerialization() throws Exception { @@ -942,12 +947,13 @@ public void testExecute_headerSerialization() throws Exception { myHeaders.otherValue = E.OTHER_VALUE; // execute request final MockLowLevelHttpRequest lowLevelRequest = new MockLowLevelHttpRequest(); - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return lowLevelRequest; - } - }; + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return lowLevelRequest; + } + }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); request.setHeaders(myHeaders); @@ -958,8 +964,8 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce assertEquals(ImmutableList.of("a2", "b2", "c2"), lowLevelRequest.getHeaderValues("objlist")); assertEquals(ImmutableList.of("a1", "a2"), lowLevelRequest.getHeaderValues("r")); assertTrue(lowLevelRequest.getHeaderValues("accept-encoding").isEmpty()); - assertEquals(ImmutableList.of("foo Google-HTTP-Java-Client/" - + HttpRequest.VERSION + " (gzip)"), + assertEquals( + ImmutableList.of("foo Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)"), lowLevelRequest.getHeaderValues("user-agent")); assertEquals(ImmutableList.of("b"), lowLevelRequest.getHeaderValues("a")); assertEquals(ImmutableList.of("VALUE"), lowLevelRequest.getHeaderValues("value")); @@ -998,9 +1004,14 @@ public LowLevelHttpResponse execute() throws IOException { MyTransport transport = new MyTransport(); byte[] content = new byte[300]; Arrays.fill(content, (byte) ' '); - HttpRequest request = transport.createRequestFactory().buildPostRequest( - HttpTesting.SIMPLE_GENERIC_URL, new ByteArrayContent( - new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), content)); + HttpRequest request = + transport + .createRequestFactory() + .buildPostRequest( + HttpTesting.SIMPLE_GENERIC_URL, + new ByteArrayContent( + new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), + content)); assertNull(request.getEncoding()); request.execute(); assertNull(request.getEncoding()); @@ -1037,8 +1048,11 @@ public LowLevelHttpResponse execute() throws IOException { // Create content of length 300. byte[] content = new byte[300]; Arrays.fill(content, (byte) ' '); - HttpRequest request = transport.createRequestFactory().buildPostRequest( - HttpTesting.SIMPLE_GENERIC_URL, new ByteArrayContent("text/html", content)); + HttpRequest request = + transport + .createRequestFactory() + .buildPostRequest( + HttpTesting.SIMPLE_GENERIC_URL, new ByteArrayContent("text/html", content)); // Assert logging is enabled by default. assertTrue(request.isLoggingEnabled()); @@ -1152,16 +1166,19 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce // expect that it redirected to new URL every time using the count assertEquals(HttpTesting.SIMPLE_URL + "_" + count, url); count++; - return new MockLowLevelHttpRequest().setResponse( - new MockLowLevelHttpResponse().setStatusCode( - HttpStatusCodes.STATUS_CODE_MOVED_PERMANENTLY) - .setHeaderNames(Arrays.asList("Location")) - .setHeaderValues(Arrays.asList(HttpTesting.SIMPLE_URL + "_" + count))); + return new MockLowLevelHttpRequest() + .setResponse( + new MockLowLevelHttpResponse() + .setStatusCode(HttpStatusCodes.STATUS_CODE_MOVED_PERMANENTLY) + .setHeaderNames(Arrays.asList("Location")) + .setHeaderValues(Arrays.asList(HttpTesting.SIMPLE_URL + "_" + count))); } } MyTransport transport = new MyTransport(); - HttpRequest request = transport.createRequestFactory() - .buildGetRequest(new GenericUrl(HttpTesting.SIMPLE_URL + "_" + transport.count)); + HttpRequest request = + transport + .createRequestFactory() + .buildGetRequest(new GenericUrl(HttpTesting.SIMPLE_URL + "_" + transport.count)); try { request.execute(); fail("expected " + HttpResponseException.class); @@ -1176,12 +1193,15 @@ public void testExecute_redirectWithIncorrectContentRetryableSetting() throws Ex String contentValue = "hello"; fakeTransport.expectedContent = new String[] {contentValue, ""}; byte[] bytes = StringUtils.getBytesUtf8(contentValue); - InputStreamContent content = new InputStreamContent( - new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), - new ByteArrayInputStream(bytes)); + InputStreamContent content = + new InputStreamContent( + new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), + new ByteArrayInputStream(bytes)); content.setRetrySupported(true); - HttpRequest request = fakeTransport.createRequestFactory() - .buildPostRequest(HttpTesting.SIMPLE_GENERIC_URL, content); + HttpRequest request = + fakeTransport + .createRequestFactory() + .buildPostRequest(HttpTesting.SIMPLE_GENERIC_URL, content); HttpResponse resp = request.execute(); assertEquals(200, resp.getStatusCode()); assertEquals(2, fakeTransport.lowLevelExecCalls); @@ -1191,15 +1211,20 @@ public void testExecute_curlLogger() throws Exception { LogRecordingHandler recorder = new LogRecordingHandler(); HttpTransport.LOGGER.setLevel(Level.CONFIG); HttpTransport.LOGGER.addHandler(recorder); - new MockHttpTransport().createRequestFactory() - .buildGetRequest(new GenericUrl("http://google.com/#q=a'b'c")).execute(); + new MockHttpTransport() + .createRequestFactory() + .buildGetRequest(new GenericUrl("http://google.com/#q=a'b'c")) + .execute(); boolean found = false; for (String message : recorder.messages()) { if (message.startsWith("curl")) { found = true; - assertEquals("curl -v --compressed -H 'Accept-Encoding: gzip' -H 'User-Agent: " - + "Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)" - + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'", + assertEquals( + "curl -v --compressed -H 'Accept-Encoding: gzip' -H 'User-Agent: " + + "Google-HTTP-Java-Client/" + + HttpRequest.VERSION + + " (gzip)" + + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'", message); } } @@ -1213,19 +1238,24 @@ public void testExecute_curlLoggerWithContentEncoding() throws Exception { String contentValue = "hello"; byte[] bytes = StringUtils.getBytesUtf8(contentValue); - InputStreamContent content = new InputStreamContent( - new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), - new ByteArrayInputStream(bytes)); + InputStreamContent content = + new InputStreamContent( + new HttpMediaType("text/plain").setCharsetParameter(Charsets.UTF_8).build(), + new ByteArrayInputStream(bytes)); - new MockHttpTransport().createRequestFactory() + new MockHttpTransport() + .createRequestFactory() .buildPostRequest(new GenericUrl("http://google.com/#q=a'b'c"), content) - .setEncoding(new GZipEncoding()).execute(); + .setEncoding(new GZipEncoding()) + .execute(); boolean found = false; - final String expectedCurlLog = "curl -v --compressed -X POST -H 'Accept-Encoding: gzip' " - + "-H 'User-Agent: " + HttpRequest.USER_AGENT_SUFFIX - + "' -H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip' " - + "-d '@-' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c' << $$$"; + final String expectedCurlLog = + "curl -v --compressed -X POST -H 'Accept-Encoding: gzip' " + + "-H 'User-Agent: " + + HttpRequest.USER_AGENT_SUFFIX + + "' -H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip' " + + "-d '@-' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c' << $$$"; for (String message : recorder.messages()) { if (message.startsWith("curl")) { found = true; diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java index 627d70a00..4d651aecb 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java @@ -51,8 +51,10 @@ public void testConstructor() throws Exception { public void testBuilder() throws Exception { HttpHeaders headers = new HttpHeaders(); - Builder builder = new HttpResponseException.Builder(9, "statusMessage", headers).setMessage( - "message").setContent("content"); + Builder builder = + new HttpResponseException.Builder(9, "statusMessage", headers) + .setMessage("message") + .setContent("content"); assertEquals("message", builder.getMessage()); assertEquals("content", builder.getContent()); assertEquals(9, builder.getStatusCode()); @@ -67,19 +69,20 @@ public void testBuilder() throws Exception { } public void testConstructorWithStatusMessage() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setReasonPhrase("OK"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setReasonPhrase("OK"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -88,19 +91,20 @@ public LowLevelHttpResponse execute() throws IOException { } public void testConstructor_noStatusCode() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setStatusCode(0); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(0); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); try { @@ -112,20 +116,21 @@ public LowLevelHttpResponse execute() throws IOException { } public void testConstructor_messageButNoStatusCode() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setStatusCode(0); - result.setReasonPhrase("Foo"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(0); + result.setReasonPhrase("Foo"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); try { @@ -137,19 +142,20 @@ public LowLevelHttpResponse execute() throws IOException { } public void testComputeMessage() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setReasonPhrase("Foo"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setReasonPhrase("Foo"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -157,21 +163,22 @@ public LowLevelHttpResponse execute() throws IOException { } public void testThrown() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); - result.setReasonPhrase("Not Found"); - result.setContent("Unable to find resource"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); + result.setReasonPhrase("Not Found"); + result.setContent("Unable to find resource"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); try { @@ -184,58 +191,58 @@ public LowLevelHttpResponse execute() throws IOException { } public void testInvalidCharset() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); - result.setReasonPhrase("Not Found"); - result.setContentType("text/plain; charset="); - result.setContent("Unable to find resource"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); + result.setReasonPhrase("Not Found"); + result.setContentType("text/plain; charset="); + result.setContent("Unable to find resource"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); try { request.execute(); fail(); } catch (HttpResponseException e) { - assertEquals( - "404 Not Found", e.getMessage()); + assertEquals("404 Not Found", e.getMessage()); } } public void testUnsupportedCharset() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); - result.setReasonPhrase("Not Found"); - result.setContentType("text/plain; charset=invalid-charset"); - result.setContent("Unable to find resource"); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_NOT_FOUND); + result.setReasonPhrase("Not Found"); + result.setContentType("text/plain; charset=invalid-charset"); + result.setContent("Unable to find resource"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); try { request.execute(); fail(); } catch (HttpResponseException e) { - assertEquals( - "404 Not Found", e.getMessage()); + assertEquals("404 Not Found", e.getMessage()); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index 9a2bd43b6..7846778e5 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -39,8 +39,7 @@ */ public class HttpResponseTest extends TestCase { - public HttpResponseTest() { - } + public HttpResponseTest() {} public HttpResponseTest(String name) { super(name); @@ -58,20 +57,21 @@ public void testParseAsString_none() throws Exception { private static final String SAMPLE2 = "123abc"; public void testParseAsString_utf8() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContentType(Json.MEDIA_TYPE); - result.setContent(SAMPLE); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContentType(Json.MEDIA_TYPE); + result.setContent(SAMPLE); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -79,19 +79,20 @@ public LowLevelHttpResponse execute() throws IOException { } public void testParseAsString_noContentType() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContent(SAMPLE2); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(SAMPLE2); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -107,13 +108,14 @@ public void testStatusCode_negative_throwException() throws Exception { } private void subtestStatusCode_negative(boolean throwExceptionOnExecuteError) throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest().setResponse( - new MockLowLevelHttpResponse().setStatusCode(-1)); - } - }; + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() + .setResponse(new MockLowLevelHttpResponse().setStatusCode(-1)); + } + }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); request.setThrowExceptionOnExecuteError(throwExceptionOnExecuteError); @@ -131,40 +133,38 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce public static class MyHeaders extends HttpHeaders { - @Key - public String foo; + @Key public String foo; - @Key - public Object obj; + @Key public Object obj; - @Key - String[] r; + @Key String[] r; } static final String ETAG_VALUE = "\"abc\""; public void testHeaderParsing() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.addHeader("accept", "value"); - result.addHeader("foo", "bar"); - result.addHeader("goo", "car"); - result.addHeader("hoo", "dar"); - result.addHeader("hoo", "far"); - result.addHeader("obj", "o"); - result.addHeader("r", "a1"); - result.addHeader("r", "a2"); - result.addHeader("ETAG", ETAG_VALUE); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.addHeader("accept", "value"); + result.addHeader("foo", "bar"); + result.addHeader("goo", "car"); + result.addHeader("hoo", "dar"); + result.addHeader("hoo", "far"); + result.addHeader("obj", "o"); + result.addHeader("r", "a1"); + result.addHeader("r", "a2"); + result.addHeader("ETAG", ETAG_VALUE); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); request.setResponseHeaders(new MyHeaders()); @@ -180,8 +180,11 @@ public LowLevelHttpResponse execute() throws IOException { public void testParseAs_noParser() throws Exception { try { - new MockHttpTransport().createRequestFactory() - .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL).execute().parseAs(Object.class); + new MockHttpTransport() + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) + .execute() + .parseAs(Object.class); fail("expected " + NullPointerException.class); } catch (NullPointerException e) { // expected @@ -191,30 +194,36 @@ public void testParseAs_noParser() throws Exception { public void testParseAs_classNoContent() throws Exception { final MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - for (final int status : new int[] { - HttpStatusCodes.STATUS_CODE_NO_CONTENT, HttpStatusCodes.STATUS_CODE_NOT_MODIFIED, 102}) { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { - return new MockLowLevelHttpRequest() { + for (final int status : + new int[] { + HttpStatusCodes.STATUS_CODE_NO_CONTENT, HttpStatusCodes.STATUS_CODE_NOT_MODIFIED, 102 + }) { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - result.setStatusCode(status); - result.setContentType(null); - result.setContent(new ByteArrayInputStream(new byte[0])); - return result; + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + result.setStatusCode(status); + result.setContentType(null); + result.setContent(new ByteArrayInputStream(new byte[0])); + return result; + } + }; } }; - } - }; // Confirm that 'null' is returned when getting the response object of a // request with no message body. - Object parsed = transport.createRequestFactory() - .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) - .setThrowExceptionOnExecuteError(false) - .execute() - .parseAs(Object.class); + Object parsed = + transport + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) + .setThrowExceptionOnExecuteError(false) + .execute() + .parseAs(Object.class); assertNull(parsed); } } @@ -222,49 +231,56 @@ public LowLevelHttpResponse execute() throws IOException { public void testParseAs_typeNoContent() throws Exception { final MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - for (final int status : new int[] { - HttpStatusCodes.STATUS_CODE_NO_CONTENT, HttpStatusCodes.STATUS_CODE_NOT_MODIFIED, 102}) { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { - return new MockLowLevelHttpRequest() { + for (final int status : + new int[] { + HttpStatusCodes.STATUS_CODE_NO_CONTENT, HttpStatusCodes.STATUS_CODE_NOT_MODIFIED, 102 + }) { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - result.setStatusCode(status); - result.setContentType(null); - result.setContent(new ByteArrayInputStream(new byte[0])); - return result; + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + result.setStatusCode(status); + result.setContentType(null); + result.setContent(new ByteArrayInputStream(new byte[0])); + return result; + } + }; } }; - } - }; // Confirm that 'null' is returned when getting the response object of a // request with no message body. - Object parsed = transport.createRequestFactory() - .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) - .setThrowExceptionOnExecuteError(false) - .execute() - .parseAs((Type) Object.class); + Object parsed = + transport + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) + .setThrowExceptionOnExecuteError(false) + .execute() + .parseAs((Type) Object.class); assertNull(parsed); } } public void testDownload() throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContentType(Json.MEDIA_TYPE); - result.setContent(SAMPLE); - return result; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContentType(Json.MEDIA_TYPE); + result.setContent(SAMPLE); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -274,22 +290,22 @@ public LowLevelHttpResponse execute() throws IOException { } public void testDisconnectWithContent() throws Exception { - final MockLowLevelHttpResponse lowLevelHttpResponse = - new MockLowLevelHttpResponse(); + final MockLowLevelHttpResponse lowLevelHttpResponse = new MockLowLevelHttpResponse(); - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - lowLevelHttpResponse.setContentType(Json.MEDIA_TYPE); - lowLevelHttpResponse.setContent(SAMPLE); - return lowLevelHttpResponse; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + lowLevelHttpResponse.setContentType(Json.MEDIA_TYPE); + lowLevelHttpResponse.setContent(SAMPLE); + return lowLevelHttpResponse; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -304,20 +320,20 @@ public LowLevelHttpResponse execute() throws IOException { } public void testDisconnectWithNoContent() throws Exception { - final MockLowLevelHttpResponse lowLevelHttpResponse = - new MockLowLevelHttpResponse(); + final MockLowLevelHttpResponse lowLevelHttpResponse = new MockLowLevelHttpResponse(); - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - return lowLevelHttpResponse; + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + return lowLevelHttpResponse; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); @@ -346,26 +362,38 @@ public void testContentLoggingLimitWithLoggingEnabledAndDisabled() throws Except Arrays.fill(a, 'x'); String big = new String(a); String formated18kInteger = NumberFormat.getInstance().format(18000); - subtestContentLoggingLimit(big, Integer.MAX_VALUE, true, String.format("Total: %s bytes", formated18kInteger), big); - subtestContentLoggingLimit(big, 4, true, String.format("Total: %s bytes (logging first 4 bytes)", formated18kInteger), "xxxx"); + subtestContentLoggingLimit( + big, Integer.MAX_VALUE, true, String.format("Total: %s bytes", formated18kInteger), big); + subtestContentLoggingLimit( + big, + 4, + true, + String.format("Total: %s bytes (logging first 4 bytes)", formated18kInteger), + "xxxx"); } - public void subtestContentLoggingLimit(final String content, int contentLoggingLimit, - boolean loggingEnabled, String... expectedMessages) throws Exception { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { - return new MockLowLevelHttpRequest() { + public void subtestContentLoggingLimit( + final String content, + int contentLoggingLimit, + boolean loggingEnabled, + String... expectedMessages) + throws Exception { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContent(content); - result.setContentType("text/plain"); - return result; + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(content); + result.setContentType("text/plain"); + return result; + } + }; } }; - } - }; HttpTransport.LOGGER.setLevel(Level.CONFIG); HttpRequest request = @@ -382,45 +410,51 @@ public LowLevelHttpResponse execute() throws IOException { } public void testGetContent_gzipNoContent() throws IOException { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContent(""); - result.setContentEncoding("gzip"); - result.setContentType("text/plain"); - return result; + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(""); + result.setContentEncoding("gzip"); + result.setContentType("text/plain"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); request.execute().getContent(); } public void testGetContent_gzipEncoding_ReturnRawStream() throws IOException { - HttpTransport transport = new MockHttpTransport() { - @Override - public LowLevelHttpRequest buildRequest(String method, final String url) throws IOException { - return new MockLowLevelHttpRequest() { + HttpTransport transport = + new MockHttpTransport() { @Override - public LowLevelHttpResponse execute() throws IOException { - MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); - result.setContent(""); - result.setContentEncoding("gzip"); - result.setContentType("text/plain"); - return result; + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(""); + result.setContentEncoding("gzip"); + result.setContentType("text/plain"); + return result; + } + }; } }; - } - }; HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); request.setResponseReturnRawInputStream(true); - assertFalse("it should not decompress stream", request.execute().getContent() instanceof GZIPInputStream); + assertFalse( + "it should not decompress stream", + request.execute().getContent() instanceof GZIPInputStream); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java index fd6c08b4b..76f725b61 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java @@ -28,19 +28,56 @@ public class MultipartContentTest extends TestCase { private static final String CRLF = "\r\n"; private static final String CONTENT_TYPE = Json.MEDIA_TYPE; - private static final String HEADERS = "Content-Length: 3" + CRLF - + "Content-Type: application/json; charset=UTF-8" + CRLF + "content-transfer-encoding: binary" - + CRLF; + private static final String HEADERS = + "Content-Length: 3" + + CRLF + + "Content-Type: application/json; charset=UTF-8" + + CRLF + + "content-transfer-encoding: binary" + + CRLF; public void testContent() throws Exception { subtestContent("--__END_OF_PART__--" + CRLF, null); subtestContent( "--__END_OF_PART__" + CRLF + HEADERS + CRLF + "foo" + CRLF + "--__END_OF_PART__--" + CRLF, - null, "foo"); - subtestContent("--__END_OF_PART__" + CRLF + HEADERS + CRLF + "foo" + CRLF + "--__END_OF_PART__" - + CRLF + HEADERS + CRLF + "bar" + CRLF + "--__END_OF_PART__--" + CRLF, null, "foo", "bar"); - subtestContent("--myboundary" + CRLF + HEADERS + CRLF + "foo" + CRLF + "--myboundary" + CRLF - + HEADERS + CRLF + "bar" + CRLF + "--myboundary--" + CRLF, "myboundary", "foo", "bar"); + null, + "foo"); + subtestContent( + "--__END_OF_PART__" + + CRLF + + HEADERS + + CRLF + + "foo" + + CRLF + + "--__END_OF_PART__" + + CRLF + + HEADERS + + CRLF + + "bar" + + CRLF + + "--__END_OF_PART__--" + + CRLF, + null, + "foo", + "bar"); + subtestContent( + "--myboundary" + + CRLF + + HEADERS + + CRLF + + "foo" + + CRLF + + "--myboundary" + + CRLF + + HEADERS + + CRLF + + "bar" + + CRLF + + "--myboundary--" + + CRLF, + "myboundary", + "foo", + "bar"); } private void subtestContent(String expectedContent, String boundaryString, String... contents) @@ -59,7 +96,10 @@ private void subtestContent(String expectedContent, String boundaryString, Strin content.writeTo(out); assertEquals(expectedContent, out.toString()); assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); - assertEquals(boundaryString == null ? "multipart/related; boundary=__END_OF_PART__" : - "multipart/related; boundary=" + boundaryString, content.getType()); + assertEquals( + boundaryString == null + ? "multipart/related; boundary=__END_OF_PART__" + : "multipart/related; boundary=" + boundaryString, + content.getType()); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java index d88f34d6a..8fa8624eb 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java @@ -14,12 +14,11 @@ package com.google.api.client.http; -import com.google.api.client.http.HttpHeaders; -import io.opencensus.trace.BlankSpan; -import io.opencensus.trace.EndSpanOptions; import io.opencensus.trace.Annotation; import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.BlankSpan; +import io.opencensus.trace.EndSpanOptions; import io.opencensus.trace.Link; import io.opencensus.trace.MessageEvent; import io.opencensus.trace.Span; @@ -52,49 +51,52 @@ public OpenCensusUtilsTest(String testName) { @Override public void setUp() { - mockTextFormat = new TextFormat() { - @Override - public List fields() { - throw new UnsupportedOperationException("TextFormat.fields"); - } - - @Override - public void inject(SpanContext spanContext, C carrier, Setter setter) { - throw new UnsupportedOperationException("TextFormat.inject"); - } - - @Override - public SpanContext extract(C carrier, Getter getter) { - throw new UnsupportedOperationException("TextFormat.extract"); - } - }; - mockTextFormatSetter = new TextFormat.Setter() { - @Override - public void put(HttpHeaders carrier, String key, String value) { - throw new UnsupportedOperationException("TextFormat.Setter.put"); - } - }; + mockTextFormat = + new TextFormat() { + @Override + public List fields() { + throw new UnsupportedOperationException("TextFormat.fields"); + } + + @Override + public void inject(SpanContext spanContext, C carrier, Setter setter) { + throw new UnsupportedOperationException("TextFormat.inject"); + } + + @Override + public SpanContext extract(C carrier, Getter getter) { + throw new UnsupportedOperationException("TextFormat.extract"); + } + }; + mockTextFormatSetter = + new TextFormat.Setter() { + @Override + public void put(HttpHeaders carrier, String key, String value) { + throw new UnsupportedOperationException("TextFormat.Setter.put"); + } + }; headers = new HttpHeaders(); tracer = OpenCensusUtils.getTracer(); - mockSpan = new Span(tracer.getCurrentSpan().getContext(), null) { + mockSpan = + new Span(tracer.getCurrentSpan().getContext(), null) { - @Override - public void addAnnotation(String description, Map attributes) {} + @Override + public void addAnnotation(String description, Map attributes) {} - @Override - public void addAnnotation(Annotation annotation) {} + @Override + public void addAnnotation(Annotation annotation) {} - @Override - public void addMessageEvent(MessageEvent event) { - throw new UnsupportedOperationException("Span.addMessageEvent"); - } + @Override + public void addMessageEvent(MessageEvent event) { + throw new UnsupportedOperationException("Span.addMessageEvent"); + } - @Override - public void addLink(Link link) {} + @Override + public void addLink(Link link) {} - @Override - public void end(EndSpanOptions options) {} - }; + @Override + public void end(EndSpanOptions options) {} + }; originTextFormat = OpenCensusUtils.propagationTextFormat; originTextFormatSetter = OpenCensusUtils.propagationTextFormatSetter; } @@ -200,7 +202,8 @@ public void testGetEndSpanOptionsNotFound() { } public void testGetEndSpanOptionsPreconditionFailed() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.FAILED_PRECONDITION).build(); + EndSpanOptions expected = + EndSpanOptions.builder().setStatus(Status.FAILED_PRECONDITION).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(412)); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java index fea7d8cbe..53376c389 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java @@ -48,7 +48,8 @@ public void testExpandTemplates_basic() { // Assert with addUnusedParamsAsQueryParams = false. assertEquals("foo/xyz/bar/123", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, false)); // Assert with addUnusedParamsAsQueryParams = true. - assertEquals("foo/xyz/bar/123?unused=unused%20parameter", + assertEquals( + "foo/xyz/bar/123?unused=unused%20parameter", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, true)); // Assert the map has not changed. assertEquals(3, requestMap.size()); @@ -68,8 +69,8 @@ public void testExpandTemplates_noExpansionsWithQueryParams() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); requestMap.put("def", "123"); - assertEquals("foo/xyz/bar/123?abc=xyz&def=123", - UriTemplate.expand("foo/xyz/bar/123", requestMap, true)); + assertEquals( + "foo/xyz/bar/123?abc=xyz&def=123", UriTemplate.expand("foo/xyz/bar/123", requestMap, true)); } public void testExpandTemplates_noExpansionsWithoutQueryParams() { @@ -104,22 +105,22 @@ private Iterable getListIterable() { // template, expected output. private static final String[][] LIST_TESTS = { - {"{d}", "red,green,blue"}, - {"{d*}", "red,green,blue"}, - {"{+d}", "red,green,blue"}, - {"{+d*}", "red,green,blue"}, - {"{#d}", "#red,green,blue"}, - {"{#d*}", "#red,green,blue"}, - {"X{.d}", "X.red,green,blue"}, - {"X{.d*}", "X.red.green.blue"}, - {"{/d}", "/red,green,blue"}, - {"{/d*}", "/red/green/blue"}, - {"{;d}", ";d=red,green,blue"}, - {"{;d*}", ";d=red;d=green;d=blue"}, - {"{?d}", "?d=red,green,blue"}, - {"{?d*}", "?d=red&d=green&d=blue"}, - {"{&d}", "&d=red,green,blue"}, - {"{&d*}", "&d=red&d=green&d=blue"}, + {"{d}", "red,green,blue"}, + {"{d*}", "red,green,blue"}, + {"{+d}", "red,green,blue"}, + {"{+d*}", "red,green,blue"}, + {"{#d}", "#red,green,blue"}, + {"{#d*}", "#red,green,blue"}, + {"X{.d}", "X.red,green,blue"}, + {"X{.d*}", "X.red.green.blue"}, + {"{/d}", "/red,green,blue"}, + {"{/d*}", "/red/green/blue"}, + {"{;d}", ";d=red,green,blue"}, + {"{;d*}", ";d=red;d=green;d=blue"}, + {"{?d}", "?d=red,green,blue"}, + {"{?d*}", "?d=red&d=green&d=blue"}, + {"{&d}", "&d=red,green,blue"}, + {"{&d*}", "&d=red&d=green&d=blue"}, }; public void testExpandTemplates_explodeIterator() { @@ -172,22 +173,22 @@ private Map getMapParams() { // template, expected output. private static final String[][] MAP_TESTS = { - {"{d}", "semi,%3B,dot,.,comma,%2C"}, - {"{d*}", "semi=%3B,dot=.,comma=%2C"}, - {"{+d}", "semi,;,dot,.,comma,,"}, - {"{+d*}", "semi=;,dot=.,comma=,"}, - {"{#d}", "#semi,;,dot,.,comma,,"}, - {"{#d*}", "#semi=;,dot=.,comma=,"}, - {"X{.d}", "X.semi,%3B,dot,.,comma,%2C"}, - {"X{.d*}", "X.semi=%3B.dot=..comma=%2C"}, - {"{/d}", "/semi,%3B,dot,.,comma,%2C"}, - {"{/d*}", "/semi=%3B/dot=./comma=%2C"}, - {"{;d}", ";d=semi,%3B,dot,.,comma,%2C"}, - {"{;d*}", ";semi=%3B;dot=.;comma=%2C"}, - {"{?d}", "?d=semi,%3B,dot,.,comma,%2C"}, - {"{?d*}", "?semi=%3B&dot=.&comma=%2C"}, - {"{&d}", "&d=semi,%3B,dot,.,comma,%2C"}, - {"{&d*}", "&semi=%3B&dot=.&comma=%2C"}, + {"{d}", "semi,%3B,dot,.,comma,%2C"}, + {"{d*}", "semi=%3B,dot=.,comma=%2C"}, + {"{+d}", "semi,;,dot,.,comma,,"}, + {"{+d*}", "semi=;,dot=.,comma=,"}, + {"{#d}", "#semi,;,dot,.,comma,,"}, + {"{#d*}", "#semi=;,dot=.,comma=,"}, + {"X{.d}", "X.semi,%3B,dot,.,comma,%2C"}, + {"X{.d*}", "X.semi=%3B.dot=..comma=%2C"}, + {"{/d}", "/semi,%3B,dot,.,comma,%2C"}, + {"{/d*}", "/semi=%3B/dot=./comma=%2C"}, + {"{;d}", ";d=semi,%3B,dot,.,comma,%2C"}, + {"{;d*}", ";semi=%3B;dot=.;comma=%2C"}, + {"{?d}", "?d=semi,%3B,dot,.,comma,%2C"}, + {"{?d*}", "?semi=%3B&dot=.&comma=%2C"}, + {"{&d}", "&d=semi,%3B,dot,.,comma,%2C"}, + {"{&d*}", "&semi=%3B&dot=.&comma=%2C"}, }; public void testExpandTemplates_explodeMap() { @@ -210,7 +211,8 @@ public void testExpandTemplates_unusedQueryParametersEncoding() { requestMap.put("unused1", "abc!1234?"); requestMap.put("unused2", "56$7 8"); requestMap.put("unused3", "9=&/:@."); - assertEquals("?unused1=abc!1234?&unused2=56$7%208&unused3=9%3D%26/:@.", + assertEquals( + "?unused1=abc!1234?&unused2=56$7%208&unused3=9%3D%26/:@.", UriTemplate.expand("", requestMap, true)); } @@ -223,7 +225,8 @@ public void testExpandTemplates_unusedListQueryParameters() { requestMap.put("unused1", params); requestMap.put("unused2", "56$7 8"); requestMap.put("unused3", "9=&/:@."); - assertEquals("?unused1=value1&unused1=value2&unused2=56$7%208&unused3=9%3D%26/:@.", + assertEquals( + "?unused1=value1&unused1=value2&unused2=56$7%208&unused3=9%3D%26/:@.", UriTemplate.expand("", requestMap, true)); } @@ -243,7 +246,7 @@ public void testExpandTemplates_mixedBagParameters() { requestMap.put("unused2", "unused=param"); assertEquals( "foo/xyz/red/green/blue&iterable=red&iterable=green&iterable=blue&map=semi,%3B,dot,.,comma" - + ",%2C&enum=ONE?unused1=unused%20param&unused2=unused%3Dparam", + + ",%2C&enum=ONE?unused1=unused%20param&unused2=unused%3Dparam", UriTemplate.expand("foo/{abc}{/iterator*}{&iterable*}{&map}{&enum}", requestMap, true)); // Assert the map has not changed. assertEquals(7, requestMap.size()); @@ -261,32 +264,36 @@ public void testExpandTemplates_withBaseUrl() { requestMap.put("def", "123"); // Expand with URI template not starting with "/". - assertEquals("https://test/base/path/xyz/123/bar/", + assertEquals( + "https://test/base/path/xyz/123/bar/", UriTemplate.expand("https://test/base/path/", "{abc}/{def}/bar/", requestMap, true)); // Expand with URI template starting with "/". - assertEquals("https://test/xyz/123/bar/", + assertEquals( + "https://test/xyz/123/bar/", UriTemplate.expand("https://test/base/path/", "/{abc}/{def}/bar/", requestMap, true)); // Expand with URI template as a full URL. - assertEquals("http://test3/xyz/123/bar/", UriTemplate.expand("https://test/base/path/", - "http://test3/{abc}/{def}/bar/", requestMap, true)); + assertEquals( + "http://test3/xyz/123/bar/", + UriTemplate.expand( + "https://test/base/path/", "http://test3/{abc}/{def}/bar/", requestMap, true)); } public void testExpandNonReservedNonComposite() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); requestMap.put("def", "a/b?c"); - assertEquals("foo/xyz/bar/a%2Fb%3Fc", - UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, false)); - assertEquals("foo/xyz/bar/a/b?c", - UriTemplate.expand("foo/{abc}/bar/{+def}", requestMap, false)); + assertEquals( + "foo/xyz/bar/a%2Fb%3Fc", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, false)); + assertEquals( + "foo/xyz/bar/a/b?c", UriTemplate.expand("foo/{abc}/bar/{+def}", requestMap, false)); } public void testExpandSeveralTemplates() { - SortedMap map = Maps.newTreeMap(); - map.put("id", "a"); - map.put("uid", "b"); + SortedMap map = Maps.newTreeMap(); + map.put("id", "a"); + map.put("uid", "b"); - assertEquals("?id=a&uid=b", UriTemplate.expand("{?id,uid}", map, false)); + assertEquals("?id=a&uid=b", UriTemplate.expand("{?id,uid}", map, false)); } public void testExpandSeveralTemplatesUnusedParameterInMiddle() { diff --git a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java index 76e768404..f0e0768a9 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java @@ -35,10 +35,8 @@ public class UrlEncodedContentTest extends TestCase { public void testWriteTo() throws IOException { subtestWriteTo("a=x", ArrayMap.of("a", "x")); subtestWriteTo("noval", ArrayMap.of("noval", "")); - subtestWriteTo( - "multi=a&multi=b&multi=c", ArrayMap.of("multi", Arrays.asList("a", "b", "c"))); - subtestWriteTo( - "multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"})); + subtestWriteTo("multi=a&multi=b&multi=c", ArrayMap.of("multi", Arrays.asList("a", "b", "c"))); + subtestWriteTo("multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"})); // https://github.com/googleapis/google-http-java-client/issues/202 final Map params = new LinkedHashMap(); params.put("username", "un"); @@ -54,8 +52,10 @@ private void subtestWriteTo(String expected, Object data) throws IOException { } public void testGetContent() throws Exception { - HttpRequest request = new MockHttpTransport().createRequestFactory() - .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = + new MockHttpTransport() + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); UrlEncodedContent content = UrlEncodedContent.getContent(request); assertNotNull(content); assertTrue(content.getData() instanceof Map); diff --git a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java index 7659e4551..e61799777 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java @@ -34,8 +34,7 @@ */ public class UrlEncodedParserTest extends TestCase { - public UrlEncodedParserTest() { - } + public UrlEncodedParserTest() {} public UrlEncodedParserTest(String name) { super(name); @@ -43,36 +42,32 @@ public UrlEncodedParserTest(String name) { public static class Simple { - @Key - Void v; + @Key Void v; - @Key - String a; + @Key String a; - @Key - String b; + @Key String b; - @Key - String c; + @Key String c; - @Key - List q; + @Key List q; - @Key - String[] r; + @Key String[] r; - @Key - Object o; + @Key Object o; @Override public boolean equals(Object obj) { Simple other = (Simple) obj; - return Objects.equal(a, other.a) && Objects.equal(b, other.b) && Objects.equal(c, other.c) - && Objects.equal(q, other.q) && Arrays.equals(r, other.r) && Objects.equal(o, other.o); + return Objects.equal(a, other.a) + && Objects.equal(b, other.b) + && Objects.equal(c, other.c) + && Objects.equal(q, other.q) + && Arrays.equals(r, other.r) + && Objects.equal(o, other.o); } - public Simple() { - } + public Simple() {} @Override public String toString() { @@ -88,20 +83,15 @@ public String toString() { } public static class Generic extends GenericData { - @Key - String a; + @Key String a; - @Key - String b; + @Key String b; - @Key - String c; + @Key String c; - @Key - List q; + @Key List q; - @Key - Object o; + @Key Object o; @Override public Generic set(String fieldName, Object value) { @@ -169,7 +159,6 @@ public void testParse_null() { } public enum E { - @Value VALUE, @Value("other") @@ -177,10 +166,8 @@ public enum E { } public static class EnumValue extends GenericData { - @Key - public E value; - @Key - public E otherValue; + @Key public E value; + @Key public E otherValue; @Override public EnumValue set(String fieldName, Object value) { diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java index d1a3e03cc..d4118328e 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java @@ -1,5 +1,9 @@ package com.google.api.client.http.javanet; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.http.HttpContent; import com.google.api.client.http.InputStreamContent; import com.google.api.client.http.LowLevelHttpResponse; @@ -11,11 +15,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.concurrent.TimeoutException; import org.junit.Test; @@ -23,9 +22,11 @@ public class NetHttpRequestTest { static class SleepingOutputWriter implements OutputWriter { private long sleepTimeInMs; + public SleepingOutputWriter(long sleepTimeInMs) { this.sleepTimeInMs = sleepTimeInMs; } + @Override public void write(OutputStream outputStream, StreamingContent content) throws IOException { try { @@ -38,21 +39,22 @@ public void write(OutputStream outputStream, StreamingContent content) throws IO @Test public void testHangingWrite() throws InterruptedException { - Thread thread = new Thread() { - @Override - public void run() { - try { - postWithTimeout(0); - } catch (IOException e) { - // expected to be interrupted - assertEquals(e.getCause().getClass(), InterruptedException.class); - return; - } catch (Exception e) { - fail(); - } - fail("should be interrupted before here"); - } - }; + Thread thread = + new Thread() { + @Override + public void run() { + try { + postWithTimeout(0); + } catch (IOException e) { + // expected to be interrupted + assertEquals(e.getCause().getClass(), InterruptedException.class); + return; + } catch (Exception e) { + fail(); + } + fail("should be interrupted before here"); + } + }; thread.start(); Thread.sleep(1000); @@ -85,17 +87,18 @@ private static void postWithTimeout(int timeout) throws Exception { @Test public void testInterruptedWriteWithResponse() throws Exception { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { - @Override - public OutputStream getOutputStream() throws IOException { - return new OutputStream() { + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { @Override - public void write(int b) throws IOException { - throw new IOException("Error writing request body to server"); + public OutputStream getOutputStream() throws IOException { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + throw new IOException("Error writing request body to server"); + } + }; } }; - } - }; connection.setResponseCode(401); connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); @@ -109,17 +112,18 @@ public void write(int b) throws IOException { @Test public void testInterruptedWriteWithoutResponse() throws Exception { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { - @Override - public OutputStream getOutputStream() throws IOException { - return new OutputStream() { + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { @Override - public void write(int b) throws IOException { - throw new IOException("Error writing request body to server"); + public OutputStream getOutputStream() throws IOException { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + throw new IOException("Error writing request body to server"); + } + }; } }; - } - }; connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); @@ -136,22 +140,23 @@ public void write(int b) throws IOException { @Test public void testInterruptedWriteErrorOnResponse() throws Exception { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { - @Override - public OutputStream getOutputStream() throws IOException { - return new OutputStream() { + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { @Override - public void write(int b) throws IOException { - throw new IOException("Error writing request body to server"); + public OutputStream getOutputStream() throws IOException { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + throw new IOException("Error writing request body to server"); + } + }; } - }; - } - @Override - public int getResponseCode() throws IOException { - throw new IOException("Error parsing response code"); - } - }; + @Override + public int getResponseCode() throws IOException { + throw new IOException("Error parsing response code"); + } + }; connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); @@ -168,22 +173,23 @@ public int getResponseCode() throws IOException { @Test public void testErrorOnClose() throws Exception { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { - @Override - public OutputStream getOutputStream() throws IOException { - return new OutputStream() { - @Override - public void write(int b) throws IOException { - return; - } - + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) { @Override - public void close() throws IOException { - throw new IOException("Error during close"); + public OutputStream getOutputStream() throws IOException { + return new OutputStream() { + @Override + public void write(int b) throws IOException { + return; + } + + @Override + public void close() throws IOException { + throw new IOException("Error during close"); + } + }; } }; - } - }; connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java index 866928d16..beb4891ef 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java @@ -39,8 +39,10 @@ public void testGetStatusCode() throws IOException { } public void subtestGetStatusCode(int expectedCode, int responseCode) throws IOException { - assertEquals(expectedCode, new NetHttpResponse( - new MockHttpURLConnection(null).setResponseCode(responseCode)).getStatusCode()); + assertEquals( + expectedCode, + new NetHttpResponse(new MockHttpURLConnection(null).setResponseCode(responseCode)) + .getStatusCode()); } public void testGetContent() throws IOException { @@ -61,9 +63,12 @@ public void testGetContent() throws IOException { public void subtestGetContent(int responseCode) throws IOException { NetHttpResponse response = - new NetHttpResponse(new MockHttpURLConnection(null).setResponseCode(responseCode) - .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(VALID_RESPONSE))) - .setErrorStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(ERROR_RESPONSE)))); + new NetHttpResponse( + new MockHttpURLConnection(null) + .setResponseCode(responseCode) + .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(VALID_RESPONSE))) + .setErrorStream( + new ByteArrayInputStream(StringUtils.getBytesUtf8(ERROR_RESPONSE)))); InputStream is = response.getContent(); byte[] buf = new byte[100]; int bytes = 0, n = 0; @@ -79,9 +84,12 @@ public void subtestGetContent(int responseCode) throws IOException { public void subtestGetContentWithShortRead(int responseCode) throws IOException { NetHttpResponse response = - new NetHttpResponse(new MockHttpURLConnection(null).setResponseCode(responseCode) - .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(VALID_RESPONSE))) - .setErrorStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(ERROR_RESPONSE)))); + new NetHttpResponse( + new MockHttpURLConnection(null) + .setResponseCode(responseCode) + .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(VALID_RESPONSE))) + .setErrorStream( + new ByteArrayInputStream(StringUtils.getBytesUtf8(ERROR_RESPONSE)))); InputStream is = response.getContent(); byte[] buf = new byte[100]; int bytes = 0, b = 0; @@ -96,10 +104,11 @@ public void subtestGetContentWithShortRead(int responseCode) throws IOException } public void testSkippingBytes() throws IOException { - MockHttpURLConnection connection = new MockHttpURLConnection(null) - .setResponseCode(200) - .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8("0123456789"))) - .addHeader("Content-Length", "10"); + MockHttpURLConnection connection = + new MockHttpURLConnection(null) + .setResponseCode(200) + .setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8("0123456789"))) + .addHeader("Content-Length", "10"); NetHttpResponse response = new NetHttpResponse(connection); InputStream is = response.getContent(); // read 1 byte, then skip 9 (to EOF) diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java index 56e65c01b..a1bc3b348 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java @@ -32,8 +32,9 @@ */ public class NetHttpTransportTest extends TestCase { - private static final String[] METHODS = - {"GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE"}; + private static final String[] METHODS = { + "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" + }; public void testExecute_mock() throws Exception { for (String method : METHODS) { @@ -59,14 +60,14 @@ public void testExecute_mock() throws Exception { } } - public void testExecute_methodUnchanged() throws Exception { String body = "Arbitrary body"; byte[] buf = StringUtils.getBytesUtf8(body); for (String method : METHODS) { - HttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) - .setResponseCode(200) - .setInputStream(new ByteArrayInputStream(buf)); + HttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) + .setResponseCode(200) + .setInputStream(new ByteArrayInputStream(buf)); connection.setRequestMethod(method); NetHttpRequest request = new NetHttpRequest(connection); setContent(request, "text/html", ""); @@ -76,14 +77,13 @@ public void testExecute_methodUnchanged() throws Exception { } public void testAbruptTerminationIsNoticedWithContentLength() throws Exception { - String incompleteBody = "" - + "Fixed size body test.\r\n" - + "Incomplete response."; + String incompleteBody = "" + "Fixed size body test.\r\n" + "Incomplete response."; byte[] buf = StringUtils.getBytesUtf8(incompleteBody); - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) - .setResponseCode(200) - .addHeader("Content-Length", "205") - .setInputStream(new ByteArrayInputStream(buf)); + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) + .setResponseCode(200) + .addHeader("Content-Length", "205") + .setInputStream(new ByteArrayInputStream(buf)); connection.setRequestMethod("GET"); NetHttpRequest request = new NetHttpRequest(connection); setContent(request, null, ""); @@ -102,14 +102,13 @@ public void testAbruptTerminationIsNoticedWithContentLength() throws Exception { } public void testAbruptTerminationIsNoticedWithContentLengthWithReadToBuf() throws Exception { - String incompleteBody = "" - + "Fixed size body test.\r\n" - + "Incomplete response."; + String incompleteBody = "" + "Fixed size body test.\r\n" + "Incomplete response."; byte[] buf = StringUtils.getBytesUtf8(incompleteBody); - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) - .setResponseCode(200) - .addHeader("Content-Length", "205") - .setInputStream(new ByteArrayInputStream(buf)); + MockHttpURLConnection connection = + new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)) + .setResponseCode(200) + .addHeader("Content-Length", "205") + .setInputStream(new ByteArrayInputStream(buf)); connection.setRequestMethod("GET"); NetHttpRequest request = new NetHttpRequest(connection); setContent(request, null, ""); diff --git a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java index b5d88adc8..3192b62ba 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java @@ -38,7 +38,8 @@ public void testConstructor_null() { try { new JsonObjectParser((JsonFactory) null); fail("Did not throw NullPointerException"); - } catch (NullPointerException expected) {} + } catch (NullPointerException expected) { + } } public void testParse_InputStream() throws Exception { diff --git a/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java b/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java index 726671f9c..3f4db6fc9 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java @@ -14,10 +14,8 @@ package com.google.api.client.json; - import com.google.api.client.testing.json.MockJsonFactory; import com.google.api.client.testing.json.MockJsonParser; - import junit.framework.TestCase; /** diff --git a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java index b26237569..312c1d971 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java @@ -34,12 +34,15 @@ public void testSign() throws Exception { header.setAlgorithm("RS256"); header.setType("JWT"); JsonWebToken.Payload payload = new JsonWebToken.Payload(); - payload.setIssuer("issuer") - .setAudience("audience").setIssuedAtTimeSeconds(0L).setExpirationTimeSeconds(3600L); + payload + .setIssuer("issuer") + .setAudience("audience") + .setIssuedAtTimeSeconds(0L) + .setExpirationTimeSeconds(3600L); RSAPrivateKey privateKey = SecurityTestUtils.newRsaPrivateKey(); assertEquals( "..kDmKaHNYByLmqAi9ROeLcFmZM7W_emsceKvDZiEGAo-ineCunC6_Nb0HEpAuzIidV-LYTMHS3BvI49KFz9gi6hI3" - + "ZndDL5EzplpFJo1ZclVk1_hLn94P2OTAkZ4ydsTfus6Bl98EbCkInpF_2t5Fr8OaHxCZCDdDU7W5DSnOsx4", + + "ZndDL5EzplpFJo1ZclVk1_hLn94P2OTAkZ4ydsTfus6Bl98EbCkInpF_2t5Fr8OaHxCZCDdDU7W5DSnOsx4", JsonWebSignature.signUsingRsaSha256(privateKey, new MockJsonFactory(), header, payload)); } diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java index e384d91e0..002685427 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java @@ -18,12 +18,11 @@ /** * Tests for the {@link FixedClock}. + * * @author mlinder@google.com (Matthias Linder) */ public class FixedClockTest extends TestCase { - /** - * Tests that the {@link FixedClock#currentTimeMillis()} method will return the mocked values. - */ + /** Tests that the {@link FixedClock#currentTimeMillis()} method will return the mocked values. */ public void testCurrentTimeMillis() { // Check that the initial value is set properly. FixedClock clock = new FixedClock(100); diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java index 474150471..ea5851917 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java @@ -19,7 +19,6 @@ import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpRequestFactory; - import junit.framework.TestCase; /** diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java index 537e20bad..3c887a3ef 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java @@ -16,7 +16,6 @@ import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; - import junit.framework.TestCase; /** diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java index 6f54f1975..4dbf2df37 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java @@ -25,48 +25,46 @@ import java.util.Map; import junit.framework.TestCase; -/** - * Tests {@link MockHttpURLConnection}. - */ +/** Tests {@link MockHttpURLConnection}. */ public class MockHttpUrlConnectionTest extends TestCase { private static final String RESPONSE_BODY = "body"; private static final String HEADER_NAME = "Custom-Header"; public void testSetGetHeaders() throws IOException { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); - connection.addHeader(HEADER_NAME, "100"); - assertEquals("100", connection.getHeaderField(HEADER_NAME)); + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.addHeader(HEADER_NAME, "100"); + assertEquals("100", connection.getHeaderField(HEADER_NAME)); } public void testSetGetMultipleHeaders() throws IOException { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); - List values = Arrays.asList("value1", "value2", "value3"); - for (String value : values) { - connection.addHeader(HEADER_NAME, value); - } - Map> headers = connection.getHeaderFields(); - assertEquals(3, headers.get(HEADER_NAME).size()); - for (int i = 0; i < 3; i++) { - assertEquals(values.get(i), headers.get(HEADER_NAME).get(i)); - } + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + List values = Arrays.asList("value1", "value2", "value3"); + for (String value : values) { + connection.addHeader(HEADER_NAME, value); + } + Map> headers = connection.getHeaderFields(); + assertEquals(3, headers.get(HEADER_NAME).size()); + for (int i = 0; i < 3; i++) { + assertEquals(values.get(i), headers.get(HEADER_NAME).get(i)); + } } public void testGetNonExistingHeader() throws IOException { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); - assertNull(connection.getHeaderField(HEADER_NAME)); + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + assertNull(connection.getHeaderField(HEADER_NAME)); } public void testSetInputStreamAndInputStreamImmutable() throws IOException { - MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); - connection.setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(RESPONSE_BODY))); - connection.setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8("override"))); - byte[] buf = new byte[10]; - InputStream in = connection.getInputStream(); - int n = 0, bytes = 0; - while ((n = in.read(buf)) != -1) { - bytes += n; - } - assertEquals(RESPONSE_BODY, new String(buf, 0, bytes)); + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(RESPONSE_BODY))); + connection.setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8("override"))); + byte[] buf = new byte[10]; + InputStream in = connection.getInputStream(); + int n = 0, bytes = 0; + while ((n = in.read(buf)) != -1) { + bytes += n; + } + assertEquals(RESPONSE_BODY, new String(buf, 0, bytes)); } } diff --git a/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java b/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java index 127edb1b0..9fdc66ecf 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java @@ -37,5 +37,4 @@ public void subtestNextBackOffMillis(long expectedValue, BackOff backOffPolicy) assertEquals(expectedValue, backOffPolicy.nextBackOffMillis()); } } - } diff --git a/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java b/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java index db1f1e435..b08c2fa29 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java @@ -14,10 +14,9 @@ package com.google.api.client.util; -import junit.framework.TestCase; - import java.util.Iterator; import java.util.Map; +import junit.framework.TestCase; /** * Tests {@link ArrayMap}. @@ -26,8 +25,7 @@ */ public class ArrayMapTest extends TestCase { - public ArrayMapTest() { - } + public ArrayMapTest() {} public ArrayMapTest(String testName) { super(testName); diff --git a/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java index fad0b82f9..79ddc4f5e 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java @@ -16,7 +16,6 @@ import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; - import junit.framework.TestCase; /** diff --git a/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java b/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java index c7ec1c7af..380fd6189 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java @@ -27,13 +27,13 @@ public class ClassInfoTest extends TestCase { public enum E { - @Value VALUE, @Value("other") OTHER_VALUE, @NullValue - NULL, IGNORED_VALUE + NULL, + IGNORED_VALUE } public void testIsEnum() { @@ -49,10 +49,11 @@ public void testGetFieldInfo_enum() throws Exception { } public class A { - @Key - String b; + @Key String b; + @Key("oc") String c; + String d; @Key("AbC") @@ -60,8 +61,7 @@ public class A { } public class B extends A { - @Key - String e; + @Key String e; } public class C extends B { @@ -70,8 +70,8 @@ public class C extends B { } public class A1 { - @Key - String foo; + @Key String foo; + @Key("foo") String foo2; } diff --git a/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java b/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java index 64acd1993..8af12e19c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java @@ -18,12 +18,11 @@ /** * Tests for the {@link Clock}. + * * @author mlinder@google.com (Matthias Linder) */ public class ClockTest extends TestCase { - /** - * Tests that the Clock.SYSTEM.currentTimeMillis() method returns useful values. - */ + /** Tests that the Clock.SYSTEM.currentTimeMillis() method returns useful values. */ public void testSystemClock() { assertNotNull(Clock.SYSTEM); diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java index 30d5eba0d..82b7ed2a4 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java @@ -27,12 +27,9 @@ */ public class DataMapTest extends TestCase { static class A { - @Key - String r; - @Key - String s; - @Key - String t; + @Key String r; + @Key String s; + @Key String t; } public void testSizeAndIsEmpty() { diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java index 8a40c3f01..de428c60c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java @@ -203,29 +203,41 @@ public void testParsePrimitiveValue() { assertEquals('a', Data.parsePrimitiveValue(Character.class, "a")); assertEquals(true, Data.parsePrimitiveValue(boolean.class, "true")); assertEquals(true, Data.parsePrimitiveValue(Boolean.class, "true")); - assertEquals(new Byte(Byte.MAX_VALUE), + assertEquals( + new Byte(Byte.MAX_VALUE), Data.parsePrimitiveValue(Byte.class, String.valueOf(Byte.MAX_VALUE))); - assertEquals(new Byte(Byte.MAX_VALUE), + assertEquals( + new Byte(Byte.MAX_VALUE), Data.parsePrimitiveValue(byte.class, String.valueOf(Byte.MAX_VALUE))); - assertEquals(new Short(Short.MAX_VALUE), + assertEquals( + new Short(Short.MAX_VALUE), Data.parsePrimitiveValue(Short.class, String.valueOf(Short.MAX_VALUE))); - assertEquals(new Short(Short.MAX_VALUE), + assertEquals( + new Short(Short.MAX_VALUE), Data.parsePrimitiveValue(short.class, String.valueOf(Short.MAX_VALUE))); - assertEquals(new Integer(Integer.MAX_VALUE), + assertEquals( + new Integer(Integer.MAX_VALUE), Data.parsePrimitiveValue(Integer.class, String.valueOf(Integer.MAX_VALUE))); - assertEquals(new Integer(Integer.MAX_VALUE), + assertEquals( + new Integer(Integer.MAX_VALUE), Data.parsePrimitiveValue(int.class, String.valueOf(Integer.MAX_VALUE))); - assertEquals(new Long(Long.MAX_VALUE), + assertEquals( + new Long(Long.MAX_VALUE), Data.parsePrimitiveValue(Long.class, String.valueOf(Long.MAX_VALUE))); - assertEquals(new Long(Long.MAX_VALUE), + assertEquals( + new Long(Long.MAX_VALUE), Data.parsePrimitiveValue(long.class, String.valueOf(Long.MAX_VALUE))); - assertEquals(new Float(Float.MAX_VALUE), + assertEquals( + new Float(Float.MAX_VALUE), Data.parsePrimitiveValue(Float.class, String.valueOf(Float.MAX_VALUE))); - assertEquals(new Float(Float.MAX_VALUE), + assertEquals( + new Float(Float.MAX_VALUE), Data.parsePrimitiveValue(float.class, String.valueOf(Float.MAX_VALUE))); - assertEquals(new Double(Double.MAX_VALUE), + assertEquals( + new Double(Double.MAX_VALUE), Data.parsePrimitiveValue(Double.class, String.valueOf(Double.MAX_VALUE))); - assertEquals(new Double(Double.MAX_VALUE), + assertEquals( + new Double(Double.MAX_VALUE), Data.parsePrimitiveValue(double.class, String.valueOf(Double.MAX_VALUE))); BigInteger bigint = BigInteger.valueOf(Long.MAX_VALUE); assertEquals( @@ -268,57 +280,59 @@ static class Resolve { public X x; } - static class IntegerResolve extends Resolve { - } + static class IntegerResolve extends Resolve {} - static class MedResolve extends Resolve { - } + static class MedResolve extends Resolve {} - static class DoubleResolve extends MedResolve { - } + static class DoubleResolve extends MedResolve {} - static class Med2Resolve extends MedResolve { - } + static class Med2Resolve extends MedResolve {} - static class LongResolve extends Med2Resolve { - } + static class LongResolve extends Med2Resolve {} - static class ArrayResolve extends Resolve { - } + static class ArrayResolve extends Resolve {} - static class ParameterizedResolve extends Resolve, Integer> { - } + static class ParameterizedResolve extends Resolve, Integer> {} - static class MedXResolve extends Resolve { - } + static class MedXResolve extends Resolve {} public void testResolveWildcardTypeOrTypeVariable() throws Exception { // t TypeVariable tTypeVar = (TypeVariable) Resolve.class.getField("t").getGenericType(); assertEquals( Number.class, resolveWildcardTypeOrTypeVariable(new Object().getClass(), tTypeVar)); - assertEquals(Number.class, + assertEquals( + Number.class, resolveWildcardTypeOrTypeVariable(new Resolve().getClass(), tTypeVar)); - assertEquals(Integer.class, + assertEquals( + Integer.class, resolveWildcardTypeOrTypeVariable(new IntegerResolve().getClass(), tTypeVar)); assertEquals( Long.class, resolveWildcardTypeOrTypeVariable(new LongResolve().getClass(), tTypeVar)); assertEquals( Double.class, resolveWildcardTypeOrTypeVariable(new DoubleResolve().getClass(), tTypeVar)); // partially resolved - assertEquals(Number.class, + assertEquals( + Number.class, resolveWildcardTypeOrTypeVariable(new MedResolve().getClass(), tTypeVar)); // x TypeVariable xTypeVar = (TypeVariable) Resolve.class.getField("x").getGenericType(); assertEquals( Object.class, resolveWildcardTypeOrTypeVariable(new Object().getClass(), xTypeVar)); - assertEquals(Boolean.class, Types.getArrayComponentType( - resolveWildcardTypeOrTypeVariable(new ArrayResolve().getClass(), xTypeVar))); assertEquals( - Collection.class, Types.getRawClass((ParameterizedType) resolveWildcardTypeOrTypeVariable( - new ParameterizedResolve().getClass(), xTypeVar))); - assertEquals(Number.class, resolveWildcardTypeOrTypeVariable( - new MedXResolve().getClass(), xTypeVar)); + Boolean.class, + Types.getArrayComponentType( + resolveWildcardTypeOrTypeVariable(new ArrayResolve().getClass(), xTypeVar))); + assertEquals( + Collection.class, + Types.getRawClass( + (ParameterizedType) + resolveWildcardTypeOrTypeVariable( + new ParameterizedResolve().getClass(), xTypeVar))); + assertEquals( + Number.class, + resolveWildcardTypeOrTypeVariable( + new MedXResolve().getClass(), xTypeVar)); } private static Type resolveWildcardTypeOrTypeVariable( diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index 7313d92ce..6318e327c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -27,8 +27,7 @@ public class DateTimeTest extends TestCase { private TimeZone originalTimeZone; - public DateTimeTest() { - } + public DateTimeTest() {} public DateTimeTest(String testName) { super(testName); @@ -47,52 +46,57 @@ protected void tearDown() throws Exception { public void testToStringRfc3339() { TimeZone.setDefault(TimeZone.getTimeZone("GMT-4")); - assertEquals("Check with explicit Date and Timezone.", + assertEquals( + "Check with explicit Date and Timezone.", "2012-11-06T12:10:44.000-08:00", new DateTime(new Date(1352232644000L), TimeZone.getTimeZone("GMT-8")).toStringRfc3339()); - assertEquals("Check with explicit Date but no explicit Timezone.", + assertEquals( + "Check with explicit Date but no explicit Timezone.", "2012-11-06T16:10:44.000-04:00", new DateTime(new Date(1352232644000L)).toStringRfc3339()); - assertEquals("Check with explicit Date and Timezone-Shift.", + assertEquals( + "Check with explicit Date and Timezone-Shift.", "2012-11-06T17:10:44.000-03:00", new DateTime(1352232644000L, -180).toStringRfc3339()); - assertEquals("Check with explicit Date and Zulu Timezone Offset.", + assertEquals( + "Check with explicit Date and Zulu Timezone Offset.", "2012-11-06T20:10:44.000Z", new DateTime(1352232644000L, 0).toStringRfc3339()); TimeZone.setDefault(TimeZone.getTimeZone("UTC")); - assertEquals("Check with explicit Date but no explicit Timezone.", + assertEquals( + "Check with explicit Date but no explicit Timezone.", "2012-11-06T20:10:44.000Z", new DateTime(new Date(1352232644000L)).toStringRfc3339()); } public void testToStringRfc3339_dateOnly() { - for (String timeZoneString : new String[]{"GMT-4", "UTC", "UTC-7"}) { + for (String timeZoneString : new String[] {"GMT-4", "UTC", "UTC-7"}) { TimeZone.setDefault(TimeZone.getTimeZone(timeZoneString)); - assertEquals( - "2012-11-06", - new DateTime(true, 1352232644000L, 1).toStringRfc3339()); - assertEquals( - "2012-11-06", - new DateTime(true, 1352232644000L, null).toStringRfc3339()); + assertEquals("2012-11-06", new DateTime(true, 1352232644000L, 1).toStringRfc3339()); + assertEquals("2012-11-06", new DateTime(true, 1352232644000L, null).toStringRfc3339()); assertEquals("2000-01-01", new DateTime("2000-01-01").toStringRfc3339()); } } public void testEquals() throws InterruptedException { - assertFalse("Check equals with two different tz specified.", + assertFalse( + "Check equals with two different tz specified.", new DateTime(1234567890L).equals(new DateTime(1234567890L, 120))); - assertTrue("Check equals with two identical tz specified.", + assertTrue( + "Check equals with two identical tz specified.", new DateTime(1234567890L, -240).equals(new DateTime(1234567890L, -240))); - assertFalse("Check equals with two different tz specified.", + assertFalse( + "Check equals with two different tz specified.", new DateTime(1234567890L, 60).equals(new DateTime(1234567890L, 240))); assertFalse("Check not equal.", new DateTime(1234567890L).equals(new DateTime(9876543210L))); - assertFalse("Check not equal with tz.", + assertFalse( + "Check not equal with tz.", new DateTime(1234567890L, 120).equals(new DateTime(9876543210L, 120))); assertFalse( "Check not equal with Date.", new DateTime(1234567890L).equals(new Date(9876543210L))); @@ -129,11 +133,14 @@ public void testParseRfc3339() { assertEquals(0, value.getValue() % 100); // From the RFC3339 Standard - assertEquals(DateTime.parseRfc3339("1996-12-19T16:39:57-08:00").getValue(), + assertEquals( + DateTime.parseRfc3339("1996-12-19T16:39:57-08:00").getValue(), DateTime.parseRfc3339("1996-12-20T00:39:57Z").getValue()); // from Section 5.8 Examples - assertEquals(DateTime.parseRfc3339("1990-12-31T23:59:60Z").getValue(), + assertEquals( + DateTime.parseRfc3339("1990-12-31T23:59:60Z").getValue(), DateTime.parseRfc3339("1990-12-31T15:59:60-08:00").getValue()); // from Section 5.8 Examples - assertEquals(DateTime.parseRfc3339("2007-06-01t18:50:00-04:00").getValue(), + assertEquals( + DateTime.parseRfc3339("2007-06-01t18:50:00-04:00").getValue(), DateTime.parseRfc3339("2007-06-01t22:50:00Z").getValue()); // from Section 4.2 Local Offsets } @@ -146,7 +153,7 @@ public void testParseAndFormatRfc3339() { assertEquals(expected, output); // Truncated to milliseconds. - input = "1996-12-19T16:39:57.123456789-08:00"; + input = "1996-12-19T16:39:57.123456789-08:00"; expected = "1996-12-19T16:39:57.123-08:00"; dt = DateTime.parseRfc3339(input); output = dt.toStringRfc3339(); diff --git a/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java b/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java index 8561e5a4c..7d9fe9dff 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java @@ -29,31 +29,37 @@ public ExponentialBackOffTest(String name) { public void testConstructor() { ExponentialBackOff backOffPolicy = new ExponentialBackOff(); - assertEquals(ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); + assertEquals( + ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); assertEquals( ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS, backOffPolicy.getMaxElapsedTimeMillis()); } public void testBuilder() { ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder().build(); - assertEquals(ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getInitialIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); + assertEquals( + ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); assertEquals( ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); - assertEquals(ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS, + assertEquals( + ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME_MILLIS, backOffPolicy.getMaxElapsedTimeMillis()); int testInitialInterval = 1; @@ -62,13 +68,14 @@ public void testBuilder() { int testMaxInterval = 10; int testMaxElapsedTime = 900000; - backOffPolicy = new ExponentialBackOff.Builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); + backOffPolicy = + new ExponentialBackOff.Builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); @@ -84,13 +91,14 @@ public void testBackOff() throws Exception { int testMaxInterval = 5000; int testMaxElapsedTime = 900000; - ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder() - .setInitialIntervalMillis(testInitialInterval) - .setRandomizationFactor(testRandomizationFactor) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .setMaxElapsedTimeMillis(testMaxElapsedTime) - .build(); + ExponentialBackOff backOffPolicy = + new ExponentialBackOff.Builder() + .setInitialIntervalMillis(testInitialInterval) + .setRandomizationFactor(testRandomizationFactor) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .setMaxElapsedTimeMillis(testMaxElapsedTime) + .build(); int[] expectedResults = {500, 1000, 2000, 4000, 5000, 5000, 5000, 5000, 5000, 5000}; for (int expected : expectedResults) { assertEquals(expected, backOffPolicy.getCurrentIntervalMillis()); @@ -119,8 +127,7 @@ static class MyNanoClock implements NanoClock { private int i = 0; private long startSeconds; - MyNanoClock() { - } + MyNanoClock() {} MyNanoClock(long startSeconds) { this.startSeconds = startSeconds; @@ -152,11 +159,12 @@ public void testBackOffOverflow() throws Exception { int testInitialInterval = Integer.MAX_VALUE / 2; double testMultiplier = 2.1; int testMaxInterval = Integer.MAX_VALUE; - ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder() - .setInitialIntervalMillis(testInitialInterval) - .setMultiplier(testMultiplier) - .setMaxIntervalMillis(testMaxInterval) - .build(); + ExponentialBackOff backOffPolicy = + new ExponentialBackOff.Builder() + .setInitialIntervalMillis(testInitialInterval) + .setMultiplier(testMultiplier) + .setMaxIntervalMillis(testMaxInterval) + .build(); backOffPolicy.nextBackOffMillis(); // Assert that when an overflow is possible the current interval is set to the max interval. assertEquals(testMaxInterval, backOffPolicy.getCurrentIntervalMillis()); diff --git a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java index 4f62d4455..c000a90dd 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java @@ -14,7 +14,6 @@ package com.google.api.client.util; - import junit.framework.TestCase; /** @@ -25,13 +24,13 @@ public class FieldInfoTest extends TestCase { public enum E { - @Value VALUE, @Value("other") OTHER_VALUE, @NullValue - NULL, IGNORED_VALUE + NULL, + IGNORED_VALUE } public void testOf_enum() throws Exception { diff --git a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java index f38c8dac7..39a66dbde 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java @@ -48,8 +48,9 @@ public void testIsSymbolicLink_true() throws IOException, InterruptedException { File file2 = new File(file.getCanonicalPath() + "2"); file2.deleteOnExit(); try { - Process process = Runtime.getRuntime() - .exec(new String[] {"ln", "-s", file.getCanonicalPath(), file2.getCanonicalPath()}); + Process process = + Runtime.getRuntime() + .exec(new String[] {"ln", "-s", file.getCanonicalPath(), file2.getCanonicalPath()}); process.waitFor(); process.destroy(); } catch (IOException e) { diff --git a/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java b/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java index 2a353466a..cfb4eca4e 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java @@ -34,12 +34,11 @@ public class LoggingStreamingContentTest extends TestCase { new byte[] {49, 50, 51, -41, -103, -41, -96, -41, -103, -41, -111}; private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; - /** - * Test method for {@link LoggingStreamingContent#writeTo(java.io.OutputStream)}. - */ + /** Test method for {@link LoggingStreamingContent#writeTo(java.io.OutputStream)}. */ public void testWriteTo() throws Exception { - LoggingStreamingContent logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, Integer.MAX_VALUE); + LoggingStreamingContent logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, Integer.MAX_VALUE); ByteArrayOutputStream out = new ByteArrayOutputStream(); LOGGER.setLevel(Level.CONFIG); LogRecordingHandler recorder = new LogRecordingHandler(); @@ -56,16 +55,21 @@ public void testContentLoggingLimit() throws Exception { LogRecordingHandler recorder = new LogRecordingHandler(); LOGGER.addHandler(recorder); ByteArrayOutputStream out = new ByteArrayOutputStream(); - LoggingStreamingContent logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, SAMPLE_UTF8.length); + LoggingStreamingContent logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, SAMPLE_UTF8.length); logContent.writeTo(out); assertEquals(Arrays.asList("Total: 11 bytes", SAMPLE), recorder.messages()); // Set the content logging limit to be less than the length of the content. recorder = new LogRecordingHandler(); LOGGER.addHandler(recorder); - logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, SAMPLE_UTF8.length - 1); + logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), + LOGGER, + Level.CONFIG, + SAMPLE_UTF8.length - 1); logContent.writeTo(new ByteArrayOutputStream()); assertEquals( Arrays.asList("Total: 11 bytes (logging first 10 bytes)", "123\u05D9\u05e0\u05D9\ufffd"), @@ -74,23 +78,26 @@ public void testContentLoggingLimit() throws Exception { // Set the content logging limit to 0 to disable content logging. recorder = new LogRecordingHandler(); LOGGER.addHandler(recorder); - logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, 0); + logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, 0); logContent.writeTo(new ByteArrayOutputStream()); assertEquals(Arrays.asList("Total: 11 bytes"), recorder.messages()); // writeTo should behave as expected even if content length is specified to be -1. recorder = new LogRecordingHandler(); LOGGER.addHandler(recorder); - logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, SAMPLE_UTF8.length); + logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, SAMPLE_UTF8.length); logContent.writeTo(new ByteArrayOutputStream()); assertEquals(Arrays.asList("Total: 11 bytes", SAMPLE), recorder.messages()); // Assert that an exception is thrown if content logging limit < 0. try { - logContent = new LoggingStreamingContent( - new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, -1); + logContent = + new LoggingStreamingContent( + new ByteArrayStreamingContent(SAMPLE_UTF8), LOGGER, Level.CONFIG, -1); logContent.writeTo(new ByteArrayOutputStream()); fail("Expected: " + IllegalArgumentException.class); } catch (IllegalArgumentException e) { diff --git a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java index b2b1b8372..570ede362 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java @@ -33,17 +33,14 @@ public void testConstructor_innerClass() { } public void testToString_oneIntegerField() { - String toTest = Objects.toStringHelper(new TestClass()) - .add("field1", new Integer(42)) - .toString(); + String toTest = + Objects.toStringHelper(new TestClass()).add("field1", new Integer(42)).toString(); assertEquals("TestClass{field1=42}", toTest); } public void testToStringOmitNullValues_oneField() { - String toTest = Objects.toStringHelper(new TestClass()) - .omitNullValues() - .add("field1", null) - .toString(); + String toTest = + Objects.toStringHelper(new TestClass()).omitNullValues().add("field1", null).toString(); assertEquals("TestClass{}", toTest); } diff --git a/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java b/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java index 8a1d01e5f..c3d4e586f 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java @@ -26,38 +26,39 @@ */ public class PemReaderTest extends TestCase { - private static final byte[] EXPECTED_BYTES = {48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, - 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, 95, 48, -126, 2, 91, 2, 1, 0, 2, -127, -127, 0, - -67, 82, 117, -113, 35, 77, 69, 84, -20, -18, 63, 94, -74, 75, 97, 60, 52, 56, -35, 101, 87, - -93, 16, 68, 102, -93, 20, 49, 66, -88, 61, -123, 119, -37, 80, 24, -75, -68, 33, -5, 113, -9, - 7, -41, 123, 92, -18, 105, -24, 73, 74, 2, -36, -56, 44, 90, -51, -4, -119, -96, -35, -47, -120, - -29, 65, -118, 16, 106, 89, -114, -99, -34, 84, 10, -86, 72, 44, 69, 51, 89, -111, -47, 73, 89, - -36, -27, -1, -96, -79, -124, -81, 108, -94, 56, 118, -89, 74, -9, -73, 39, 109, -65, -40, -80, - -85, -105, -18, -71, 98, 47, -76, -32, -19, 79, -33, 4, -126, -104, 97, -99, -60, 0, -86, 66, - -88, 23, 124, -43, 2, 3, 1, 0, 1, 2, -127, -128, 121, -44, 31, 92, 93, -18, 50, -120, 100, -13, - 39, -118, 78, 42, -111, -58, -55, 32, 50, -80, 45, 69, -4, -120, -41, -73, 103, -98, 15, 115, - -18, 42, -2, 38, -2, 18, -8, -105, -71, 18, 114, -110, -15, -45, -29, 73, -71, 14, 35, -15, 77, - -108, 43, -7, 16, 57, -38, -58, 0, -42, -87, 7, 86, 91, 49, -112, 10, -2, -83, 49, -104, -123, - 51, 116, -46, 3, -120, 100, -88, 77, 113, -115, -38, 97, 31, 118, -63, 41, 67, -11, -30, -65, - 73, 114, -123, -128, 65, 60, 47, -54, -30, -58, 8, -92, 119, 28, -98, 20, -111, 65, 70, 101, 88, - -78, -40, -108, 78, 92, 20, -46, -126, -11, -66, -10, -37, -87, -115, -67, 2, 65, 0, -5, 116, - -123, -16, -115, 32, -35, 36, 81, -125, -128, -10, 55, 75, -73, 30, -62, 19, -116, -110, 24, - -61, -33, -28, -93, -63, -69, 51, -35, -14, -36, -75, 127, 22, -123, -101, -45, -63, -20, 30, - -6, 85, -108, 24, -104, 119, 22, -53, -54, -45, -27, 120, -24, 44, -111, -21, -104, 101, -75, - 102, -13, -2, -120, 59, 2, 65, 0, -64, -66, 114, -88, 106, -77, -50, 25, -66, 98, 37, -7, 42, - 70, -80, 56, 126, 87, -11, 76, -23, 95, -5, 95, -82, -88, -125, -119, -9, -113, 121, -10, 57, - 36, 37, -26, -12, -126, -1, -45, -78, 16, -25, -101, -81, -37, 90, 127, -75, -112, -100, -91, - 65, -94, -78, -128, 40, -77, -64, -4, 1, 103, -50, 47, 2, 64, 52, 14, -21, -85, -31, -117, -20, - 60, -104, -93, -95, 15, 88, 99, 84, -122, 9, -88, 2, 114, 60, -82, 80, -84, 5, 59, 22, -122, - -90, 108, -95, 68, -14, 10, -73, -98, -117, 56, -102, -87, -49, 41, -24, 127, 47, 17, 120, -90, - -72, 87, 38, 42, -31, -26, 88, 79, 110, 61, -96, 80, -80, 51, 2, 1, 2, 64, 17, 56, -13, 69, -39, - 66, -9, -57, -107, 27, 112, 9, 51, -99, -35, 97, 46, -24, -19, 34, 82, 56, 33, 94, 11, 93, 67, - 99, -80, -101, 65, 106, -98, -16, 123, -14, -121, 38, -83, 117, 93, 19, -27, -98, 35, -72, -107, - -3, -109, 91, -72, -93, -117, -103, -34, 25, 85, -119, -70, 84, -54, 75, 92, 65, 2, 64, 30, -82, - 75, 100, -32, 123, 48, 18, -75, 26, 80, 109, 108, -3, -33, -110, -127, -49, 30, -4, -93, 30, 4, - 73, 85, -8, -36, 70, -123, -59, -124, 121, -101, 95, 28, -55, -1, -23, 83, -91, 111, 54, 60, - -40, -100, -81, 11, -45, -118, 11, -51, 0, -28, 32, 4, 85, 69, 122, 111, 110, 100, -86, -73, - 46}; + private static final byte[] EXPECTED_BYTES = { + 48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, + 95, 48, -126, 2, 91, 2, 1, 0, 2, -127, -127, 0, -67, 82, 117, -113, 35, 77, 69, 84, -20, -18, + 63, 94, -74, 75, 97, 60, 52, 56, -35, 101, 87, -93, 16, 68, 102, -93, 20, 49, 66, -88, 61, -123, + 119, -37, 80, 24, -75, -68, 33, -5, 113, -9, 7, -41, 123, 92, -18, 105, -24, 73, 74, 2, -36, + -56, 44, 90, -51, -4, -119, -96, -35, -47, -120, -29, 65, -118, 16, 106, 89, -114, -99, -34, 84, + 10, -86, 72, 44, 69, 51, 89, -111, -47, 73, 89, -36, -27, -1, -96, -79, -124, -81, 108, -94, 56, + 118, -89, 74, -9, -73, 39, 109, -65, -40, -80, -85, -105, -18, -71, 98, 47, -76, -32, -19, 79, + -33, 4, -126, -104, 97, -99, -60, 0, -86, 66, -88, 23, 124, -43, 2, 3, 1, 0, 1, 2, -127, -128, + 121, -44, 31, 92, 93, -18, 50, -120, 100, -13, 39, -118, 78, 42, -111, -58, -55, 32, 50, -80, + 45, 69, -4, -120, -41, -73, 103, -98, 15, 115, -18, 42, -2, 38, -2, 18, -8, -105, -71, 18, 114, + -110, -15, -45, -29, 73, -71, 14, 35, -15, 77, -108, 43, -7, 16, 57, -38, -58, 0, -42, -87, 7, + 86, 91, 49, -112, 10, -2, -83, 49, -104, -123, 51, 116, -46, 3, -120, 100, -88, 77, 113, -115, + -38, 97, 31, 118, -63, 41, 67, -11, -30, -65, 73, 114, -123, -128, 65, 60, 47, -54, -30, -58, 8, + -92, 119, 28, -98, 20, -111, 65, 70, 101, 88, -78, -40, -108, 78, 92, 20, -46, -126, -11, -66, + -10, -37, -87, -115, -67, 2, 65, 0, -5, 116, -123, -16, -115, 32, -35, 36, 81, -125, -128, -10, + 55, 75, -73, 30, -62, 19, -116, -110, 24, -61, -33, -28, -93, -63, -69, 51, -35, -14, -36, -75, + 127, 22, -123, -101, -45, -63, -20, 30, -6, 85, -108, 24, -104, 119, 22, -53, -54, -45, -27, + 120, -24, 44, -111, -21, -104, 101, -75, 102, -13, -2, -120, 59, 2, 65, 0, -64, -66, 114, -88, + 106, -77, -50, 25, -66, 98, 37, -7, 42, 70, -80, 56, 126, 87, -11, 76, -23, 95, -5, 95, -82, + -88, -125, -119, -9, -113, 121, -10, 57, 36, 37, -26, -12, -126, -1, -45, -78, 16, -25, -101, + -81, -37, 90, 127, -75, -112, -100, -91, 65, -94, -78, -128, 40, -77, -64, -4, 1, 103, -50, 47, + 2, 64, 52, 14, -21, -85, -31, -117, -20, 60, -104, -93, -95, 15, 88, 99, 84, -122, 9, -88, 2, + 114, 60, -82, 80, -84, 5, 59, 22, -122, -90, 108, -95, 68, -14, 10, -73, -98, -117, 56, -102, + -87, -49, 41, -24, 127, 47, 17, 120, -90, -72, 87, 38, 42, -31, -26, 88, 79, 110, 61, -96, 80, + -80, 51, 2, 1, 2, 64, 17, 56, -13, 69, -39, 66, -9, -57, -107, 27, 112, 9, 51, -99, -35, 97, 46, + -24, -19, 34, 82, 56, 33, 94, 11, 93, 67, 99, -80, -101, 65, 106, -98, -16, 123, -14, -121, 38, + -83, 117, 93, 19, -27, -98, 35, -72, -107, -3, -109, 91, -72, -93, -117, -103, -34, 25, 85, + -119, -70, 84, -54, 75, 92, 65, 2, 64, 30, -82, 75, 100, -32, 123, 48, 18, -75, 26, 80, 109, + 108, -3, -33, -110, -127, -49, 30, -4, -93, 30, 4, 73, 85, -8, -36, 70, -123, -59, -124, 121, + -101, 95, 28, -55, -1, -23, 83, -91, 111, 54, 60, -40, -100, -81, 11, -45, -118, 11, -51, 0, + -28, 32, 4, 85, 69, 122, 111, 110, 100, -86, -73, 46 + }; public void testReadFirstSectionAndClose() throws Exception { InputStream stream = diff --git a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java index aa3eab20a..b9f91fd1e 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java @@ -33,86 +33,90 @@ */ public class SecurityUtilsTest extends TestCase { - private static final byte[] ENCODED = {48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, - -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, 95, 48, -126, 2, 91, 2, 1, 0, 2, -127, -127, 0, -67, - 82, 117, -113, 35, 77, 69, 84, -20, -18, 63, 94, -74, 75, 97, 60, 52, 56, -35, 101, 87, -93, 16, - 68, 102, -93, 20, 49, 66, -88, 61, -123, 119, -37, 80, 24, -75, -68, 33, -5, 113, -9, 7, -41, - 123, 92, -18, 105, -24, 73, 74, 2, -36, -56, 44, 90, -51, -4, -119, -96, -35, -47, -120, -29, - 65, -118, 16, 106, 89, -114, -99, -34, 84, 10, -86, 72, 44, 69, 51, 89, -111, -47, 73, 89, -36, - -27, -1, -96, -79, -124, -81, 108, -94, 56, 118, -89, 74, -9, -73, 39, 109, -65, -40, -80, -85, - -105, -18, -71, 98, 47, -76, -32, -19, 79, -33, 4, -126, -104, 97, -99, -60, 0, -86, 66, -88, - 23, 124, -43, 2, 3, 1, 0, 1, 2, -127, -128, 121, -44, 31, 92, 93, -18, 50, -120, 100, -13, 39, - -118, 78, 42, -111, -58, -55, 32, 50, -80, 45, 69, -4, -120, -41, -73, 103, -98, 15, 115, -18, - 42, -2, 38, -2, 18, -8, -105, -71, 18, 114, -110, -15, -45, -29, 73, -71, 14, 35, -15, 77, -108, - 43, -7, 16, 57, -38, -58, 0, -42, -87, 7, 86, 91, 49, -112, 10, -2, -83, 49, -104, -123, 51, - 116, -46, 3, -120, 100, -88, 77, 113, -115, -38, 97, 31, 118, -63, 41, 67, -11, -30, -65, 73, - 114, -123, -128, 65, 60, 47, -54, -30, -58, 8, -92, 119, 28, -98, 20, -111, 65, 70, 101, 88, - -78, -40, -108, 78, 92, 20, -46, -126, -11, -66, -10, -37, -87, -115, -67, 2, 65, 0, -5, 116, - -123, -16, -115, 32, -35, 36, 81, -125, -128, -10, 55, 75, -73, 30, -62, 19, -116, -110, 24, - -61, -33, -28, -93, -63, -69, 51, -35, -14, -36, -75, 127, 22, -123, -101, -45, -63, -20, 30, - -6, 85, -108, 24, -104, 119, 22, -53, -54, -45, -27, 120, -24, 44, -111, -21, -104, 101, -75, - 102, -13, -2, -120, 59, 2, 65, 0, -64, -66, 114, -88, 106, -77, -50, 25, -66, 98, 37, -7, 42, - 70, -80, 56, 126, 87, -11, 76, -23, 95, -5, 95, -82, -88, -125, -119, -9, -113, 121, -10, 57, - 36, 37, -26, -12, -126, -1, -45, -78, 16, -25, -101, -81, -37, 90, 127, -75, -112, -100, -91, - 65, -94, -78, -128, 40, -77, -64, -4, 1, 103, -50, 47, 2, 64, 52, 14, -21, -85, -31, -117, -20, - 60, -104, -93, -95, 15, 88, 99, 84, -122, 9, -88, 2, 114, 60, -82, 80, -84, 5, 59, 22, -122, - -90, 108, -95, 68, -14, 10, -73, -98, -117, 56, -102, -87, -49, 41, -24, 127, 47, 17, 120, -90, - -72, 87, 38, 42, -31, -26, 88, 79, 110, 61, -96, 80, -80, 51, 2, 1, 2, 64, 17, 56, -13, 69, -39, - 66, -9, -57, -107, 27, 112, 9, 51, -99, -35, 97, 46, -24, -19, 34, 82, 56, 33, 94, 11, 93, 67, - 99, -80, -101, 65, 106, -98, -16, 123, -14, -121, 38, -83, 117, 93, 19, -27, -98, 35, -72, -107, - -3, -109, 91, -72, -93, -117, -103, -34, 25, 85, -119, -70, 84, -54, 75, 92, 65, 2, 64, 30, -82, - 75, 100, -32, 123, 48, 18, -75, 26, 80, 109, 108, -3, -33, -110, -127, -49, 30, -4, -93, 30, 4, - 73, 85, -8, -36, 70, -123, -59, -124, 121, -101, 95, 28, -55, -1, -23, 83, -91, 111, 54, 60, - -40, -100, -81, 11, -45, -118, 11, -51, 0, -28, 32, 4, 85, 69, 122, 111, 110, 100, -86, -73, - 46}; + private static final byte[] ENCODED = { + 48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, + 95, 48, -126, 2, 91, 2, 1, 0, 2, -127, -127, 0, -67, 82, 117, -113, 35, 77, 69, 84, -20, -18, + 63, 94, -74, 75, 97, 60, 52, 56, -35, 101, 87, -93, 16, 68, 102, -93, 20, 49, 66, -88, 61, -123, + 119, -37, 80, 24, -75, -68, 33, -5, 113, -9, 7, -41, 123, 92, -18, 105, -24, 73, 74, 2, -36, + -56, 44, 90, -51, -4, -119, -96, -35, -47, -120, -29, 65, -118, 16, 106, 89, -114, -99, -34, 84, + 10, -86, 72, 44, 69, 51, 89, -111, -47, 73, 89, -36, -27, -1, -96, -79, -124, -81, 108, -94, 56, + 118, -89, 74, -9, -73, 39, 109, -65, -40, -80, -85, -105, -18, -71, 98, 47, -76, -32, -19, 79, + -33, 4, -126, -104, 97, -99, -60, 0, -86, 66, -88, 23, 124, -43, 2, 3, 1, 0, 1, 2, -127, -128, + 121, -44, 31, 92, 93, -18, 50, -120, 100, -13, 39, -118, 78, 42, -111, -58, -55, 32, 50, -80, + 45, 69, -4, -120, -41, -73, 103, -98, 15, 115, -18, 42, -2, 38, -2, 18, -8, -105, -71, 18, 114, + -110, -15, -45, -29, 73, -71, 14, 35, -15, 77, -108, 43, -7, 16, 57, -38, -58, 0, -42, -87, 7, + 86, 91, 49, -112, 10, -2, -83, 49, -104, -123, 51, 116, -46, 3, -120, 100, -88, 77, 113, -115, + -38, 97, 31, 118, -63, 41, 67, -11, -30, -65, 73, 114, -123, -128, 65, 60, 47, -54, -30, -58, 8, + -92, 119, 28, -98, 20, -111, 65, 70, 101, 88, -78, -40, -108, 78, 92, 20, -46, -126, -11, -66, + -10, -37, -87, -115, -67, 2, 65, 0, -5, 116, -123, -16, -115, 32, -35, 36, 81, -125, -128, -10, + 55, 75, -73, 30, -62, 19, -116, -110, 24, -61, -33, -28, -93, -63, -69, 51, -35, -14, -36, -75, + 127, 22, -123, -101, -45, -63, -20, 30, -6, 85, -108, 24, -104, 119, 22, -53, -54, -45, -27, + 120, -24, 44, -111, -21, -104, 101, -75, 102, -13, -2, -120, 59, 2, 65, 0, -64, -66, 114, -88, + 106, -77, -50, 25, -66, 98, 37, -7, 42, 70, -80, 56, 126, 87, -11, 76, -23, 95, -5, 95, -82, + -88, -125, -119, -9, -113, 121, -10, 57, 36, 37, -26, -12, -126, -1, -45, -78, 16, -25, -101, + -81, -37, 90, 127, -75, -112, -100, -91, 65, -94, -78, -128, 40, -77, -64, -4, 1, 103, -50, 47, + 2, 64, 52, 14, -21, -85, -31, -117, -20, 60, -104, -93, -95, 15, 88, 99, 84, -122, 9, -88, 2, + 114, 60, -82, 80, -84, 5, 59, 22, -122, -90, 108, -95, 68, -14, 10, -73, -98, -117, 56, -102, + -87, -49, 41, -24, 127, 47, 17, 120, -90, -72, 87, 38, 42, -31, -26, 88, 79, 110, 61, -96, 80, + -80, 51, 2, 1, 2, 64, 17, 56, -13, 69, -39, 66, -9, -57, -107, 27, 112, 9, 51, -99, -35, 97, 46, + -24, -19, 34, 82, 56, 33, 94, 11, 93, 67, 99, -80, -101, 65, 106, -98, -16, 123, -14, -121, 38, + -83, 117, 93, 19, -27, -98, 35, -72, -107, -3, -109, 91, -72, -93, -117, -103, -34, 25, 85, + -119, -70, 84, -54, 75, 92, 65, 2, 64, 30, -82, 75, 100, -32, 123, 48, 18, -75, 26, 80, 109, + 108, -3, -33, -110, -127, -49, 30, -4, -93, 30, 4, 73, 85, -8, -36, 70, -123, -59, -124, 121, + -101, 95, 28, -55, -1, -23, 83, -91, 111, 54, 60, -40, -100, -81, 11, -45, -118, 11, -51, 0, + -28, 32, 4, 85, 69, 122, 111, 110, 100, -86, -73, 46 + }; - private static final byte[] SIGNED = {55, -20, -102, 62, -2, 115, -3, 103, -30, -45, 87, -128, - -124, 39, -45, -125, -30, 19, -103, 85, -117, 99, 36, 44, 106, -94, -33, 51, 10, 62, 98, 81, 6, - 55, 26, -123, -48, -78, 40, -83, 38, 114, 18, 30, 12, 103, -77, 18, -10, -93, 126, -10, -99, 44, - 123, -57, -98, -13, 40, 86, 90, 91, 4, -127, -62, 10, -95, -26, 34, -23, 1, 3, 57, -70, -68, - -74, 18, -107, -39, -85, 16, 87, 60, 91, -71, 65, -43, -121, 116, -28, -75, 94, -68, -60, -24, - 83, 113, -41, -47, -35, 11, 107, 117, -22, -112, 9, -14, 126, -90, 107, 63, -106, -118, -91, - -97, -128, 31, -108, -100, 102, 0, -40, 25, 53, -85, -112, 51, -61}; + private static final byte[] SIGNED = { + 55, -20, -102, 62, -2, 115, -3, 103, -30, -45, 87, -128, -124, 39, -45, -125, -30, 19, -103, 85, + -117, 99, 36, 44, 106, -94, -33, 51, 10, 62, 98, 81, 6, 55, 26, -123, -48, -78, 40, -83, 38, + 114, 18, 30, 12, 103, -77, 18, -10, -93, 126, -10, -99, 44, 123, -57, -98, -13, 40, 86, 90, 91, + 4, -127, -62, 10, -95, -26, 34, -23, 1, 3, 57, -70, -68, -74, 18, -107, -39, -85, 16, 87, 60, + 91, -71, 65, -43, -121, 116, -28, -75, 94, -68, -60, -24, 83, 113, -41, -47, -35, 11, 107, 117, + -22, -112, 9, -14, 126, -90, 107, 63, -106, -118, -91, -97, -128, 31, -108, -100, 102, 0, -40, + 25, 53, -85, -112, 51, -61 + }; private static final byte[] CONTENT_BYTES = StringUtils.getBytesUtf8("hello world"); private static final String SECRET_P12_BASE64 = "MIIGgAIBAzCCBjoGCSqGSIb3DQEHAaCCBisEggYnMIIGIzCCAygGCSqGSIb3DQEHAaCCAxkEggMV" - + "MIIDETCCAw0GCyqGSIb3DQEMCgECoIICsjCCAq4wKAYKKoZIhvcNAQwBAzAaBBTfraKzYbHQ1S+9" - + "Og5GtCQccMoZgAICBAAEggKAqYQ5X3GaQyBXepYj7EskFZ3bXYJkXv+OYIZQmzwWEMa13G7ve7BY" - + "yQ5SVWYlJYDpg2wDAp++PFE6nqGTzSe3Fw+HcbCiUDdY2nHdcDG5WS54ZEzQ8iJ2GaUzpGDQkVTX" - + "2mNp979ftks5n991kI056BXBxLXjQI06GTLJCu6e9snx7ow2hwJ4drNgfC3A6pENnMKl//O/QYxJ" - + "lqVkq9Y4xMUQYzFugzQNbN/8Z3ml6IaWTnWMaquFuGHSi6Ci98roj575M8oIVbI7HV8+bm5fYPoC" - + "8+Au9wmWgjdwI5ZkyIgQwBxMuTfL47xDaVBzhrXT+iX1dhI8Yh2E/vEpGf7D5/0jHJZe2f+II56n" - + "jfvgAwXarCP/XPViFtkfg59/NWgAB8KDxfOnWZiq9Yakw9SDr0fHEJAOw/7g9/hySZzkE69vpHNl" - + "2e5DJoSLNgHGkPMBJL5cDVaDvJm++JRsBsVP4DflPAMErp3wSbQoep6h7yyK2hLMFkwDetoaOdcM" - + "e+JV6rzjbCrfEWg8563oJy119USDbgG+4wbVFIWH5TFYE7hY+aQQZH9nI3h69IDHidpQ4llaVQkA" - + "sFMBGhr5oKzbbrf4qi5hdm2R7UMMNsNJTQPXhfY6yaD6PLUWbYJ1fyBzPK26dVVlnqvACyik0QcG" - + "UQMP5pgEZWey1bbQj6b9a+4iumSlXM3KOQco/nqx4zkPDskr9+V67eOULudiQm9rBevC/sH/dAMD" - + "9aeiFqiQI8/9qFATvUhXkk/UzQyIw5kL1TtOj0gZ+c7GyrFCf9BYa7S4ywymFz6Bwq5UMs+vjqMz" - + "6JckkNfds4YN21piFlnCnIorz+9wFME610UpLCsj1zFIMCMGCSqGSIb3DQEJFDEWHhQAcAByAGkA" - + "dgBhAHQAZQBrAGUAeTAhBgkqhkiG9w0BCRUxFAQSVGltZSAxMzU0Mzc4MjQ1MzA1MIIC8wYJKoZI" - + "hvcNAQcGoIIC5DCCAuACAQAwggLZBgkqhkiG9w0BBwEwKAYKKoZIhvcNAQwBBjAaBBSUpExQ6kOI" - + "8VuFs0MRfku3GddfmAICBACAggKg8NTeaId96ftUgJNvk7kcbAjf/1Gl3+nRJphNrU0VAQ1C2zyU" - + "85La3PuqRhEpgzQBp8vFydDqbPWorevxQuprG8W5vkDyB/CE4ZNJ/Vo55L8bZAlWKIPEKoH4GAhS" - + "gKmp8o/FWjuTs4OshOe32U0/d0WjeT3BG9xuGzLxNH9HvPTi8obMe8JZWYT/K0j26WeDrdbR8bZR" - + "nMg5aNZCbyuk42XuYUyXcA9/g4iVy0AuFEXm9qengkPGQ8dWYSdA4oGBzVxD32JIjm3BkwTgI84g" - + "wA5kvq1X4R9MxeHdMMafbf5H7j3MeSQBKoUgLFPp7ZWHcuEIF6eE0vqmobMT81SqQajUncludgfF" - + "UY7ykFwEZFbCZu+a9ueDt3HfBlrzBTMI2pYDJlm/0uDfukPRQ1Nk+PgyKLo8gxEB7Q9TSQQ4SeaB" - + "k22fOJ5QFH1go7kzPbbR/9GkUIYphscyVEYcztsHCDeIW6ajwzQYdtnDhSwKhPZTCFKm5oUIZ5kb" - + "+ilCQh12Mu6F9FyXiO+vWe8zVu0oBoS7xUUGNBZmkyUTzfUZ2ZuwWs6KxHryATIGCkG64evSrYqH" - + "nxuImCfA08ToVVeIHnOQk8jzgRdyifEs4nJxrWf9Ipn0ZlwOpEM4LBmBJDRiaOERP9YBTANAwKEk" - + "T6wt03nIg5Af7+/144cTedx5lGvjNW397ZFrWABpYr6WAlxd8IzVXn/4eCTun0yIsb3EcIkQN5es" - + "t4ao2eQz6gmalGRmXLKdPu2aa1XbGzv3yxNY7ldCf2W20nlxxpqJ9SsNFdorVnWiVNe/1tylNuaf" - + "2MsCs4xlHiD0A3MOrvgUc4aY9N52Ab/dd0VYGH5cZpoBB9G1LL8+LqIoM8dkFxrNg5AgKTk8O91D" - + "22RFKkRCWD/bMD0wITAJBgUrDgMCGgUABBTypWwWM5JDub1RzIXkRwfD7oQ9XwQUbgGuCBGKiU1C" - + "YAqwa61lyj/OG90CAgQA"; + + "MIIDETCCAw0GCyqGSIb3DQEMCgECoIICsjCCAq4wKAYKKoZIhvcNAQwBAzAaBBTfraKzYbHQ1S+9" + + "Og5GtCQccMoZgAICBAAEggKAqYQ5X3GaQyBXepYj7EskFZ3bXYJkXv+OYIZQmzwWEMa13G7ve7BY" + + "yQ5SVWYlJYDpg2wDAp++PFE6nqGTzSe3Fw+HcbCiUDdY2nHdcDG5WS54ZEzQ8iJ2GaUzpGDQkVTX" + + "2mNp979ftks5n991kI056BXBxLXjQI06GTLJCu6e9snx7ow2hwJ4drNgfC3A6pENnMKl//O/QYxJ" + + "lqVkq9Y4xMUQYzFugzQNbN/8Z3ml6IaWTnWMaquFuGHSi6Ci98roj575M8oIVbI7HV8+bm5fYPoC" + + "8+Au9wmWgjdwI5ZkyIgQwBxMuTfL47xDaVBzhrXT+iX1dhI8Yh2E/vEpGf7D5/0jHJZe2f+II56n" + + "jfvgAwXarCP/XPViFtkfg59/NWgAB8KDxfOnWZiq9Yakw9SDr0fHEJAOw/7g9/hySZzkE69vpHNl" + + "2e5DJoSLNgHGkPMBJL5cDVaDvJm++JRsBsVP4DflPAMErp3wSbQoep6h7yyK2hLMFkwDetoaOdcM" + + "e+JV6rzjbCrfEWg8563oJy119USDbgG+4wbVFIWH5TFYE7hY+aQQZH9nI3h69IDHidpQ4llaVQkA" + + "sFMBGhr5oKzbbrf4qi5hdm2R7UMMNsNJTQPXhfY6yaD6PLUWbYJ1fyBzPK26dVVlnqvACyik0QcG" + + "UQMP5pgEZWey1bbQj6b9a+4iumSlXM3KOQco/nqx4zkPDskr9+V67eOULudiQm9rBevC/sH/dAMD" + + "9aeiFqiQI8/9qFATvUhXkk/UzQyIw5kL1TtOj0gZ+c7GyrFCf9BYa7S4ywymFz6Bwq5UMs+vjqMz" + + "6JckkNfds4YN21piFlnCnIorz+9wFME610UpLCsj1zFIMCMGCSqGSIb3DQEJFDEWHhQAcAByAGkA" + + "dgBhAHQAZQBrAGUAeTAhBgkqhkiG9w0BCRUxFAQSVGltZSAxMzU0Mzc4MjQ1MzA1MIIC8wYJKoZI" + + "hvcNAQcGoIIC5DCCAuACAQAwggLZBgkqhkiG9w0BBwEwKAYKKoZIhvcNAQwBBjAaBBSUpExQ6kOI" + + "8VuFs0MRfku3GddfmAICBACAggKg8NTeaId96ftUgJNvk7kcbAjf/1Gl3+nRJphNrU0VAQ1C2zyU" + + "85La3PuqRhEpgzQBp8vFydDqbPWorevxQuprG8W5vkDyB/CE4ZNJ/Vo55L8bZAlWKIPEKoH4GAhS" + + "gKmp8o/FWjuTs4OshOe32U0/d0WjeT3BG9xuGzLxNH9HvPTi8obMe8JZWYT/K0j26WeDrdbR8bZR" + + "nMg5aNZCbyuk42XuYUyXcA9/g4iVy0AuFEXm9qengkPGQ8dWYSdA4oGBzVxD32JIjm3BkwTgI84g" + + "wA5kvq1X4R9MxeHdMMafbf5H7j3MeSQBKoUgLFPp7ZWHcuEIF6eE0vqmobMT81SqQajUncludgfF" + + "UY7ykFwEZFbCZu+a9ueDt3HfBlrzBTMI2pYDJlm/0uDfukPRQ1Nk+PgyKLo8gxEB7Q9TSQQ4SeaB" + + "k22fOJ5QFH1go7kzPbbR/9GkUIYphscyVEYcztsHCDeIW6ajwzQYdtnDhSwKhPZTCFKm5oUIZ5kb" + + "+ilCQh12Mu6F9FyXiO+vWe8zVu0oBoS7xUUGNBZmkyUTzfUZ2ZuwWs6KxHryATIGCkG64evSrYqH" + + "nxuImCfA08ToVVeIHnOQk8jzgRdyifEs4nJxrWf9Ipn0ZlwOpEM4LBmBJDRiaOERP9YBTANAwKEk" + + "T6wt03nIg5Af7+/144cTedx5lGvjNW397ZFrWABpYr6WAlxd8IzVXn/4eCTun0yIsb3EcIkQN5es" + + "t4ao2eQz6gmalGRmXLKdPu2aa1XbGzv3yxNY7ldCf2W20nlxxpqJ9SsNFdorVnWiVNe/1tylNuaf" + + "2MsCs4xlHiD0A3MOrvgUc4aY9N52Ab/dd0VYGH5cZpoBB9G1LL8+LqIoM8dkFxrNg5AgKTk8O91D" + + "22RFKkRCWD/bMD0wITAJBgUrDgMCGgUABBTypWwWM5JDub1RzIXkRwfD7oQ9XwQUbgGuCBGKiU1C" + + "YAqwa61lyj/OG90CAgQA"; public void testLoadPrivateKeyFromKeyStore() throws Exception { byte[] secretP12 = Base64.decodeBase64(SECRET_P12_BASE64); ByteArrayInputStream stream = new ByteArrayInputStream(secretP12); - PrivateKey privateKey = SecurityUtils.loadPrivateKeyFromKeyStore( - SecurityUtils.getPkcs12KeyStore(), stream, "notasecret", "privateKey", "notasecret"); + PrivateKey privateKey = + SecurityUtils.loadPrivateKeyFromKeyStore( + SecurityUtils.getPkcs12KeyStore(), stream, "notasecret", "privateKey", "notasecret"); assertEquals("RSA", privateKey.getAlgorithm()); assertEquals("PKCS#8", privateKey.getFormat()); byte[] actualEncoded = privateKey.getEncoded(); @@ -120,9 +124,11 @@ public void testLoadPrivateKeyFromKeyStore() throws Exception { } public void testSign() throws Exception { - byte[] actualSigned = SecurityUtils.sign( - SecurityUtils.getSha256WithRsaSignatureAlgorithm(), SecurityTestUtils.newRsaPrivateKey(), - CONTENT_BYTES); + byte[] actualSigned = + SecurityUtils.sign( + SecurityUtils.getSha256WithRsaSignatureAlgorithm(), + SecurityTestUtils.newRsaPrivateKey(), + CONTENT_BYTES); Assert.assertArrayEquals(SIGNED, actualSigned); } @@ -143,8 +149,8 @@ public X509Certificate verifyX509(TestCertificates.CertData caCert) throws Excep ArrayList certChain = new ArrayList(); certChain.add(TestCertificates.FOO_BAR_COM_CERT.getBase64Der()); certChain.add(TestCertificates.CA_CERT.getBase64Der()); - return SecurityUtils.verify(signatureAlgorithm, trustManager, certChain, signature, - data.getBytes("UTF-8")); + return SecurityUtils.verify( + signatureAlgorithm, trustManager, certChain, signature, data.getBytes("UTF-8")); } public void testVerifyX509() throws Exception { diff --git a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java index f325633f1..2aaf60c0c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java @@ -14,7 +14,6 @@ package com.google.api.client.util; - import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; @@ -49,8 +48,7 @@ public void testIsAssignableToOrFrom() { assertFalse(Types.isAssignableToOrFrom(String.class, List.class)); } - static class Foo { - } + static class Foo {} public void testNewInstance() { assertEquals(Object.class, Types.newInstance(Object.class).getClass()); @@ -74,8 +72,7 @@ public void testNewInstance() { } @SuppressWarnings("serial") - static class IntegerList extends ArrayList { - } + static class IntegerList extends ArrayList {} static class WildcardBounds { public Collection any; @@ -101,26 +98,19 @@ static class Resolve { public X x; } - static class IntegerResolve extends Resolve { - } + static class IntegerResolve extends Resolve {} - static class MedResolve extends Resolve { - } + static class MedResolve extends Resolve {} - static class DoubleResolve extends MedResolve { - } + static class DoubleResolve extends MedResolve {} - static class Med2Resolve extends MedResolve { - } + static class Med2Resolve extends MedResolve {} - static class LongResolve extends Med2Resolve { - } + static class LongResolve extends Med2Resolve {} - static class ArrayResolve extends Resolve { - } + static class ArrayResolve extends Resolve {} - static class ParameterizedResolve extends Resolve, Integer> { - } + static class ParameterizedResolve extends Resolve, Integer> {} public void testResolveTypeVariable() throws Exception { // t @@ -131,16 +121,21 @@ public void testResolveTypeVariable() throws Exception { assertEquals(Long.class, resolveTypeVariable(new LongResolve().getClass(), tTypeVar)); assertEquals(Double.class, resolveTypeVariable(new DoubleResolve().getClass(), tTypeVar)); // partially resolved - assertEquals(MedResolve.class, + assertEquals( + MedResolve.class, ((TypeVariable) resolveTypeVariable(new MedResolve().getClass(), tTypeVar)) .getGenericDeclaration()); // x TypeVariable xTypeVar = (TypeVariable) Resolve.class.getField("x").getGenericType(); assertNull(resolveTypeVariable(new Object().getClass(), xTypeVar)); - assertEquals(Boolean.class, + assertEquals( + Boolean.class, Types.getArrayComponentType(resolveTypeVariable(new ArrayResolve().getClass(), xTypeVar))); - assertEquals(Collection.class, Types.getRawClass( - (ParameterizedType) resolveTypeVariable(new ParameterizedResolve().getClass(), xTypeVar))); + assertEquals( + Collection.class, + Types.getRawClass( + (ParameterizedType) + resolveTypeVariable(new ParameterizedResolve().getClass(), xTypeVar))); } private static Type resolveTypeVariable(Type context, TypeVariable typeVariable) { @@ -150,8 +145,10 @@ private static Type resolveTypeVariable(Type context, TypeVariable typeVariab public class A { public Iterable i; public ArrayList a; + @SuppressWarnings({"unchecked", "rawtypes"}) public ArrayList aNoType; + public Stack wild; public Vector arr; public Vector tarr; @@ -160,30 +157,38 @@ public class A { public ArrayList atv; } - public class B extends A { - } + public class B extends A {} public void testGetIterableParameter() throws Exception { - assertEquals("T", + assertEquals( + "T", ((TypeVariable) Types.getIterableParameter(A.class.getField("tv").getGenericType())) .getName()); - assertEquals("T", + assertEquals( + "T", ((TypeVariable) Types.getIterableParameter(A.class.getField("atv").getGenericType())) .getName()); assertEquals(String.class, Types.getIterableParameter(A.class.getField("i").getGenericType())); assertEquals(String.class, Types.getIterableParameter(A.class.getField("a").getGenericType())); - assertEquals("E", + assertEquals( + "E", ((TypeVariable) Types.getIterableParameter(A.class.getField("aNoType").getGenericType())) .getName()); - assertEquals(Integer.class, Types.getArrayComponentType( - Types.getIterableParameter(A.class.getField("arr").getGenericType()))); - assertEquals("T", + assertEquals( + Integer.class, + Types.getArrayComponentType( + Types.getIterableParameter(A.class.getField("arr").getGenericType()))); + assertEquals( + "T", ((GenericArrayType) Types.getIterableParameter(A.class.getField("tarr").getGenericType())) - .getGenericComponentType().toString()); - assertEquals(ArrayList.class, + .getGenericComponentType() + .toString()); + assertEquals( + ArrayList.class, ((ParameterizedType) Types.getIterableParameter(A.class.getField("list").getGenericType())) .getRawType()); - assertEquals(Number.class, + assertEquals( + Number.class, ((WildcardType) Types.getIterableParameter(A.class.getField("wild").getGenericType())) .getUpperBounds()[0]); } @@ -191,8 +196,10 @@ public void testGetIterableParameter() throws Exception { public class C { public Map i; public ArrayMap a; + @SuppressWarnings({"unchecked", "rawtypes"}) public ArrayMap aNoType; + public TreeMap wild; public Vector arr; public HashMap tarr; @@ -201,29 +208,38 @@ public class C { public ArrayMap atv; } - public class D extends C { - } + public class D extends C {} public void testGetMapParameter() throws Exception { - assertEquals("T", + assertEquals( + "T", ((TypeVariable) Types.getMapValueParameter(C.class.getField("tv").getGenericType())) .getName()); - assertEquals("T", + assertEquals( + "T", ((TypeVariable) Types.getMapValueParameter(C.class.getField("atv").getGenericType())) .getName()); assertEquals(String.class, Types.getMapValueParameter(C.class.getField("i").getGenericType())); assertEquals(String.class, Types.getMapValueParameter(C.class.getField("a").getGenericType())); - assertEquals("V", + assertEquals( + "V", ((TypeVariable) Types.getMapValueParameter(C.class.getField("aNoType").getGenericType())) .getName()); - assertEquals(Integer.class, Types.getArrayComponentType( - Types.getIterableParameter(A.class.getField("arr").getGenericType()))); - assertEquals("T", ((GenericArrayType) Types.getMapValueParameter( - C.class.getField("tarr").getGenericType())).getGenericComponentType().toString()); - assertEquals(ArrayList.class, + assertEquals( + Integer.class, + Types.getArrayComponentType( + Types.getIterableParameter(A.class.getField("arr").getGenericType()))); + assertEquals( + "T", + ((GenericArrayType) Types.getMapValueParameter(C.class.getField("tarr").getGenericType())) + .getGenericComponentType() + .toString()); + assertEquals( + ArrayList.class, ((ParameterizedType) Types.getMapValueParameter(C.class.getField("list").getGenericType())) .getRawType()); - assertEquals(Number.class, + assertEquals( + Number.class, ((WildcardType) Types.getMapValueParameter(C.class.getField("wild").getGenericType())) .getUpperBounds()[0]); } @@ -237,10 +253,13 @@ public void testIterableOf() { public void testToArray() { assertTrue( - Arrays.equals(new String[] {"a", "b"}, + Arrays.equals( + new String[] {"a", "b"}, (String[]) Types.toArray(ImmutableList.of("a", "b"), String.class))); - assertTrue(Arrays.equals( - new Integer[] {1, 2}, (Integer[]) Types.toArray(ImmutableList.of(1, 2), Integer.class))); + assertTrue( + Arrays.equals( + new Integer[] {1, 2}, + (Integer[]) Types.toArray(ImmutableList.of(1, 2), Integer.class))); assertTrue( Arrays.equals(new int[] {1, 2}, (int[]) Types.toArray(ImmutableList.of(1, 2), int.class))); int[][] arr = (int[][]) Types.toArray(ImmutableList.of(new int[] {1, 2}), int[].class); diff --git a/pom.xml b/pom.xml index e18210518..6c709c747 100644 --- a/pom.xml +++ b/pom.xml @@ -530,6 +530,15 @@ org.sonatype.plugins nexus-staging-maven-plugin + + com.coveo + fmt-maven-plugin + 2.6.0 + + + true + + diff --git a/samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java b/samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java index 8fb16c04a..2e8e08128 100644 --- a/samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java +++ b/samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java @@ -1,11 +1,11 @@ /* * Copyright (c) 2011 Google Inc. - * + * * 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 @@ -25,13 +25,12 @@ import com.google.api.client.json.JsonObjectParser; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.client.util.Key; - import java.util.List; /** * Simple example for the Dailymotion * Graph API. - * + * * @author Yaniv Inbar */ public class DailyMotionSample { @@ -41,8 +40,7 @@ public class DailyMotionSample { /** Represents a video feed. */ public static class VideoFeed { - @Key - public List

            Maven Usage

            For information on how to add these libraries to your Maven project please see https://developers.google.com/api-client-library/java/google-http-java-client/setup#maven. -

            Eclipse

            - A .classpath file snippet that can be included in your project's .classpath - has been provided - here. Please only use the classpathentry's you - actually need (see below for details). -

            ProGuard

            A ProGuard configuration file proguard-google-http-client.txt From 5e1e74faf6b3f1929d2561a15f0c93b4b4083038 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 26 Mar 2019 11:22:49 -0400 Subject: [PATCH 075/983] remove assembly from BOM (#627) --- google-http-client-bom/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e6e72661b..2b4287634 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -80,11 +80,6 @@ google-http-client-appengine 1.29.1-SNAPSHOT - - com.google.http-client - google-http-client-assembly - 1.29.1-SNAPSHOT - com.google.http-client google-http-client-findbugs From da597e87b9d7463de4eb7da55256c648d28fe3ba Mon Sep 17 00:00:00 2001 From: Thomas Decaux Date: Tue, 26 Mar 2019 17:10:28 +0100 Subject: [PATCH 076/983] Fix int type transformed as BigDecimal value when parsing as Map (#529) * Fix int type transformed as BigDecimal value Using with Jackson2 parser, a simple parsing of { "data" : 1} gives a BigDecimal instead an integer. In my case, ``valueClass`` is Object, but the JSON current token is VALUE_NUMBER_INT not FLOAT. * added unit test * Fix Single classes * Fix Test failing. --- .../test/json/AbstractJsonFactoryTest.java | 43 ++++++++++++++----- .../google/api/client/json/JsonParser.java | 4 ++ 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java index 8bf518109..1f11dfd38 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java @@ -482,6 +482,8 @@ public static class MapOfMapType { static final String MAP_TYPE = "{\"value\":[{\"map1\":{\"k1\":1,\"k2\":2},\"map2\":{\"kk1\":3,\"kk2\":4}}]}"; + static final String BIGDECIMAL_MAP_TYPE = + "{\"value\":[{\"map1\":{\"k1\":1.14566,\"k2\":2.14},\"map2\":{\"kk1\":3.29,\"kk2\":4.69}}]}"; public void testParser_mapType() throws Exception { // parse @@ -510,16 +512,35 @@ public void testParser_hashmapForMapType() throws Exception { parser = factory.createJsonParser(MAP_TYPE); parser.nextToken(); @SuppressWarnings("unchecked") - HashMap>>> result = + HashMap>>> result = parser.parse(HashMap.class); // serialize assertEquals(MAP_TYPE, factory.toString(result)); // check parsed result + ArrayList>> value = result.get("value"); + ArrayMap> firstMap = value.get(0); + ArrayMap map1 = firstMap.get("map1"); + Integer integer = map1.get("k1"); + assertEquals(1, integer.intValue()); + } + + public void testParser_hashmapForMapTypeWithBigDecimal() throws Exception { + // parse + JsonFactory factory = newFactory(); + JsonParser parser; + parser = factory.createJsonParser(BIGDECIMAL_MAP_TYPE); + parser.nextToken(); + @SuppressWarnings("unchecked") + HashMap>>> result = + parser.parse(HashMap.class); + // serialize + assertEquals(BIGDECIMAL_MAP_TYPE, factory.toString(result)); + // check parsed result ArrayList>> value = result.get("value"); ArrayMap> firstMap = value.get(0); ArrayMap map1 = firstMap.get("map1"); - BigDecimal integer = map1.get("k1"); - assertEquals(1, integer.intValue()); + BigDecimal bigDecimal = map1.get("k1"); + assertEquals(BigDecimal.valueOf(1.14566).setScale(5), bigDecimal); } public static class WildCardTypes { @@ -547,8 +568,8 @@ public void testParser_wildCardType() throws Exception { assertEquals(WILDCARD_TYPE, factory.toString(result)); // check parsed result Collection[] simple = result.simple; - ArrayList wildcard = (ArrayList) simple[0]; - BigDecimal wildcardFirstValue = wildcard.get(0); + ArrayList wildcard = (ArrayList) simple[0]; + Integer wildcardFirstValue = wildcard.get(0); assertEquals(1, wildcardFirstValue.intValue()); Collection[] upper = result.upper; ArrayList wildcardUpper = (ArrayList) upper[0]; @@ -558,8 +579,8 @@ public void testParser_wildCardType() throws Exception { ArrayList wildcardLower = (ArrayList) lower[0]; Integer wildcardFirstValueLower = wildcardLower.get(0); assertEquals(1, wildcardFirstValueLower.intValue()); - Map map = (Map) result.map; - BigDecimal mapValue = map.get("v"); + Map map = (Map) result.map; + Integer mapValue = map.get("v"); assertEquals(1, mapValue.intValue()); Map mapUpper = (Map) result.mapUpper; Integer mapUpperValue = mapUpper.get("v"); @@ -771,16 +792,16 @@ public void testParser_treemapForTypeVariableType() throws Exception { ArrayList arr = (ArrayList) result.get("arr"); assertEquals(2, arr.size()); assertEquals(Data.nullOf(Object.class), arr.get(0)); - ArrayList subArr = (ArrayList) arr.get(1); + ArrayList subArr = (ArrayList) arr.get(1); assertEquals(2, subArr.size()); assertEquals(Data.nullOf(Object.class), subArr.get(0)); - BigDecimal arrValue = subArr.get(1); + Integer arrValue = subArr.get(1); assertEquals(1, arrValue.intValue()); // null value Object nullValue = result.get("nullValue"); assertEquals(Data.nullOf(Object.class), nullValue); // value - BigDecimal value = (BigDecimal) result.get("value"); + Integer value = (Integer) result.get("value"); assertEquals(1, value.intValue()); } @@ -1519,7 +1540,7 @@ public void testParser_heterogeneousSchema_genericJson() throws Exception { assertEquals(4, dog.numberOfLegs); assertEquals(3, ((DogGenericJson) dog).tricksKnown); assertEquals("this is not being used!", dog.get("unusedInfo")); - BigDecimal foo = ((BigDecimal) ((ArrayMap) dog.get("unused")).get("foo")); + Integer foo = ((Integer) ((ArrayMap) dog.get("unused")).get("foo")); assertEquals(200, foo.intValue()); } diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index 75972a16c..44bec3f51 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -828,6 +828,10 @@ private final Object parseValue( Preconditions.checkArgument( fieldContext == null || fieldContext.getAnnotation(JsonString.class) == null, "number type formatted as a JSON number cannot use @JsonString annotation"); + if (getCurrentToken() == JsonToken.VALUE_NUMBER_INT + && (valueClass == null || valueClass.isAssignableFrom(Integer.class))) { + return getIntValue(); + } if (valueClass == null || valueClass.isAssignableFrom(BigDecimal.class)) { return getDecimalValue(); } From b6f375540c71add5978f85ed6473ea5448e4cfb5 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 4 Apr 2019 18:04:31 -0400 Subject: [PATCH 077/983] fix up dependencies (#628) --- pom.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index aae946f68..2fea3c146 100644 --- a/pom.xml +++ b/pom.xml @@ -229,11 +229,6 @@ mockito-all 1.10.19 - - javax.jdo - jdo2-api - ${project.jdo2-api.version} - mysql mysql-connector-java @@ -565,7 +560,7 @@ 1.1.4c 1.2 4.5.5 - 0.18.0 + 0.19.2 .. From 149b6c3f5cbcff7f51edfdf550d739746cb69630 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 25 Apr 2019 11:31:19 -0700 Subject: [PATCH 078/983] Add publish javadoc kokoro job (#631) * Add publish javadoc kokoro job * Update maven-javadoc-plugin * Add source config for maven-javadoc-plugin * Fix gson hosted javadoc location * Update maven-site-plugin and skip site generation for bom artifact * we don't need to stage the site as we're aggregating * Fix url for jackson-core-asl javadocs --- .kokoro/release/publish_javadoc.cfg | 19 ++++++++ .kokoro/release/publish_javadoc.sh | 55 ++++++++++++++++++++++++ google-http-client-apache-legacy/pom.xml | 2 +- google-http-client-bom/pom.xml | 12 ++++++ google-http-client-gson/pom.xml | 2 +- google-http-client-jackson/pom.xml | 2 +- pom.xml | 14 ++++-- 7 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 .kokoro/release/publish_javadoc.cfg create mode 100755 .kokoro/release/publish_javadoc.sh diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 000000000..fabf592e2 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 000000000..b65eb9f90 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# 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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -DskipTests=true + +NAME=google-http-client +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} + +popd diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 405953bdb..1545c6257 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -18,7 +18,7 @@ https://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation + https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 2b4287634..ec6bd9deb 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -130,6 +130,18 @@ false + + maven-javadoc-plugin + + true + + + + maven-site-plugin + + true + + diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 48a134233..4c810993d 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -18,7 +18,7 @@ http://download.oracle.com/javase/7/docs/api/ - https://www.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} + https://static.javadoc.io/com.google.code.gson/gson/${project.gson.version} ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index fdeb9c22d..731ecc527 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -18,7 +18,7 @@ http://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation + https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/pom.xml b/pom.xml index 2fea3c146..c8175302d 100644 --- a/pom.xml +++ b/pom.xml @@ -304,7 +304,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 + 3.1.0 attach-javadocs @@ -357,7 +357,12 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 2.7 + 3.0.0 + + + org.apache.maven.plugins + maven-site-plugin + 3.7.1 @@ -385,6 +390,7 @@ maven-javadoc-plugin none + 7 @@ -397,9 +403,9 @@ http://download.oracle.com/javase/7/docs/api/ http://cloud.google.com/appengine/docs/java/javadoc - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation + https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ - https://www.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} + https://static.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} https://google.github.io/guava/releases/${project.guava.version}/api/docs/ Google HTTP Client Library for Java ${project.version} From 78c130de1bd8d94b2913669e9d941f1b0ae4793d Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 25 Apr 2019 12:18:45 -0700 Subject: [PATCH 079/983] Release v1.29.1 (#633) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-legacy/pom.xml | 4 +-- google-http-client-apache/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 24 ++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 6 ++-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 34 +++++++++---------- 19 files changed, 63 insertions(+), 63 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 3f4c088d1..d869ac366 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.29.1-SNAPSHOT + 1.29.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.29.1-SNAPSHOT + 1.29.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.29.1-SNAPSHOT + 1.29.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 52777dd3b..4964c83e3 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-android - 1.29.1-SNAPSHOT + 1.29.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 1545c6257..0c12e61d1 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-apache - 1.29.1-SNAPSHOT + 1.29.1 Legacy Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache/pom.xml index e5db92891..67dfa5029 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-apache - 2.1.1-SNAPSHOT + 2.1.1 Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index ceafbf5a7..22524a033 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-appengine - 1.29.1-SNAPSHOT + 1.29.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f97b3287a..8910bfbcb 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.29.1-SNAPSHOT + 1.29.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index 2033cff81..cbe294620 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.29.0 + 1.29.1 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ec6bd9deb..914af072a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.29.1-SNAPSHOT + 1.29.1 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-android - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-apache - 2.1.1-SNAPSHOT + 2.1.1 com.google.http-client google-http-client-appengine - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-findbugs - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-gson - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-jackson - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-jackson2 - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-protobuf - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-test - 1.29.1-SNAPSHOT + 1.29.1 com.google.http-client google-http-client-xml - 1.29.1-SNAPSHOT + 1.29.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e2521be77..9a2b747ea 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-findbugs - 1.29.1-SNAPSHOT + 1.29.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 4c810993d..684201276 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-gson - 1.29.1-SNAPSHOT + 1.29.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index 731ecc527..cbe9fa716 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-jackson - 1.29.1-SNAPSHOT + 1.29.1 Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 5d56ef301..acc160119 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-jackson2 - 1.29.1-SNAPSHOT + 1.29.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 43cbcb61e..5fb842069 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-protobuf - 1.29.1-SNAPSHOT + 1.29.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index f566c9117..d0bb02226 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-test - 1.29.1-SNAPSHOT + 1.29.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e87a35639..e7e719708 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client-xml - 1.29.1-SNAPSHOT + 1.29.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 76197bd34..578e83103 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../pom.xml google-http-client - 1.29.1-SNAPSHOT + 1.29.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c8175302d..34ffce8da 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 pom Parent for the Google HTTP Client Library for Java @@ -553,8 +553,8 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.29.1-SNAPSHOT - 2.1.1-SNAPSHOT + 1.29.1 + 2.1.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ec60b00b7..607b2f9e2 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.29.1-SNAPSHOT + 1.29.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 115db9d3f..2c2c6ce18 100644 --- a/versions.txt +++ b/versions.txt @@ -1,20 +1,20 @@ # Format: # module:released-version:current-version -google-http-client:1.29.0:1.29.1-SNAPSHOT -google-http-client-bom:1.29.0:1.29.1-SNAPSHOT -google-http-client-parent:1.29.0:1.29.1-SNAPSHOT -google-http-client-android:1.29.0:1.29.1-SNAPSHOT -google-http-client-android-test:1.29.0:1.29.1-SNAPSHOT -google-http-client-apache:2.1.0:2.1.1-SNAPSHOT -google-http-client-apache-legacy:1.29.0:1.29.1-SNAPSHOT -google-http-client-appengine:1.29.0:1.29.1-SNAPSHOT -google-http-client-assembly:1.29.0:1.29.1-SNAPSHOT -google-http-client-findbugs:1.29.0:1.29.1-SNAPSHOT -google-http-client-gson:1.29.0:1.29.1-SNAPSHOT -google-http-client-jackson:1.29.0:1.29.1-SNAPSHOT -google-http-client-jackson2:1.29.0:1.29.1-SNAPSHOT -google-http-client-jdo:1.29.0:1.29.1-SNAPSHOT -google-http-client-protobuf:1.29.0:1.29.1-SNAPSHOT -google-http-client-test:1.29.0:1.29.1-SNAPSHOT -google-http-client-xml:1.29.0:1.29.1-SNAPSHOT +google-http-client:1.29.1:1.29.1 +google-http-client-bom:1.29.1:1.29.1 +google-http-client-parent:1.29.1:1.29.1 +google-http-client-android:1.29.1:1.29.1 +google-http-client-android-test:1.29.1:1.29.1 +google-http-client-apache:2.1.1:2.1.1 +google-http-client-apache-legacy:1.29.1:1.29.1 +google-http-client-appengine:1.29.1:1.29.1 +google-http-client-assembly:1.29.1:1.29.1 +google-http-client-findbugs:1.29.1:1.29.1 +google-http-client-gson:1.29.1:1.29.1 +google-http-client-jackson:1.29.1:1.29.1 +google-http-client-jackson2:1.29.1:1.29.1 +google-http-client-jdo:1.29.1:1.29.1 +google-http-client-protobuf:1.29.1:1.29.1 +google-http-client-test:1.29.1:1.29.1 +google-http-client-xml:1.29.1:1.29.1 From 0988ae4e0f26a80f579b6adb2b276dd8254928de Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 26 Apr 2019 09:07:04 -0700 Subject: [PATCH 080/983] Bump next snapshot (#634) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-legacy/pom.xml | 4 +-- google-http-client-apache/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 ++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 6 ++-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 34 +++++++++---------- 18 files changed, 62 insertions(+), 62 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d869ac366..5accbaca3 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.29.1 + 1.29.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.29.1 + 1.29.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.29.1 + 1.29.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 4964c83e3..f28dc3d1e 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-android - 1.29.1 + 1.29.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml index 0c12e61d1..26e0d01c6 100644 --- a/google-http-client-apache-legacy/pom.xml +++ b/google-http-client-apache-legacy/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-apache - 1.29.1 + 1.29.2-SNAPSHOT Legacy Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache/pom.xml index 67dfa5029..126ae7cc9 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-apache - 2.1.1 + 2.1.2-SNAPSHOT Apache HTTP transport for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 22524a033..611d20532 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.29.1 + 1.29.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 8910bfbcb..4888ef25f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.29.1 + 1.29.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 914af072a..c4e73d148 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.29.1 + 1.29.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-android - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-apache - 2.1.1 + 2.1.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-jackson - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-test - 1.29.1 + 1.29.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.29.1 + 1.29.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9a2b747ea..9d126ecbf 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.29.1 + 1.29.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 684201276..14734edc9 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.29.1 + 1.29.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml index cbe9fa716..67a928cb4 100644 --- a/google-http-client-jackson/pom.xml +++ b/google-http-client-jackson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-jackson - 1.29.1 + 1.29.2-SNAPSHOT Jackson extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index acc160119..070ff5008 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.29.1 + 1.29.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5fb842069..b7245b539 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.29.1 + 1.29.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d0bb02226..f55edd716 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-test - 1.29.1 + 1.29.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e7e719708..489d97c11 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.29.1 + 1.29.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 578e83103..1886057b4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../pom.xml google-http-client - 1.29.1 + 1.29.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 34ffce8da..6776e672b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java @@ -553,8 +553,8 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.29.1 - 2.1.1 + 1.29.2-SNAPSHOT + 2.1.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 607b2f9e2..5edea60b8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.29.1 + 1.29.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2c2c6ce18..f90ff8086 100644 --- a/versions.txt +++ b/versions.txt @@ -1,20 +1,20 @@ # Format: # module:released-version:current-version -google-http-client:1.29.1:1.29.1 -google-http-client-bom:1.29.1:1.29.1 -google-http-client-parent:1.29.1:1.29.1 -google-http-client-android:1.29.1:1.29.1 -google-http-client-android-test:1.29.1:1.29.1 -google-http-client-apache:2.1.1:2.1.1 -google-http-client-apache-legacy:1.29.1:1.29.1 -google-http-client-appengine:1.29.1:1.29.1 -google-http-client-assembly:1.29.1:1.29.1 -google-http-client-findbugs:1.29.1:1.29.1 -google-http-client-gson:1.29.1:1.29.1 -google-http-client-jackson:1.29.1:1.29.1 -google-http-client-jackson2:1.29.1:1.29.1 -google-http-client-jdo:1.29.1:1.29.1 -google-http-client-protobuf:1.29.1:1.29.1 -google-http-client-test:1.29.1:1.29.1 -google-http-client-xml:1.29.1:1.29.1 +google-http-client:1.29.1:1.29.2-SNAPSHOT +google-http-client-bom:1.29.1:1.29.2-SNAPSHOT +google-http-client-parent:1.29.1:1.29.2-SNAPSHOT +google-http-client-android:1.29.1:1.29.2-SNAPSHOT +google-http-client-android-test:1.29.1:1.29.2-SNAPSHOT +google-http-client-apache:2.1.1:2.1.2-SNAPSHOT +google-http-client-apache-legacy:1.29.1:1.29.2-SNAPSHOT +google-http-client-appengine:1.29.1:1.29.2-SNAPSHOT +google-http-client-assembly:1.29.1:1.29.2-SNAPSHOT +google-http-client-findbugs:1.29.1:1.29.2-SNAPSHOT +google-http-client-gson:1.29.1:1.29.2-SNAPSHOT +google-http-client-jackson:1.29.1:1.29.2-SNAPSHOT +google-http-client-jackson2:1.29.1:1.29.2-SNAPSHOT +google-http-client-jdo:1.29.1:1.29.2-SNAPSHOT +google-http-client-protobuf:1.29.1:1.29.2-SNAPSHOT +google-http-client-test:1.29.1:1.29.2-SNAPSHOT +google-http-client-xml:1.29.1:1.29.2-SNAPSHOT From 4d612030a33fe5b1c638af405b650ce7f0e514c1 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 8 May 2019 14:26:43 -0700 Subject: [PATCH 081/983] Update links to javadoc to point to googleapis.dev (#636) * Update links to javadoc to point to googleapis.dev * Fix release notes link * Fix some GitHub urls --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 468a5efa7..04a3ee4af 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ The library supports the following Java environments: The following related projects are built on the Google HTTP Client Library for Java: -- [Google OAuth Client Library for Java](https://github.com/google/google-oauth-java-client), +- [Google OAuth Client Library for Java](https://github.com/googleapis/google-oauth-java-client), for the OAuth 2.0 and OAuth 1.0a authorization standards. -- [Google APIs Client Library for Java](https://github.com/google/google-api-java-client), for +- [Google APIs Client Library for Java](https://github.com/googleapis/google-api-java-client), for access to Google APIs. This is an open-source library, and @@ -32,8 +32,8 @@ are welcome. - [Developer's Guide](https://developers.google.com/api-client-library/java/google-http-java-client/) - [Setup Instructions](https://developers.google.com/api-client-library/java/google-http-java-client/setup) -- [JavaDoc](https://developers.google.com/api-client-library/java/google-http-java-client/reference/index) -- [Release Notes](https://developers.google.com/api-client-library/java/google-http-java-client/release-notes) +- [JavaDoc](https://googleapis.dev/java/google-http-client/latest/) +- [Release Notes](https://github.com/googleapis/google-http-java-client/releases) - [Support (Questions, Bugs)](https://developers.google.com/api-client-library/java/google-http-java-client/support) ## CI Status From 1f28f54fa149de4a1e9fe06431933040819ca6a0 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 15 May 2019 09:27:30 -0700 Subject: [PATCH 082/983] Republish the fixed apache extensions as google-http-client-apache-v2 (#637) * Republish the fixed apache extensions as google-http-client-apache-v2 * Fix parent version * Remove google-http-client-apache and google-http-client-apache-legacy * Deprecate the public interfaces for the legacy apache extensions. Deprecates the package com.google.api.client.http.apache Deprecates the com.google.api.client.http.apache.AppacheHttpTransport class. * Clean up bom versions. Appengine artifact does not need to depend upon the apache artifact * Fix assembly references to apache artifact * Fix main dependency management config * Fix license headers * Update javadoc from review * Declare explicit exceptions thrown in tests * Rename test variables * Replace StringUtils.getbytesUtf8() --- google-http-client-android/pom.xml | 4 - google-http-client-apache-legacy/pom.xml | 116 ------ .../http/apache/ApacheHttpTransport.java | 387 ------------------ .../apache/SSLSocketFactoryExtension.java | 59 --- .../http/apache/ApacheHttpTransportTest.java | 120 ------ .../pom.xml | 8 +- .../http/apache/v2}/ApacheHttpRequest.java | 26 +- .../http/apache/v2}/ApacheHttpResponse.java | 14 +- .../http/apache/v2/ApacheHttpTransport.java | 202 +++++++++ .../client/http/apache/v2}/ContentEntity.java | 8 +- .../http/apache/v2}/HttpExtensionMethod.java | 4 +- .../client/http/apache/v2}/package-info.java | 10 +- .../apache/v2/ApacheHttpTransportTest.java | 178 ++++++++ .../http/apache/ApacheHttpTransportTest.java | 120 ------ google-http-client-assembly/assembly.xml | 8 +- google-http-client-assembly/pom.xml | 2 +- ...oogle-http-client-apache-v2.jar.properties | 1 + .../google-http-client-apache.jar.properties | 1 - google-http-client-bom/pom.xml | 4 +- .../http/apache/ApacheHttpTransport.java | 3 + .../api/client/http/apache/package-info.java | 2 + pom.xml | 8 +- versions.txt | 3 +- 23 files changed, 436 insertions(+), 852 deletions(-) delete mode 100644 google-http-client-apache-legacy/pom.xml delete mode 100644 google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java delete mode 100644 google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java delete mode 100644 google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java rename {google-http-client-apache => google-http-client-apache-v2}/pom.xml (93%) rename {google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache => google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2}/ApacheHttpRequest.java (77%) rename {google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache => google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2}/ApacheHttpResponse.java (97%) create mode 100644 google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java rename {google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache => google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2}/ContentEntity.java (94%) rename {google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache => google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2}/HttpExtensionMethod.java (93%) rename {google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache => google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2}/package-info.java (85%) create mode 100644 google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java delete mode 100644 google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java create mode 100644 google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties delete mode 100644 google-http-client-assembly/properties/google-http-client-apache.jar.properties diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index f28dc3d1e..0db928781 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -48,9 +48,5 @@ com.google.http-client google-http-client - - com.google.http-client - google-http-client-apache - diff --git a/google-http-client-apache-legacy/pom.xml b/google-http-client-apache-legacy/pom.xml deleted file mode 100644 index 26e0d01c6..000000000 --- a/google-http-client-apache-legacy/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - 4.0.0 - - com.google.http-client - google-http-client-parent - 1.29.2-SNAPSHOT - ../pom.xml - - google-http-client-apache - 1.29.2-SNAPSHOT - Legacy Apache HTTP transport for the Google HTTP Client Library for Java. - - - - - maven-javadoc-plugin - - - https://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} - - ${project.name} ${project.version} - ${project.artifactId} ${project.version} - - - - maven-source-plugin - - - source-jar - compile - - jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.5 - - - add-test-source - generate-test-sources - - add-test-source - - - - target/generated-test-sources - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - com.google.api.client.http.apache - - - - - - org.apache.felix - maven-bundle-plugin - 2.5.4 - - - bundle-manifest - process-classes - - manifest - - - - - - - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-test - test - - - junit - junit - test - - - com.google.guava - guava - test - - - org.apache.httpcomponents - httpclient - 4.2.6 - - - org.mockito - mockito-all - test - - - diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java deleted file mode 100644 index 2dfda73fe..000000000 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ /dev/null @@ -1,387 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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.apache; - -import com.google.api.client.http.HttpMethods; -import com.google.api.client.http.HttpRequest; -import com.google.api.client.http.HttpTransport; -import com.google.api.client.util.Beta; -import com.google.api.client.util.Preconditions; -import com.google.api.client.util.SecurityUtils; -import com.google.api.client.util.SslUtils; -import java.io.IOException; -import java.io.InputStream; -import java.net.ProxySelector; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.cert.CertificateFactory; -import javax.net.ssl.SSLContext; -import org.apache.http.HttpHost; -import org.apache.http.HttpVersion; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpDelete; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpHead; -import org.apache.http.client.methods.HttpOptions; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.methods.HttpPut; -import org.apache.http.client.methods.HttpRequestBase; -import org.apache.http.client.methods.HttpTrace; -import org.apache.http.client.params.ClientPNames; -import org.apache.http.conn.ClientConnectionManager; -import org.apache.http.conn.params.ConnManagerParams; -import org.apache.http.conn.params.ConnPerRouteBean; -import org.apache.http.conn.params.ConnRouteParams; -import org.apache.http.conn.scheme.PlainSocketFactory; -import org.apache.http.conn.scheme.Scheme; -import org.apache.http.conn.scheme.SchemeRegistry; -import org.apache.http.conn.ssl.SSLSocketFactory; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; -import org.apache.http.impl.conn.DefaultHttpRoutePlanner; -import org.apache.http.impl.conn.ProxySelectorRoutePlanner; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.params.BasicHttpParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; - -/** - * Thread-safe HTTP transport based on the Apache HTTP Client library. - * - *

            Implementation is thread-safe, as long as any parameter modification to the {@link - * #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum efficiency, - * applications should use a single globally-shared instance of the HTTP transport. - * - *

            Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link - * #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. - * Alternatively, use {@link #ApacheHttpTransport()} and change the {@link #getHttpClient()}. Please - * read the Apache HTTP - * Client connection management tutorial for more complex configuration options. - * - * @since 1.0 - * @author Yaniv Inbar - */ -public final class ApacheHttpTransport extends HttpTransport { - - /** Apache HTTP client. */ - private final HttpClient httpClient; - - /** - * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. - * - *

            Use {@link Builder} to modify HTTP client options. - * - * @since 1.3 - */ - public ApacheHttpTransport() { - this(newDefaultHttpClient()); - } - - /** - * Constructor that allows an alternative Apache HTTP client to be used. - * - *

            Note that a few settings are overridden: - * - *

              - *
            • HTTP version is set to 1.1 using {@link HttpProtocolParams#setVersion} with {@link - * HttpVersion#HTTP_1_1}. - *
            • Redirects are disabled using {@link ClientPNames#HANDLE_REDIRECTS}. - *
            • {@link ConnManagerParams#setTimeout} and {@link - * HttpConnectionParams#setConnectionTimeout} are set on each request based on {@link - * HttpRequest#getConnectTimeout()}. - *
            • {@link HttpConnectionParams#setSoTimeout} is set on each request based on {@link - * HttpRequest#getReadTimeout()}. - *
            - * - *

            Use {@link Builder} for a more user-friendly way to modify the HTTP client options. - * - * @param httpClient Apache HTTP client to use - * @since 1.6 - */ - public ApacheHttpTransport(HttpClient httpClient) { - this.httpClient = httpClient; - HttpParams params = httpClient.getParams(); - if (params == null) { - params = newDefaultHttpClient().getParams(); - } - HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); - params.setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, false); - } - - /** Returns a new instance of the default HTTP parameters we use. */ - static HttpParams newDefaultHttpParams() { - HttpParams params = new BasicHttpParams(); - // Turn off stale checking. Our connections break all the time anyway, - // and it's not worth it to pay the penalty of checking every time. - HttpConnectionParams.setStaleCheckingEnabled(params, false); - HttpConnectionParams.setSocketBufferSize(params, 8192); - ConnManagerParams.setMaxTotalConnections(params, 200); - ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(20)); - return params; - } - - /** - * Creates a new instance of the Apache HTTP client that is used by the {@link - * #ApacheHttpTransport()} constructor. - * - *

            Use this constructor if you want to customize the default Apache HTTP client. Settings: - * - *

              - *
            • The client connection manager is set to {@link ThreadSafeClientConnManager}. - *
            • The socket buffer size is set to 8192 using {@link - * HttpConnectionParams#setSocketBufferSize}. - *
            • The retry mechanism is turned off by setting {@code new DefaultHttpRequestRetryHandler(0, - * false)}. - *
            • The route planner uses {@link ProxySelectorRoutePlanner} with {@link - * ProxySelector#getDefault()}, which uses the proxy settings from system - * properties. - *
            - * - * @return new instance of the Apache HTTP client - * @since 1.6 - */ - public static DefaultHttpClient newDefaultHttpClient() { - return newDefaultHttpClient( - SSLSocketFactory.getSocketFactory(), newDefaultHttpParams(), ProxySelector.getDefault()); - } - - /** - * Creates a new instance of the Apache HTTP client that is used by the {@link - * #ApacheHttpTransport()} constructor. - * - * @param socketFactory SSL socket factory - * @param params HTTP parameters - * @param proxySelector HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code - * null} for {@link DefaultHttpRoutePlanner} - * @return new instance of the Apache HTTP client - */ - static DefaultHttpClient newDefaultHttpClient( - SSLSocketFactory socketFactory, HttpParams params, ProxySelector proxySelector) { - // See http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html - SchemeRegistry registry = new SchemeRegistry(); - registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); - registry.register(new Scheme("https", socketFactory, 443)); - ClientConnectionManager connectionManager = new ThreadSafeClientConnManager(params, registry); - DefaultHttpClient defaultHttpClient = new DefaultHttpClient(connectionManager, params); - defaultHttpClient.setHttpRequestRetryHandler(new DefaultHttpRequestRetryHandler(0, false)); - if (proxySelector != null) { - defaultHttpClient.setRoutePlanner(new ProxySelectorRoutePlanner(registry, proxySelector)); - } - return defaultHttpClient; - } - - @Override - public boolean supportsMethod(String method) { - return true; - } - - @Override - protected ApacheHttpRequest buildRequest(String method, String url) { - HttpRequestBase requestBase; - if (method.equals(HttpMethods.DELETE)) { - requestBase = new HttpDelete(url); - } else if (method.equals(HttpMethods.GET)) { - requestBase = new HttpGet(url); - } else if (method.equals(HttpMethods.HEAD)) { - requestBase = new HttpHead(url); - } else if (method.equals(HttpMethods.POST)) { - requestBase = new HttpPost(url); - } else if (method.equals(HttpMethods.PUT)) { - requestBase = new HttpPut(url); - } else if (method.equals(HttpMethods.TRACE)) { - requestBase = new HttpTrace(url); - } else if (method.equals(HttpMethods.OPTIONS)) { - requestBase = new HttpOptions(url); - } else { - requestBase = new HttpExtensionMethod(method, url); - } - return new ApacheHttpRequest(httpClient, requestBase); - } - - /** - * Shuts down the connection manager and releases allocated resources. This includes closing all - * connections, whether they are currently used or not. - * - * @since 1.4 - */ - @Override - public void shutdown() { - httpClient.getConnectionManager().shutdown(); - } - - /** - * Returns the Apache HTTP client. - * - * @since 1.5 - */ - public HttpClient getHttpClient() { - return httpClient; - } - - /** - * Builder for {@link ApacheHttpTransport}. - * - *

            Implementation is not thread-safe. - * - * @since 1.13 - */ - public static final class Builder { - - /** SSL socket factory. */ - private SSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory(); - - /** HTTP parameters. */ - private final HttpParams params = newDefaultHttpParams(); - - /** - * HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for {@link - * DefaultHttpRoutePlanner}. - */ - private ProxySelector proxySelector = ProxySelector.getDefault(); - - /** - * Sets the HTTP proxy to use {@link DefaultHttpRoutePlanner} or {@code null} to use {@link - * #setProxySelector(ProxySelector)} with {@link ProxySelector#getDefault()}. - * - *

            By default it is {@code null}, which uses the proxy settings from system - * properties. - * - *

            For example: - * - *

            -     * setProxy(new HttpHost("127.0.0.1", 8080))
            -     * 
            - */ - public Builder setProxy(HttpHost proxy) { - ConnRouteParams.setDefaultProxy(params, proxy); - if (proxy != null) { - proxySelector = null; - } - return this; - } - - /** - * Sets the HTTP proxy selector to use {@link ProxySelectorRoutePlanner} or {@code null} for - * {@link DefaultHttpRoutePlanner}. - * - *

            By default it is {@link ProxySelector#getDefault()} which uses the proxy settings from system - * properties. - */ - public Builder setProxySelector(ProxySelector proxySelector) { - this.proxySelector = proxySelector; - if (proxySelector != null) { - ConnRouteParams.setDefaultProxy(params, null); - } - return this; - } - /** - * Sets the SSL socket factory based on root certificates in a Java KeyStore. - * - *

            Example usage: - * - *

            -     * trustCertificatesFromJavaKeyStore(new FileInputStream("certs.jks"), "password");
            -     * 
            - * - * @param keyStoreStream input stream to the key store (closed at the end of this method in a - * finally block) - * @param storePass password protecting the key store file - * @since 1.14 - */ - public Builder trustCertificatesFromJavaKeyStore(InputStream keyStoreStream, String storePass) - throws GeneralSecurityException, IOException { - KeyStore trustStore = SecurityUtils.getJavaKeyStore(); - SecurityUtils.loadKeyStore(trustStore, keyStoreStream, storePass); - return trustCertificates(trustStore); - } - - /** - * Sets the SSL socket factory based root certificates generated from the specified stream using - * {@link CertificateFactory#generateCertificates(InputStream)}. - * - *

            Example usage: - * - *

            -     * trustCertificatesFromStream(new FileInputStream("certs.pem"));
            -     * 
            - * - * @param certificateStream certificate stream - * @since 1.14 - */ - public Builder trustCertificatesFromStream(InputStream certificateStream) - throws GeneralSecurityException, IOException { - KeyStore trustStore = SecurityUtils.getJavaKeyStore(); - trustStore.load(null, null); - SecurityUtils.loadKeyStoreFromCertificates( - trustStore, SecurityUtils.getX509CertificateFactory(), certificateStream); - return trustCertificates(trustStore); - } - - /** - * Sets the SSL socket factory based on a root certificate trust store. - * - * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} - * or {@link SecurityUtils#loadKeyStoreFromCertificates}) - * @since 1.14 - */ - public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityException { - SSLContext sslContext = SslUtils.getTlsSslContext(); - SslUtils.initSslContext(sslContext, trustStore, SslUtils.getPkixTrustManagerFactory()); - return setSocketFactory(new SSLSocketFactoryExtension(sslContext)); - } - - /** - * {@link Beta}
            - * Disables validating server SSL certificates by setting the SSL socket factory using {@link - * SslUtils#trustAllSSLContext()} for the SSL context and {@link - * SSLSocketFactory#ALLOW_ALL_HOSTNAME_VERIFIER} for the host name verifier. - * - *

            Be careful! Disabling certificate validation is dangerous and should only be done in - * testing environments. - */ - @Beta - public Builder doNotValidateCertificate() throws GeneralSecurityException { - socketFactory = new SSLSocketFactoryExtension(SslUtils.trustAllSSLContext()); - socketFactory.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); - return this; - } - - /** Sets the SSL socket factory ({@link SSLSocketFactory#getSocketFactory()} by default). */ - public Builder setSocketFactory(SSLSocketFactory socketFactory) { - this.socketFactory = Preconditions.checkNotNull(socketFactory); - return this; - } - - /** Returns the SSL socket factory ({@link SSLSocketFactory#getSocketFactory()} by default). */ - public SSLSocketFactory getSSLSocketFactory() { - return socketFactory; - } - - /** Returns the HTTP parameters. */ - public HttpParams getHttpParams() { - return params; - } - - /** Returns a new instance of {@link ApacheHttpTransport} based on the options. */ - public ApacheHttpTransport build() { - return new ApacheHttpTransport(newDefaultHttpClient(socketFactory, params, proxySelector)); - } - } -} diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java b/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java deleted file mode 100644 index 4b9a624f2..000000000 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2013 Google Inc. - * - * 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.apache; - -import java.io.IOException; -import java.net.Socket; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSocket; -import org.apache.http.conn.ssl.SSLSocketFactory; - -/** - * Implementation of SSL socket factory that extends Apache's implementation to provide - * functionality missing from the Android SDK that is available in Apache HTTP Client. - * - * @author Yaniv Inbar - */ -final class SSLSocketFactoryExtension extends SSLSocketFactory { - - /** Wrapped Java SSL socket factory. */ - private final javax.net.ssl.SSLSocketFactory socketFactory; - - /** @param sslContext SSL context */ - SSLSocketFactoryExtension(SSLContext sslContext) - throws KeyManagementException, UnrecoverableKeyException, NoSuchAlgorithmException, - KeyStoreException { - super((KeyStore) null); - socketFactory = sslContext.getSocketFactory(); - } - - @Override - public Socket createSocket() throws IOException { - return socketFactory.createSocket(); - } - - @Override - public Socket createSocket(Socket socket, String host, int port, boolean autoClose) - throws IOException { - SSLSocket sslSocket = (SSLSocket) socketFactory.createSocket(socket, host, port, autoClose); - getHostnameVerifier().verify(host, sslSocket); - return sslSocket; - } -} diff --git a/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java b/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java deleted file mode 100644 index 8176166db..000000000 --- a/google-http-client-apache-legacy/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2011 Google Inc. - * - * 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.apache; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.api.client.util.ByteArrayStreamingContent; -import com.google.api.client.util.StringUtils; -import junit.framework.TestCase; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.params.ClientPNames; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.params.CoreConnectionPNames; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; - -/** - * Tests {@link ApacheHttpTransport}. - * - * @author Yaniv Inbar - */ -public class ApacheHttpTransportTest extends TestCase { - - public void testApacheHttpTransport() { - ApacheHttpTransport transport = new ApacheHttpTransport(); - DefaultHttpClient httpClient = (DefaultHttpClient) transport.getHttpClient(); - checkDefaultHttpClient(httpClient); - checkHttpClient(httpClient); - } - - public void testApacheHttpTransportWithParam() { - ApacheHttpTransport transport = new ApacheHttpTransport(new DefaultHttpClient()); - checkHttpClient(transport.getHttpClient()); - } - - public void testNewDefaultHttpClient() { - checkDefaultHttpClient(ApacheHttpTransport.newDefaultHttpClient()); - } - - public void testRequestsWithContent() throws Exception { - HttpClient mockClient = mock(HttpClient.class); - HttpResponse mockResponse = mock(HttpResponse.class); - when(mockClient.execute(any(HttpUriRequest.class))).thenReturn(mockResponse); - - ApacheHttpTransport transport = new ApacheHttpTransport(mockClient); - - // Test GET. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("GET", "http://www.test.url"), "GET"); - // Test DELETE. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("DELETE", "http://www.test.url"), "DELETE"); - // Test HEAD. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("HEAD", "http://www.test.url"), "HEAD"); - - // Test PUT. - execute(transport.buildRequest("PUT", "http://www.test.url")); - // Test POST. - execute(transport.buildRequest("POST", "http://www.test.url")); - // Test PATCH. - execute(transport.buildRequest("PATCH", "http://www.test.url")); - } - - private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, String method) - throws Exception { - try { - execute(request); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { - // expected - assertEquals( - e.getMessage(), - "Apache HTTP client does not support " + method + " requests with content."); - } - } - - private void execute(ApacheHttpRequest request) throws Exception { - byte[] bytes = StringUtils.getBytesUtf8("abc"); - request.setStreamingContent(new ByteArrayStreamingContent(bytes)); - request.setContentType("text/html"); - request.setContentLength(bytes.length); - request.execute(); - } - - private void checkDefaultHttpClient(DefaultHttpClient client) { - HttpParams params = client.getParams(); - assertTrue(client.getConnectionManager() instanceof ThreadSafeClientConnManager); - assertEquals(8192, params.getIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1)); - DefaultHttpRequestRetryHandler retryHandler = - (DefaultHttpRequestRetryHandler) client.getHttpRequestRetryHandler(); - assertEquals(0, retryHandler.getRetryCount()); - assertFalse(retryHandler.isRequestSentRetryEnabled()); - } - - private void checkHttpClient(HttpClient client) { - HttpParams params = client.getParams(); - assertFalse(params.getBooleanParameter(ClientPNames.HANDLE_REDIRECTS, true)); - assertEquals(HttpVersion.HTTP_1_1, HttpProtocolParams.getVersion(params)); - } -} diff --git a/google-http-client-apache/pom.xml b/google-http-client-apache-v2/pom.xml similarity index 93% rename from google-http-client-apache/pom.xml rename to google-http-client-apache-v2/pom.xml index 126ae7cc9..fab345615 100644 --- a/google-http-client-apache/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -7,9 +7,9 @@ 1.29.2-SNAPSHOT ../pom.xml - google-http-client-apache - 2.1.2-SNAPSHOT - Apache HTTP transport for the Google HTTP Client Library for Java. + google-http-client-apache-v2 + 1.29.2-SNAPSHOT + Apache HTTP transport v2 for the Google HTTP Client Library for Java. @@ -61,7 +61,7 @@ ${project.build.outputDirectory}/META-INF/MANIFEST.MF - com.google.api.client.http.apache + com.google.api.client.http.apache.v2 diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java similarity index 77% rename from google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java rename to google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java index 2d2f40189..5d9323dd6 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Google Inc. + * 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 @@ -12,7 +12,7 @@ * the License. */ -package com.google.api.client.http.apache; +package com.google.api.client.http.apache.v2; import com.google.api.client.http.LowLevelHttpRequest; import com.google.api.client.http.LowLevelHttpResponse; @@ -20,20 +20,24 @@ import java.io.IOException; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.client.HttpClient; +import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpRequestBase; -import org.apache.http.conn.params.ConnManagerParams; -import org.apache.http.params.HttpConnectionParams; -import org.apache.http.params.HttpParams; -/** @author Yaniv Inbar */ +/** + * @author Yaniv Inbar + */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; private final HttpRequestBase request; + private RequestConfig.Builder requestConfig; + ApacheHttpRequest(HttpClient httpClient, HttpRequestBase request) { this.httpClient = httpClient; this.request = request; + // disable redirects as google-http-client handles redirects + this.requestConfig = RequestConfig.custom().setRedirectsEnabled(false); } @Override @@ -43,17 +47,14 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - HttpParams params = request.getParams(); - ConnManagerParams.setTimeout(params, connectTimeout); - HttpConnectionParams.setConnectionTimeout(params, connectTimeout); - HttpConnectionParams.setSoTimeout(params, readTimeout); + requestConfig.setConnectionRequestTimeout(connectTimeout) + .setSocketTimeout(readTimeout); } @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument( - request instanceof HttpEntityEnclosingRequest, + Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); @@ -61,6 +62,7 @@ public LowLevelHttpResponse execute() throws IOException { entity.setContentType(getContentType()); ((HttpEntityEnclosingRequest) request).setEntity(entity); } + request.setConfig(requestConfig.build()); return new ApacheHttpResponse(request, httpClient.execute(request)); } } diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpResponse.java similarity index 97% rename from google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java rename to google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpResponse.java index 5e8e427aa..ccf9c5788 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Google Inc. + * 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 @@ -12,7 +12,7 @@ * the License. */ -package com.google.api.client.http.apache; +package com.google.api.client.http.apache.v2; import com.google.api.client.http.LowLevelHttpResponse; import java.io.IOException; @@ -89,6 +89,10 @@ public String getStatusLine() { return statusLine == null ? null : statusLine.toString(); } + public String getHeaderValue(String name) { + return response.getLastHeader(name).getValue(); + } + @Override public int getHeaderCount() { return allHeaders.length; @@ -99,10 +103,6 @@ public String getHeaderName(int index) { return allHeaders[index].getName(); } - public String getHeaderValue(String name) { - return response.getLastHeader(name).getValue(); - } - @Override public String getHeaderValue(int index) { return allHeaders[index].getValue(); @@ -111,7 +111,7 @@ public String getHeaderValue(int index) { /** * Aborts execution of the request. * - * @since 1.4 + * @since 1.30 */ @Override public void disconnect() { diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java new file mode 100644 index 000000000..42f53d490 --- /dev/null +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -0,0 +1,202 @@ +/* + * 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.apache.v2; + +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.SecurityUtils; +import com.google.api.client.util.SslUtils; +import java.io.IOException; +import java.io.InputStream; +import java.net.ProxySelector; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.cert.CertificateFactory; +import java.util.concurrent.TimeUnit; +import javax.net.ssl.SSLContext; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpDelete; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpHead; +import org.apache.http.client.methods.HttpOptions; +import org.apache.http.client.methods.HttpPatch; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.methods.HttpPut; +import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.client.methods.HttpTrace; +import org.apache.http.config.SocketConfig; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.http.impl.conn.SystemDefaultRoutePlanner; + +/** + * Thread-safe HTTP transport based on the Apache HTTP Client library. + * + *

            + * Implementation is thread-safe, as long as any parameter modification to the + * {@link #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum + * efficiency, applications should use a single globally-shared instance of the HTTP transport. + *

            + * + *

            + * Default settings are specified in {@link #newDefaultHttpClient()}. Use the + * {@link #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. + * Please read the Apache HTTP + * Client connection management tutorial for more complex configuration options. + *

            + * + * @since 1.30 + * @author Yaniv Inbar + */ +public final class ApacheHttpTransport extends HttpTransport { + + /** Apache HTTP client. */ + private final HttpClient httpClient; + + /** + * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. + * + * @since 1.30 + */ + public ApacheHttpTransport() { + this(newDefaultHttpClient()); + } + + /** + * Constructor that allows an alternative Apache HTTP client to be used. + * + *

            + * Note that in the previous version, we overrode several settings, however, we are no longer able + * to do so. + *

            + * + *

            If you choose to provide your own Apache HttpClient implementation, be sure that

            + *
              + *
            • HTTP version is set to 1.1.
            • + *
            • Redirects are disabled (google-http-client handles redirects).
            • + *
            • Retries are disabled (google-http-client handles retries).
            • + *
            + * + * @param httpClient Apache HTTP client to use + * + * @since 1.30 + */ + public ApacheHttpTransport(HttpClient httpClient) { + this.httpClient = httpClient; + } + + /** + * Creates a new instance of the Apache HTTP client that is used by the + * {@link #ApacheHttpTransport()} constructor. + * + *

            + * Settings: + *

            + *
              + *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
            • + *
            • The socket buffer size is set to 8192 using {@link SocketConfig}.
            • + *
            • + *
            • The route planner uses {@link SystemDefaultRoutePlanner} with + * {@link ProxySelector#getDefault()}, which uses the proxy settings from system + * properties.
            • + *
            + * + * @return new instance of the Apache HTTP client + * @since 1.30 + */ + public static HttpClient newDefaultHttpClient() { + // Set socket buffer sizes to 8192 + SocketConfig socketConfig = + SocketConfig.custom() + .setRcvBufSize(8192) + .setSndBufSize(8192) + .build(); + + PoolingHttpClientConnectionManager connectionManager = + new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); + // Disable the stale connection check (previously configured in the HttpConnectionParams + connectionManager.setValidateAfterInactivity(-1); + + return HttpClientBuilder.create() + .useSystemProperties() + .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) + .setDefaultSocketConfig(socketConfig) + .setMaxConnTotal(200) + .setMaxConnPerRoute(20) + .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) + .setConnectionManager(connectionManager) + .disableRedirectHandling() + .disableAutomaticRetries() + .build(); + } + + @Override + public boolean supportsMethod(String method) { + return true; + } + + @Override + protected ApacheHttpRequest buildRequest(String method, String url) { + HttpRequestBase requestBase; + if (method.equals(HttpMethods.DELETE)) { + requestBase = new HttpDelete(url); + } else if (method.equals(HttpMethods.GET)) { + requestBase = new HttpGet(url); + } else if (method.equals(HttpMethods.HEAD)) { + requestBase = new HttpHead(url); + } else if (method.equals(HttpMethods.PATCH)) { + requestBase = new HttpPatch(url); + } else if (method.equals(HttpMethods.POST)) { + requestBase = new HttpPost(url); + } else if (method.equals(HttpMethods.PUT)) { + requestBase = new HttpPut(url); + } else if (method.equals(HttpMethods.TRACE)) { + requestBase = new HttpTrace(url); + } else if (method.equals(HttpMethods.OPTIONS)) { + requestBase = new HttpOptions(url); + } else { + requestBase = new HttpExtensionMethod(method, url); + } + return new ApacheHttpRequest(httpClient, requestBase); + } + + /** + * Shuts down the connection manager and releases allocated resources. This closes all + * connections, whether they are currently used or not. + * + * @since 1.30 + */ + @Override + public void shutdown() throws IOException { + if (httpClient instanceof CloseableHttpClient) { + ((CloseableHttpClient) httpClient).close(); + } + } + + /** + * Returns the Apache HTTP client. + * + * @since 1.30 + */ + public HttpClient getHttpClient() { + return httpClient; + } +} diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java similarity index 94% rename from google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java rename to google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java index 343b35c50..8fc11e6d8 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/ContentEntity.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Google Inc. + * 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 @@ -12,7 +12,7 @@ * the License. */ -package com.google.api.client.http.apache; +package com.google.api.client.http.apache.v2; import com.google.api.client.util.Preconditions; import com.google.api.client.util.StreamingContent; @@ -21,7 +21,9 @@ import java.io.OutputStream; import org.apache.http.entity.AbstractHttpEntity; -/** @author Yaniv Inbar */ +/** + * @author Yaniv Inbar + */ final class ContentEntity extends AbstractHttpEntity { /** Content length or less than zero if not known. */ diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/HttpExtensionMethod.java similarity index 93% rename from google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java rename to google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/HttpExtensionMethod.java index 598833de5..360baaecb 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/HttpExtensionMethod.java @@ -1,4 +1,6 @@ /* + * 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 * @@ -10,7 +12,7 @@ * the License. */ -package com.google.api.client.http.apache; +package com.google.api.client.http.apache.v2; import com.google.api.client.util.Preconditions; import java.net.URI; diff --git a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java similarity index 85% rename from google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java rename to google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java index 0c2c23b4f..bc753838b 100644 --- a/google-http-client-apache-legacy/src/main/java/com/google/api/client/http/apache/package-info.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Google Inc. + * 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 @@ -13,9 +13,11 @@ */ /** - * HTTP Transport library for Google API's based on Apache HTTP Client version 4. + * HTTP Transport library for Google API's based on Apache HTTP Client version 4.5+ * - * @since 1.0 + * @since 1.30 * @author Yaniv Inbar */ -package com.google.api.client.http.apache; + +package com.google.api.client.http.apache.v2; + diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java new file mode 100644 index 000000000..dabd9bf3d --- /dev/null +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -0,0 +1,178 @@ +/* + * 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.apache.v2; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.util.ByteArrayStreamingContent; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import org.apache.http.Header; +import org.apache.http.HttpClientConnection; +import org.apache.http.HttpException; +import org.apache.http.HttpRequest; +import org.apache.http.HttpRequestInterceptor; +import org.apache.http.HttpResponse; +import org.apache.http.HttpVersion; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicHttpResponse; +import org.apache.http.protocol.HttpContext; +import org.apache.http.protocol.HttpRequestExecutor; +import org.junit.Test; + +/** + * Tests {@link ApacheHttpTransport}. + * + * @author Yaniv Inbar + */ +public class ApacheHttpTransportTest { + + @Test + public void testApacheHttpTransport() { + ApacheHttpTransport transport = new ApacheHttpTransport(); + checkHttpTransport(transport); + } + + @Test + public void testApacheHttpTransportWithParam() { + ApacheHttpTransport transport = new ApacheHttpTransport(HttpClients.custom().build()); + checkHttpTransport(transport); + } + + @Test + public void testNewDefaultHttpClient() { + HttpClient client = ApacheHttpTransport.newDefaultHttpClient(); + checkHttpClient(client); + } + + private void checkHttpTransport(ApacheHttpTransport transport) { + assertNotNull(transport); + HttpClient client = transport.getHttpClient(); + checkHttpClient(client); + } + + private void checkHttpClient(HttpClient client) { + assertNotNull(client); + // TODO(chingor): Is it possible to test this effectively? The newer HttpClient implementations + // are read-only and we're testing that we built the client with the right configuration + } + + @Test + public void testRequestsWithContent() throws IOException { + HttpClient mockClient = mock(HttpClient.class); + HttpResponse mockResponse = mock(HttpResponse.class); + when(mockClient.execute(any(HttpUriRequest.class))).thenReturn(mockResponse); + + ApacheHttpTransport transport = new ApacheHttpTransport(mockClient); + + // Test GET. + subtestUnsupportedRequestsWithContent( + transport.buildRequest("GET", "http://www.test.url"), "GET"); + // Test DELETE. + subtestUnsupportedRequestsWithContent( + transport.buildRequest("DELETE", "http://www.test.url"), "DELETE"); + // Test HEAD. + subtestUnsupportedRequestsWithContent( + transport.buildRequest("HEAD", "http://www.test.url"), "HEAD"); + + // Test PATCH. + execute(transport.buildRequest("PATCH", "http://www.test.url")); + // Test PUT. + execute(transport.buildRequest("PUT", "http://www.test.url")); + // Test POST. + execute(transport.buildRequest("POST", "http://www.test.url")); + // Test PATCH. + execute(transport.buildRequest("PATCH", "http://www.test.url")); + } + + private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, String method) + throws IOException { + try { + execute(request); + fail("expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + // expected + assertEquals(e.getMessage(), + "Apache HTTP client does not support " + method + " requests with content."); + } + } + + private void execute(ApacheHttpRequest request) throws IOException { + byte[] bytes = "abc".getBytes(StandardCharsets.UTF_8); + request.setStreamingContent(new ByteArrayStreamingContent(bytes)); + request.setContentType("text/html"); + request.setContentLength(bytes.length); + request.execute(); + } + + @Test + public void testRequestShouldNotFollowRedirects() throws IOException { + final AtomicInteger requestsAttempted = new AtomicInteger(0); + HttpRequestExecutor requestExecutor = new HttpRequestExecutor() { + @Override + public HttpResponse execute(HttpRequest request, HttpClientConnection connection, + HttpContext context) throws IOException, HttpException { + HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 302, null); + response.addHeader("location", "https://google.com/path"); + requestsAttempted.incrementAndGet(); + return response; + } + }; + HttpClient client = HttpClients.custom().setRequestExecutor(requestExecutor).build(); + ApacheHttpTransport transport = new ApacheHttpTransport(client); + ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); + LowLevelHttpResponse response = request.execute(); + assertEquals(1, requestsAttempted.get()); + assertEquals(302, response.getStatusCode()); + } + + @Test + public void testRequestCanSetHeaders() { + final AtomicBoolean interceptorCalled = new AtomicBoolean(false); + HttpClient client = HttpClients.custom().addInterceptorFirst(new HttpRequestInterceptor() { + @Override + public void process(HttpRequest request, HttpContext context) + throws HttpException, IOException { + Header header = request.getFirstHeader("foo"); + assertNotNull("Should have found header", header); + assertEquals("bar", header.getValue()); + interceptorCalled.set(true); + throw new IOException("cancelling request"); + } + }).build(); + + ApacheHttpTransport transport = new ApacheHttpTransport(client); + ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); + request.addHeader("foo", "bar"); + try { + LowLevelHttpResponse response = request.execute(); + fail("should not actually make the request"); + } catch (IOException exception) { + assertEquals("cancelling request", exception.getMessage()); + } + assertTrue("Expected to have called our test interceptor", interceptorCalled.get()); + } +} diff --git a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java b/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java deleted file mode 100644 index 8176166db..000000000 --- a/google-http-client-apache/src/test/java/com/google/api/client/http/apache/ApacheHttpTransportTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2011 Google Inc. - * - * 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.apache; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import com.google.api.client.util.ByteArrayStreamingContent; -import com.google.api.client.util.StringUtils; -import junit.framework.TestCase; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpUriRequest; -import org.apache.http.client.params.ClientPNames; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.params.CoreConnectionPNames; -import org.apache.http.params.HttpParams; -import org.apache.http.params.HttpProtocolParams; - -/** - * Tests {@link ApacheHttpTransport}. - * - * @author Yaniv Inbar - */ -public class ApacheHttpTransportTest extends TestCase { - - public void testApacheHttpTransport() { - ApacheHttpTransport transport = new ApacheHttpTransport(); - DefaultHttpClient httpClient = (DefaultHttpClient) transport.getHttpClient(); - checkDefaultHttpClient(httpClient); - checkHttpClient(httpClient); - } - - public void testApacheHttpTransportWithParam() { - ApacheHttpTransport transport = new ApacheHttpTransport(new DefaultHttpClient()); - checkHttpClient(transport.getHttpClient()); - } - - public void testNewDefaultHttpClient() { - checkDefaultHttpClient(ApacheHttpTransport.newDefaultHttpClient()); - } - - public void testRequestsWithContent() throws Exception { - HttpClient mockClient = mock(HttpClient.class); - HttpResponse mockResponse = mock(HttpResponse.class); - when(mockClient.execute(any(HttpUriRequest.class))).thenReturn(mockResponse); - - ApacheHttpTransport transport = new ApacheHttpTransport(mockClient); - - // Test GET. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("GET", "http://www.test.url"), "GET"); - // Test DELETE. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("DELETE", "http://www.test.url"), "DELETE"); - // Test HEAD. - subtestUnsupportedRequestsWithContent( - transport.buildRequest("HEAD", "http://www.test.url"), "HEAD"); - - // Test PUT. - execute(transport.buildRequest("PUT", "http://www.test.url")); - // Test POST. - execute(transport.buildRequest("POST", "http://www.test.url")); - // Test PATCH. - execute(transport.buildRequest("PATCH", "http://www.test.url")); - } - - private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, String method) - throws Exception { - try { - execute(request); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { - // expected - assertEquals( - e.getMessage(), - "Apache HTTP client does not support " + method + " requests with content."); - } - } - - private void execute(ApacheHttpRequest request) throws Exception { - byte[] bytes = StringUtils.getBytesUtf8("abc"); - request.setStreamingContent(new ByteArrayStreamingContent(bytes)); - request.setContentType("text/html"); - request.setContentLength(bytes.length); - request.execute(); - } - - private void checkDefaultHttpClient(DefaultHttpClient client) { - HttpParams params = client.getParams(); - assertTrue(client.getConnectionManager() instanceof ThreadSafeClientConnManager); - assertEquals(8192, params.getIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1)); - DefaultHttpRequestRetryHandler retryHandler = - (DefaultHttpRequestRetryHandler) client.getHttpRequestRetryHandler(); - assertEquals(0, retryHandler.getRetryCount()); - assertFalse(retryHandler.isRequestSentRetryEnabled()); - } - - private void checkHttpClient(HttpClient client) { - HttpParams params = client.getParams(); - assertFalse(params.getBooleanParameter(ClientPNames.HANDLE_REDIRECTS, true)); - assertEquals(HttpVersion.HTTP_1_1, HttpProtocolParams.getVersion(params)); - } -} diff --git a/google-http-client-assembly/assembly.xml b/google-http-client-assembly/assembly.xml index 80ee72de1..45478f40a 100644 --- a/google-http-client-assembly/assembly.xml +++ b/google-http-client-assembly/assembly.xml @@ -39,8 +39,8 @@ true - properties/google-http-client-apache.jar.properties - google-http-client-apache-${project.http-client-apache.version}.jar.properties + properties/google-http-client-apache-v2.jar.properties + google-http-client-apache-v2-${project.http-client.version}.jar.properties google-http-java-client/libs true @@ -110,8 +110,8 @@ google-http-java-client/dependencies - ../google-http-client-apache/target/site/dependencies.html - google-http-client-apache-dependencies.html + ../google-http-client-apache-v2/target/site/dependencies.html + google-http-client-apache-v2-dependencies.html google-http-java-client/dependencies diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 4888ef25f..1279fa067 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -24,7 +24,7 @@
            com.google.http-client - google-http-client-apache + google-http-client-apache-v2 com.google.http-client diff --git a/google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties b/google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties new file mode 100644 index 000000000..e1d1f0f97 --- /dev/null +++ b/google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties @@ -0,0 +1 @@ +src=../libs-sources/google-http-client-apache-v2-${project.version}-sources.jar diff --git a/google-http-client-assembly/properties/google-http-client-apache.jar.properties b/google-http-client-assembly/properties/google-http-client-apache.jar.properties deleted file mode 100644 index 4046b3a73..000000000 --- a/google-http-client-assembly/properties/google-http-client-apache.jar.properties +++ /dev/null @@ -1 +0,0 @@ -src=../libs-sources/google-http-client-apache-${project.http-client-apache.version}-sources.jar diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index c4e73d148..9db27edc7 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -72,8 +72,8 @@ com.google.http-client - google-http-client-apache - 2.1.2-SNAPSHOT + google-http-client-apache-v2 + 1.29.2-SNAPSHOT com.google.http-client diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java index 946f5e718..ce5e59d51 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java @@ -74,7 +74,10 @@ * * @since 1.0 * @author Yaniv Inbar + * @deprecated Please use com.google.api.client.http.apache.v2.ApacheHttpTransport provided by + * the com.google.http-client:google-http-client-apache-v2 artifact. */ +@Deprecated public final class ApacheHttpTransport extends HttpTransport { /** Apache HTTP client. */ diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java b/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java index 0c2c23b4f..93577e38b 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java @@ -17,5 +17,7 @@ * * @since 1.0 * @author Yaniv Inbar + * @deprecated Please use com.google.api.client.http.apache.v2 provided by the + * com.google.http-client:google-http-client-apache-v2 artifact. */ package com.google.api.client.http.apache; diff --git a/pom.xml b/pom.xml index 6776e672b..b1d4d0bb6 100644 --- a/pom.xml +++ b/pom.xml @@ -57,8 +57,7 @@ google-http-client-assembly google-http-client-appengine google-http-client-android - google-http-client-apache - google-http-client-apache-legacy + google-http-client-apache-v2 google-http-client-protobuf google-http-client-gson google-http-client-jackson @@ -176,8 +175,8 @@ com.google.http-client - google-http-client-apache - ${project.http-client-apache.version} + google-http-client-apache-v2 + ${project.http-client.version} com.google.http-client @@ -554,7 +553,6 @@ - Internally, update the default features.json file --> 1.29.2-SNAPSHOT - 2.1.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/versions.txt b/versions.txt index f90ff8086..d3e97b814 100644 --- a/versions.txt +++ b/versions.txt @@ -6,8 +6,7 @@ google-http-client-bom:1.29.1:1.29.2-SNAPSHOT google-http-client-parent:1.29.1:1.29.2-SNAPSHOT google-http-client-android:1.29.1:1.29.2-SNAPSHOT google-http-client-android-test:1.29.1:1.29.2-SNAPSHOT -google-http-client-apache:2.1.1:2.1.2-SNAPSHOT -google-http-client-apache-legacy:1.29.1:1.29.2-SNAPSHOT +google-http-client-apache-v2:1.29.1:1.29.2-SNAPSHOT google-http-client-appengine:1.29.1:1.29.2-SNAPSHOT google-http-client-assembly:1.29.1:1.29.2-SNAPSHOT google-http-client-findbugs:1.29.1:1.29.2-SNAPSHOT From 1c6840349eb7c07bc823427c8e5ac306a9a080f0 Mon Sep 17 00:00:00 2001 From: Eric Dalquist Date: Thu, 16 May 2019 15:40:30 -0700 Subject: [PATCH 083/983] Fix deadlock caused by concurrent class loading (#639) When loading generated data classes concurrently the ProGuard protection which calls Data.nullOf in a static initializer can result in a deadlock on the Data.NULL_CACHE lock. The fix is to emulate ConcurrentMap.computeIfAbsent to protect against blocking during concurrent populate of the cache. --- .../java/com/google/api/client/util/Data.java | 65 +++++++++++-------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/Data.java b/google-http-client/src/main/java/com/google/api/client/util/Data.java index 88b294cea..10e3fe5bd 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Data.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Data.java @@ -108,35 +108,22 @@ public class Data { * @return magic object instance that represents the "null" value (not Java {@code null}) * @throws IllegalArgumentException if unable to create a new instance */ - public static T nullOf(Class objClass) { + public static T nullOf(Class objClass) { + // ConcurrentMap.computeIfAbsent is explicitly NOT used in the following logic. The + // ConcurrentHashMap implementation of that method BLOCKS if the mappingFunction triggers + // modification of the map which createNullInstance can do depending on the state of class + // loading. Object result = NULL_CACHE.get(objClass); if (result == null) { - synchronized (NULL_CACHE) { - result = NULL_CACHE.get(objClass); - if (result == null) { - if (objClass.isArray()) { - // arrays are special because we need to compute both the dimension and component type - int dims = 0; - Class componentType = objClass; - do { - componentType = componentType.getComponentType(); - dims++; - } while (componentType.isArray()); - result = Array.newInstance(componentType, new int[dims]); - } else if (objClass.isEnum()) { - // enum requires look for constant with @NullValue - FieldInfo fieldInfo = ClassInfo.of(objClass).getFieldInfo(null); - Preconditions.checkNotNull( - fieldInfo, "enum missing constant with @NullValue annotation: %s", objClass); - @SuppressWarnings({"unchecked", "rawtypes"}) - Enum e = fieldInfo.enumValue(); - result = e; - } else { - // other classes are simpler - result = Types.newInstance(objClass); - } - NULL_CACHE.put(objClass, result); - } + // If nullOf is called concurrently for the same class createNullInstance may be executed + // multiple times. However putIfAbsent ensures that no matter what the concurrent access + // pattern looks like callers always get a singleton instance returned. Since + // createNullInstance has no side-effects beyond triggering class loading this multiple-call + // pattern is safe. + Object newValue = createNullInstance(objClass); + result = NULL_CACHE.putIfAbsent(objClass, newValue); + if (result == null) { + result = newValue; } } @SuppressWarnings("unchecked") @@ -144,6 +131,30 @@ public static T nullOf(Class objClass) { return tResult; } + private static Object createNullInstance(Class objClass) { + if (objClass.isArray()) { + // arrays are special because we need to compute both the dimension and component type + int dims = 0; + Class componentType = objClass; + do { + componentType = componentType.getComponentType(); + dims++; + } while (componentType.isArray()); + return Array.newInstance(componentType, new int[dims]); + } + if (objClass.isEnum()) { + // enum requires look for constant with @NullValue + FieldInfo fieldInfo = ClassInfo.of(objClass).getFieldInfo(null); + Preconditions.checkNotNull( + fieldInfo, "enum missing constant with @NullValue annotation: %s", objClass); + @SuppressWarnings({"unchecked", "rawtypes"}) + Enum e = fieldInfo.enumValue(); + return e; + } + // other classes are simpler + return Types.newInstance(objClass); + } + /** * Returns whether the given object is the magic object that represents the null value of its * class. From 249ddec0c5d3a9ee3d978fb924df9fbe010290a0 Mon Sep 17 00:00:00 2001 From: Eric Dalquist Date: Fri, 17 May 2019 09:57:12 -0700 Subject: [PATCH 084/983] Remove blocking ClassInfo.of (#643) * Remove blocking ClassInfo.of Replaces blocking logic in ClassInfo.of with ConcurrentMap.computeIfAbsent. Also removes WeakHashMap as it wasn't actually doing the intended operation. The ClassInfo value has a strong reference to the Class which prevents the weak key reference from ever being collected. * Remove dependency on JDK8 API computeIfAbsent isn't available in all supported environments. Replace with the same logic as the default computeIfAbsent implementation. --- .../com/google/api/client/util/ClassInfo.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java b/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java index 4fe7c891b..f11f6ffb0 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java @@ -24,7 +24,8 @@ import java.util.Locale; import java.util.Map; import java.util.TreeSet; -import java.util.WeakHashMap; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; /** * Computes class information to determine data key name/value pairs associated with the class. @@ -37,11 +38,12 @@ public final class ClassInfo { /** Class information cache, with case-sensitive field names. */ - private static final Map, ClassInfo> CACHE = new WeakHashMap, ClassInfo>(); + private static final ConcurrentMap, ClassInfo> CACHE = + new ConcurrentHashMap, ClassInfo>(); /** Class information cache, with case-insensitive fields names. */ - private static final Map, ClassInfo> CACHE_IGNORE_CASE = - new WeakHashMap, ClassInfo>(); + private static final ConcurrentMap, ClassInfo> CACHE_IGNORE_CASE = + new ConcurrentHashMap, ClassInfo>(); /** Class. */ private final Class clazz; @@ -81,16 +83,15 @@ public static ClassInfo of(Class underlyingClass, boolean ignoreCase) { if (underlyingClass == null) { return null; } - final Map, ClassInfo> cache = ignoreCase ? CACHE_IGNORE_CASE : CACHE; - ClassInfo classInfo; - synchronized (cache) { - classInfo = cache.get(underlyingClass); - if (classInfo == null) { - classInfo = new ClassInfo(underlyingClass, ignoreCase); - cache.put(underlyingClass, classInfo); - } - } - return classInfo; + final ConcurrentMap, ClassInfo> cache = ignoreCase ? CACHE_IGNORE_CASE : CACHE; + + // Logic copied from ConcurrentMap.computeIfAbsent + ClassInfo v, newValue; + return ((v = cache.get(underlyingClass)) == null + && (newValue = new ClassInfo(underlyingClass, ignoreCase)) != null + && (v = cache.putIfAbsent(underlyingClass, newValue)) == null) + ? newValue + : v; } /** From 19545751ca8fe780c693f8e00737ca51b0d6f888 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 20 May 2019 11:12:10 -0700 Subject: [PATCH 085/983] Restore the ApacheHttpRequest implementation. (#641) The RequestConfig class is an API from the newer Apache HttpClient 4.5.x clients. --- .../client/http/apache/ApacheHttpRequest.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java index 230d9b0f5..b31b20594 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java @@ -20,21 +20,22 @@ import java.io.IOException; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.client.HttpClient; -import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.conn.params.ConnManagerParams; +import org.apache.http.params.HttpConnectionParams; +import org.apache.http.params.HttpParams; -/** @author Yaniv Inbar */ +/** + * @author Yaniv Inbar + */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; private final HttpRequestBase request; - private RequestConfig.Builder requestConfig; - ApacheHttpRequest(HttpClient httpClient, HttpRequestBase request) { this.httpClient = httpClient; this.request = request; - this.requestConfig = RequestConfig.custom().setRedirectsEnabled(false); } @Override @@ -44,14 +45,16 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - requestConfig.setConnectionRequestTimeout(connectTimeout).setSocketTimeout(readTimeout); + HttpParams params = request.getParams(); + ConnManagerParams.setTimeout(params, connectTimeout); + HttpConnectionParams.setConnectionTimeout(params, connectTimeout); + HttpConnectionParams.setSoTimeout(params, readTimeout); } @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument( - request instanceof HttpEntityEnclosingRequest, + Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); @@ -59,7 +62,6 @@ public LowLevelHttpResponse execute() throws IOException { entity.setContentType(getContentType()); ((HttpEntityEnclosingRequest) request).setEntity(entity); } - request.setConfig(requestConfig.build()); return new ApacheHttpResponse(request, httpClient.execute(request)); } } From c4f29bcf96d488c6f053c3fc6096ec7c5cfeb30a Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sun, 26 May 2019 07:00:59 -0700 Subject: [PATCH 086/983] Fix a bunch of typos (#640) --- .../src/main/java/com/google/api/client/xml/Xml.java | 2 +- .../com/google/api/client/xml/XmlNamespaceDictionary.java | 2 +- .../main/java/com/google/api/client/http/HttpEncoding.java | 4 ++-- .../com/google/api/client/http/javanet/NetHttpRequest.java | 4 ++-- .../src/main/java/com/google/api/client/util/Key.java | 2 +- .../java/com/google/api/client/util/StreamingContent.java | 4 ++-- .../src/main/java/com/google/api/client/util/StringUtils.java | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java index 3955c5e18..4f9156d3c 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java @@ -195,7 +195,7 @@ public boolean stopAfterEndTag(String namespace, String localName) { /** * Parses an XML element using the given XML pull parser into the given destination object. * - *

            Requires the the current event be {@link XmlPullParser#START_TAG} (skipping any initial + *

            Requires the current event be {@link XmlPullParser#START_TAG} (skipping any initial * {@link XmlPullParser#START_DOCUMENT}) of the element being parsed. At normal parsing * completion, the current event will either be {@link XmlPullParser#END_TAG} of the element being * parsed, or the {@link XmlPullParser#START_TAG} of the requested {@code atom:entry}. diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java index c500e2f83..6c04ef00f 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java @@ -283,7 +283,7 @@ private void computeAliases(Object element, SortedSet aliases) { * @return namespace URI, using a predictable made-up namespace URI if the namespace alias is not * recognized * @throws IllegalArgumentException if the namespace alias is not recognized and {@code - * errorOnUnkown} is {@code true} + * errorOnUnknown} is {@code true} */ String getNamespaceUriForAliasHandlingUnknown(boolean errorOnUnknown, String alias) { String result = getUriForAlias(alias); diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java index 38702b82e..2720310f8 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java @@ -35,8 +35,8 @@ public interface HttpEncoding { * Encodes the streaming content into the output stream. * *

            Implementations must not close the output stream, and instead should flush the output - * stream. Some callers may assume that the the output stream has not been closed, and will fail - * to work if it has been closed. + * stream. Some callers may assume that the output stream has not been closed, and will fail to + * work if it has been closed. * * @param content streaming content * @param out output stream diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java index e497f882c..aa0d8e3e4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java @@ -115,7 +115,7 @@ LowLevelHttpResponse execute(final OutputWriter outputWriter) throws IOException } catch (IOException e) { // If we've gotten a response back, continue on and try to parse the response. Otherwise, // re-throw the IOException - if (!hasReponse(connection)) { + if (!hasResponse(connection)) { throw e; } } finally { @@ -151,7 +151,7 @@ LowLevelHttpResponse execute(final OutputWriter outputWriter) throws IOException } } - private boolean hasReponse(HttpURLConnection connection) { + private boolean hasResponse(HttpURLConnection connection) { try { return connection.getResponseCode() > 0; } catch (IOException e) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/Key.java b/google-http-client/src/main/java/com/google/api/client/util/Key.java index dfc0dd454..40094065c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Key.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Key.java @@ -34,7 +34,7 @@ * * // uses data key name of "some_other_name" * @Key("some_other_name") - * private String dataKeyNameIsOverriden; + * private String dataKeyNameIsOverridden; * * // not a data key * private String notADataKey; diff --git a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java index a2a9f600d..8ae55bbf6 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java @@ -31,8 +31,8 @@ public interface StreamingContent { * Writes the byte content to the given output stream. * *

            Implementations must not close the output stream, and instead should flush the output - * stream. Some callers may assume that the the output stream has not been closed, and will fail - * to work if it has been closed. + * stream. Some callers may assume that the output stream has not been closed, and will fail to + * work if it has been closed. * * @param out output stream */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java b/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java index dc57990ef..0efb24674 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/StringUtils.java @@ -39,7 +39,7 @@ public class StringUtils { * @param string the String to encode, may be null * @return encoded bytes, or null if the input string was null * @throws IllegalStateException Thrown when the charset is missing, which should be never - * according the the Java specification. + * according the Java specification. * @see Standard charsets * @since 1.8 From 1d4270dc2971d52780359d9e3411dd761696c4e6 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sun, 26 May 2019 07:26:47 -0700 Subject: [PATCH 087/983] Linting cleanup (#645) * Fix javadoc param name * Group serializeHeaders() overloads --- .../google/api/client/http/HttpHeaders.java | 30 +++++++++---------- .../com/google/api/client/util/Objects.java | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java index caa88c99e..e43f09b0f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java @@ -893,21 +893,6 @@ static void serializeHeaders( serializeHeaders(headers, logbuf, curlbuf, logger, lowLevelHttpRequest, null); } - /** - * Serializes headers to an {@link Writer} for Multi-part requests. - * - * @param headers HTTP headers - * @param logbuf log buffer or {@code null} for none - * @param logger logger or {@code null} for none. Logger must be specified if log buffer is - * specified - * @param writer Writer where HTTP headers will be serialized to or {@code null} for none - * @since 1.9 - */ - public static void serializeHeadersForMultipartRequests( - HttpHeaders headers, StringBuilder logbuf, Logger logger, Writer writer) throws IOException { - serializeHeaders(headers, logbuf, null, logger, null, writer); - } - static void serializeHeaders( HttpHeaders headers, StringBuilder logbuf, @@ -947,6 +932,21 @@ static void serializeHeaders( } } + /** + * Serializes headers to an {@link Writer} for Multi-part requests. + * + * @param headers HTTP headers + * @param logbuf log buffer or {@code null} for none + * @param logger logger or {@code null} for none. Logger must be specified if log buffer is + * specified + * @param writer Writer where HTTP headers will be serialized to or {@code null} for none + * @since 1.9 + */ + public static void serializeHeadersForMultipartRequests( + HttpHeaders headers, StringBuilder logbuf, Logger logger, Writer writer) throws IOException { + serializeHeaders(headers, logbuf, null, logger, null, writer); + } + /** * Puts all headers of the {@link LowLevelHttpResponse} into this {@link HttpHeaders} object. * diff --git a/google-http-client/src/main/java/com/google/api/client/util/Objects.java b/google-http-client/src/main/java/com/google/api/client/util/Objects.java index ab980d948..08da55d0b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Objects.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Objects.java @@ -88,7 +88,7 @@ public static final class ToStringHelper { private ValueHolder holderTail = holderHead; private boolean omitNullValues; - /** @param wrapped wrapped object */ + /** @param className wrapped object */ ToStringHelper(String className) { this.className = className; } From e64f72f9deccc243312dbf621de728fabf208750 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sun, 26 May 2019 07:27:27 -0700 Subject: [PATCH 088/983] Remove deprecated google-http-client-jackson artifact. (#647) * Remove deprecated google-http-client-jackson artifact. Jackson 1.x has been unsupported for a long time. Users should be using Jackson 2.x. the google-http-client-jackson artifact was deprecated in 1.28.0. * Fix assembly references to jackson --- google-http-client-assembly/assembly.xml | 17 --- google-http-client-assembly/pom.xml | 4 - .../google-http-client-jackson.jar.properties | 1 - .../jackson-core-asl.jar.properties | 1 - google-http-client-bom/pom.xml | 5 - google-http-client-jackson/pom.xml | 110 -------------- .../client/json/jackson/JacksonFactory.java | 117 --------------- .../client/json/jackson/JacksonGenerator.java | 134 ------------------ .../client/json/jackson/JacksonParser.java | 117 --------------- .../api/client/json/jackson/package-info.java | 23 --- .../json/jackson/JacksonFactoryTest.java | 82 ----------- .../json/jackson/JacksonGeneratorTest.java | 30 ---- pom.xml | 12 -- versions.txt | 1 - 14 files changed, 654 deletions(-) delete mode 100644 google-http-client-assembly/properties/google-http-client-jackson.jar.properties delete mode 100644 google-http-client-assembly/properties/jackson-core-asl.jar.properties delete mode 100644 google-http-client-jackson/pom.xml delete mode 100644 google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java delete mode 100644 google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java delete mode 100644 google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java delete mode 100644 google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java delete mode 100644 google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java delete mode 100644 google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonGeneratorTest.java diff --git a/google-http-client-assembly/assembly.xml b/google-http-client-assembly/assembly.xml index 45478f40a..5e8a4f708 100644 --- a/google-http-client-assembly/assembly.xml +++ b/google-http-client-assembly/assembly.xml @@ -50,12 +50,6 @@ google-http-java-client/libs true - - properties/google-http-client-jackson.jar.properties - google-http-client-jackson-${project.version}.jar.properties - google-http-java-client/libs - true - properties/google-http-client-jackson2.jar.properties google-http-client-jackson2-${project.version}.jar.properties @@ -86,12 +80,6 @@ google-http-java-client/libs true - - properties/jackson-core-asl.jar.properties - jackson-core-asl-${project.jackson-core-asl.version}.jar.properties - google-http-java-client/libs - true - properties/protobuf-java.jar.properties protobuf-java-${project.protobuf-java.version}.jar.properties @@ -119,11 +107,6 @@ google-http-client-gson-dependencies.html google-http-java-client/dependencies - - ../google-http-client-jackson/target/site/dependencies.html - google-http-client-jackson-dependencies.html - google-http-java-client/dependencies - ../google-http-client-jackson2/target/site/dependencies.html google-http-client-jackson2-dependencies.html diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 1279fa067..6e009973d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -34,10 +34,6 @@ com.google.http-client google-http-client-gson - - com.google.http-client - google-http-client-jackson - com.google.http-client google-http-client-jackson2 diff --git a/google-http-client-assembly/properties/google-http-client-jackson.jar.properties b/google-http-client-assembly/properties/google-http-client-jackson.jar.properties deleted file mode 100644 index a02a3062f..000000000 --- a/google-http-client-assembly/properties/google-http-client-jackson.jar.properties +++ /dev/null @@ -1 +0,0 @@ -src=../libs-sources/google-http-client-jackson-${project.version}-sources.jar diff --git a/google-http-client-assembly/properties/jackson-core-asl.jar.properties b/google-http-client-assembly/properties/jackson-core-asl.jar.properties deleted file mode 100644 index d613b8e65..000000000 --- a/google-http-client-assembly/properties/jackson-core-asl.jar.properties +++ /dev/null @@ -1 +0,0 @@ -src=../libs-sources/jackson-core-asl-${project.jackson-core-asl.version}-sources.jar diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9db27edc7..626ca25ad 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -90,11 +90,6 @@ google-http-client-gson 1.29.2-SNAPSHOT - - com.google.http-client - google-http-client-jackson - 1.29.2-SNAPSHOT - com.google.http-client google-http-client-jackson2 diff --git a/google-http-client-jackson/pom.xml b/google-http-client-jackson/pom.xml deleted file mode 100644 index 67a928cb4..000000000 --- a/google-http-client-jackson/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - 4.0.0 - - com.google.http-client - google-http-client-parent - 1.29.2-SNAPSHOT - ../pom.xml - - google-http-client-jackson - 1.29.2-SNAPSHOT - Jackson extensions to the Google HTTP Client Library for Java. - - - - - maven-javadoc-plugin - - - http://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} - - ${project.name} ${project.version} - ${project.artifactId} ${project.version} - - - - maven-source-plugin - - - source-jar - compile - - jar - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.5 - - - add-test-source - generate-test-sources - - add-test-source - - - - target/generated-test-sources - - - - - - - maven-jar-plugin - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - com.google.api.client.json.jackson - - - - - - org.apache.felix - maven-bundle-plugin - 2.5.4 - - - bundle-manifest - process-classes - - manifest - - - - - - - - - com.google.http-client - google-http-client - - - com.google.http-client - google-http-client-test - test - - - junit - junit - test - - - org.codehaus.jackson - jackson-core-asl - - - com.google.guava - guava - test - - - diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java deleted file mode 100644 index c44ebc7fa..000000000 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonFactory.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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.json.jackson; - -import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.JsonGenerator; -import com.google.api.client.json.JsonParser; -import com.google.api.client.json.JsonToken; -import com.google.api.client.util.Preconditions; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Reader; -import java.io.Writer; -import java.nio.charset.Charset; - -/** - * Low-level JSON library implementation based on Jackson. - * - *

            Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, - * applications should use a single globally-shared instance of the JSON factory. - * - * @since 1.3 - * @author Yaniv Inbar - * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. - */ -@Deprecated -public final class JacksonFactory extends JsonFactory { - - /** JSON factory. */ - private final org.codehaus.jackson.JsonFactory factory = new org.codehaus.jackson.JsonFactory(); - - { - // don't auto-close JSON content in order to ensure consistent behavior across JSON factories - // TODO(rmistry): Should we disable the JsonGenerator.Feature.AUTO_CLOSE_TARGET feature? - factory.configure(org.codehaus.jackson.JsonGenerator.Feature.AUTO_CLOSE_JSON_CONTENT, false); - } - - @Override - public JsonGenerator createJsonGenerator(OutputStream out, Charset enc) throws IOException { - return new JacksonGenerator( - this, factory.createJsonGenerator(out, org.codehaus.jackson.JsonEncoding.UTF8)); - } - - @Override - public JsonGenerator createJsonGenerator(Writer writer) throws IOException { - return new JacksonGenerator(this, factory.createJsonGenerator(writer)); - } - - @Override - public JsonParser createJsonParser(Reader reader) throws IOException { - Preconditions.checkNotNull(reader); - return new JacksonParser(this, factory.createJsonParser(reader)); - } - - @Override - public JsonParser createJsonParser(InputStream in) throws IOException { - Preconditions.checkNotNull(in); - return new JacksonParser(this, factory.createJsonParser(in)); - } - - @Override - public JsonParser createJsonParser(InputStream in, Charset charset) throws IOException { - Preconditions.checkNotNull(in); - return new JacksonParser(this, factory.createJsonParser(in)); - } - - @Override - public JsonParser createJsonParser(String value) throws IOException { - Preconditions.checkNotNull(value); - return new JacksonParser(this, factory.createJsonParser(value)); - } - - static JsonToken convert(org.codehaus.jackson.JsonToken token) { - if (token == null) { - return null; - } - switch (token) { - case END_ARRAY: - return JsonToken.END_ARRAY; - case START_ARRAY: - return JsonToken.START_ARRAY; - case END_OBJECT: - return JsonToken.END_OBJECT; - case START_OBJECT: - return JsonToken.START_OBJECT; - case VALUE_FALSE: - return JsonToken.VALUE_FALSE; - case VALUE_TRUE: - return JsonToken.VALUE_TRUE; - case VALUE_NULL: - return JsonToken.VALUE_NULL; - case VALUE_STRING: - return JsonToken.VALUE_STRING; - case VALUE_NUMBER_FLOAT: - return JsonToken.VALUE_NUMBER_FLOAT; - case VALUE_NUMBER_INT: - return JsonToken.VALUE_NUMBER_INT; - case FIELD_NAME: - return JsonToken.FIELD_NAME; - default: - return JsonToken.NOT_AVAILABLE; - } - } -} diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java deleted file mode 100644 index 096b892ac..000000000 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonGenerator.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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.json.jackson; - -import com.google.api.client.json.JsonGenerator; -import java.io.IOException; -import java.math.BigDecimal; -import java.math.BigInteger; - -/** - * Low-level JSON serializer implementation based on Jackson. - * - *

            Implementation is not thread-safe. - * - * @author Yaniv Inbar - * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. - */ -@Deprecated -final class JacksonGenerator extends JsonGenerator { - private final org.codehaus.jackson.JsonGenerator generator; - private final JacksonFactory factory; - - @Override - public JacksonFactory getFactory() { - return factory; - } - - JacksonGenerator(JacksonFactory factory, org.codehaus.jackson.JsonGenerator generator) { - this.factory = factory; - this.generator = generator; - } - - @Override - public void flush() throws IOException { - generator.flush(); - } - - @Override - public void close() throws IOException { - generator.close(); - } - - @Override - public void writeBoolean(boolean state) throws IOException { - generator.writeBoolean(state); - } - - @Override - public void writeEndArray() throws IOException { - generator.writeEndArray(); - } - - @Override - public void writeEndObject() throws IOException { - generator.writeEndObject(); - } - - @Override - public void writeFieldName(String name) throws IOException { - generator.writeFieldName(name); - } - - @Override - public void writeNull() throws IOException { - generator.writeNull(); - } - - @Override - public void writeNumber(int v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(long v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(BigInteger v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(double v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(float v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(BigDecimal v) throws IOException { - generator.writeNumber(v); - } - - @Override - public void writeNumber(String encodedValue) throws IOException { - generator.writeNumber(encodedValue); - } - - @Override - public void writeStartArray() throws IOException { - generator.writeStartArray(); - } - - @Override - public void writeStartObject() throws IOException { - generator.writeStartObject(); - } - - @Override - public void writeString(String value) throws IOException { - generator.writeString(value); - } - - @Override - public void enablePrettyPrint() throws IOException { - generator.useDefaultPrettyPrinter(); - } -} diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java deleted file mode 100644 index 529582075..000000000 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/JacksonParser.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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.json.jackson; - -import com.google.api.client.json.JsonParser; -import com.google.api.client.json.JsonToken; -import java.io.IOException; -import java.math.BigDecimal; -import java.math.BigInteger; - -/** - * Low-level JSON serializer implementation based on Jackson. - * - *

            Implementation is not thread-safe. - * - * @author Yaniv Inbar - * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. - */ -@Deprecated -final class JacksonParser extends JsonParser { - - private final org.codehaus.jackson.JsonParser parser; - private final JacksonFactory factory; - - @Override - public JacksonFactory getFactory() { - return factory; - } - - JacksonParser(JacksonFactory factory, org.codehaus.jackson.JsonParser parser) { - this.factory = factory; - this.parser = parser; - } - - @Override - public void close() throws IOException { - parser.close(); - } - - @Override - public JsonToken nextToken() throws IOException { - return JacksonFactory.convert(parser.nextToken()); - } - - @Override - public String getCurrentName() throws IOException { - return parser.getCurrentName(); - } - - @Override - public JsonToken getCurrentToken() { - return JacksonFactory.convert(parser.getCurrentToken()); - } - - @Override - public JsonParser skipChildren() throws IOException { - parser.skipChildren(); - return this; - } - - @Override - public String getText() throws IOException { - return parser.getText(); - } - - @Override - public byte getByteValue() throws IOException { - return parser.getByteValue(); - } - - @Override - public float getFloatValue() throws IOException { - return parser.getFloatValue(); - } - - @Override - public int getIntValue() throws IOException { - return parser.getIntValue(); - } - - @Override - public short getShortValue() throws IOException { - return parser.getShortValue(); - } - - @Override - public BigInteger getBigIntegerValue() throws IOException { - return parser.getBigIntegerValue(); - } - - @Override - public BigDecimal getDecimalValue() throws IOException { - return parser.getDecimalValue(); - } - - @Override - public double getDoubleValue() throws IOException { - return parser.getDoubleValue(); - } - - @Override - public long getLongValue() throws IOException { - return parser.getLongValue(); - } -} diff --git a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java b/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java deleted file mode 100644 index eabec34a6..000000000 --- a/google-http-client-jackson/src/main/java/com/google/api/client/json/jackson/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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. - */ - -/** - * Low-level implementation of the JSON parser library based on the Jackson JSON library. - * - * @since 1.3 - * @author Yaniv Inbar - * @deprecated As of release 1.28, please use Jackson2 and google-http-client-jackson2. - */ -package com.google.api.client.json.jackson; diff --git a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java b/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java deleted file mode 100644 index 892d5b3b6..000000000 --- a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonFactoryTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2010 Google Inc. - * - * 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.json.jackson; - -import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.JsonParser; -import com.google.api.client.test.json.AbstractJsonFactoryTest; -import com.google.api.client.util.StringUtils; -import com.google.common.base.Charsets; -import java.io.ByteArrayInputStream; -import java.util.ArrayList; - -/** - * Tests {@link JacksonFactory}. - * - * @author Yaniv Inbar - */ -public class JacksonFactoryTest extends AbstractJsonFactoryTest { - - private static final String JSON_ENTRY_PRETTY = - "{" + StringUtils.LINE_SEPARATOR + " \"title\" : \"foo\"" + StringUtils.LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = - "{" - + StringUtils.LINE_SEPARATOR - + " \"entries\" : [ {" - + StringUtils.LINE_SEPARATOR - + " \"title\" : \"foo\"" - + StringUtils.LINE_SEPARATOR - + " }, {" - + StringUtils.LINE_SEPARATOR - + " \"title\" : \"bar\"" - + StringUtils.LINE_SEPARATOR - + " } ]" - + StringUtils.LINE_SEPARATOR - + "}"; - - public JacksonFactoryTest(String name) { - super(name); - } - - @Override - protected JsonFactory newFactory() { - return new JacksonFactory(); - } - - public final void testToPrettyString_entry() throws Exception { - Entry entry = new Entry(); - entry.title = "foo"; - assertEquals(JSON_ENTRY_PRETTY, newFactory().toPrettyString(entry)); - } - - public final void testToPrettyString_Feed() throws Exception { - Feed feed = new Feed(); - Entry entryFoo = new Entry(); - entryFoo.title = "foo"; - Entry entryBar = new Entry(); - entryBar.title = "bar"; - feed.entries = new ArrayList(); - feed.entries.add(entryFoo); - feed.entries.add(entryBar); - assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); - } - - public final void testParse_directValue() throws Exception { - byte[] jsonData = Charsets.UTF_8.encode("123").array(); - JsonParser jp = - newFactory().createJsonParser(new ByteArrayInputStream(jsonData), Charsets.UTF_8); - assertEquals(123, jp.parse(Integer.class, true)); - } -} diff --git a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonGeneratorTest.java b/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonGeneratorTest.java deleted file mode 100644 index bfdfbfe28..000000000 --- a/google-http-client-jackson/src/test/java/com/google/api/client/json/jackson/JacksonGeneratorTest.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2018 Google Inc. - * - * 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.json.jackson; - -import com.google.api.client.json.JsonGenerator; -import com.google.api.client.test.json.AbstractJsonGeneratorTest; -import java.io.IOException; -import java.io.Writer; - -public class JacksonGeneratorTest extends AbstractJsonGeneratorTest { - - private static final JacksonFactory FACTORY = new JacksonFactory(); - - @Override - protected JsonGenerator newGenerator(Writer writer) throws IOException { - return FACTORY.createJsonGenerator(writer); - } -} diff --git a/pom.xml b/pom.xml index b1d4d0bb6..56f3e7038 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,6 @@ google-http-client-apache-v2 google-http-client-protobuf google-http-client-gson - google-http-client-jackson google-http-client-jackson2 google-http-client-xml @@ -198,11 +197,6 @@ google-http-client-gson ${project.http-client.version} - - com.google.http-client - google-http-client-jackson - ${project.http-client.version} - com.google.http-client google-http-client-jackson2 @@ -402,7 +396,6 @@ http://download.oracle.com/javase/7/docs/api/ http://cloud.google.com/appengine/docs/java/javadoc - https://jar-download.com/javaDoc/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version} http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ https://static.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} https://google.github.io/guava/releases/${project.guava.version}/api/docs/ @@ -431,10 +424,6 @@ google-http-client-gson com.google.api.client.json.gson* - - google-http-client-jackson - com.google.api.client.json.jackson.* - google-http-client-jackson2 com.google.api.client.json.jackson2.* @@ -557,7 +546,6 @@ UTF-8 3.0.2 2.1 - 1.9.13 2.9.6 3.6.1 26.0-android diff --git a/versions.txt b/versions.txt index d3e97b814..6cadb621b 100644 --- a/versions.txt +++ b/versions.txt @@ -11,7 +11,6 @@ google-http-client-appengine:1.29.1:1.29.2-SNAPSHOT google-http-client-assembly:1.29.1:1.29.2-SNAPSHOT google-http-client-findbugs:1.29.1:1.29.2-SNAPSHOT google-http-client-gson:1.29.1:1.29.2-SNAPSHOT -google-http-client-jackson:1.29.1:1.29.2-SNAPSHOT google-http-client-jackson2:1.29.1:1.29.2-SNAPSHOT google-http-client-jdo:1.29.1:1.29.2-SNAPSHOT google-http-client-protobuf:1.29.1:1.29.2-SNAPSHOT From 91cbfdb487ee39d46bf2daa5785b15b025f516cf Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sun, 26 May 2019 07:27:50 -0700 Subject: [PATCH 089/983] Add Base64Test case for some base64 decoding edge cases (#644) * Add Base64Test case for some base64 decoding edge cases * Preserve decoding behavior for null decodeBase64(null) * Handle encoding with null inputs --- .../com/google/api/client/util/Base64.java | 11 +++- .../google/api/client/util/Base64Test.java | 65 +++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/util/Base64Test.java diff --git a/google-http-client/src/main/java/com/google/api/client/util/Base64.java b/google-http-client/src/main/java/com/google/api/client/util/Base64.java index 305ab688c..038156390 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Base64.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Base64.java @@ -43,6 +43,9 @@ public static byte[] encodeBase64(byte[] binaryData) { * @return String containing Base64 characters or {@code null} for {@code null} input */ public static String encodeBase64String(byte[] binaryData) { + if (binaryData == null) { + return null; + } return BaseEncoding.base64().encode(binaryData); } @@ -66,6 +69,9 @@ public static byte[] encodeBase64URLSafe(byte[] binaryData) { * @return String containing Base64 characters or {@code null} for {@code null} input */ public static String encodeBase64URLSafeString(byte[] binaryData) { + if (binaryData == null) { + return null; + } return BaseEncoding.base64Url().omitPadding().encode(binaryData); } @@ -88,11 +94,14 @@ public static byte[] decodeBase64(byte[] base64Data) { * @return Array containing decoded data or {@code null} for {@code null} input */ public static byte[] decodeBase64(String base64String) { + if (base64String == null) { + return null; + } try { return BaseEncoding.base64().decode(base64String); } catch (IllegalArgumentException e) { if (e.getCause() instanceof DecodingException) { - return BaseEncoding.base64Url().decode(base64String); + return BaseEncoding.base64Url().decode(base64String.trim()); } throw e; } diff --git a/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java new file mode 100644 index 000000000..0ee174f9f --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java @@ -0,0 +1,65 @@ +/* + * 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.util; + +import java.nio.charset.StandardCharsets; +import junit.framework.TestCase; + +/** + * Tests {@link Base64}. + * + * @author Jeff Ching + */ +public class Base64Test extends TestCase { + + public void test_decodeBase64_withPadding() { + String encoded = "Zm9vOmJhcg=="; + assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); + } + + public void test_decodeBase64_withoutPadding() { + String encoded = "Zm9vOmJhcg"; + assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); + } + + public void test_decodeBase64_withTrailingWhitespace() { + // Some internal use cases append extra space characters that apache-commons base64 decoding + // previously handled. + String encoded = "Zm9vOmJhcg==\r\n"; + assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); + } + + public void test_decodeBase64_withNullBytes_shouldReturnNull() { + byte[] encoded = null; + assertNull(Base64.decodeBase64(encoded)); + } + + public void test_decodeBase64_withNull_shouldReturnNull() { + String encoded = null; + assertNull(Base64.decodeBase64(encoded)); + } + + public void test_encodeBase64URLSafeString_withNull_shouldReturnNull() { + assertNull(Base64.encodeBase64URLSafeString(null)); + } + + public void test_encodeBase64URLSafe_withNull_shouldReturnNull() { + assertNull(Base64.encodeBase64URLSafe(null)); + } + + public void test_encodeBase64_withNull_shouldReturnNull() { + assertNull(Base64.encodeBase64(null)); + } +} From 1b18a6efb7acb01110d94a207cd7e9de25c21058 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 31 May 2019 19:55:02 +0200 Subject: [PATCH 090/983] Add renovate.json (#651) --- renovate.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..f45d8f110 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} From 1a4a5cc087348d081cca05566bafc11414647b82 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 31 May 2019 20:08:24 +0200 Subject: [PATCH 091/983] Update dependency com.fasterxml.jackson.core:jackson-core to v2.9.9 (#653) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56f3e7038..6c7e5897e 100644 --- a/pom.xml +++ b/pom.xml @@ -546,7 +546,7 @@ UTF-8 3.0.2 2.1 - 2.9.6 + 2.9.9 3.6.1 26.0-android 1.1.4c From b0d724593ce3962a751292bcf4f6e508e824bec8 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 31 May 2019 20:09:21 +0200 Subject: [PATCH 092/983] Update dependency com.coveo:fmt-maven-plugin to v2.9 (#652) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c7e5897e..f91a2ab92 100644 --- a/pom.xml +++ b/pom.xml @@ -522,7 +522,7 @@ com.coveo fmt-maven-plugin - 2.6.0 + 2.9 true From 13731cdff2f9ff9c178ec7387ef1cf18aee51ab9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 31 May 2019 21:51:38 +0200 Subject: [PATCH 093/983] Update dependency com.google.code.gson:gson to v2.8.5 (#657) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f91a2ab92..6872e5cc4 100644 --- a/pom.xml +++ b/pom.xml @@ -545,7 +545,7 @@ 1.9.71 UTF-8 3.0.2 - 2.1 + 2.8.5 2.9.9 3.6.1 26.0-android From fdafec10c56ec8674378daf50779b84ee4902a0e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 1 Jun 2019 00:42:58 +0200 Subject: [PATCH 094/983] Update dependency com.google.truth:truth to v0.45 (#663) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6872e5cc4..2bce0e45f 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ com.google.truth truth - 0.42 + 0.45 test From 50d56f9f19671fa743ab2bba8e5444c9351f50d1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 1 Jun 2019 01:13:56 +0200 Subject: [PATCH 095/983] Update dependency com.jayway.maven.plugins.android.generation2:android-maven-plugin to v3.8.2 (#666) --- google-http-client-android-test/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 5accbaca3..5a17f8d90 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -12,7 +12,7 @@ com.jayway.maven.plugins.android.generation2 android-maven-plugin - 3.3.0 + 3.8.2 ${env.ANDROID_HOME} From 7ffd3904d9ef63ea6d2ff6b0db99bff867175d62 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 1 Jun 2019 01:30:12 +0200 Subject: [PATCH 096/983] Update dependency com.google.j2objc:j2objc-annotations to v1.3 (#660) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2bce0e45f..e22c8824e 100644 --- a/pom.xml +++ b/pom.xml @@ -230,7 +230,7 @@ com.google.j2objc j2objc-annotations - 1.1 + 1.3 io.opencensus From 28f84275f79e69b402eecaee0adc7c0bd9af4c47 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:20:36 +0200 Subject: [PATCH 097/983] Update dependency kr.motd.maven:os-maven-plugin to v1.6.2 (#669) --- google-http-client-protobuf/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b7245b539..eada200c1 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -16,7 +16,7 @@ kr.motd.maven os-maven-plugin - 1.4.0.Final + 1.6.2 From f0af47234430dc9786646db2adfb92784034bf77 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:20:53 +0200 Subject: [PATCH 098/983] Update dependency mysql:mysql-connector-java to v5.1.47 (#670) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e22c8824e..d20120084 100644 --- a/pom.xml +++ b/pom.xml @@ -225,7 +225,7 @@ mysql mysql-connector-java - 5.1.18 + 5.1.47 com.google.j2objc From 42848fe014e4c3bef714bc6b5b277663335840e9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:21:08 +0200 Subject: [PATCH 099/983] Update dependency org.apache.httpcomponents:httpclient to v4.5.8 (#671) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d20120084..f8c459ec7 100644 --- a/pom.xml +++ b/pom.xml @@ -551,7 +551,7 @@ 26.0-android 1.1.4c 1.2 - 4.5.5 + 4.5.8 0.19.2 .. From d02f6b1b2401593300979403c0621305ed8af69b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:21:39 +0200 Subject: [PATCH 100/983] Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.1.2 (#673) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f8c459ec7..101e91c2b 100644 --- a/pom.xml +++ b/pom.xml @@ -310,7 +310,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.0.2 + 3.1.2 From fc9ac8274123d0d7c70d509815adb2239ae572a7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:21:51 +0200 Subject: [PATCH 101/983] Update dependency org.apache.maven.plugins:maven-source-plugin to v2.4 (#674) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 101e91c2b..353b5e70c 100644 --- a/pom.xml +++ b/pom.xml @@ -284,7 +284,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 2.4 attach-sources From 72dad4705ee64412eac3226933c906dd79006e17 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:22:13 +0200 Subject: [PATCH 102/983] Update dependency org.codehaus.mojo:build-helper-maven-plugin to v1.12 (#676) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index fab345615..59cb50e68 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.5 + 1.12 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 14734edc9..d59f44377 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.5 + 1.12 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 070ff5008..078bf8086 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.5 + 1.12 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index f55edd716..219d998aa 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.5 + 1.12 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 489d97c11..eb0bbb5a4 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.5 + 1.12 add-test-source From 0c282918c51c2fe96d891cae0f770107f8e986c6 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:22:34 +0200 Subject: [PATCH 103/983] Update dependency org.codehaus.mojo:exec-maven-plugin to v1.6.0 (#677) --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 5edea60b8..ded144b0d 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 1.1 + 1.6.0 From ffab930e3a487379afd78ae10975760799e37536 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 16:23:07 +0200 Subject: [PATCH 104/983] Update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.8 (#678) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 626ca25ad..ed2c5821b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.6 + 1.6.8 true sonatype-nexus-staging diff --git a/pom.xml b/pom.xml index 353b5e70c..f9fdcd404 100644 --- a/pom.xml +++ b/pom.xml @@ -252,7 +252,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.6 + 1.6.8 true ossrh From de65de2809334501bab41b1d294cb9769a455899 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 3 Jun 2019 09:26:52 -0700 Subject: [PATCH 105/983] Revert "Fix int type transformed as BigDecimal value when parsing as Map (#529)" (#662) This reverts commit da597e87b9d7463de4eb7da55256c648d28fe3ba. --- .../test/json/AbstractJsonFactoryTest.java | 43 +++++-------------- .../google/api/client/json/JsonParser.java | 4 -- 2 files changed, 11 insertions(+), 36 deletions(-) diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java index 1f11dfd38..8bf518109 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java @@ -482,8 +482,6 @@ public static class MapOfMapType { static final String MAP_TYPE = "{\"value\":[{\"map1\":{\"k1\":1,\"k2\":2},\"map2\":{\"kk1\":3,\"kk2\":4}}]}"; - static final String BIGDECIMAL_MAP_TYPE = - "{\"value\":[{\"map1\":{\"k1\":1.14566,\"k2\":2.14},\"map2\":{\"kk1\":3.29,\"kk2\":4.69}}]}"; public void testParser_mapType() throws Exception { // parse @@ -512,35 +510,16 @@ public void testParser_hashmapForMapType() throws Exception { parser = factory.createJsonParser(MAP_TYPE); parser.nextToken(); @SuppressWarnings("unchecked") - HashMap>>> result = - parser.parse(HashMap.class); - // serialize - assertEquals(MAP_TYPE, factory.toString(result)); - // check parsed result - ArrayList>> value = result.get("value"); - ArrayMap> firstMap = value.get(0); - ArrayMap map1 = firstMap.get("map1"); - Integer integer = map1.get("k1"); - assertEquals(1, integer.intValue()); - } - - public void testParser_hashmapForMapTypeWithBigDecimal() throws Exception { - // parse - JsonFactory factory = newFactory(); - JsonParser parser; - parser = factory.createJsonParser(BIGDECIMAL_MAP_TYPE); - parser.nextToken(); - @SuppressWarnings("unchecked") HashMap>>> result = parser.parse(HashMap.class); // serialize - assertEquals(BIGDECIMAL_MAP_TYPE, factory.toString(result)); + assertEquals(MAP_TYPE, factory.toString(result)); // check parsed result ArrayList>> value = result.get("value"); ArrayMap> firstMap = value.get(0); ArrayMap map1 = firstMap.get("map1"); - BigDecimal bigDecimal = map1.get("k1"); - assertEquals(BigDecimal.valueOf(1.14566).setScale(5), bigDecimal); + BigDecimal integer = map1.get("k1"); + assertEquals(1, integer.intValue()); } public static class WildCardTypes { @@ -568,8 +547,8 @@ public void testParser_wildCardType() throws Exception { assertEquals(WILDCARD_TYPE, factory.toString(result)); // check parsed result Collection[] simple = result.simple; - ArrayList wildcard = (ArrayList) simple[0]; - Integer wildcardFirstValue = wildcard.get(0); + ArrayList wildcard = (ArrayList) simple[0]; + BigDecimal wildcardFirstValue = wildcard.get(0); assertEquals(1, wildcardFirstValue.intValue()); Collection[] upper = result.upper; ArrayList wildcardUpper = (ArrayList) upper[0]; @@ -579,8 +558,8 @@ public void testParser_wildCardType() throws Exception { ArrayList wildcardLower = (ArrayList) lower[0]; Integer wildcardFirstValueLower = wildcardLower.get(0); assertEquals(1, wildcardFirstValueLower.intValue()); - Map map = (Map) result.map; - Integer mapValue = map.get("v"); + Map map = (Map) result.map; + BigDecimal mapValue = map.get("v"); assertEquals(1, mapValue.intValue()); Map mapUpper = (Map) result.mapUpper; Integer mapUpperValue = mapUpper.get("v"); @@ -792,16 +771,16 @@ public void testParser_treemapForTypeVariableType() throws Exception { ArrayList arr = (ArrayList) result.get("arr"); assertEquals(2, arr.size()); assertEquals(Data.nullOf(Object.class), arr.get(0)); - ArrayList subArr = (ArrayList) arr.get(1); + ArrayList subArr = (ArrayList) arr.get(1); assertEquals(2, subArr.size()); assertEquals(Data.nullOf(Object.class), subArr.get(0)); - Integer arrValue = subArr.get(1); + BigDecimal arrValue = subArr.get(1); assertEquals(1, arrValue.intValue()); // null value Object nullValue = result.get("nullValue"); assertEquals(Data.nullOf(Object.class), nullValue); // value - Integer value = (Integer) result.get("value"); + BigDecimal value = (BigDecimal) result.get("value"); assertEquals(1, value.intValue()); } @@ -1540,7 +1519,7 @@ public void testParser_heterogeneousSchema_genericJson() throws Exception { assertEquals(4, dog.numberOfLegs); assertEquals(3, ((DogGenericJson) dog).tricksKnown); assertEquals("this is not being used!", dog.get("unusedInfo")); - Integer foo = ((Integer) ((ArrayMap) dog.get("unused")).get("foo")); + BigDecimal foo = ((BigDecimal) ((ArrayMap) dog.get("unused")).get("foo")); assertEquals(200, foo.intValue()); } diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index 44bec3f51..75972a16c 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -828,10 +828,6 @@ private final Object parseValue( Preconditions.checkArgument( fieldContext == null || fieldContext.getAnnotation(JsonString.class) == null, "number type formatted as a JSON number cannot use @JsonString annotation"); - if (getCurrentToken() == JsonToken.VALUE_NUMBER_INT - && (valueClass == null || valueClass.isAssignableFrom(Integer.class))) { - return getIntValue(); - } if (valueClass == null || valueClass.isAssignableFrom(BigDecimal.class)) { return getDecimalValue(); } From f3381389a54917b7e172176a3592d007f1e4c66c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 18:43:45 +0200 Subject: [PATCH 106/983] Update dependency mysql:mysql-connector-java to v8 (#679) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9fdcd404..bcbbf8334 100644 --- a/pom.xml +++ b/pom.xml @@ -225,7 +225,7 @@ mysql mysql-connector-java - 5.1.47 + 8.0.16 com.google.j2objc From 8bdda6a251116e1972675c0d4a99d9edacccce73 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 18:44:10 +0200 Subject: [PATCH 107/983] Update dependency org.apache.maven.plugins:maven-source-plugin to v3 (#681) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bcbbf8334..61e3ceec8 100644 --- a/pom.xml +++ b/pom.xml @@ -284,7 +284,7 @@ org.apache.maven.plugins maven-source-plugin - 2.4 + 3.1.0 attach-sources From 6d11bb3a616b93f2c394efd3b295e424709bf4eb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 3 Jun 2019 18:44:31 +0200 Subject: [PATCH 108/983] Update dependency org.codehaus.mojo:build-helper-maven-plugin to v3 (#682) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 59cb50e68..cfc88c1d7 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.0.0 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d59f44377..8f8d7748e 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.0.0 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 078bf8086..2d6d7ecb4 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.0.0 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 219d998aa..a7af4faa1 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.0.0 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index eb0bbb5a4..8c1f60bfe 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.12 + 3.0.0 add-test-source From e4b205b2d31d56ce61ee8bd422d3d28201d3005e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 3 Jun 2019 09:59:06 -0700 Subject: [PATCH 109/983] Add abstract JSON test and tests for Jackson2 and gson (#665) --- .../api/client/json/gson/GsonParserTest.java | 28 +++++++++ .../json/jackson2/JacksonParserTest.java | 28 +++++++++ .../test/json/AbstractJsonParserTest.java | 59 +++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java create mode 100644 google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java create mode 100644 google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java new file mode 100644 index 000000000..f79d4a5d6 --- /dev/null +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java @@ -0,0 +1,28 @@ +/** + * 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 + * + * https://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.json.gson; + +import com.google.api.client.json.JsonFactory; +import com.google.api.client.test.json.AbstractJsonParserTest; + +public class GsonParserTest extends AbstractJsonParserTest { + + @Override + protected JsonFactory newJsonFactory() { + return new GsonFactory(); + } +} diff --git a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java new file mode 100644 index 000000000..92da03605 --- /dev/null +++ b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java @@ -0,0 +1,28 @@ +/** + * 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 + * + * https://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.json.jackson2; + +import com.google.api.client.json.JsonFactory; +import com.google.api.client.test.json.AbstractJsonParserTest; + +public class JacksonParserTest extends AbstractJsonParserTest { + + @Override + protected JsonFactory newJsonFactory() { + return new JacksonFactory(); + } +} diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java new file mode 100644 index 000000000..a61dc5c27 --- /dev/null +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java @@ -0,0 +1,59 @@ +/** + * 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 + * + * https://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.test.json; + +import com.google.api.client.json.GenericJson; +import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import junit.framework.TestCase; + +public abstract class AbstractJsonParserTest extends TestCase { + + protected abstract JsonFactory newJsonFactory(); + + private static String TEST_JSON = + "{\"strValue\": \"bar\", \"intValue\": 123, \"boolValue\": false}"; + private static String TEST_JSON_BIG_DECIMAL = "{\"bigDecimalValue\": 1559341956102}"; + + public void testParse_basic() throws IOException { + JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); + InputStream inputStream = new ByteArrayInputStream(TEST_JSON.getBytes(StandardCharsets.UTF_8)); + GenericJson json = parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + + assertTrue(json.get("strValue") instanceof String); + assertEquals("bar", json.get("strValue")); + assertTrue(json.get("intValue") instanceof BigDecimal); + assertEquals(new BigDecimal(123), json.get("intValue")); + assertTrue(json.get("boolValue") instanceof Boolean); + assertEquals(Boolean.FALSE, json.get("boolValue")); + } + + public void testParse_bigDecimal() throws IOException { + JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); + InputStream inputStream = + new ByteArrayInputStream(TEST_JSON_BIG_DECIMAL.getBytes(StandardCharsets.UTF_8)); + GenericJson json = parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + + assertTrue(json.get("bigDecimalValue") instanceof BigDecimal); + assertEquals(new BigDecimal("1559341956102"), json.get("bigDecimalValue")); + } +} From f0724d793711cae1b6df33eff583b280a622ff95 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 3 Jun 2019 22:51:55 -0700 Subject: [PATCH 110/983] Update dependency io.opencensus:opencensus-api to v0.21.0 (#692) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 61e3ceec8..1e8599b60 100644 --- a/pom.xml +++ b/pom.xml @@ -552,7 +552,7 @@ 1.1.4c 1.2 4.5.8 - 0.19.2 + 0.21.0 .. From f2b6e71523a2966242ce780e54eb0f284e33ce7f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 4 Jun 2019 08:20:41 -0700 Subject: [PATCH 111/983] Release google-http-java-client v1.30.0 (#690) * Release v1.30.0 * Fix HttpRequest.VERSION constant --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- .../google/api/client/http/HttpRequest.java | 2 +- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 56 insertions(+), 56 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 5a17f8d90..fefb81614 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.29.2-SNAPSHOT + 1.30.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.29.2-SNAPSHOT + 1.30.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.29.2-SNAPSHOT + 1.30.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 0db928781..86d405f05 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-android - 1.29.2-SNAPSHOT + 1.30.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index cfc88c1d7..a11536f77 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-apache-v2 - 1.29.2-SNAPSHOT + 1.30.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 611d20532..a6caed151 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-appengine - 1.29.2-SNAPSHOT + 1.30.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6e009973d..9519a319b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.29.2-SNAPSHOT + 1.30.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index cbe294620..b5d54cdd3 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.29.1 + 1.30.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ed2c5821b..ef8aa084b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.29.2-SNAPSHOT + 1.30.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-android - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-apache-v2 - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-appengine - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-findbugs - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-gson - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-jackson2 - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-protobuf - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-test - 1.29.2-SNAPSHOT + 1.30.0 com.google.http-client google-http-client-xml - 1.29.2-SNAPSHOT + 1.30.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9d126ecbf..7be42e7eb 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-findbugs - 1.29.2-SNAPSHOT + 1.30.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 8f8d7748e..0ee67699c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-gson - 1.29.2-SNAPSHOT + 1.30.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2d6d7ecb4..eddccaa95 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-jackson2 - 1.29.2-SNAPSHOT + 1.30.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index eada200c1..4dd5012d9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-protobuf - 1.29.2-SNAPSHOT + 1.30.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index a7af4faa1..62098358b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-test - 1.29.2-SNAPSHOT + 1.30.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8c1f60bfe..c5adc93dc 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client-xml - 1.29.2-SNAPSHOT + 1.30.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1886057b4..ee1419a1d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../pom.xml google-http-client - 1.29.2-SNAPSHOT + 1.30.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 05d6cc906..c45152894 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -53,7 +53,7 @@ public final class HttpRequest { * * @since 1.8 */ - public static final String VERSION = "1.28.0"; + public static final String VERSION = "1.30.0"; /** * User agent suffix for all requests. diff --git a/pom.xml b/pom.xml index 1e8599b60..6c697a664 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 pom Parent for the Google HTTP Client Library for Java @@ -541,7 +541,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.29.2-SNAPSHOT + 1.30.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ded144b0d..45b6e0734 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.29.2-SNAPSHOT + 1.30.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 6cadb621b..99b12f9a4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.29.1:1.29.2-SNAPSHOT -google-http-client-bom:1.29.1:1.29.2-SNAPSHOT -google-http-client-parent:1.29.1:1.29.2-SNAPSHOT -google-http-client-android:1.29.1:1.29.2-SNAPSHOT -google-http-client-android-test:1.29.1:1.29.2-SNAPSHOT -google-http-client-apache-v2:1.29.1:1.29.2-SNAPSHOT -google-http-client-appengine:1.29.1:1.29.2-SNAPSHOT -google-http-client-assembly:1.29.1:1.29.2-SNAPSHOT -google-http-client-findbugs:1.29.1:1.29.2-SNAPSHOT -google-http-client-gson:1.29.1:1.29.2-SNAPSHOT -google-http-client-jackson2:1.29.1:1.29.2-SNAPSHOT -google-http-client-jdo:1.29.1:1.29.2-SNAPSHOT -google-http-client-protobuf:1.29.1:1.29.2-SNAPSHOT -google-http-client-test:1.29.1:1.29.2-SNAPSHOT -google-http-client-xml:1.29.1:1.29.2-SNAPSHOT +google-http-client:1.30.0:1.30.0 +google-http-client-bom:1.30.0:1.30.0 +google-http-client-parent:1.30.0:1.30.0 +google-http-client-android:1.30.0:1.30.0 +google-http-client-android-test:1.30.0:1.30.0 +google-http-client-apache-v2:1.30.0:1.30.0 +google-http-client-appengine:1.30.0:1.30.0 +google-http-client-assembly:1.30.0:1.30.0 +google-http-client-findbugs:1.30.0:1.30.0 +google-http-client-gson:1.30.0:1.30.0 +google-http-client-jackson2:1.30.0:1.30.0 +google-http-client-jdo:1.30.0:1.30.0 +google-http-client-protobuf:1.30.0:1.30.0 +google-http-client-test:1.30.0:1.30.0 +google-http-client-xml:1.30.0:1.30.0 From 3ae08582e2a4b80a97db4ee840fa973116b47217 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 4 Jun 2019 08:43:59 -0700 Subject: [PATCH 112/983] Bump next snapshot (#698) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 16 files changed, 54 insertions(+), 54 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index fefb81614..71dd0bb65 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.30.0 + 1.30.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.30.0 + 1.30.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.30.0 + 1.30.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 86d405f05..54e253b98 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-android - 1.30.0 + 1.30.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a11536f77..13f36b6e2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.30.0 + 1.30.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index a6caed151..5e1f3bbc1 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.30.0 + 1.30.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9519a319b..9856921a8 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.30.0 + 1.30.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ef8aa084b..4e716d983 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.30.0 + 1.30.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-android - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-test - 1.30.0 + 1.30.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.30.0 + 1.30.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 7be42e7eb..11d21a568 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.30.0 + 1.30.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 0ee67699c..12bb26418 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.30.0 + 1.30.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index eddccaa95..45d38dbd1 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.30.0 + 1.30.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 4dd5012d9..bba3108a9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.30.0 + 1.30.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 62098358b..324a7273c 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-test - 1.30.0 + 1.30.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c5adc93dc..d50489371 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.30.0 + 1.30.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ee1419a1d..86ea24f1d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../pom.xml google-http-client - 1.30.0 + 1.30.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 6c697a664..6cd9c2b98 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java @@ -541,7 +541,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.30.0 + 1.30.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 45b6e0734..242da2e92 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.30.0 + 1.30.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 99b12f9a4..9e0aa43d6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.30.0:1.30.0 -google-http-client-bom:1.30.0:1.30.0 -google-http-client-parent:1.30.0:1.30.0 -google-http-client-android:1.30.0:1.30.0 -google-http-client-android-test:1.30.0:1.30.0 -google-http-client-apache-v2:1.30.0:1.30.0 -google-http-client-appengine:1.30.0:1.30.0 -google-http-client-assembly:1.30.0:1.30.0 -google-http-client-findbugs:1.30.0:1.30.0 -google-http-client-gson:1.30.0:1.30.0 -google-http-client-jackson2:1.30.0:1.30.0 -google-http-client-jdo:1.30.0:1.30.0 -google-http-client-protobuf:1.30.0:1.30.0 -google-http-client-test:1.30.0:1.30.0 -google-http-client-xml:1.30.0:1.30.0 +google-http-client:1.30.0:1.30.1-SNAPSHOT +google-http-client-bom:1.30.0:1.30.1-SNAPSHOT +google-http-client-parent:1.30.0:1.30.1-SNAPSHOT +google-http-client-android:1.30.0:1.30.1-SNAPSHOT +google-http-client-android-test:1.30.0:1.30.1-SNAPSHOT +google-http-client-apache-v2:1.30.0:1.30.1-SNAPSHOT +google-http-client-appengine:1.30.0:1.30.1-SNAPSHOT +google-http-client-assembly:1.30.0:1.30.1-SNAPSHOT +google-http-client-findbugs:1.30.0:1.30.1-SNAPSHOT +google-http-client-gson:1.30.0:1.30.1-SNAPSHOT +google-http-client-jackson2:1.30.0:1.30.1-SNAPSHOT +google-http-client-jdo:1.30.0:1.30.1-SNAPSHOT +google-http-client-protobuf:1.30.0:1.30.1-SNAPSHOT +google-http-client-test:1.30.0:1.30.1-SNAPSHOT +google-http-client-xml:1.30.0:1.30.1-SNAPSHOT From f24926619e3095d7d2ddd26d19b8ba2a5f2e0d68 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 6 Jun 2019 10:10:00 -0700 Subject: [PATCH 113/983] Fix method template signature broken in #639 (#700) --- .../src/main/java/com/google/api/client/util/Data.java | 2 +- .../src/test/java/com/google/api/client/util/DataTest.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/Data.java b/google-http-client/src/main/java/com/google/api/client/util/Data.java index 10e3fe5bd..5b2a91e4b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Data.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Data.java @@ -108,7 +108,7 @@ public class Data { * @return magic object instance that represents the "null" value (not Java {@code null}) * @throws IllegalArgumentException if unable to create a new instance */ - public static T nullOf(Class objClass) { + public static T nullOf(Class objClass) { // ConcurrentMap.computeIfAbsent is explicitly NOT used in the following logic. The // ConcurrentHashMap implementation of that method BLOCKS if the mappingFunction triggers // modification of the map which createNullInstance can do depending on the state of class diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java index de428c60c..00f1dd5d2 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java @@ -14,6 +14,7 @@ package com.google.api.client.util; +import com.google.common.collect.ImmutableMap; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; @@ -68,6 +69,12 @@ public void testNullOf() { } } + public void testNullOfTemplateTypes() { + String nullValue = Data.nullOf(String.class); + Map nullField = ImmutableMap.of("v", nullValue); + assertEquals(nullValue, nullField.get("v")); + } + public void testIsNull() { assertTrue(Data.isNull(Data.NULL_BOOLEAN)); assertTrue(Data.isNull(Data.NULL_STRING)); From 1e4e4829ced01bfaaf688779112a403d6f3e1a8b Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 6 Jun 2019 10:34:07 -0700 Subject: [PATCH 114/983] Release v1.30.1 (#701) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 55 insertions(+), 55 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 71dd0bb65..9ae99c1aa 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.30.1-SNAPSHOT + 1.30.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.30.1-SNAPSHOT + 1.30.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.30.1-SNAPSHOT + 1.30.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 54e253b98..b71423880 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-android - 1.30.1-SNAPSHOT + 1.30.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 13f36b6e2..eb98d9402 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-apache-v2 - 1.30.1-SNAPSHOT + 1.30.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 5e1f3bbc1..7de8a8e0a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-appengine - 1.30.1-SNAPSHOT + 1.30.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9856921a8..fd57ac06d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.30.1-SNAPSHOT + 1.30.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index b5d54cdd3..d47ee347c 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.30.0 + 1.30.1 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 4e716d983..50e964f19 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.30.1-SNAPSHOT + 1.30.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-android - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-apache-v2 - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-appengine - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-findbugs - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-gson - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-jackson2 - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-protobuf - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-test - 1.30.1-SNAPSHOT + 1.30.1 com.google.http-client google-http-client-xml - 1.30.1-SNAPSHOT + 1.30.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 11d21a568..8b96e90b3 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-findbugs - 1.30.1-SNAPSHOT + 1.30.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 12bb26418..fa5483bbc 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-gson - 1.30.1-SNAPSHOT + 1.30.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 45d38dbd1..d7ebfe076 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-jackson2 - 1.30.1-SNAPSHOT + 1.30.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index bba3108a9..d561354b1 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-protobuf - 1.30.1-SNAPSHOT + 1.30.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 324a7273c..dff31255b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-test - 1.30.1-SNAPSHOT + 1.30.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index d50489371..d02605496 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client-xml - 1.30.1-SNAPSHOT + 1.30.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 86ea24f1d..d0af626a9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../pom.xml google-http-client - 1.30.1-SNAPSHOT + 1.30.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 6cd9c2b98..317bea379 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 pom Parent for the Google HTTP Client Library for Java @@ -541,7 +541,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.30.1-SNAPSHOT + 1.30.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 242da2e92..51f55b99e 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.30.1-SNAPSHOT + 1.30.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 9e0aa43d6..ffe80820d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.30.0:1.30.1-SNAPSHOT -google-http-client-bom:1.30.0:1.30.1-SNAPSHOT -google-http-client-parent:1.30.0:1.30.1-SNAPSHOT -google-http-client-android:1.30.0:1.30.1-SNAPSHOT -google-http-client-android-test:1.30.0:1.30.1-SNAPSHOT -google-http-client-apache-v2:1.30.0:1.30.1-SNAPSHOT -google-http-client-appengine:1.30.0:1.30.1-SNAPSHOT -google-http-client-assembly:1.30.0:1.30.1-SNAPSHOT -google-http-client-findbugs:1.30.0:1.30.1-SNAPSHOT -google-http-client-gson:1.30.0:1.30.1-SNAPSHOT -google-http-client-jackson2:1.30.0:1.30.1-SNAPSHOT -google-http-client-jdo:1.30.0:1.30.1-SNAPSHOT -google-http-client-protobuf:1.30.0:1.30.1-SNAPSHOT -google-http-client-test:1.30.0:1.30.1-SNAPSHOT -google-http-client-xml:1.30.0:1.30.1-SNAPSHOT +google-http-client:1.30.1:1.30.1 +google-http-client-bom:1.30.1:1.30.1 +google-http-client-parent:1.30.1:1.30.1 +google-http-client-android:1.30.1:1.30.1 +google-http-client-android-test:1.30.1:1.30.1 +google-http-client-apache-v2:1.30.1:1.30.1 +google-http-client-appengine:1.30.1:1.30.1 +google-http-client-assembly:1.30.1:1.30.1 +google-http-client-findbugs:1.30.1:1.30.1 +google-http-client-gson:1.30.1:1.30.1 +google-http-client-jackson2:1.30.1:1.30.1 +google-http-client-jdo:1.30.1:1.30.1 +google-http-client-protobuf:1.30.1:1.30.1 +google-http-client-test:1.30.1:1.30.1 +google-http-client-xml:1.30.1:1.30.1 From 509ab9650ba051ce201b18d86c5e2d2a727f8971 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 6 Jun 2019 15:10:07 -0700 Subject: [PATCH 115/983] Bump next snapshot (#702) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 16 files changed, 54 insertions(+), 54 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 9ae99c1aa..aed4553ed 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.30.1 + 1.30.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.30.1 + 1.30.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.30.1 + 1.30.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index b71423880..b25d16d91 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-android - 1.30.1 + 1.30.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index eb98d9402..c31000af4 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.30.1 + 1.30.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 7de8a8e0a..42dccf641 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.30.1 + 1.30.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index fd57ac06d..58cd1c31c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.30.1 + 1.30.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 50e964f19..6603bbe64 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.30.1 + 1.30.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-android - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-test - 1.30.1 + 1.30.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.30.1 + 1.30.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 8b96e90b3..5fab3c601 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.30.1 + 1.30.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index fa5483bbc..871da6b75 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.30.1 + 1.30.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d7ebfe076..2f3af9abb 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.30.1 + 1.30.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d561354b1..d203f2fa3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.30.1 + 1.30.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index dff31255b..ad2b0357a 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-test - 1.30.1 + 1.30.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index d02605496..4cd19d682 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.30.1 + 1.30.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index d0af626a9..1615ee91f 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../pom.xml google-http-client - 1.30.1 + 1.30.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 317bea379..5ed395c5a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java @@ -541,7 +541,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.30.1 + 1.30.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 51f55b99e..05f90afb2 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.30.1 + 1.30.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ffe80820d..cd28e17b1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.30.1:1.30.1 -google-http-client-bom:1.30.1:1.30.1 -google-http-client-parent:1.30.1:1.30.1 -google-http-client-android:1.30.1:1.30.1 -google-http-client-android-test:1.30.1:1.30.1 -google-http-client-apache-v2:1.30.1:1.30.1 -google-http-client-appengine:1.30.1:1.30.1 -google-http-client-assembly:1.30.1:1.30.1 -google-http-client-findbugs:1.30.1:1.30.1 -google-http-client-gson:1.30.1:1.30.1 -google-http-client-jackson2:1.30.1:1.30.1 -google-http-client-jdo:1.30.1:1.30.1 -google-http-client-protobuf:1.30.1:1.30.1 -google-http-client-test:1.30.1:1.30.1 -google-http-client-xml:1.30.1:1.30.1 +google-http-client:1.30.1:1.30.2-SNAPSHOT +google-http-client-bom:1.30.1:1.30.2-SNAPSHOT +google-http-client-parent:1.30.1:1.30.2-SNAPSHOT +google-http-client-android:1.30.1:1.30.2-SNAPSHOT +google-http-client-android-test:1.30.1:1.30.2-SNAPSHOT +google-http-client-apache-v2:1.30.1:1.30.2-SNAPSHOT +google-http-client-appengine:1.30.1:1.30.2-SNAPSHOT +google-http-client-assembly:1.30.1:1.30.2-SNAPSHOT +google-http-client-findbugs:1.30.1:1.30.2-SNAPSHOT +google-http-client-gson:1.30.1:1.30.2-SNAPSHOT +google-http-client-jackson2:1.30.1:1.30.2-SNAPSHOT +google-http-client-jdo:1.30.1:1.30.2-SNAPSHOT +google-http-client-protobuf:1.30.1:1.30.2-SNAPSHOT +google-http-client-test:1.30.1:1.30.2-SNAPSHOT +google-http-client-xml:1.30.1:1.30.2-SNAPSHOT From 0ee7fbbad42667c43cabb234ae4df9386cec9837 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 6 Jun 2019 16:27:19 -0700 Subject: [PATCH 116/983] Enable autorelease (#703) --- .kokoro/release/stage.cfg | 30 ++++++++++++++++++++++++++++++ .kokoro/release/stage.sh | 13 ++++++++++++- pom.xml | 3 ++- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index c49930316..79d4be8da 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -5,3 +5,33 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/stage.sh" } + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3b6794c27..592dd61a2 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -15,6 +15,10 @@ set -eo pipefail +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + source $(dirname "$0")/common.sh pushd $(dirname "$0")/../../ @@ -22,11 +26,18 @@ pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" +AUTORELEASE="false" +if [[ -n "${AUTORELEASE_PR}" ]] +then + AUTORELEASE="true" +fi + mvn clean install deploy -B \ --settings settings.xml \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} + -Dgpg.homedir=${GPG_HOMEDIR} \ + -Ddeploy.autorelease=${AUTORELEASE} diff --git a/pom.xml b/pom.xml index 5ed395c5a..5807af150 100644 --- a/pom.xml +++ b/pom.xml @@ -257,7 +257,7 @@ ossrh https://oss.sonatype.org/ - false + ${deploy.autorelease} @@ -554,6 +554,7 @@ 4.5.8 0.21.0 .. + false From 50a4deb0f4d48cd48bd7e69dbd4415af6ed91f9d Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 12 Jun 2019 16:58:44 -0700 Subject: [PATCH 117/983] Group Guava, AppEngine, OpenCensus dependencies for renovate --- renovate.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/renovate.json b/renovate.json index f45d8f110..37b5f62da 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,19 @@ { "extends": [ "config:base" + ], + "packageRules": [ + { + "packagePatterns": ["^com.google.guava:guava"], + "groupName": "Guava packages" + }, + { + "packagePatterns": ["^com.google.appengine:appengine-"], + "groupName": "AppEngine packages" + }, + { + "packagePatterns": ["^io.opencensus:opencensus-"], + "groupName": "OpenCensus packages" + } ] } From 3ef5405596273efa34819faf013797217cf0ab89 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 13 Jun 2019 01:59:14 +0200 Subject: [PATCH 118/983] Update dependency org.apache.httpcomponents:httpclient to v4.5.9 (#704) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5807af150..235e2cbf9 100644 --- a/pom.xml +++ b/pom.xml @@ -551,7 +551,7 @@ 26.0-android 1.1.4c 1.2 - 4.5.8 + 4.5.9 0.21.0 .. false From 173a8143d0d0a6760c84eaefc9ae289bd9ea7cc5 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 12 Jun 2019 18:39:29 -0700 Subject: [PATCH 119/983] Expose the default HttpClientBuilder so users can customize further (#713) --- .../http/apache/v2/ApacheHttpTransport.java | 54 +++++++++++++------ 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 42f53d490..2506fd028 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -123,29 +123,53 @@ public ApacheHttpTransport(HttpClient httpClient) { * @since 1.30 */ public static HttpClient newDefaultHttpClient() { + return newDefaultHttpClientBuilder().build(); + } + + /** + * Creates a new Apache HTTP client builder that is used by the + * {@link #ApacheHttpTransport()} constructor. + * + *

            + * Settings: + *

            + *
              + *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
            • + *
            • The socket buffer size is set to 8192 using {@link SocketConfig}.
            • + *
            • + *
            • The route planner uses {@link SystemDefaultRoutePlanner} with + * {@link ProxySelector#getDefault()}, which uses the proxy settings from system + * properties.
            • + *
            + * + * @return new instance of the Apache HTTP client + * @since 1.31 + */ + public static HttpClientBuilder newDefaultHttpClientBuilder() { // Set socket buffer sizes to 8192 SocketConfig socketConfig = - SocketConfig.custom() - .setRcvBufSize(8192) - .setSndBufSize(8192) - .build(); + SocketConfig.custom() + .setRcvBufSize(8192) + .setSndBufSize(8192) + .build(); PoolingHttpClientConnectionManager connectionManager = - new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); + new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); // Disable the stale connection check (previously configured in the HttpConnectionParams connectionManager.setValidateAfterInactivity(-1); return HttpClientBuilder.create() - .useSystemProperties() - .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) - .setDefaultSocketConfig(socketConfig) - .setMaxConnTotal(200) - .setMaxConnPerRoute(20) - .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) - .setConnectionManager(connectionManager) - .disableRedirectHandling() - .disableAutomaticRetries() - .build(); + .useSystemProperties() + .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) + .setDefaultSocketConfig(socketConfig) + .setMaxConnTotal(200) + .setMaxConnPerRoute(20) + .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) + .setConnectionManager(connectionManager) + .disableRedirectHandling() + .disableAutomaticRetries(); } @Override From 3c91a6529b73cbf30f097d0f9860e441b7ddf8f6 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 14 Jun 2019 16:03:17 -0400 Subject: [PATCH 120/983] Add Linkage Monitor presubmit check (#719) * Linkage Monitor * 2019 * empty commit to trigger Kokoro * 755 permission --- .kokoro/linkage-monitor.sh | 34 +++++++++++++++++++++++++++ .kokoro/presubmit/linkage-monitor.cfg | 15 ++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 .kokoro/linkage-monitor.sh create mode 100644 .kokoro/presubmit/linkage-monitor.cfg diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh new file mode 100755 index 000000000..c7ad10cc3 --- /dev/null +++ b/.kokoro/linkage-monitor.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# 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. + +set -eo pipefail + +cd github/google-http-java-client/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# Installs snapshot artifacts locally. Linkage Monitor uses them. +mvn install -DskipTests=true -B -V + +# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR +JAR=linkage-monitor-latest-all-deps.jar +curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" + +# Fails if there's new linkage errors compared with baseline +java -jar $JAR com.google.cloud:libraries-bom diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 000000000..b8e1a21e1 --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,15 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Linkage Monitor notifies new linkage errors as Kokoro presubmit check +# https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/linkage-monitor.sh" +} From 97ba2c7808747b5ef817101f091a3455ac19c642 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Sun, 16 Jun 2019 13:55:53 -0700 Subject: [PATCH 121/983] Configure Kokoro CI for Windows (#716) * Add windows 8 kokoro config * Loosen maven requirements for the windows build * Skip checkstyle on Windows (path exclusions don't behave on windows) * Use nio for IOUtilsTest --- .kokoro/build.bat | 3 +++ .kokoro/continuous/java8-win.cfg | 3 +++ .kokoro/presubmit/java8-win.cfg | 3 +++ .../google/api/client/util/IOUtilsTest.java | 21 +++++------------- pom.xml | 22 ++++++++++++++++++- 5 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 .kokoro/build.bat create mode 100644 .kokoro/continuous/java8-win.cfg create mode 100644 .kokoro/presubmit/java8-win.cfg diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 000000000..e5324a570 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" github/google-http-java-client/.kokoro/build.sh diff --git a/.kokoro/continuous/java8-win.cfg b/.kokoro/continuous/java8-win.cfg new file mode 100644 index 000000000..b44537d03 --- /dev/null +++ b/.kokoro/continuous/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 000000000..b44537d03 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.bat" diff --git a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java index 39a66dbde..4d3503544 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java @@ -16,6 +16,7 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; import junit.framework.TestCase; /** @@ -42,24 +43,14 @@ public void testIsSymbolicLink_false() throws IOException { assertFalse(IOUtils.isSymbolicLink(file)); } - public void testIsSymbolicLink_true() throws IOException, InterruptedException { + public void testIsSymbolicLink_true() throws IOException { File file = File.createTempFile("tmp", null); file.deleteOnExit(); File file2 = new File(file.getCanonicalPath() + "2"); file2.deleteOnExit(); - try { - Process process = - Runtime.getRuntime() - .exec(new String[] {"ln", "-s", file.getCanonicalPath(), file2.getCanonicalPath()}); - process.waitFor(); - process.destroy(); - } catch (IOException e) { - // ignore because ln command may not be defined - return; - } - // multiple versions of jdk6 cannot detect the symbolic link. Consider support best-effort on - // jdk6 - boolean jdk6 = System.getProperty("java.version").startsWith("1.6.0_"); - assertTrue(IOUtils.isSymbolicLink(file2) || jdk6); + Files.createSymbolicLink(file2.toPath(), file.toPath()); + + assertTrue(IOUtils.isSymbolicLink(file2)); } } + diff --git a/pom.xml b/pom.xml index 235e2cbf9..a2b5784d0 100644 --- a/pom.xml +++ b/pom.xml @@ -372,7 +372,7 @@ - [3.5.4,4.0.0) + [3.5.2,4.0.0) @@ -558,6 +558,26 @@ + + Windows + + + windows + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + + release-sign-artifacts From e63e0094f1d90692d37af67b3e378356aebbbe2d Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 17 Jun 2019 10:27:19 -0700 Subject: [PATCH 122/983] Clean up javadoc warnings in OpenCensusUtils (#714) * Clean up javadoc warnings * Remove redundant wording --- .../src/main/java/com/google/api/client/http/HttpRequest.java | 2 +- .../main/java/com/google/api/client/http/OpenCensusUtils.java | 2 +- .../src/main/java/com/google/api/client/json/JsonParser.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index c45152894..57adecde5 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1124,7 +1124,7 @@ public HttpResponse call() throws Exception { /** * {@link Beta}
            * Executes this request asynchronously using {@link #executeAsync(Executor)} in a single separate - * thread using {@link Executors#newFixedThreadPool(1)}. + * thread using {@link Executors#newFixedThreadPool(int)}. * * @return A future for accessing the results of the asynchronous request. * @since 1.13 diff --git a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java index e7ecd3dc0..5b2c9d41e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java @@ -81,7 +81,7 @@ public static void setPropagationTextFormat(@Nullable TextFormat textFormat) { } /** - * Sets the {@link TextFormat.Setter} used in context propagation. + * Sets the {@link io.opencensus.trace.propagation.TextFormat.Setter} used in context propagation. * *

            This API allows users of google-http-client to specify other text format setter, or disable * context propagation by setting it to {@code null}. It should be used along with {@link diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index 75972a16c..9bb1184f0 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -53,7 +53,7 @@ *

            * *

            If a JSON map is encountered while using a destination class of type Map, then an {@link - * ArrayMap} is used by default for the parsed values. + * java.util.ArrayMap} is used by default for the parsed values. * * @since 1.3 * @author Yaniv Inbar From 4e77793bdf8a9b3d87e9c80ce94e538d78d42581 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 17 Jun 2019 10:27:39 -0700 Subject: [PATCH 123/983] Use NIO to set file permissions (#557) * Use NIO to set file permissions * Fix checkstyle * Fix merge conflict * Fix merge conflict --- .../util/store/FileDataStoreFactory.java | 99 +++++++++++++------ 1 file changed, 68 insertions(+), 31 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 3ee9eb87b..230af26e2 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -16,14 +16,26 @@ import com.google.api.client.util.IOUtils; import com.google.api.client.util.Maps; -import com.google.api.client.util.Throwables; + +import com.google.common.base.StandardSystemProperty; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.attribute.AclEntry; +import java.nio.file.attribute.AclEntryPermission; +import java.nio.file.attribute.AclEntryType; +import java.nio.file.attribute.AclFileAttributeView; +import java.nio.file.attribute.PosixFilePermission; +import java.nio.file.attribute.UserPrincipal; +import java.util.HashSet; +import java.util.Set; import java.util.logging.Logger; /** @@ -40,6 +52,9 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory { private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName()); + private static final boolean IS_WINDOWS = StandardSystemProperty.OS_NAME.value() + .startsWith("WINDOWS"); + /** Directory to store data. */ private final File dataDirectory; @@ -55,7 +70,12 @@ public FileDataStoreFactory(File dataDirectory) throws IOException { if (!dataDirectory.exists() && !dataDirectory.mkdirs()) { throw new IOException("unable to create directory: " + dataDirectory); } - setPermissionsToOwnerOnly(dataDirectory); + + if (IS_WINDOWS) { + setPermissionsToOwnerOnlyWindows(dataDirectory); + } else { + setPermissionsToOwnerOnly(dataDirectory); + } } /** Returns the data directory. */ @@ -117,38 +137,55 @@ public FileDataStoreFactory getDataStoreFactory() { * @throws IOException */ static void setPermissionsToOwnerOnly(File file) throws IOException { - // Disable access by other users if O/S allows it and set file permissions to readable and - // writable by user. Use reflection since JDK 1.5 will not have these methods + Set permissions = new HashSet(); + permissions.add(PosixFilePermission.OWNER_READ); + permissions.add(PosixFilePermission.OWNER_WRITE); + permissions.add(PosixFilePermission.OWNER_EXECUTE); try { - Method setReadable = File.class.getMethod("setReadable", boolean.class, boolean.class); - Method setWritable = File.class.getMethod("setWritable", boolean.class, boolean.class); - Method setExecutable = File.class.getMethod("setExecutable", boolean.class, boolean.class); - if (!(Boolean) setReadable.invoke(file, false, false) - || !(Boolean) setWritable.invoke(file, false, false) - || !(Boolean) setExecutable.invoke(file, false, false)) { - LOGGER.warning("unable to change permissions for everybody: " + file); - } - if (!(Boolean) setReadable.invoke(file, true, true) - || !(Boolean) setWritable.invoke(file, true, true) - || !(Boolean) setExecutable.invoke(file, true, true)) { - LOGGER.warning("unable to change permissions for owner: " + file); - } - } catch (InvocationTargetException exception) { - Throwable cause = exception.getCause(); - Throwables.propagateIfPossible(cause, IOException.class); - // shouldn't reach this point, but just in case... - throw new RuntimeException(cause); - } catch (NoSuchMethodException exception) { - LOGGER.warning( - "Unable to set permissions for " - + file - + ", likely because you are running a version of Java prior to 1.6"); + Files.setPosixFilePermissions(Paths.get(file.getAbsolutePath()), permissions); + } catch (UnsupportedOperationException exception) { + LOGGER.warning("Unable to set permissions for " + file + + ", because you are running on a non-POSIX file system."); } catch (SecurityException exception) { // ignored - } catch (IllegalAccessException exception) { - // ignored } catch (IllegalArgumentException exception) { // ignored } } + + static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { + Path path = Paths.get(file.getAbsolutePath()); + UserPrincipal owner = path.getFileSystem().getUserPrincipalLookupService() + .lookupPrincipalByName("OWNER@"); + + // get view + AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); + + // All available entries + Set permissions = ImmutableSet.of( + AclEntryPermission.APPEND_DATA, + AclEntryPermission.DELETE, + AclEntryPermission.DELETE_CHILD, + AclEntryPermission.READ_ACL, + AclEntryPermission.READ_ATTRIBUTES, + AclEntryPermission.READ_DATA, + AclEntryPermission.READ_NAMED_ATTRS, + AclEntryPermission.SYNCHRONIZE, + AclEntryPermission.WRITE_ACL, + AclEntryPermission.WRITE_ATTRIBUTES, + AclEntryPermission.WRITE_DATA, + AclEntryPermission.WRITE_NAMED_ATTRS, + AclEntryPermission.WRITE_OWNER + ); + + // create ACL to give owner everything + AclEntry entry = AclEntry.newBuilder() + .setType(AclEntryType.ALLOW) + .setPrincipal(owner) + .setPermissions(permissions) + .build(); + + // Overwrite the ACL with only this permission + view.setAcl(ImmutableList.of(entry)); + } } From 88a65483f5a993043b882fa1056668c7e4a61762 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 18 Jun 2019 11:31:26 -0700 Subject: [PATCH 124/983] Fix ApacheHttpTransport configuration (#717) * Switch back to deprecated setStaleConnectionCheck * checkstyle fix for TODO --- .../api/client/http/apache/v2/ApacheHttpRequest.java | 6 +++++- .../api/client/http/apache/v2/ApacheHttpTransport.java | 7 +------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java index 5d9323dd6..447edae66 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java @@ -33,11 +33,15 @@ final class ApacheHttpRequest extends LowLevelHttpRequest { private RequestConfig.Builder requestConfig; + @SuppressWarnings("deprecation") ApacheHttpRequest(HttpClient httpClient, HttpRequestBase request) { this.httpClient = httpClient; this.request = request; // disable redirects as google-http-client handles redirects - this.requestConfig = RequestConfig.custom().setRedirectsEnabled(false); + this.requestConfig = RequestConfig.custom() + .setRedirectsEnabled(false) + // TODO(chingor): configure in HttpClientBuilder when available + .setStaleConnectionCheckEnabled(false); } @Override diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 2506fd028..7f547a38b 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -155,19 +155,14 @@ public static HttpClientBuilder newDefaultHttpClientBuilder() { .setSndBufSize(8192) .build(); - PoolingHttpClientConnectionManager connectionManager = - new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); - // Disable the stale connection check (previously configured in the HttpConnectionParams - connectionManager.setValidateAfterInactivity(-1); - return HttpClientBuilder.create() .useSystemProperties() .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) .setDefaultSocketConfig(socketConfig) .setMaxConnTotal(200) .setMaxConnPerRoute(20) + .setConnectionTimeToLive(-1, TimeUnit.MILLISECONDS) .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) - .setConnectionManager(connectionManager) .disableRedirectHandling() .disableAutomaticRetries(); } From 63d079988460dbd59ff51488ba98964942b21160 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 3 Jul 2019 10:22:33 -0700 Subject: [PATCH 125/983] Add GitHub repo, issue tracker metadata for javadoc site (#721) --- .kokoro/release/publish_javadoc.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index b65eb9f90..4115ca6e1 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -45,7 +45,9 @@ pushd target/site/apidocs python3 -m docuploader create-metadata \ --name ${NAME} \ --version ${VERSION} \ - --language java + --language java \ + --github-repository https://github.com/googleapis/google-http-java-client \ + --issue-tracker https://github.com/googleapis/google-http-java-client/issues \ # upload docs python3 -m docuploader upload . \ From 5e191de30a4088f43f0c526b291545c64c32992d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 4 Jul 2019 01:18:44 +0300 Subject: [PATCH 126/983] Update dependency com.google.truth:truth to v0.46 (#724) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a2b5784d0..81e68105c 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ com.google.truth truth - 0.45 + 0.46 test From c8326bfce5a24a4b7f3294032f300d6c97da9352 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 8 Jul 2019 10:50:39 -0700 Subject: [PATCH 127/983] Adds CI test for mvn dependency:analyze and fixes missing deps (#738) * Add Kokoro CI config for testing for dependency declarations * Fix missing and unused dependencies * Fix used dependency which is only used for javadocs * Ignore appengine-api-stubs test dependency --- .kokoro/dependencies.sh | 27 +++++++++++++++++++++++++++ .kokoro/presubmit/dependencies.cfg | 12 ++++++++++++ google-http-client-apache-v2/pom.xml | 13 +++---------- google-http-client-appengine/pom.xml | 13 ++++++++----- google-http-client-findbugs/pom.xml | 21 +++++++++++++++++---- google-http-client-gson/pom.xml | 5 ----- google-http-client-jackson2/pom.xml | 5 ----- google-http-client/pom.xml | 4 ++++ pom.xml | 11 +++++++++++ 9 files changed, 82 insertions(+), 29 deletions(-) create mode 100755 .kokoro/dependencies.sh create mode 100644 .kokoro/presubmit/dependencies.cfg diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 000000000..8e909db98 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# 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. + +set -eo pipefail + +cd github/google-http-java-client/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +mvn install -DskipTests=true -B -V +mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 000000000..b89a20740 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/dependencies.sh" +} diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index c31000af4..15fdb2fc6 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -18,7 +18,6 @@ https://download.oracle.com/javase/7/docs/api/ - https://jar-download.com/artifacts/org.codehaus.jackson/jackson-core-asl/${project.jackson-core-asl.version}/documentation ${project.name} ${project.version} ${project.artifactId} ${project.version} @@ -87,24 +86,18 @@ com.google.http-client google-http-client - - com.google.http-client - google-http-client-test - test - junit junit test - com.google.guava - guava - test + org.apache.httpcomponents + httpclient org.apache.httpcomponents - httpclient + httpcore org.mockito diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 42dccf641..1c7f89d6a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -48,6 +48,14 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.appengine:appengine-api-stubs + + @@ -80,10 +88,5 @@ junit test - - com.google.guava - guava - test - diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5fab3c601..b6ed96eec 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -32,13 +32,17 @@ true + + org.apache.maven.plugins + maven-dependency-plugin + + + com.google.http-client:google-http-client + + - - com.google.http-client - google-http-client - com.google.code.findbugs findbugs @@ -58,5 +62,14 @@ + + com.google.code.findbugs + bcel-findbugs + 6.0 + + + com.google.http-client + google-http-client + diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 871da6b75..d93727a7d 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -67,11 +67,6 @@ google-http-client-test test - - junit - junit - test - com.google.code.gson gson diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2f3af9abb..99ce3e5e3 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -67,11 +67,6 @@ google-http-client-test test - - junit - junit - test - com.fasterxml.jackson.core jackson-core diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1615ee91f..0365b7bb9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -72,6 +72,10 @@ org.apache.httpcomponents httpclient + + org.apache.httpcomponents + httpcore + com.google.code.findbugs jsr305 diff --git a/pom.xml b/pom.xml index 81e68105c..58b96a9b7 100644 --- a/pom.xml +++ b/pom.xml @@ -147,6 +147,11 @@ httpclient ${project.httpclient.version} + + org.apache.httpcomponents + httpcore + ${project.httpcore.version} + com.google.guava guava @@ -357,6 +362,11 @@ maven-site-plugin 3.7.1 + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + @@ -552,6 +562,7 @@ 1.1.4c 1.2 4.5.9 + 4.4.11 0.21.0 .. false From b9295745a57de829e3d49b4617037b8852e2f293 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 8 Jul 2019 21:10:25 +0300 Subject: [PATCH 128/983] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.1.1 (#741) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 58b96a9b7..365f97e39 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.0 + 3.1.1 attach-javadocs From cd5a565ab67e660b0855b5fa6d62e979686c2376 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 8 Jul 2019 21:10:39 +0300 Subject: [PATCH 129/983] Update dependency com.google.truth:truth to v1 (#742) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 365f97e39..5eef2dae3 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ com.google.truth truth - 0.46 + 1.0 test From b5379ae43f54e240ae91922ecb97c7afcc3fdf6d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 23 Jul 2019 20:27:44 +0300 Subject: [PATCH 130/983] Update dependency mysql:mysql-connector-java to v8.0.17 (#750) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5eef2dae3..149bf70e2 100644 --- a/pom.xml +++ b/pom.xml @@ -230,7 +230,7 @@ mysql mysql-connector-java - 8.0.16 + 8.0.17 com.google.j2objc From 3abca4e2cb38fd364566ce8c84318d36415f343f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 23 Jul 2019 11:01:19 -0700 Subject: [PATCH 131/983] new ClassName().getClass() -> ClassName.class (#751) --- .../com/google/api/client/util/DataTest.java | 34 ++++++------------- .../com/google/api/client/util/TypesTest.java | 19 +++++------ 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java index 00f1dd5d2..5cce2816a 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java @@ -306,40 +306,26 @@ static class MedXResolve extends Resolve tTypeVar = (TypeVariable) Resolve.class.getField("t").getGenericType(); - assertEquals( - Number.class, resolveWildcardTypeOrTypeVariable(new Object().getClass(), tTypeVar)); - assertEquals( - Number.class, - resolveWildcardTypeOrTypeVariable(new Resolve().getClass(), tTypeVar)); - assertEquals( - Integer.class, - resolveWildcardTypeOrTypeVariable(new IntegerResolve().getClass(), tTypeVar)); - assertEquals( - Long.class, resolveWildcardTypeOrTypeVariable(new LongResolve().getClass(), tTypeVar)); - assertEquals( - Double.class, resolveWildcardTypeOrTypeVariable(new DoubleResolve().getClass(), tTypeVar)); + assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(Object.class, tTypeVar)); + assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(Resolve.class, tTypeVar)); + assertEquals(Integer.class, resolveWildcardTypeOrTypeVariable(IntegerResolve.class, tTypeVar)); + assertEquals(Long.class, resolveWildcardTypeOrTypeVariable(LongResolve.class, tTypeVar)); + assertEquals(Double.class, resolveWildcardTypeOrTypeVariable(DoubleResolve.class, tTypeVar)); // partially resolved - assertEquals( - Number.class, - resolveWildcardTypeOrTypeVariable(new MedResolve().getClass(), tTypeVar)); + assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(MedResolve.class, tTypeVar)); // x TypeVariable xTypeVar = (TypeVariable) Resolve.class.getField("x").getGenericType(); - assertEquals( - Object.class, resolveWildcardTypeOrTypeVariable(new Object().getClass(), xTypeVar)); + assertEquals(Object.class, resolveWildcardTypeOrTypeVariable(Object.class, xTypeVar)); assertEquals( Boolean.class, Types.getArrayComponentType( - resolveWildcardTypeOrTypeVariable(new ArrayResolve().getClass(), xTypeVar))); + resolveWildcardTypeOrTypeVariable(ArrayResolve.class, xTypeVar))); assertEquals( Collection.class, Types.getRawClass( (ParameterizedType) - resolveWildcardTypeOrTypeVariable( - new ParameterizedResolve().getClass(), xTypeVar))); - assertEquals( - Number.class, - resolveWildcardTypeOrTypeVariable( - new MedXResolve().getClass(), xTypeVar)); + resolveWildcardTypeOrTypeVariable(ParameterizedResolve.class, xTypeVar))); + assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(MedXResolve.class, xTypeVar)); } private static Type resolveWildcardTypeOrTypeVariable( diff --git a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java index 2aaf60c0c..7cbf26bb0 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java @@ -115,27 +115,26 @@ static class ParameterizedResolve extends Resolve, Integer> public void testResolveTypeVariable() throws Exception { // t TypeVariable tTypeVar = (TypeVariable) Resolve.class.getField("t").getGenericType(); - assertNull(resolveTypeVariable(new Object().getClass(), tTypeVar)); - assertNull(resolveTypeVariable(new Resolve().getClass(), tTypeVar)); - assertEquals(Integer.class, resolveTypeVariable(new IntegerResolve().getClass(), tTypeVar)); - assertEquals(Long.class, resolveTypeVariable(new LongResolve().getClass(), tTypeVar)); - assertEquals(Double.class, resolveTypeVariable(new DoubleResolve().getClass(), tTypeVar)); + assertNull(resolveTypeVariable(Object.class, tTypeVar)); + assertNull(resolveTypeVariable(Resolve.class, tTypeVar)); + assertEquals(Integer.class, resolveTypeVariable(IntegerResolve.class, tTypeVar)); + assertEquals(Long.class, resolveTypeVariable(LongResolve.class, tTypeVar)); + assertEquals(Double.class, resolveTypeVariable(DoubleResolve.class, tTypeVar)); // partially resolved assertEquals( MedResolve.class, - ((TypeVariable) resolveTypeVariable(new MedResolve().getClass(), tTypeVar)) + ((TypeVariable) resolveTypeVariable(MedResolve.class, tTypeVar)) .getGenericDeclaration()); // x TypeVariable xTypeVar = (TypeVariable) Resolve.class.getField("x").getGenericType(); - assertNull(resolveTypeVariable(new Object().getClass(), xTypeVar)); + assertNull(resolveTypeVariable(Object.class, xTypeVar)); assertEquals( Boolean.class, - Types.getArrayComponentType(resolveTypeVariable(new ArrayResolve().getClass(), xTypeVar))); + Types.getArrayComponentType(resolveTypeVariable(ArrayResolve.class, xTypeVar))); assertEquals( Collection.class, Types.getRawClass( - (ParameterizedType) - resolveTypeVariable(new ParameterizedResolve().getClass(), xTypeVar))); + (ParameterizedType) resolveTypeVariable(ParameterizedResolve.class, xTypeVar))); } private static Type resolveTypeVariable(Type context, TypeVariable typeVariable) { From 4916aa3d74e38ba4924e24123f957eaaf2f92b28 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 30 Jul 2019 22:59:43 +0300 Subject: [PATCH 132/983] Update dependency org.apache.maven.plugins:maven-site-plugin to v3.8.2 (#753) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 149bf70e2..1098f3273 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.8.2 org.apache.maven.plugins From 1d496dc0a33d74b04b2616a5406ab9148ec3dfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Olav=20L=C3=B8ite?= Date: Wed, 31 Jul 2019 16:12:11 +0200 Subject: [PATCH 133/983] Add support for nanosecond precision when parsing rfc3339 strings (#752) * support nanosecond precision when parsing rfc3339 strings * removed hamcrest matchers * fix javadoc + change exception type * assert parse directly instead of using a map * put expected and actual in correct order --- .../com/google/api/client/util/DateTime.java | 135 +++++++++++++++--- .../google/api/client/util/DateTimeTest.java | 89 ++++++++++++ 2 files changed, 204 insertions(+), 20 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java index bd071b327..cd0dcd777 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java @@ -14,12 +14,15 @@ package com.google.api.client.util; +import com.google.common.base.Strings; import java.io.Serializable; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; +import java.util.Objects; import java.util.TimeZone; +import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -39,12 +42,12 @@ public final class DateTime implements Serializable { private static final TimeZone GMT = TimeZone.getTimeZone("GMT"); /** Regular expression for parsing RFC3339 date/times. */ - private static final Pattern RFC3339_PATTERN = - Pattern.compile( - "^(\\d{4})-(\\d{2})-(\\d{2})" // yyyy-MM-dd - + "([Tt](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d+)?)?" // 'T'HH:mm:ss.milliseconds - + "([Zz]|([+-])(\\d{2}):(\\d{2}))?"); // 'Z' or time zone shift HH:mm following '+' or - // '-' + private static final String RFC3339_REGEX = + "(\\d{4})-(\\d{2})-(\\d{2})" // yyyy-MM-dd + + "([Tt](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d{1,9})?)?" // 'T'HH:mm:ss.nanoseconds + + "([Zz]|([+-])(\\d{2}):(\\d{2}))?"; // 'Z' or time zone shift HH:mm following '+' or '-' + + private static final Pattern RFC3339_PATTERN = Pattern.compile(RFC3339_REGEX); /** * Date/time value expressed as the number of ms since the Unix epoch. @@ -260,6 +263,8 @@ public int hashCode() { * NumberFormatException}. Also, in accordance with the RFC3339 standard, any number of * milliseconds digits is now allowed. * + *

            Any time information beyond millisecond precision is truncated. + * *

            For the date-only case, the time zone is ignored and the hourOfDay, minute, second, and * millisecond parameters are set to zero. * @@ -269,6 +274,98 @@ public int hashCode() { * time zone shift but no time. */ public static DateTime parseRfc3339(String str) throws NumberFormatException { + return parseRfc3339WithNanoSeconds(str).toDateTime(); + } + + /** + * Parses an RFC3339 timestamp to a pair of seconds and nanoseconds since Unix Epoch. + * + * @param str Date/time string in RFC3339 format + * @throws IllegalArgumentException if {@code str} doesn't match the RFC3339 standard format; an + * exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it contains a + * time zone shift but no time. + */ + public static SecondsAndNanos parseRfc3339ToSecondsAndNanos(String str) + throws IllegalArgumentException { + return parseRfc3339WithNanoSeconds(str).toSecondsAndNanos(); + } + + /** A timestamp represented as the number of seconds and nanoseconds since Epoch. */ + public static final class SecondsAndNanos implements Serializable { + private final long seconds; + private final int nanos; + + public static SecondsAndNanos ofSecondsAndNanos(long seconds, int nanos) { + return new SecondsAndNanos(seconds, nanos); + } + + private SecondsAndNanos(long seconds, int nanos) { + this.seconds = seconds; + this.nanos = nanos; + } + + public long getSeconds() { + return seconds; + } + + public int getNanos() { + return nanos; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecondsAndNanos that = (SecondsAndNanos) o; + return seconds == that.seconds && nanos == that.nanos; + } + + @Override + public int hashCode() { + return Objects.hash(seconds, nanos); + } + + @Override + public String toString() { + return String.format("Seconds: %d, Nanos: %d", seconds, nanos); + } + } + + /** Result of parsing a Rfc3339 string. */ + private static class Rfc3339ParseResult implements Serializable { + private final long seconds; + private final int nanos; + private final boolean timeGiven; + private final Integer tzShift; + + private Rfc3339ParseResult(long seconds, int nanos, boolean timeGiven, Integer tzShift) { + this.seconds = seconds; + this.nanos = nanos; + this.timeGiven = timeGiven; + this.tzShift = tzShift; + } + + /** + * Convert this {@link Rfc3339ParseResult} to a {@link DateTime} with millisecond precision. Any + * fraction of a millisecond will be truncated. + */ + private DateTime toDateTime() { + long seconds = TimeUnit.SECONDS.toMillis(this.seconds); + long nanos = TimeUnit.NANOSECONDS.toMillis(this.nanos); + return new DateTime(!timeGiven, seconds + nanos, tzShift); + } + + private SecondsAndNanos toSecondsAndNanos() { + return new SecondsAndNanos(seconds, nanos); + } + } + + private static Rfc3339ParseResult parseRfc3339WithNanoSeconds(String str) + throws NumberFormatException { Matcher matcher = RFC3339_PATTERN.matcher(str); if (!matcher.matches()) { throw new NumberFormatException("Invalid date/time format: " + str); @@ -283,7 +380,7 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException { int hourOfDay = 0; int minute = 0; int second = 0; - int milliseconds = 0; + int nanoseconds = 0; Integer tzShiftInteger = null; if (isTzShiftGiven && !isTimeGiven) { @@ -297,34 +394,32 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException { hourOfDay = Integer.parseInt(matcher.group(5)); // HH minute = Integer.parseInt(matcher.group(6)); // mm second = Integer.parseInt(matcher.group(7)); // ss - if (matcher.group(8) != null) { // contains .milliseconds? - milliseconds = Integer.parseInt(matcher.group(8).substring(1)); // milliseconds - // The number of digits after the dot may not be 3. Need to renormalize. - int fractionDigits = matcher.group(8).substring(1).length() - 3; - milliseconds = (int) ((float) milliseconds / Math.pow(10, fractionDigits)); + if (matcher.group(8) != null) { // contains .nanoseconds? + String fraction = Strings.padEnd(matcher.group(8).substring(1), 9, '0'); + nanoseconds = Integer.parseInt(fraction); } } Calendar dateTime = new GregorianCalendar(GMT); dateTime.set(year, month, day, hourOfDay, minute, second); - dateTime.set(Calendar.MILLISECOND, milliseconds); long value = dateTime.getTimeInMillis(); if (isTimeGiven && isTzShiftGiven) { - int tzShift; - if (Character.toUpperCase(tzShiftRegexGroup.charAt(0)) == 'Z') { - tzShift = 0; - } else { - tzShift = + if (Character.toUpperCase(tzShiftRegexGroup.charAt(0)) != 'Z') { + int tzShift = Integer.parseInt(matcher.group(11)) * 60 // time zone shift HH + Integer.parseInt(matcher.group(12)); // time zone shift mm if (matcher.group(10).charAt(0) == '-') { // time zone shift + or - tzShift = -tzShift; } value -= tzShift * 60000L; // e.g. if 1 hour ahead of UTC, subtract an hour to get UTC time + tzShiftInteger = tzShift; + } else { + tzShiftInteger = 0; } - tzShiftInteger = tzShift; } - return new DateTime(!isTimeGiven, value, tzShiftInteger); + // convert to seconds and nanoseconds + long secondsSinceEpoch = value / 1000L; + return new Rfc3339ParseResult(secondsSinceEpoch, nanoseconds, isTimeGiven, tzShiftInteger); } /** Appends a zero-padded number to a string builder. */ diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index 6318e327c..c8b9cd513 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -14,6 +14,7 @@ package com.google.api.client.util; +import com.google.api.client.util.DateTime.SecondsAndNanos; import java.util.Date; import java.util.TimeZone; import junit.framework.TestCase; @@ -142,6 +143,94 @@ public void testParseRfc3339() { assertEquals( DateTime.parseRfc3339("2007-06-01t18:50:00-04:00").getValue(), DateTime.parseRfc3339("2007-06-01t22:50:00Z").getValue()); // from Section 4.2 Local Offsets + + // Test truncating beyond millisecond precision. + assertEquals( + DateTime.parseRfc3339( + "2018-12-31T23:59:59.999999999Z"), // This value would be rounded up prior to version + // 1.30.2 + DateTime.parseRfc3339("2018-12-31T23:59:59.999Z")); + assertEquals( + DateTime.parseRfc3339( + "2018-12-31T23:59:59.9999Z"), // This value would be truncated prior to version 1.30.2 + DateTime.parseRfc3339("2018-12-31T23:59:59.999Z")); + } + + /** + * The following test values have been generated and verified using the {@link DateTimeFormatter} + * in Java 8. + * + *

            +   * Timestamp                           |   Seconds     |   Nanos
            +   * 2018-03-01T10:11:12.999Z            |   1519899072  |   999000000
            +   * 2018-10-28T02:00:00+02:00           |   1540684800  |   0
            +   * 2018-10-28T03:00:00+01:00           |   1540692000  |   0
            +   * 2018-01-01T00:00:00.000000001Z      |   1514764800  |   1
            +   * 2018-10-28T02:00:00Z                |   1540692000  |   0
            +   * 2018-12-31T23:59:59.999999999Z      |   1546300799  |   999999999
            +   * 2018-03-01T10:11:12.9999Z           |   1519899072  |   999900000
            +   * 2018-03-01T10:11:12.000000001Z      |   1519899072  |   1
            +   * 2018-03-01T10:11:12.100000000Z      |   1519899072  |   100000000
            +   * 2018-03-01T10:11:12.100000001Z      |   1519899072  |   100000001
            +   * 2018-03-01T10:11:12-10:00           |   1519935072  |   0
            +   * 2018-03-01T10:11:12.999999999Z      |   1519899072  |   999999999
            +   * 2018-03-01T10:11:12-12:00           |   1519942272  |   0
            +   * 2018-10-28T03:00:00Z                |   1540695600  |   0
            +   * 2018-10-28T02:30:00Z                |   1540693800  |   0
            +   * 2018-03-01T10:11:12.123Z            |   1519899072  |   123000000
            +   * 2018-10-28T02:30:00+02:00           |   1540686600  |   0
            +   * 2018-03-01T10:11:12.123456789Z      |   1519899072  |   123456789
            +   * 2018-03-01T10:11:12.1000Z           |   1519899072  |   100000000
            +   * 
            + */ + public void testParseRfc3339ToSecondsAndNanos() { + assertParsedRfc3339( + "2018-03-01T10:11:12.999Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 999000000)); + assertParsedRfc3339( + "2018-10-28T02:00:00+02:00", SecondsAndNanos.ofSecondsAndNanos(1540684800L, 0)); + assertParsedRfc3339( + "2018-10-28T03:00:00+01:00", SecondsAndNanos.ofSecondsAndNanos(1540692000L, 0)); + assertParsedRfc3339( + "2018-01-01T00:00:00.000000001Z", SecondsAndNanos.ofSecondsAndNanos(1514764800L, 1)); + assertParsedRfc3339("2018-10-28T02:00:00Z", SecondsAndNanos.ofSecondsAndNanos(1540692000L, 0)); + assertParsedRfc3339( + "2018-12-31T23:59:59.999999999Z", + SecondsAndNanos.ofSecondsAndNanos(1546300799L, 999999999)); + assertParsedRfc3339( + "2018-03-01T10:11:12.9999Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 999900000)); + assertParsedRfc3339( + "2018-03-01T10:11:12.000000001Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 1)); + assertParsedRfc3339( + "2018-03-01T10:11:12.100000000Z", + SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000000)); + assertParsedRfc3339( + "2018-03-01T10:11:12.100000001Z", + SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000001)); + assertParsedRfc3339( + "2018-03-01T10:11:12-10:00", SecondsAndNanos.ofSecondsAndNanos(1519935072L, 0)); + assertParsedRfc3339( + "2018-03-01T10:11:12.999999999Z", + SecondsAndNanos.ofSecondsAndNanos(1519899072L, 999999999)); + assertParsedRfc3339( + "2018-03-01T10:11:12-12:00", SecondsAndNanos.ofSecondsAndNanos(1519942272L, 0)); + assertParsedRfc3339("2018-10-28T03:00:00Z", SecondsAndNanos.ofSecondsAndNanos(1540695600L, 0)); + assertParsedRfc3339("2018-10-28T02:30:00Z", SecondsAndNanos.ofSecondsAndNanos(1540693800L, 0)); + assertParsedRfc3339( + "2018-03-01T10:11:12.123Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 123000000)); + assertParsedRfc3339( + "2018-10-28T02:30:00+02:00", SecondsAndNanos.ofSecondsAndNanos(1540686600L, 0)); + assertParsedRfc3339( + "2018-03-01T10:11:12.123456789Z", + SecondsAndNanos.ofSecondsAndNanos(1519899072L, 123456789)); + assertParsedRfc3339( + "2018-03-01T10:11:12.1000Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000000)); + } + + private void assertParsedRfc3339(String input, SecondsAndNanos expected) { + SecondsAndNanos actual = DateTime.parseRfc3339ToSecondsAndNanos(input); + assertEquals( + "Seconds for " + input + " do not match", expected.getSeconds(), actual.getSeconds()); + assertEquals("Nanos for " + input + " do not match", expected.getNanos(), actual.getNanos()); } public void testParseAndFormatRfc3339() { From 983016dfafda1cf1b7bd85994644ccb97f47979c Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Wed, 31 Jul 2019 13:49:48 -0400 Subject: [PATCH 134/983] Release v1.31.0 (#754) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 55 insertions(+), 55 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index aed4553ed..3a95534dd 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.30.2-SNAPSHOT + 1.31.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.30.2-SNAPSHOT + 1.31.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.30.2-SNAPSHOT + 1.31.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index b25d16d91..070ccd080 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-android - 1.30.2-SNAPSHOT + 1.31.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 15fdb2fc6..2a0a6a92b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-apache-v2 - 1.30.2-SNAPSHOT + 1.31.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1c7f89d6a..0c3f0d3b4 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-appengine - 1.30.2-SNAPSHOT + 1.31.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 58cd1c31c..49aeecef7 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.30.2-SNAPSHOT + 1.31.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index d47ee347c..59a197bee 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.30.1 + 1.31.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6603bbe64..1931d22d9 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.30.2-SNAPSHOT + 1.31.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-android - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-apache-v2 - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-appengine - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-findbugs - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-gson - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-jackson2 - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-protobuf - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-test - 1.30.2-SNAPSHOT + 1.31.0 com.google.http-client google-http-client-xml - 1.30.2-SNAPSHOT + 1.31.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index b6ed96eec..655ada240 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-findbugs - 1.30.2-SNAPSHOT + 1.31.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d93727a7d..8406ebb06 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-gson - 1.30.2-SNAPSHOT + 1.31.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 99ce3e5e3..2145eb6e8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-jackson2 - 1.30.2-SNAPSHOT + 1.31.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d203f2fa3..10c2f3943 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-protobuf - 1.30.2-SNAPSHOT + 1.31.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ad2b0357a..1f490f0d3 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-test - 1.30.2-SNAPSHOT + 1.31.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 4cd19d682..093a4ed47 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client-xml - 1.30.2-SNAPSHOT + 1.31.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0365b7bb9..7f0a4ce77 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../pom.xml google-http-client - 1.30.2-SNAPSHOT + 1.31.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 1098f3273..5b38c2afa 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 pom Parent for the Google HTTP Client Library for Java @@ -551,7 +551,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.30.2-SNAPSHOT + 1.31.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 05f90afb2..2cc763f38 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.30.2-SNAPSHOT + 1.31.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index cd28e17b1..b8d07bb06 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.30.1:1.30.2-SNAPSHOT -google-http-client-bom:1.30.1:1.30.2-SNAPSHOT -google-http-client-parent:1.30.1:1.30.2-SNAPSHOT -google-http-client-android:1.30.1:1.30.2-SNAPSHOT -google-http-client-android-test:1.30.1:1.30.2-SNAPSHOT -google-http-client-apache-v2:1.30.1:1.30.2-SNAPSHOT -google-http-client-appengine:1.30.1:1.30.2-SNAPSHOT -google-http-client-assembly:1.30.1:1.30.2-SNAPSHOT -google-http-client-findbugs:1.30.1:1.30.2-SNAPSHOT -google-http-client-gson:1.30.1:1.30.2-SNAPSHOT -google-http-client-jackson2:1.30.1:1.30.2-SNAPSHOT -google-http-client-jdo:1.30.1:1.30.2-SNAPSHOT -google-http-client-protobuf:1.30.1:1.30.2-SNAPSHOT -google-http-client-test:1.30.1:1.30.2-SNAPSHOT -google-http-client-xml:1.30.1:1.30.2-SNAPSHOT +google-http-client:1.31.0:1.31.0 +google-http-client-bom:1.31.0:1.31.0 +google-http-client-parent:1.31.0:1.31.0 +google-http-client-android:1.31.0:1.31.0 +google-http-client-android-test:1.31.0:1.31.0 +google-http-client-apache-v2:1.31.0:1.31.0 +google-http-client-appengine:1.31.0:1.31.0 +google-http-client-assembly:1.31.0:1.31.0 +google-http-client-findbugs:1.31.0:1.31.0 +google-http-client-gson:1.31.0:1.31.0 +google-http-client-jackson2:1.31.0:1.31.0 +google-http-client-jdo:1.31.0:1.31.0 +google-http-client-protobuf:1.31.0:1.31.0 +google-http-client-test:1.31.0:1.31.0 +google-http-client-xml:1.31.0:1.31.0 From 6202d33a7f27e7a3d5445b7f587895c9434197ab Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Wed, 31 Jul 2019 14:41:44 -0400 Subject: [PATCH 135/983] Bump next snapshot (#755) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 16 files changed, 54 insertions(+), 54 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 3a95534dd..366c0ee1a 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.31.0 + 1.31.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.31.0 + 1.31.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.31.0 + 1.31.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 070ccd080..3b1ea76f3 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-android - 1.31.0 + 1.31.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 2a0a6a92b..3b779b6ee 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.31.0 + 1.31.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 0c3f0d3b4..898475756 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.31.0 + 1.31.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 49aeecef7..338e7e7e5 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.31.0 + 1.31.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 1931d22d9..72b523920 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.31.0 + 1.31.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-android - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-test - 1.31.0 + 1.31.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.31.0 + 1.31.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 655ada240..ce47fb634 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.31.0 + 1.31.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 8406ebb06..2b93e7e78 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.31.0 + 1.31.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2145eb6e8..b42bca6e8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.31.0 + 1.31.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 10c2f3943..d8c6869ba 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.31.0 + 1.31.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 1f490f0d3..bd15aea7f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-test - 1.31.0 + 1.31.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 093a4ed47..d47f43996 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.31.0 + 1.31.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 7f0a4ce77..fe8e384d4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../pom.xml google-http-client - 1.31.0 + 1.31.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 5b38c2afa..76a74d03a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java @@ -551,7 +551,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.31.0 + 1.31.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2cc763f38..8c5ca35fb 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.31.0 + 1.31.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b8d07bb06..3bf502904 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.31.0:1.31.0 -google-http-client-bom:1.31.0:1.31.0 -google-http-client-parent:1.31.0:1.31.0 -google-http-client-android:1.31.0:1.31.0 -google-http-client-android-test:1.31.0:1.31.0 -google-http-client-apache-v2:1.31.0:1.31.0 -google-http-client-appengine:1.31.0:1.31.0 -google-http-client-assembly:1.31.0:1.31.0 -google-http-client-findbugs:1.31.0:1.31.0 -google-http-client-gson:1.31.0:1.31.0 -google-http-client-jackson2:1.31.0:1.31.0 -google-http-client-jdo:1.31.0:1.31.0 -google-http-client-protobuf:1.31.0:1.31.0 -google-http-client-test:1.31.0:1.31.0 -google-http-client-xml:1.31.0:1.31.0 +google-http-client:1.31.0:1.31.1-SNAPSHOT +google-http-client-bom:1.31.0:1.31.1-SNAPSHOT +google-http-client-parent:1.31.0:1.31.1-SNAPSHOT +google-http-client-android:1.31.0:1.31.1-SNAPSHOT +google-http-client-android-test:1.31.0:1.31.1-SNAPSHOT +google-http-client-apache-v2:1.31.0:1.31.1-SNAPSHOT +google-http-client-appengine:1.31.0:1.31.1-SNAPSHOT +google-http-client-assembly:1.31.0:1.31.1-SNAPSHOT +google-http-client-findbugs:1.31.0:1.31.1-SNAPSHOT +google-http-client-gson:1.31.0:1.31.1-SNAPSHOT +google-http-client-jackson2:1.31.0:1.31.1-SNAPSHOT +google-http-client-jdo:1.31.0:1.31.1-SNAPSHOT +google-http-client-protobuf:1.31.0:1.31.1-SNAPSHOT +google-http-client-test:1.31.0:1.31.1-SNAPSHOT +google-http-client-xml:1.31.0:1.31.1-SNAPSHOT From 5360cbfc977b5bb256ab16d90bf63264615ed5e6 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 31 Jul 2019 13:28:52 -0700 Subject: [PATCH 136/983] Update common repo files from synthtool (#756) * Update common repo files from synthtool * Ignore license-checks.xml from templates * Update issue templates from synth --- .github/ISSUE_TEMPLATE/bug_report.md | 51 +++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 18 ++++ .github/ISSUE_TEMPLATE/support_request.md | 7 ++ .github/PULL_REQUEST_TEMPLATE.md | 5 +- .gitignore | 32 +++++- .kokoro/build.bat | 2 +- .kokoro/build.sh | 41 ++++++-- .kokoro/continuous/common.cfg | 8 +- .kokoro/continuous/dependencies.cfg | 12 +++ .kokoro/continuous/integration.cfg | 7 ++ .kokoro/continuous/java11.cfg | 4 +- .kokoro/continuous/java7.cfg | 4 +- .kokoro/continuous/java8-osx.cfg | 3 + .kokoro/continuous/java8.cfg | 4 +- .kokoro/continuous/lint.cfg | 13 +++ .kokoro/continuous/propose_release.cfg | 53 ++++++++++ .kokoro/continuous/propose_release.sh | 29 +++++ .kokoro/linkage-monitor.sh | 15 ++- .kokoro/nightly/common.cfg | 24 +++++ .kokoro/nightly/dependencies.cfg | 12 +++ .kokoro/nightly/integration.cfg | 7 ++ .kokoro/nightly/java11.cfg | 7 ++ .kokoro/nightly/java7.cfg | 7 ++ .kokoro/nightly/java8-osx.cfg | 3 + .kokoro/nightly/java8-win.cfg | 3 + .kokoro/nightly/java8.cfg | 7 ++ .kokoro/nightly/lint.cfg | 13 +++ .kokoro/presubmit/common.cfg | 17 ++- .kokoro/presubmit/dependencies.cfg | 4 +- .kokoro/presubmit/integration.cfg | 7 ++ .kokoro/presubmit/java11.cfg | 4 +- .kokoro/presubmit/java7.cfg | 4 +- .kokoro/presubmit/java8-osx.cfg | 3 + .kokoro/presubmit/java8.cfg | 4 +- .kokoro/presubmit/linkage-monitor.cfg | 9 +- .kokoro/presubmit/lint.cfg | 13 +++ .kokoro/release/bump_snapshot.cfg | 53 ++++++++++ .kokoro/release/bump_snapshot.sh | 30 ++++++ .kokoro/release/common.cfg | 11 +- .kokoro/release/common.sh | 2 +- .kokoro/release/drop.cfg | 4 +- .kokoro/release/promote.cfg | 5 +- .kokoro/release/publish_javadoc.cfg | 8 +- .kokoro/release/publish_javadoc.sh | 4 +- .kokoro/release/snapshot.cfg | 6 ++ .kokoro/release/snapshot.sh | 30 ++++++ .kokoro/release/stage.cfg | 9 +- .kokoro/release/stage.sh | 20 ++-- .repo-metadata.json | 10 ++ CODE_OF_CONDUCT.md | 122 +++++++++++++++------- CONTRIBUTING.md | 28 +++++ LICENSE | 7 +- codecov.yaml | 4 + synth.metadata | 12 +++ synth.py | 28 +++++ 55 files changed, 727 insertions(+), 122 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/support_request.md create mode 100644 .kokoro/continuous/dependencies.cfg create mode 100644 .kokoro/continuous/integration.cfg create mode 100644 .kokoro/continuous/java8-osx.cfg create mode 100644 .kokoro/continuous/lint.cfg create mode 100644 .kokoro/continuous/propose_release.cfg create mode 100644 .kokoro/continuous/propose_release.sh create mode 100644 .kokoro/nightly/common.cfg create mode 100644 .kokoro/nightly/dependencies.cfg create mode 100644 .kokoro/nightly/integration.cfg create mode 100644 .kokoro/nightly/java11.cfg create mode 100644 .kokoro/nightly/java7.cfg create mode 100644 .kokoro/nightly/java8-osx.cfg create mode 100644 .kokoro/nightly/java8-win.cfg create mode 100644 .kokoro/nightly/java8.cfg create mode 100644 .kokoro/nightly/lint.cfg create mode 100644 .kokoro/presubmit/integration.cfg create mode 100644 .kokoro/presubmit/java8-osx.cfg create mode 100644 .kokoro/presubmit/lint.cfg create mode 100644 .kokoro/release/bump_snapshot.cfg create mode 100644 .kokoro/release/bump_snapshot.sh mode change 100644 => 100755 .kokoro/release/common.sh create mode 100644 .kokoro/release/snapshot.cfg create mode 100644 .kokoro/release/snapshot.sh create mode 100644 .repo-metadata.json create mode 100644 CONTRIBUTING.md create mode 100644 codecov.yaml create mode 100644 synth.metadata create mode 100644 synth.py diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..6b028d0fe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/google-http-client/issues + - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform + +If you are still having issues, please be sure to include as much information as possible: + +#### Environment details + +1. Specify the API at the beginning of the title (for example, "BigQuery: ...") + General, Core, and Other are also allowed as types +2. OS type and version: +3. Java version: +4. google-http-client version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides used + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..4490605ae --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + + **Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Example: I'm always frustrated when [...] + **Describe the solution you'd like** +A clear and concise description of what you want to happen. + **Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + **Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 000000000..995869032 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3af206e9c..0bd0ee062 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1 @@ -Fixes # (it's a good idea to open an issue first for discussion) - -- [ ] Tests pass -- [ ] Appropriate docs were updated (if necessary) +Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file diff --git a/.gitignore b/.gitignore index 542fed8d1..3ca4b1fa5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,32 @@ -target/ -bin/ +.gitignore + +# Packages +dist +bin +var +sdist +target + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject *.iml .idea -.project .settings -.classpath .DS_Store +.classpath + +# Built documentation +docs/ + +# Python utilities +*.pyc diff --git a/.kokoro/build.bat b/.kokoro/build.bat index e5324a570..b8ca8a893 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +1,3 @@ :: See documentation in type-shell-output.bat - + "C:\Program Files\Git\bin\bash.exe" github/google-http-java-client/.kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index b883e2c51..2ffb5ef7f 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# 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. @@ -15,13 +15,40 @@ set -eo pipefail -cd github/google-http-java-client/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. -# Print out Java +# Print out Java version java -version -echo $JOB_TYPE +echo ${JOB_TYPE} -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +mvn install -B -V \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C -mvn install -DskipTests=true -B -V -mvn test -B +# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +case ${JOB_TYPE} in +test) + mvn test -B + bash ${KOKORO_GFILE_DIR}/codecov.sh + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + ;; +*) + ;; +esac \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg index a5178e08c..582175deb 100644 --- a/.kokoro/continuous/common.cfg +++ b/.kokoro/continuous/common.cfg @@ -14,11 +14,11 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" build_file: "google-http-java-client/.kokoro/trampoline.sh" env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } env_vars: { - key: "JOB_TYPE" - value: "test" + key: "JOB_TYPE" + value: "test" } diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg new file mode 100644 index 000000000..4de4271a3 --- /dev/null +++ b/.kokoro/continuous/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/dependencies.sh" +} diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg new file mode 100644 index 000000000..34f6c33e5 --- /dev/null +++ b/.kokoro/continuous/integration.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg index 709f2b4c7..b81a66a3c 100644 --- a/.kokoro/continuous/java11.cfg +++ b/.kokoro/continuous/java11.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" } diff --git a/.kokoro/continuous/java7.cfg b/.kokoro/continuous/java7.cfg index cb24f44ee..584e8ea60 100644 --- a/.kokoro/continuous/java7.cfg +++ b/.kokoro/continuous/java7.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" } diff --git a/.kokoro/continuous/java8-osx.cfg b/.kokoro/continuous/java8-osx.cfg new file mode 100644 index 000000000..b2354168e --- /dev/null +++ b/.kokoro/continuous/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.sh" diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 3b017fc80..34f6c33e5 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg new file mode 100644 index 000000000..eb517a23e --- /dev/null +++ b/.kokoro/continuous/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg new file mode 100644 index 000000000..aac26b203 --- /dev/null +++ b/.kokoro/continuous/propose_release.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-http-java-client/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh new file mode 100644 index 000000000..da0e23e6f --- /dev/null +++ b/.kokoro/continuous/propose_release.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# 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 +# +# https://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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the release PR as new commits are merged. + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/google-http-java-client \ + --package-name="google-http-client" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --release-type=java-auth-yoshi +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index c7ad10cc3..5b1b65516 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google Inc. +# 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. @@ -14,21 +14,20 @@ # limitations under the License. set -eo pipefail +# Display commands being run. +set -x cd github/google-http-java-client/ -# Print out Java +# Print out Java version java -version -echo $JOB_TYPE +echo ${JOB_TYPE} -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" - -# Installs snapshot artifacts locally. Linkage Monitor uses them. -mvn install -DskipTests=true -B -V +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" # Fails if there's new linkage errors compared with baseline -java -jar $JAR com.google.cloud:libraries-bom +java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 000000000..582175deb --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-http-java-client/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg new file mode 100644 index 000000000..4de4271a3 --- /dev/null +++ b/.kokoro/nightly/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/dependencies.sh" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 000000000..34f6c33e5 --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 000000000..b81a66a3c --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 000000000..584e8ea60 --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 000000000..b2354168e --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 000000000..b44537d03 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 000000000..34f6c33e5 --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/nightly/lint.cfg b/.kokoro/nightly/lint.cfg new file mode 100644 index 000000000..eb517a23e --- /dev/null +++ b/.kokoro/nightly/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index a5178e08c..48b591f7c 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -14,11 +14,20 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" build_file: "google-http-java-client/.kokoro/trampoline.sh" env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } env_vars: { - key: "JOB_TYPE" - value: "test" + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } } diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg index b89a20740..4de4271a3 100644 --- a/.kokoro/presubmit/dependencies.cfg +++ b/.kokoro/presubmit/dependencies.cfg @@ -2,8 +2,8 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 000000000..34f6c33e5 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg index 709f2b4c7..b81a66a3c 100644 --- a/.kokoro/presubmit/java11.cfg +++ b/.kokoro/presubmit/java11.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" } diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg index cb24f44ee..584e8ea60 100644 --- a/.kokoro/presubmit/java7.cfg +++ b/.kokoro/presubmit/java7.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" } diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 000000000..b2354168e --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "google-http-java-client/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 3b017fc80..34f6c33e5 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg index b8e1a21e1..c32b0b938 100644 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -1,15 +1,12 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Linkage Monitor notifies new linkage errors as Kokoro presubmit check -# https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor - # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/linkage-monitor.sh" -} +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 000000000..eb517a23e --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 000000000..aac26b203 --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-http-java-client/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh new file mode 100644 index 000000000..43226e25a --- /dev/null +++ b/.kokoro/release/bump_snapshot.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# 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 +# +# https://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. + +set -eo pipefail + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the snapshot release PR immediately after publishing a release + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/google-http-java-client \ + --package-name="google-http-client" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --snapshot \ + --release-type=java-auth-yoshi +fi diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 4377eeb04..5e39fef43 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -1,12 +1,5 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - # Download trampoline resources. gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" @@ -15,8 +8,8 @@ build_file: "google-http-java-client/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } before_action { diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh old mode 100644 new mode 100755 index f7d538b3a..6e3f65999 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -47,4 +47,4 @@ create_settings_xml_file() { " > $1 -} +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg index 278e44d75..51ac729d0 100644 --- a/.kokoro/release/drop.cfg +++ b/.kokoro/release/drop.cfg @@ -1,7 +1,9 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Tell the trampoline which build file to use. env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/drop.sh" } + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-http-java-client" \ No newline at end of file diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg index e6d8b8fdf..2d06e55e8 100644 --- a/.kokoro/release/promote.cfg +++ b/.kokoro/release/promote.cfg @@ -1,7 +1,10 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Tell the trampoline which build file to use. env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/promote.sh" } + +# Download staging properties file. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-http-java-client" + diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index fabf592e2..c5d16b787 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -1,12 +1,12 @@ # Format: //devtools/kokoro/config/proto/build.proto env_vars: { - key: "STAGING_BUCKET" - value: "docs-staging" + key: "STAGING_BUCKET" + value: "docs-staging" } env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" } before_action { diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 4115ca6e1..b65eb9f90 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -45,9 +45,7 @@ pushd target/site/apidocs python3 -m docuploader create-metadata \ --name ${NAME} \ --version ${VERSION} \ - --language java \ - --github-repository https://github.com/googleapis/google-http-java-client \ - --issue-tracker https://github.com/googleapis/google-http-java-client/issues \ + --language java # upload docs python3 -m docuploader upload . \ diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 000000000..f6afdf68c --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100644 index 000000000..bf738c56d --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# 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. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} \ No newline at end of file diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index 79d4be8da..4ea285a5a 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -1,11 +1,18 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Tell the trampoline which build file to use. env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/stage.sh" } +# Need to save the properties file +action { + define_artifacts { + regex: "github/google-http-java-client/target/nexus-staging/staging/*.properties" + strip_prefix: "github/google-http-java-client" + } +} + # Fetch the token needed for reporting release status to GitHub before_action { fetch_keystore { diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 592dd61a2..b1b1b01c6 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -20,24 +20,22 @@ python3 -m pip install gcp-releasetool python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh - +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -AUTORELEASE="false" -if [[ -n "${AUTORELEASE_PR}" ]] -then - AUTORELEASE="true" -fi - mvn clean install deploy -B \ - --settings settings.xml \ + --settings ${MAVEN_SETTINGS_FILE} \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} \ - -Ddeploy.autorelease=${AUTORELEASE} - + -Dgpg.homedir=${GPG_HOMEDIR} +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 000000000..8825ad582 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "name": "google-http-client", + "name_pretty": "Google HTTP Java Client", + "client_documentation": "https://googleapis.dev/java/google-http-client/latest/", + "release_level": "ga", + "language": "java", + "repo": "googleapis/google-http-java-client", + "repo_short": "google-http-java-client", + "distribution_name": "google-http-java-client" +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 46b2a08ea..6b2238bb7 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,43 +1,93 @@ -# Contributor Code of Conduct +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the +Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..ebbb59e53 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). \ No newline at end of file diff --git a/LICENSE b/LICENSE index 980a15ac2..d64569567 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ - Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 000000000..5724ea947 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/synth.metadata b/synth.metadata new file mode 100644 index 000000000..1eff26d99 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,12 @@ +{ + "updateTime": "2019-07-31T20:12:46.410742Z", + "sources": [ + { + "template": { + "name": "java_library", + "origin": "synthtool.gcp", + "version": "2019.5.2" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 000000000..9ed5d7487 --- /dev/null +++ b/synth.py @@ -0,0 +1,28 @@ +# 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. +"""This script is used to synthesize generated parts of this library.""" +import synthtool as s +import synthtool.gcp as gcp +import logging + +logging.basicConfig(level=logging.DEBUG) +common_templates = gcp.CommonTemplates() +templates = common_templates.java_library() +s.copy(templates, excludes=[ + "README.md", + "java.header", + "checkstyle.xml", + "renovate.json", + "license-checks.xml", +]) From d0a06236acd050f1a5316b840b68e5b029faf78b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 5 Aug 2019 12:32:17 -0400 Subject: [PATCH 137/983] Update guava to 28.0-android (#760) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 76a74d03a..3f296b7b7 100644 --- a/pom.xml +++ b/pom.xml @@ -558,7 +558,7 @@ 2.8.5 2.9.9 3.6.1 - 26.0-android + 28.0-android 1.1.4c 1.2 4.5.9 From 9916535337284e9d4397ae603246c84925f84b78 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 5 Aug 2019 12:33:12 -0400 Subject: [PATCH 138/983] Update JWT documentation URLs (#759) * update URLs * fix .gitignore for eclipse * fix .gitignore for eclipse * fix .gitignore for eclipse * update link to JSON Web signature spec --- .gitignore | 6 +++-- .../json/webtoken/JsonWebSignature.java | 25 +++++++++---------- .../client/json/webtoken/JsonWebToken.java | 12 ++++----- .../.classpath | 9 ------- .../.project | 23 ----------------- 5 files changed, 22 insertions(+), 53 deletions(-) delete mode 100644 samples/dailymotion-simple-cmdline-sample/.classpath delete mode 100644 samples/dailymotion-simple-cmdline-sample/.project diff --git a/.gitignore b/.gitignore index 3ca4b1fa5..cb264df74 100644 --- a/.gitignore +++ b/.gitignore @@ -17,13 +17,15 @@ nosetests.xml # Mr Developer .mr.developer.cfg -.project + +**/.project .pydevproject *.iml .idea .settings .DS_Store -.classpath +**/.classpath +**/.checkstyle # Built documentation docs/ diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 4d5775c65..0777c8b92 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Google Inc. + * Copyright 2012 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 @@ -38,15 +38,14 @@ import javax.net.ssl.X509TrustManager; /** - * JSON Web Signature - * (JWS). + * JSON Web Signature(JWS). * *

            Sample usage: * *

              * public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
            - * JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
            - * System.out.println(jws.getPayload());
            + *   JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
            + *   System.out.println(jws.getPayload());
              * }
              * 
            * @@ -67,7 +66,7 @@ public class JsonWebSignature extends JsonWebToken { * @param header header * @param payload payload * @param signatureBytes bytes of the signature - * @param signedContentBytes bytes of the signature content + * @param signedContentBytes bytes of the signed content */ public JsonWebSignature( Header header, Payload payload, byte[] signatureBytes, byte[] signedContentBytes) { @@ -77,8 +76,8 @@ public JsonWebSignature( } /** - * Header as specified in Reserved + * Header as specified in + * Reserved * Header Parameter Names. */ public static class Header extends JsonWebToken.Header { @@ -406,11 +405,11 @@ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurity * *

            The leaf certificate of the certificate chain must be an SSL server certificate. * - * @param trustManager Trust manager used to verify the X509 certificate chain embedded in this - * message. - * @return The signature certificate if the signature could be verified, null otherwise. + * @param trustManager trust manager used to verify the X509 certificate chain embedded in this + * message + * @return the signature certificate if the signature could be verified, null otherwise * @throws GeneralSecurityException - * @since 1.19.1. + * @since 1.19.1 */ @Beta public final X509Certificate verifySignature(X509TrustManager trustManager) @@ -441,7 +440,7 @@ public final X509Certificate verifySignature(X509TrustManager trustManager) * *

            The leaf certificate of the certificate chain must be an SSL server certificate. * - * @return The signature certificate if the signature could be verified, null otherwise. + * @return the signature certificate if the signature could be verified, null otherwise * @throws GeneralSecurityException * @since 1.19.1. */ diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java index f7c19d543..f68450190 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Google Inc. + * Copyright 2012 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 @@ -22,7 +22,7 @@ import java.util.List; /** - * JSON Web Token (JWT). + * JSON Web Token (JWT). * *

            Implementation is not thread-safe. * @@ -47,8 +47,8 @@ public JsonWebToken(Header header, Payload payload) { } /** - * Header as specified in JWT Header. + * Header as specified in + * JWT Header. */ public static class Header extends GenericJson { @@ -115,8 +115,8 @@ public Header clone() { } /** - * Payload as specified in Reserved Claim + * Payload as specified in + * Reserved Claim * Names. */ public static class Payload extends GenericJson { diff --git a/samples/dailymotion-simple-cmdline-sample/.classpath b/samples/dailymotion-simple-cmdline-sample/.classpath deleted file mode 100644 index f3de25032..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/samples/dailymotion-simple-cmdline-sample/.project b/samples/dailymotion-simple-cmdline-sample/.project deleted file mode 100644 index 1d87e91e0..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - dailymotion-simple-cmdline-sample - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - From 74dd65f11e947bca7d84ba83254babc0d16a6e5c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 5 Aug 2019 12:34:20 -0400 Subject: [PATCH 139/983] Cleanup: remove deprecated code, fix warnings, and use JUnit 4 (#763) * remove deprecated code, fix warnings, an duse JUnit 4 * generics --- .../client/http/apache/v2/ApacheHttpTransport.java | 8 -------- .../api/client/http/apache/v2/package-info.java | 2 +- .../client/test/json/AbstractJsonGeneratorTest.java | 12 ++++++------ .../api/client/test/json/AbstractJsonParserTest.java | 4 ++-- .../api/client/http/javanet/NetHttpTransport.java | 1 - .../java/com/google/api/client/util/FieldInfo.java | 1 - .../com/google/api/client/http/HttpRequestTest.java | 7 +++++-- .../com/google/api/client/util/GenericDataTest.java | 9 ++++++--- 8 files changed, 20 insertions(+), 24 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 7f547a38b..0e735f174 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -16,17 +16,9 @@ import com.google.api.client.http.HttpMethods; import com.google.api.client.http.HttpTransport; -import com.google.api.client.util.Preconditions; -import com.google.api.client.util.SecurityUtils; -import com.google.api.client.util.SslUtils; import java.io.IOException; -import java.io.InputStream; import java.net.ProxySelector; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.cert.CertificateFactory; import java.util.concurrent.TimeUnit; -import javax.net.ssl.SSLContext; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java index bc753838b..1909a2f75 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java @@ -13,7 +13,7 @@ */ /** - * HTTP Transport library for Google API's based on Apache HTTP Client version 4.5+ + * HTTP Transport library for Google API's based on Apache HTTP Client version 4.5+. * * @since 1.30 * @author Yaniv Inbar diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java index 0f92bc10f..1a2a1bb54 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java @@ -38,10 +38,10 @@ public void testSerialize_simpleMap() throws Exception { StringWriter writer = new StringWriter(); JsonGenerator generator = newGenerator(writer); - Map m = new HashMap(); - m.put("a", "b"); + Map map = new HashMap(); + map.put("a", "b"); - generator.serialize(m); + generator.serialize(map); generator.close(); assertEquals("{\"a\":\"b\"}", writer.toString()); } @@ -50,10 +50,10 @@ public void testSerialize_iterableMap() throws Exception { StringWriter writer = new StringWriter(); JsonGenerator generator = newGenerator(writer); - Map m = new IterableMap(); - m.put("a", "b"); + Map map = new IterableMap(); + map.put("a", "b"); - generator.serialize(m); + generator.serialize(map); generator.close(); assertEquals("{\"a\":\"b\"}", writer.toString()); } diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java index a61dc5c27..ef641e868 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java @@ -30,9 +30,9 @@ public abstract class AbstractJsonParserTest extends TestCase { protected abstract JsonFactory newJsonFactory(); - private static String TEST_JSON = + private static final String TEST_JSON = "{\"strValue\": \"bar\", \"intValue\": 123, \"boolValue\": false}"; - private static String TEST_JSON_BIG_DECIMAL = "{\"bigDecimalValue\": 1559341956102}"; + private static final String TEST_JSON_BIG_DECIMAL = "{\"bigDecimalValue\": 1559341956102}"; public void testParse_basic() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java index 3ba4eb676..3e90cb2c2 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java @@ -81,7 +81,6 @@ private static Proxy defaultProxy() { private static final String SHOULD_USE_PROXY_FLAG = "com.google.api.client.should_use_proxy"; - /** Factory to produce connections from {@link URL}s */ private final ConnectionFactory connectionFactory; /** SSL socket factory or {@code null} for the default. */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java index fb3599f98..3830a8664 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java @@ -115,7 +115,6 @@ public static FieldInfo of(Field field) { /** Field. */ private final Field field; - /** Setters Method for field */ private final Method[] setters; /** diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index 946f5961f..f024e05cb 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -31,6 +31,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; + +import junit.framework.TestCase; + import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Arrays; @@ -41,8 +44,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.logging.Level; -import junit.framework.Assert; -import junit.framework.TestCase; + +import org.junit.Assert; /** * Tests {@link HttpRequest}. diff --git a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java index 9dabe8298..c1d3872c0 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java @@ -15,11 +15,14 @@ package com.google.api.client.util; import com.google.api.client.util.GenericData.Flags; + +import junit.framework.TestCase; + import java.util.ArrayList; import java.util.EnumSet; import java.util.List; -import junit.framework.Assert; -import junit.framework.TestCase; + +import org.junit.Assert; /** * Tests {@link GenericData}. @@ -191,7 +194,7 @@ public void testPutShouldUseSetter() { MyData data = new MyData(); data.put("fieldB", "value1"); assertEquals("value1", data.fieldB.get(0)); - List list = new ArrayList(); + List list = new ArrayList<>(); list.add("value2"); data.put("fieldB", list); assertEquals(list, data.fieldB); From db1d97041b857a4710f4a6801df548509a93fb92 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 7 Aug 2019 10:44:40 -0400 Subject: [PATCH 140/983] stop exposing internal private state in JsonWebSignature (#767) * stop exposing internal private state * JUnit 4 * don't expose internal lists --- .../json/webtoken/JsonWebSignature.java | 26 ++++--- .../json/webtoken/JsonWebSignatureTest.java | 67 +++++++++++++++++-- 2 files changed, 75 insertions(+), 18 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 0777c8b92..727e93569 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -32,6 +32,7 @@ import java.security.Signature; import java.security.cert.X509Certificate; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; @@ -135,7 +136,7 @@ public static class Header extends JsonWebToken.Header { * @since 1.19.1. */ @Key("x5c") - private List x509Certificates; + private ArrayList x509Certificates; /** * Array listing the header parameter names that define extensions that are used in the JWS @@ -299,7 +300,7 @@ public final String getX509Certificate() { * @since 1.19.1. */ public final List getX509Certificates() { - return x509Certificates; + return new ArrayList<>(x509Certificates); } /** @@ -331,22 +332,25 @@ public Header setX509Certificate(String x509Certificate) { * @since 1.19.1. */ public Header setX509Certificates(List x509Certificates) { - this.x509Certificates = x509Certificates; + this.x509Certificates = new ArrayList<>(x509Certificates); return this; } /** - * Returns the array listing the header parameter names that define extensions that are used in + * Returns an array listing the header parameter names that define extensions used in * the JWS header that MUST be understood and processed or {@code null} for none. * * @since 1.16 */ public final List getCritical() { - return critical; + if (critical == null || critical.isEmpty()) { + return null; + } + return new ArrayList<>(critical); } /** - * Sets the array listing the header parameter names that define extensions that are used in the + * Sets the header parameter names that define extensions used in the * JWS header that MUST be understood and processed or {@code null} for none. * *

            Overriding is only supported for the purpose of calling the super implementation and @@ -355,7 +359,7 @@ public final List getCritical() { * @since 1.16 */ public Header setCritical(List critical) { - this.critical = critical; + this.critical = new ArrayList<>(critical); return this; } @@ -471,14 +475,14 @@ private static X509TrustManager getDefaultX509TrustManager() { } } - /** Returns the modifiable array of bytes of the signature. */ + /** Returns the bytes of the signature. */ public final byte[] getSignatureBytes() { - return signatureBytes; + return Arrays.copyOf(signatureBytes, signatureBytes.length); } - /** Returns the modifiable array of bytes of the signature content. */ + /** Returns the bytes of the signature content. */ public final byte[] getSignedContentBytes() { - return signedContentBytes; + return Arrays.copyOf(signedContentBytes, signedContentBytes.length); } /** diff --git a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java index 312c1d971..8bff77f93 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java @@ -17,18 +17,27 @@ import com.google.api.client.testing.json.MockJsonFactory; import com.google.api.client.testing.json.webtoken.TestCertificates; import com.google.api.client.testing.util.SecurityTestUtils; + +import java.io.IOException; +import java.security.GeneralSecurityException; import java.security.cert.X509Certificate; import java.security.interfaces.RSAPrivateKey; +import java.util.ArrayList; +import java.util.List; + import javax.net.ssl.X509TrustManager; -import junit.framework.TestCase; + +import org.junit.Assert; +import org.junit.Test; /** * Tests {@link JsonWebSignature}. * * @author Yaniv Inbar */ -public class JsonWebSignatureTest extends TestCase { +public class JsonWebSignatureTest { + @Test public void testSign() throws Exception { JsonWebSignature.Header header = new JsonWebSignature.Header(); header.setAlgorithm("RS256"); @@ -40,25 +49,69 @@ public void testSign() throws Exception { .setIssuedAtTimeSeconds(0L) .setExpirationTimeSeconds(3600L); RSAPrivateKey privateKey = SecurityTestUtils.newRsaPrivateKey(); - assertEquals( + Assert.assertEquals( "..kDmKaHNYByLmqAi9ROeLcFmZM7W_emsceKvDZiEGAo-ineCunC6_Nb0HEpAuzIidV-LYTMHS3BvI49KFz9gi6hI3" + "ZndDL5EzplpFJo1ZclVk1_hLn94P2OTAkZ4ydsTfus6Bl98EbCkInpF_2t5Fr8OaHxCZCDdDU7W5DSnOsx4", JsonWebSignature.signUsingRsaSha256(privateKey, new MockJsonFactory(), header, payload)); } - private X509Certificate verifyX509WithCaCert(TestCertificates.CertData caCert) throws Exception { + private X509Certificate verifyX509WithCaCert(TestCertificates.CertData caCert) + throws IOException, GeneralSecurityException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); X509TrustManager trustManager = caCert.getTrustManager(); return signature.verifySignature(trustManager); } + + @Test + public void testImmutableSignatureBytes() throws IOException { + JsonWebSignature signature = TestCertificates.getJsonWebSignature(); + byte[] bytes = signature.getSignatureBytes(); + bytes[0] = (byte) (bytes[0] + 1); + byte[] bytes2 = signature.getSignatureBytes(); + Assert.assertNotEquals(bytes2[0], bytes[0]); + } + + @Test + public void testImmutableSignedContentBytes() throws IOException { + JsonWebSignature signature = TestCertificates.getJsonWebSignature(); + byte[] bytes = signature.getSignedContentBytes(); + bytes[0] = (byte) (bytes[0] + 1); + byte[] bytes2 = signature.getSignedContentBytes(); + Assert.assertNotEquals(bytes2[0], bytes[0]); + } + + @Test + public void testImmutableCertificates() throws IOException { + JsonWebSignature signature = TestCertificates.getJsonWebSignature(); + List certificates = signature.getHeader().getX509Certificates(); + certificates.set(0, "foo"); + Assert.assertNotEquals("foo", signature.getHeader().getX509Certificates().get(0)); + } + + @Test + public void testImmutableCritical() throws IOException { + JsonWebSignature signature = TestCertificates.getJsonWebSignature(); + List critical = new ArrayList<>(); + signature.getHeader().setCritical(critical); + critical.add("bar"); + Assert.assertNull(signature.getHeader().getCritical()); + } + + @Test + public void testCriticalNullForNone() throws IOException { + JsonWebSignature signature = TestCertificates.getJsonWebSignature(); + Assert.assertNull(signature.getHeader().getCritical()); + } + @Test public void testVerifyX509() throws Exception { X509Certificate signatureCert = verifyX509WithCaCert(TestCertificates.CA_CERT); - assertNotNull(signatureCert); - assertTrue(signatureCert.getSubjectDN().getName().startsWith("CN=foo.bar.com")); + Assert.assertNotNull(signatureCert); + Assert.assertTrue(signatureCert.getSubjectDN().getName().startsWith("CN=foo.bar.com")); } + @Test public void testVerifyX509WrongCa() throws Exception { - assertNull(verifyX509WithCaCert(TestCertificates.BOGUS_CA_CERT)); + Assert.assertNull(verifyX509WithCaCert(TestCertificates.BOGUS_CA_CERT)); } } From 23e4383fd03257607cf2daa862d42a961e0ac8df Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 7 Aug 2019 16:55:53 -0400 Subject: [PATCH 141/983] Remove google-http-client-jdo from versions.txt manifest (#775) Last release was 1.28.0. Then it was deleted. --- versions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/versions.txt b/versions.txt index 3bf502904..dad3e44f7 100644 --- a/versions.txt +++ b/versions.txt @@ -12,7 +12,6 @@ google-http-client-assembly:1.31.0:1.31.1-SNAPSHOT google-http-client-findbugs:1.31.0:1.31.1-SNAPSHOT google-http-client-gson:1.31.0:1.31.1-SNAPSHOT google-http-client-jackson2:1.31.0:1.31.1-SNAPSHOT -google-http-client-jdo:1.31.0:1.31.1-SNAPSHOT google-http-client-protobuf:1.31.0:1.31.1-SNAPSHOT google-http-client-test:1.31.0:1.31.1-SNAPSHOT google-http-client-xml:1.31.0:1.31.1-SNAPSHOT From f27f63c5065753c7001579b4c56662c506f0c6cc Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 12:33:00 -0400 Subject: [PATCH 142/983] remove maven jarjar plugin (#773) This is not bound to any executions so I don't think we're using it. --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 3f296b7b7..8370183c2 100644 --- a/pom.xml +++ b/pom.xml @@ -281,11 +281,6 @@ maven-deploy-plugin 2.8.2 - - org.sonatype.plugins - jarjar-maven-plugin - 1.9 - org.apache.maven.plugins maven-source-plugin From b1e9adc45443519e274f4aebba4e05a8ecda7f87 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 13:07:15 -0400 Subject: [PATCH 143/983] add module name to submodules (#783) * add module name to protobuf module * more module names * more module names for xml module --- google-http-client-android/pom.xml | 10 + google-http-client-appengine/pom.xml | 10 + google-http-client-findbugs/pom.xml | 10 + google-http-client-gson/pom.xml | 10 + google-http-client-jackson2/pom.xml | 10 + google-http-client-protobuf/pom.xml | 10 + google-http-client-xml/pom.xml | 10 + .../.settings/org.eclipse.jdt.core.prefs | 380 ------------------ 8 files changed, 70 insertions(+), 380 deletions(-) delete mode 100644 samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 3b1ea76f3..c82da393c 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -35,6 +35,16 @@ + + maven-jar-plugin + + + + com.google.api.client.extensions.android + + + + diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 898475756..e3058e637 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -56,6 +56,16 @@ com.google.appengine:appengine-api-stubs + + maven-jar-plugin + + + + com.google.api.client.extensions.appengine + + + + diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index ce47fb634..7a777325d 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -40,6 +40,16 @@ com.google.http-client:google-http-client + + maven-jar-plugin + + + + com.google.api.client.findbugs + + + + diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 2b93e7e78..a3c99c9dd 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -55,6 +55,16 @@ + + maven-jar-plugin + + + + com.google.api.client.json.gson + + + + diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index b42bca6e8..56da836ba 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -55,6 +55,16 @@ + + maven-jar-plugin + + + + com.google.api.client.json.jackson2 + + + + diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d8c6869ba..c704397b6 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -57,6 +57,16 @@ + + maven-jar-plugin + + + + com.google.api.client.http.protobuf + + + + diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index d47f43996..5dedef3b0 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -54,6 +54,16 @@ + + maven-jar-plugin + + + + com.google.api.client.http.xml + + + + diff --git a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 652b81273..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,380 +0,0 @@ -#Fri Nov 04 10:10:39 EDT 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.fieldPrefixes= -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore -org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=warning -org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package_declaration=569 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=24 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type_declaration=569 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=16 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16|5|48 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16|5|80 -org.eclipse.jdt.core.formatter.alignment_for_field_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_for_statement=16 -org.eclipse.jdt.core.formatter.alignment_for_generic_type_arguments=16 -org.eclipse.jdt.core.formatter.alignment_for_local_variable_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_new_anonymous_class=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16|5|80 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16|5|80 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16|4|49 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16|4|48 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16|4|48 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16|4|48 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=0 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=0 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=2 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=true -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=false -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=100 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.comment_new_line_at_start_of_html_paragraph=true -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.force_if_else_statement_brace=true -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=100 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=3 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false -org.eclipse.jdt.core.formatter.sort_local_variable_annotations=false -org.eclipse.jdt.core.formatter.sort_member_annotations=false -org.eclipse.jdt.core.formatter.sort_package_annotations=false -org.eclipse.jdt.core.formatter.sort_parameter_annotations=false -org.eclipse.jdt.core.formatter.sort_type_annotations=false -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=2 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_comment_inline_tags=false -org.eclipse.jdt.core.formatter.wrap_non_simple_local_variable_annotation=true -org.eclipse.jdt.core.formatter.wrap_non_simple_member_annotation=true -org.eclipse.jdt.core.formatter.wrap_non_simple_package_annotation=true -org.eclipse.jdt.core.formatter.wrap_non_simple_parameter_annotation=false -org.eclipse.jdt.core.formatter.wrap_non_simple_type_annotation=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.formatter.wrap_prefer_two_fragments=false From ee296fc672ef6420032d0b16e6543bb769c6bb9d Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 13:16:02 -0400 Subject: [PATCH 144/983] Remove deprecated testing method (#777) * remove deprecated testing method * ignore removed method --- clirr-ignored-differences.xml | 5 +++++ .../api/client/testing/http/MockHttpTransport.java | 13 ------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index bb01b2b4d..9bf04bd17 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -2,6 +2,11 @@ + + 7002 + com/google/api/client/testing/http/MockHttpTransport + com.google.api.client.testing.http.MockHttpTransport$Builder builder() + 8001 diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java index 1f5c316e2..b16ac31eb 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java @@ -99,19 +99,6 @@ public final MockLowLevelHttpRequest getLowLevelHttpRequest() { return lowLevelHttpRequest; } - /** - * Returns an instance of a new builder. - * - *

            - * - * @deprecated (to be removed in the future) Use {@link Builder#Builder()} instead. - * @since 1.5 - */ - @Deprecated - public static Builder builder() { - return new Builder(); - } - /** * {@link Beta}
            * Builder for {@link MockHttpTransport}. From 24b0d174fb7cc012bb84dcc25d07f5ba378c40ff Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 13:18:56 -0400 Subject: [PATCH 145/983] remove obsolete and deprecated parent (#785) --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 8370183c2..005439475 100644 --- a/pom.xml +++ b/pom.xml @@ -2,11 +2,6 @@ 4.0.0 - - org.sonatype.oss - oss-parent - 7 - com.google.http-client google-http-client-parent 1.31.1-SNAPSHOT From b1b84e4e269ed45cd39ee0ac1b244b3a712a013e Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 14:06:22 -0400 Subject: [PATCH 146/983] remove deprecated methods (#769) * remove deprecated methods * ignore differences --- clirr-ignored-differences.xml | 11 ++++++- .../json/webtoken/JsonWebSignature.java | 33 ------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index 9bf04bd17..0f0a72edf 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -1,7 +1,16 @@ - + + 7002 + com/google/api/client/json/webtoken/* + java.lang.String getX509Certificate() + + + 7002 + com/google/api/client/json/webtoken/* + com.google.api.client.json.webtoken.JsonWebSignature$Header setX509Certificate(java.lang.String) + 7002 com/google/api/client/testing/http/MockHttpTransport diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 727e93569..7e3990d40 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -277,21 +277,6 @@ public Header setX509Thumbprint(String x509Thumbprint) { return this; } - /** - * Returns the X.509 certificate chain header parameter contains the X.509 public key - * certificate or corresponding to the key used to digitally sign the JWS or {@code null} for - * none. - * - *

            @deprecated Since release 1.19.1, replaced by {@link #getX509Certificates()}. - */ - @Deprecated - public final String getX509Certificate() { - if (x509Certificates == null || x509Certificates.isEmpty()) { - return null; - } - return x509Certificates.get(0); - } - /** * Returns the X.509 certificate chain header parameter contains the X.509 public key * certificate or certificate chain corresponding to the key used to digitally sign the JWS or @@ -303,24 +288,6 @@ public final List getX509Certificates() { return new ArrayList<>(x509Certificates); } - /** - * Sets the X.509 certificate chain header parameter contains the X.509 public key certificate - * corresponding to the key used to digitally sign the JWS or {@code null} for none. - * - *

            Overriding is only supported for the purpose of calling the super implementation and - * changing the return type, but nothing else. - * - *

            @deprecated Since release 1.19.1, replaced by {@link #setX509Certificates(List - * x509Certificates)}. - */ - @Deprecated - public Header setX509Certificate(String x509Certificate) { - ArrayList x509Certificates = new ArrayList(); - x509Certificates.add(x509Certificate); - this.x509Certificates = x509Certificates; - return this; - } - /** * Sets the X.509 certificate chain header parameter contains the X.509 public key certificate * or certificate chain corresponding to the key used to digitally sign the JWS or {@code null} From ff5b4e5fdf7939e82176918e9ab8a9bae9a9b56e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 8 Aug 2019 11:51:03 -0700 Subject: [PATCH 147/983] Import google_checks.xml for maven-checkstyle-plugin (#786) * Update checkstyle rules and update maven-checkstyle-plugin to 3.1.0 * Modify checkstyle rule to adhere to google-java-format --- checkstyle.xml | 506 ++++++++---------- pom.xml | 54 +- samples/checkstyle.xml | 336 ------------ .../dailymotion-simple-cmdline-sample/pom.xml | 54 +- 4 files changed, 302 insertions(+), 648 deletions(-) delete mode 100644 samples/checkstyle.xml diff --git a/checkstyle.xml b/checkstyle.xml index 9d2f4bbe9..d7917523a 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,318 +1,268 @@ - + + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> - + - - - + Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov. + --> - - - - - + + + + - - + + + + + + + + + + - - - - - - - + + + + + - - - - - - - - - + + + + - - - - - - - - - - - - - - + + + - - - - + + + + + + - - - + + + + + - - - - - - - - - - + + + + + - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + - - - - - - - - - - + + + + - - - - - - + + + + + - - - - + + + + + - - - - + + + + - - - - + + + - - - - - - - - - - - - + + - - - - + + + - - - - - - + + + - - - - - + + + - - - - + + + - - - - - + + + + - - - - - - + + + - - - - - - - - + + + - - - - + + + - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + - - + - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/pom.xml b/pom.xml index 005439475..d4951c0b0 100644 --- a/pom.xml +++ b/pom.xml @@ -325,7 +325,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.0.0 + 3.1.0 org.codehaus.mojo @@ -438,22 +438,6 @@ - - org.apache.maven.plugins - maven-checkstyle-plugin - - ${project.root-directory}/checkstyle.xml - true - ${project.root-directory}/checkstyle-suppressions.xml - - - - - check - - - - org.codehaus.mojo findbugs-maven-plugin @@ -612,6 +596,7 @@ + root-directory @@ -624,5 +609,40 @@ . + + + + checkstyle-tests + + [1.8,) + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + com.puppycrawl.tools + checkstyle + 8.23 + + + + checkstyle.xml + true + checkstyle-suppressions.xml + + + + + check + + + + + + + diff --git a/samples/checkstyle.xml b/samples/checkstyle.xml deleted file mode 100644 index 66cd0c954..000000000 --- a/samples/checkstyle.xml +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8c5ca35fb..c7977fc01 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -33,23 +33,6 @@ - - maven-checkstyle-plugin - 3.0.0 - - ../../checkstyle.xml - true - false - ../../checkstyle-suppressions.xml - - - - - check - - - - org.codehaus.mojo findbugs-maven-plugin @@ -95,4 +78,41 @@ UTF-8 + + + + + checkstyle-tests + + [1.8,) + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + com.puppycrawl.tools + checkstyle + 8.23 + + + + ../../checkstyle.xml + true + ../../checkstyle-suppressions.xml + + + + + check + + + + + + + + From 527c578497655f1a3fa8d7a15157ba6087a2e76a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Aug 2019 14:51:52 -0400 Subject: [PATCH 148/983] Update to protobuf 3.9.1 (#766) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d4951c0b0..c0ac9bf8f 100644 --- a/pom.xml +++ b/pom.xml @@ -531,7 +531,7 @@ 3.0.2 2.8.5 2.9.9 - 3.6.1 + 3.9.1 28.0-android 1.1.4c 1.2 From 65210a8b804e8ffd82dda40dd843ed9fe65ef926 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 8 Aug 2019 11:52:12 -0700 Subject: [PATCH 149/983] Point README developer guide and setup instructions to the GitHub wiki (#765) --- README.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 04a3ee4af..b69b82a60 100644 --- a/README.md +++ b/README.md @@ -19,19 +19,29 @@ The library supports the following Java environments: The following related projects are built on the Google HTTP Client Library for Java: -- [Google OAuth Client Library for Java](https://github.com/googleapis/google-oauth-java-client), -for the OAuth 2.0 and OAuth 1.0a authorization standards. -- [Google APIs Client Library for Java](https://github.com/googleapis/google-api-java-client), for -access to Google APIs. +- [Google OAuth Client Library for Java][google-oauth-client], for the OAuth 2.0 and OAuth 1.0a +authorization standards. +- [Google APIs Client Library for Java][google-api-client], for access to Google APIs. -This is an open-source library, and -[contributions](https://developers.google.com/api-client-library/java/google-http-java-client/contribute) -are welcome. +This is an open-source library, and [contributions][contributions] are welcome. + +## Beta Features + +Features marked with the `@Beta` annotation at the class or method level are subject to change. They +might be modified in any way, or even removed, in any major release. You should not use beta +features if your code is a library itself (that is, if your code is used on the `CLASSPATH` of users +outside your own control). + +## Deprecated Features + +Deprecated non-beta features will be removed eighteen months after the release in which they are +first deprecated. You must fix your usages before this time. If you don't, any type of breakage +might result, and you are not guaranteed a compilation error. ## Documentation -- [Developer's Guide](https://developers.google.com/api-client-library/java/google-http-java-client/) -- [Setup Instructions](https://developers.google.com/api-client-library/java/google-http-java-client/setup) +- [Developer's Guide](https://github.com/googleapis/google-http-java-client/wiki) +- [Setup Instructions](https://github.com/googleapis/google-http-java-client/wiki/Setup-Instructions) - [JavaDoc](https://googleapis.dev/java/google-http-client/latest/) - [Release Notes](https://github.com/googleapis/google-http-java-client/releases) - [Support (Questions, Bugs)](https://developers.google.com/api-client-library/java/google-http-java-client/support) @@ -44,6 +54,7 @@ Java 7 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/b Java 8 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java8.svg)](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java8.html) Java 11 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java11.svg)](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java11.html) -## Links -- [Discuss](https://groups.google.com/group/google-http-java-client) +[google-oauth-client]: https://github.com/googleapis/google-oauth-java-client +[google-api-client]: https://github.com/googleapis/google-api-java-client +[contributions]: CONTRIBUTING.md From 4a9be873a16e31ef515d78c5c0908c1063822d68 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 9 Aug 2019 09:24:23 -0700 Subject: [PATCH 150/983] Regenerate common configuration files from our templates --- .kokoro/common.cfg | 4 ++-- .kokoro/continuous/common.cfg | 8 ++++---- .kokoro/continuous/dependencies.cfg | 4 ++-- .kokoro/continuous/integration.cfg | 4 ++-- .kokoro/continuous/java11.cfg | 4 ++-- .kokoro/continuous/java7.cfg | 4 ++-- .kokoro/continuous/java8.cfg | 4 ++-- .kokoro/continuous/lint.cfg | 8 ++++---- .kokoro/nightly/common.cfg | 8 ++++---- .kokoro/nightly/dependencies.cfg | 4 ++-- .kokoro/nightly/integration.cfg | 4 ++-- .kokoro/nightly/java11.cfg | 4 ++-- .kokoro/nightly/java7.cfg | 4 ++-- .kokoro/nightly/java8.cfg | 4 ++-- .kokoro/nightly/lint.cfg | 8 ++++---- .kokoro/presubmit/common.cfg | 8 ++++---- .kokoro/presubmit/dependencies.cfg | 4 ++-- .kokoro/presubmit/integration.cfg | 4 ++-- .kokoro/presubmit/java11.cfg | 4 ++-- .kokoro/presubmit/java7.cfg | 4 ++-- .kokoro/presubmit/java8.cfg | 4 ++-- .kokoro/presubmit/linkage-monitor.cfg | 4 ++-- .kokoro/presubmit/lint.cfg | 8 ++++---- .kokoro/release/common.cfg | 4 ++-- .kokoro/release/drop.cfg | 4 ++-- .kokoro/release/promote.cfg | 4 ++-- .kokoro/release/snapshot.cfg | 4 ++-- .kokoro/release/stage.cfg | 4 ++-- synth.metadata | 2 +- 29 files changed, 69 insertions(+), 69 deletions(-) diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index 6687c6bde..8399354bf 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -8,6 +8,6 @@ build_file: "google-http-java-client/.kokoro/trampoline.sh" # Tell the trampoline which build file to use. env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg index 582175deb..a5178e08c 100644 --- a/.kokoro/continuous/common.cfg +++ b/.kokoro/continuous/common.cfg @@ -14,11 +14,11 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" build_file: "google-http-java-client/.kokoro/trampoline.sh" env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } env_vars: { - key: "JOB_TYPE" - value: "test" + key: "JOB_TYPE" + value: "test" } diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg index 4de4271a3..b89a20740 100644 --- a/.kokoro/continuous/dependencies.cfg +++ b/.kokoro/continuous/dependencies.cfg @@ -2,8 +2,8 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/continuous/integration.cfg +++ b/.kokoro/continuous/integration.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg index b81a66a3c..709f2b4c7 100644 --- a/.kokoro/continuous/java11.cfg +++ b/.kokoro/continuous/java11.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" } diff --git a/.kokoro/continuous/java7.cfg b/.kokoro/continuous/java7.cfg index 584e8ea60..cb24f44ee 100644 --- a/.kokoro/continuous/java7.cfg +++ b/.kokoro/continuous/java7.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" } diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg index eb517a23e..6d323c8ae 100644 --- a/.kokoro/continuous/lint.cfg +++ b/.kokoro/continuous/lint.cfg @@ -3,11 +3,11 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "lint" + key: "JOB_TYPE" + value: "lint" } \ No newline at end of file diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg index 582175deb..a5178e08c 100644 --- a/.kokoro/nightly/common.cfg +++ b/.kokoro/nightly/common.cfg @@ -14,11 +14,11 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" build_file: "google-http-java-client/.kokoro/trampoline.sh" env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } env_vars: { - key: "JOB_TYPE" - value: "test" + key: "JOB_TYPE" + value: "test" } diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg index 4de4271a3..b89a20740 100644 --- a/.kokoro/nightly/dependencies.cfg +++ b/.kokoro/nightly/dependencies.cfg @@ -2,8 +2,8 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg index b81a66a3c..709f2b4c7 100644 --- a/.kokoro/nightly/java11.cfg +++ b/.kokoro/nightly/java11.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" } diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg index 584e8ea60..cb24f44ee 100644 --- a/.kokoro/nightly/java7.cfg +++ b/.kokoro/nightly/java7.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" } diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/nightly/java8.cfg +++ b/.kokoro/nightly/java8.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/nightly/lint.cfg b/.kokoro/nightly/lint.cfg index eb517a23e..6d323c8ae 100644 --- a/.kokoro/nightly/lint.cfg +++ b/.kokoro/nightly/lint.cfg @@ -3,11 +3,11 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "lint" + key: "JOB_TYPE" + value: "lint" } \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index 48b591f7c..709e429bf 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -14,13 +14,13 @@ gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" build_file: "google-http-java-client/.kokoro/trampoline.sh" env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/build.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/build.sh" } env_vars: { - key: "JOB_TYPE" - value: "test" + key: "JOB_TYPE" + value: "test" } before_action { diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg index 4de4271a3..b89a20740 100644 --- a/.kokoro/presubmit/dependencies.cfg +++ b/.kokoro/presubmit/dependencies.cfg @@ -2,8 +2,8 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg index b81a66a3c..709f2b4c7 100644 --- a/.kokoro/presubmit/java11.cfg +++ b/.kokoro/presubmit/java11.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" } diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg index 584e8ea60..cb24f44ee 100644 --- a/.kokoro/presubmit/java7.cfg +++ b/.kokoro/presubmit/java7.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" } diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 34f6c33e5..3b017fc80 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -2,6 +2,6 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg index c32b0b938..20ab48cc8 100644 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -2,8 +2,8 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg index eb517a23e..6d323c8ae 100644 --- a/.kokoro/presubmit/lint.cfg +++ b/.kokoro/presubmit/lint.cfg @@ -3,11 +3,11 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "lint" + key: "JOB_TYPE" + value: "lint" } \ No newline at end of file diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 5e39fef43..cbcd33991 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -8,8 +8,8 @@ build_file: "google-http-java-client/.kokoro/trampoline.sh" # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } before_action { diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg index 51ac729d0..48da9c343 100644 --- a/.kokoro/release/drop.cfg +++ b/.kokoro/release/drop.cfg @@ -1,8 +1,8 @@ # Format: //devtools/kokoro/config/proto/build.proto env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/drop.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/drop.sh" } # Download staging properties file. diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg index 2d06e55e8..2fb22c3fe 100644 --- a/.kokoro/release/promote.cfg +++ b/.kokoro/release/promote.cfg @@ -1,8 +1,8 @@ # Format: //devtools/kokoro/config/proto/build.proto env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/promote.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/promote.sh" } # Download staging properties file. diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg index f6afdf68c..865cff806 100644 --- a/.kokoro/release/snapshot.cfg +++ b/.kokoro/release/snapshot.cfg @@ -1,6 +1,6 @@ # Format: //devtools/kokoro/config/proto/build.proto env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/snapshot.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/snapshot.sh" } \ No newline at end of file diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index 4ea285a5a..3463d3d7b 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -1,8 +1,8 @@ # Format: //devtools/kokoro/config/proto/build.proto env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/stage.sh" + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/stage.sh" } # Need to save the properties file diff --git a/synth.metadata b/synth.metadata index 1eff26d99..e2dc83f87 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-07-31T20:12:46.410742Z", + "updateTime": "2019-08-09T08:09:03.535997Z", "sources": [ { "template": { From 4c859ff834690833b1c2ae817b9e2868ca8764b9 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 19 Aug 2019 21:26:38 +0300 Subject: [PATCH 151/983] deps: Update OpenCensus packages to v0.23.0 (#789) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c0ac9bf8f..d7d5e8b69 100644 --- a/pom.xml +++ b/pom.xml @@ -537,7 +537,7 @@ 1.2 4.5.9 4.4.11 - 0.21.0 + 0.23.0 .. false From 04d27047d5e0e1860eff86403005535f8f7ec079 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 19 Aug 2019 16:09:09 -0700 Subject: [PATCH 152/983] build: fix missing version warnings (#792) --- google-http-client-bom/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 72b523920..dbd337f6b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -126,13 +126,17 @@ + org.apache.maven.plugins maven-javadoc-plugin + 3.1.1 true + org.apache.maven.plugins maven-site-plugin + 3.8.2 true From 371e22488dff73a847cce96371563d37029d6a5a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Aug 2019 10:07:53 -0700 Subject: [PATCH 153/983] chore: regenerate common configuration from templates --- .github/ISSUE_TEMPLATE/bug_report.md | 6 +++--- .github/ISSUE_TEMPLATE/feature_request.md | 19 +++++++++++-------- synth.metadata | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6b028d0fe..a91d98f16 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -13,11 +13,11 @@ Please run down the following list and make sure you've tried the usual "quick f - Search the issues already opened: https://github.com/googleapis/google-http-client/issues - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform -If you are still having issues, please be sure to include as much information as possible: +If you are still having issues, please include as much information as possible: #### Environment details -1. Specify the API at the beginning of the title (for example, "BigQuery: ...") +1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). General, Core, and Other are also allowed as types 2. OS type and version: 3. Java version: @@ -39,7 +39,7 @@ If you are still having issues, please be sure to include as much information as Any relevant stacktrace here. ``` -#### External references such as API reference guides used +#### External references such as API reference guides - ? diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 4490605ae..754e30c68 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,11 +8,14 @@ Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Example: I'm always frustrated when [...] - **Describe the solution you'd like** -A clear and concise description of what you want to happen. - **Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - **Additional context** -Add any other context or screenshots about the feature request here. +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/synth.metadata b/synth.metadata index e2dc83f87..ce8b6c917 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-09T08:09:03.535997Z", + "updateTime": "2019-08-20T08:09:10.578787Z", "sources": [ { "template": { From 161342172b56f8f7ad90023b52f55857ca3e7420 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Aug 2019 13:23:49 -0700 Subject: [PATCH 154/983] chore: regenerate common configuration from templates --- .kokoro/continuous/propose_release.cfg | 2 +- .kokoro/continuous/propose_release.sh | 0 .kokoro/release/bump_snapshot.sh | 0 synth.metadata | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 .kokoro/continuous/propose_release.sh mode change 100644 => 100755 .kokoro/release/bump_snapshot.sh diff --git a/.kokoro/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg index aac26b203..715a53e14 100644 --- a/.kokoro/continuous/propose_release.cfg +++ b/.kokoro/continuous/propose_release.cfg @@ -21,7 +21,7 @@ env_vars: { env_vars: { key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/bump_snapshot.sh" + value: "github/google-http-java-client/.kokoro/continuous/propose_release.sh" } # tokens used by release-please to keep an up-to-date release PR. diff --git a/.kokoro/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh old mode 100644 new mode 100755 diff --git a/.kokoro/release/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh old mode 100644 new mode 100755 diff --git a/synth.metadata b/synth.metadata index ce8b6c917..fbaf086de 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-20T08:09:10.578787Z", + "updateTime": "2019-08-27T08:10:09.160937Z", "sources": [ { "template": { From c557a1056257a3b0ef8eda8e85742e45eba5b624 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 28 Aug 2019 06:49:17 -0700 Subject: [PATCH 155/983] chore: regenerate common templates (#802) --- .kokoro/continuous/propose_release.sh | 2 +- synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh index da0e23e6f..062063eb4 100755 --- a/.kokoro/continuous/propose_release.sh +++ b/.kokoro/continuous/propose_release.sh @@ -25,5 +25,5 @@ if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; th --package-name="google-http-client" \ --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ - --release-type=java-auth-yoshi + --release-type=java-yoshi fi diff --git a/synth.metadata b/synth.metadata index fbaf086de..cb616b6ec 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-27T08:10:09.160937Z", + "updateTime": "2019-08-28T08:05:40.046451Z", "sources": [ { "template": { From 41f6a2f1d73df04119c32490fa1f26d6a6bc48be Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 28 Aug 2019 09:40:25 -0700 Subject: [PATCH 156/983] fix: OpenCensus spans should close on IOExceptions (#797) * chore: add basic test for OpenCensus spans * chore: add failing test for closing spans on IOExceptions * fix: close SENT span if the IOException was not handled before rethrowing * relax curl logger tests for added opencensus header * fix: address PR comments * chore: remove unused helper * fix: dependency warning for opencensus-impl * chore: cleanup PR comments --- google-http-client/pom.xml | 35 +++- .../google/api/client/http/HttpRequest.java | 2 + .../api/client/http/HttpRequestTest.java | 21 +-- .../client/http/HttpRequestTracingTest.java | 153 ++++++++++++++++++ pom.xml | 10 ++ 5 files changed, 201 insertions(+), 20 deletions(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index fe8e384d4..f748898e4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -16,6 +16,18 @@ + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + io.opencensus:opencensus-impl + + + + maven-javadoc-plugin @@ -84,6 +96,19 @@ com.google.guava guava + + com.google.j2objc + j2objc-annotations + + + io.opencensus + opencensus-api + + + io.opencensus + opencensus-contrib-http-util + + com.google.guava guava-testlib @@ -104,17 +129,15 @@ mockito-all test - - com.google.j2objc - j2objc-annotations - io.opencensus - opencensus-api + opencensus-impl + test io.opencensus - opencensus-contrib-http-util + opencensus-testing + test diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 57adecde5..c53c10e07 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1013,6 +1013,8 @@ public HttpResponse execute() throws IOException { if (!retryOnExecuteIOException && (ioExceptionHandler == null || !ioExceptionHandler.handleIOException(this, retryRequest))) { + // static analysis shows response is always null here + span.end(OpenCensusUtils.getEndSpanOptions(null)); throw e; } // Save the exception in case the retries do not work and we need to re-throw it later. diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index f024e05cb..66b6449eb 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -1222,13 +1222,9 @@ public void testExecute_curlLogger() throws Exception { for (String message : recorder.messages()) { if (message.startsWith("curl")) { found = true; - assertEquals( - "curl -v --compressed -H 'Accept-Encoding: gzip' -H 'User-Agent: " - + "Google-HTTP-Java-Client/" - + HttpRequest.VERSION - + " (gzip)" - + "' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'", - message); + assertTrue(message.contains("curl -v --compressed -H 'Accept-Encoding: gzip'")); + assertTrue(message.contains("-H 'User-Agent: Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)'")); + assertTrue(message.contains("' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'")); } } assertTrue(found); @@ -1253,16 +1249,13 @@ public void testExecute_curlLoggerWithContentEncoding() throws Exception { .execute(); boolean found = false; - final String expectedCurlLog = - "curl -v --compressed -X POST -H 'Accept-Encoding: gzip' " - + "-H 'User-Agent: " - + HttpRequest.USER_AGENT_SUFFIX - + "' -H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip' " - + "-d '@-' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c' << $$$"; for (String message : recorder.messages()) { if (message.startsWith("curl")) { found = true; - assertEquals(expectedCurlLog, message); + assertTrue(message.contains("curl -v --compressed -X POST -H 'Accept-Encoding: gzip'")); + assertTrue(message.contains("-H 'User-Agent: " + HttpRequest.USER_AGENT_SUFFIX + "'")); + assertTrue(message.contains("-H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip'")); + assertTrue(message.contains("-d '@-' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c' << $$$")); } } assertTrue(found); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java new file mode 100644 index 000000000..5d89f0350 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -0,0 +1,153 @@ +/* + * 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 com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import io.opencensus.common.Functions; +import io.opencensus.testing.export.TestHandler; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.MessageEvent; +import io.opencensus.trace.Status; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.export.SpanData; +import io.opencensus.trace.samplers.Samplers; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.util.List; + +import static com.google.api.client.http.OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class HttpRequestTracingTest { + private static final TestHandler testHandler = new TestHandler(); + + @Before + public void setupTestTracer() { + Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); + TraceParams params = + Tracing.getTraceConfig() + .getActiveTraceParams() + .toBuilder() + .setSampler(Samplers.alwaysSample()) + .build(); + Tracing.getTraceConfig().updateActiveTraceParams(params); + } + + @After + public void teardownTestTracer() { + Tracing.getExportComponent().getSpanExporter().unregisterHandler("test"); + } + + @Test(timeout = 20_000L) + public void executeCreatesSpan() throws IOException { + MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse() + .setStatusCode(200); + HttpTransport transport = new MockHttpTransport.Builder() + .setLowLevelHttpResponse(mockResponse) + .build(); + HttpRequest request = new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); + request.execute(); + + // This call blocks - we set a timeout on this test to ensure we don't wait forever + List spans = testHandler.waitForExport(1); + assertEquals(1, spans.size()); + SpanData span = spans.get(0); + + // Ensure the span name is set + assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); + + // Ensure we have basic span attributes + assertAttributeEquals(span, "http.path", "/"); + assertAttributeEquals(span, "http.host", "google.com"); + assertAttributeEquals(span, "http.url", "https://google.com/"); + assertAttributeEquals(span, "http.method", "GET"); + + // Ensure we have a single annotation for starting the first attempt + assertEquals(1, span.getAnnotations().getEvents().size()); + + // Ensure we have 2 message events, SENT and RECEIVED + assertEquals(2, span.getMessageEvents().getEvents().size()); + assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + assertEquals(MessageEvent.Type.RECEIVED, span.getMessageEvents().getEvents().get(1).getEvent().getType()); + + // Ensure we record the span status as OK + assertEquals(Status.OK, span.getStatus()); + } + + @Test(timeout = 20_000L) + public void executeExceptionCreatesSpan() throws IOException { + HttpTransport transport = new MockHttpTransport.Builder() + .setLowLevelHttpRequest(new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + throw new IOException("some IOException"); + } + }) + .build(); + HttpRequest request = new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); + + try { + request.execute(); + fail("expected to throw an IOException"); + } catch (IOException expected) { + } + + // This call blocks - we set a timeout on this test to ensure we don't wait forever + List spans = testHandler.waitForExport(1); + assertEquals(1, spans.size()); + SpanData span = spans.get(0); + + // Ensure the span name is set + assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); + + // Ensure we have basic span attributes + assertAttributeEquals(span, "http.path", "/"); + assertAttributeEquals(span, "http.host", "google.com"); + assertAttributeEquals(span, "http.url", "https://google.com/"); + assertAttributeEquals(span, "http.method", "GET"); + + // Ensure we have a single annotation for starting the first attempt + assertEquals(1, span.getAnnotations().getEvents().size()); + + // Ensure we have 2 message events, SENT and RECEIVED + assertEquals(1, span.getMessageEvents().getEvents().size()); + assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + + // Ensure we record the span status as UNKNOWN + assertEquals(Status.UNKNOWN, span.getStatus()); } + + void assertAttributeEquals(SpanData span, String attributeName, String expectedValue) { + Object attributeValue = span.getAttributes().getAttributeMap().get(attributeName); + assertNotNull("expected span to contain attribute: " + attributeName, attributeValue); + assertTrue(attributeValue instanceof AttributeValue); + String value = ((AttributeValue) attributeValue).match( + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnNull()); + assertEquals(expectedValue, value); + } +} diff --git a/pom.xml b/pom.xml index d7d5e8b69..74d26649c 100644 --- a/pom.xml +++ b/pom.xml @@ -242,6 +242,16 @@ opencensus-contrib-http-util ${project.opencensus.version} + + io.opencensus + opencensus-impl + ${project.opencensus.version} + + + io.opencensus + opencensus-testing + ${project.opencensus.version} + From 0e6d4519ae2b0557960b5d2c27abd7c952fbc24f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 30 Aug 2019 13:49:12 -0600 Subject: [PATCH 157/983] fix: disable uri normalization in ApacheHttpRequest (#804) * fix: disable uri normalization in ApacheHttpRequest * test: add in-memory, local webserver for testing requested url * fix: use try-with-resources on OutputStream * fix: provide port of 0 to let InetSocketAddress pick a port --- .../http/apache/v2/ApacheHttpRequest.java | 1 + .../apache/v2/ApacheHttpTransportTest.java | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java index 447edae66..ba58c2ef0 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java @@ -40,6 +40,7 @@ final class ApacheHttpRequest extends LowLevelHttpRequest { // disable redirects as google-http-client handles redirects this.requestConfig = RequestConfig.custom() .setRedirectsEnabled(false) + .setNormalizeUri(false) // TODO(chingor): configure in HttpClientBuilder when available .setStaleConnectionCheckEnabled(false); } diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index dabd9bf3d..8e61afba6 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -22,10 +22,17 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import com.google.api.client.http.GenericUrl; import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.ByteArrayStreamingContent; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; import java.io.IOException; +import java.io.OutputStream; +import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; +import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.http.Header; @@ -175,4 +182,33 @@ public void process(HttpRequest request, HttpContext context) } assertTrue("Expected to have called our test interceptor", interceptorCalled.get()); } + + @Test + public void testNormalizedUrl() throws IOException { + HttpServer server = HttpServer.create(new InetSocketAddress(0), 0); + server.createContext( + "/", + new HttpHandler() { + @Override + public void handle(HttpExchange httpExchange) throws IOException { + byte[] response = httpExchange.getRequestURI().toString().getBytes(); + httpExchange.sendResponseHeaders(200, response.length); + try (OutputStream out = httpExchange.getResponseBody()) { + out.write(response); + } + } + }); + server.start(); + + ApacheHttpTransport transport = new ApacheHttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getAddress().getPort()); + com.google.api.client.http.HttpResponse response = + transport + .createRequestFactory() + .buildGetRequest(testUrl) + .execute(); + assertEquals(200, response.getStatusCode()); + assertEquals("/foo//bar", response.parseAsString()); + } } From 125451df38194bf60ffb9f74e84c74fcfd82fe99 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 30 Aug 2019 13:59:48 -0600 Subject: [PATCH 158/983] docs: migrate docs into source control from the wiki (#807) * docs: migrate docs into source control from the wiki * docs: update wiki links to the github pages urls * docs: fix links * docs: fix markdown formatting --- .gitignore | 3 - README.md | 4 +- docs/_config.yml | 2 + docs/_data/navigation.yml | 17 +++ docs/_layouts/default.html | 54 +++++++ docs/android.md | 101 +++++++++++++ docs/component-modules.md | 52 +++++++ docs/exponential-backoff.md | 78 ++++++++++ docs/google-app-engine.md | 44 ++++++ docs/http-transport.md | 136 ++++++++++++++++++ docs/index.md | 49 +++++++ docs/json.md | 276 ++++++++++++++++++++++++++++++++++++ docs/setup.md | 80 +++++++++++ docs/unit-testing.md | 52 +++++++ 14 files changed, 943 insertions(+), 5 deletions(-) create mode 100644 docs/_config.yml create mode 100644 docs/_data/navigation.yml create mode 100644 docs/_layouts/default.html create mode 100644 docs/android.md create mode 100644 docs/component-modules.md create mode 100644 docs/exponential-backoff.md create mode 100644 docs/google-app-engine.md create mode 100644 docs/http-transport.md create mode 100644 docs/index.md create mode 100644 docs/json.md create mode 100644 docs/setup.md create mode 100644 docs/unit-testing.md diff --git a/.gitignore b/.gitignore index cb264df74..b7c3b9ec7 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,5 @@ nosetests.xml **/.classpath **/.checkstyle -# Built documentation -docs/ - # Python utilities *.pyc diff --git a/README.md b/README.md index b69b82a60..5b5d4f1c2 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ might result, and you are not guaranteed a compilation error. ## Documentation -- [Developer's Guide](https://github.com/googleapis/google-http-java-client/wiki) -- [Setup Instructions](https://github.com/googleapis/google-http-java-client/wiki/Setup-Instructions) +- [Developer's Guide](https://googleapis.github.io/google-http-java-client/) +- [Setup Instructions](https://googleapis.github.io/google-http-java-client/setup.html) - [JavaDoc](https://googleapis.dev/java/google-http-client/latest/) - [Release Notes](https://github.com/googleapis/google-http-java-client/releases) - [Support (Questions, Bugs)](https://developers.google.com/api-client-library/java/google-http-java-client/support) diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 000000000..0c830d027 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,2 @@ +theme: jekyll-theme-dinky +title: Google HTTP Client for Java diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml new file mode 100644 index 000000000..f2d85a0d1 --- /dev/null +++ b/docs/_data/navigation.yml @@ -0,0 +1,17 @@ +toc: + - page: Overview + url: index.html + - page: Setup Instructions + url: setup.html + - page: Component Modules + url: component-modules.html + - page: Android + url: android.html + - page: Google App Engine + url: google-app-engine.html + - page: JSON + url: json.html + - page: Exponential Backoff + url: exponential-backoff.html + - page: Unit Testing + url: unit-testing.html \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 000000000..b3e7d30e6 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,54 @@ + + + + + + +{% seo %} + + + + + + +

            +
            +

            {{ site.title | default: site.github.repository_name }}

            + + {% for entry in site.data.navigation.toc %} + {{ entry.page }}
            + {% endfor %} +
            + + +
            + +
            + {{ content }} +
            + + +
            + + {% if site.google_analytics %} + + {% endif %} + + \ No newline at end of file diff --git a/docs/android.md b/docs/android.md new file mode 100644 index 000000000..35a607e13 --- /dev/null +++ b/docs/android.md @@ -0,0 +1,101 @@ +--- +title: Using the Google HTTP Client Library for Java on Android +--- + +# Using the Google HTTP Client Library for Java on Android + +If you are developing for Android and the Google API you want to use is included in the +[Google Play Services library](https://developer.android.com/google/play-services/index.html), use +that library for the best performance and experience. If the Google API you want to use with Android +is not part of the Google Play Services library, you can use the Google HTTP Client Library for +Java, which supports Android 1.5 (or higher), and which is described here. + +## Beta + +Android support for the Google HTTP Client Library for Java is `@Beta`. + +## Installation + +Follow the download instructions on the [setup][setup] page, and pay special attention to the +Android instructions for [ProGuard][proguard]. Using ProGuard or a similar tool to remove unused +code and compress it is critical for minimizing application size. For example, for the +[tasks-android-sample][tasks-android-sample], ProGuard reduces the application size ~88%, from +777KB to 93KB. + +Note that ProGuard only runs when preparing your application for release; it does not run when +preparing it for debugging, to make it easier to develop. However, be sure to test your application +in release mode, because if ProGuard is misconfigured it can cause problems that are sometimes a +challenge to debug. + +**Warning:** For Android, you MUST place the jar files in a directory named "libs" so that the APK +packager can find them. Otherwise, you will get a `NoClassDefFoundError` error at runtime. + +## Data models + +### JSON + +You have a choice of three [pluggable streaming JSON libraries][json]. Options include +[`JacksonFactory`][jackson-factory] for maximum efficiency, or +[`AndroidJsonFactory`][android-json-factory] for the smallest application size on Honeycomb +(SDK 3.0) or higher. + +### XML (`@Beta`) + +The [XML data model][xml] (`@Beta`) is optimized for efficient memory usage that minimizes parsing +and serialization time. Only the fields you need are actually parsed when processing an XML +response. + +Android already has an efficient, native, built-in XML full parser implementation, so no separate +library is needed or advised. + +## Authentication + +The best practice on Android (since the 2.1 SDK) is to use the [`AccountManager`][account-manager] +class (@Beta) for centralized identity management and credential token storage. We recommend against +using your own solution for storing user identities and credentials. + +For details about using the AccountManager with the HTTP service that you need, read the +documentation for that service. + +## HTTP transport + +If your application is targeted at Android 2.3 (Gingerbread) or higher, use the +[`NetHttpTransport`][net-http-transport] class. This class isbased on `HttpURLConnection`, which is +built into the Android SDK and is found in all Java SDKs. + +In prior Android SDKs, however, the implementation of `HttpURLConnection` was buggy, and the Apache +HTTP client was preferred. For those SDKs, use the [`ApacheHttpTransport`][apache-http-transport] +class. + +If your Android application needs to work with all Android SDKs, call +[`AndroidHttp.newCompatibleTransport()`][android-transport] (@Beta), and it will decide which of the +two HTTP transport classes to use, based on the Android SDK level. + +## Logging + +To enable logging of HTTP requests and responses, including URL, headers, and content: + +```java +Logger.getLogger(HttpTransport.class.getName()).setLevel(Level.CONFIG); +``` + +When you use `Level.CONFIG`, the value of the Authorization header is not shown. To show the +Authorization header, use `Level.ALL`. + +Furthermore, you must enable logging on your device as follows: + +```java +adb shell setprop log.tag.HttpTransport DEBUG +``` + +[setup]: https://googleapis.github.io/google-http-java-client/setup.html +[proguard]: https://googleapis.github.io/google-http-java-client/setup.html#proguard +[tasks-android-sample]: https://github.com/google/google-api-java-client-samples/tree/master/tasks-android-sample +[json]: https://googleapis.github.io/google-http-java-client/json.html +[jackson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/jackson2/JacksonFactory.html +[android-json-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/android/json/AndroidJsonFactory.html +[xml]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/xml/package-summary.html +[account-manager]: http://developer.android.com/reference/android/accounts/AccountManager.html +[net-http-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/javanet/NetHttpTransport.html +[apache-http-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/apache/ApacheHttpTransport.html +[android-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/android/http/AndroidHttp.html#newCompatibleTransport-- \ No newline at end of file diff --git a/docs/component-modules.md b/docs/component-modules.md new file mode 100644 index 000000000..1f9273d76 --- /dev/null +++ b/docs/component-modules.md @@ -0,0 +1,52 @@ +--- +title: Component Modules +--- + +# Component Modules + +This libraries is composed of several modules: + +## google-http-client + +Google HTTP Client Library for Java (google-http-client) is designed to be compatible with all +supported Java platforms, including Android. + +## google-http-client-android + +Android extensions to the Google HTTP Client Library for Java (`google-http-client-android`) support +Java Google Android (only for SDK >= 2.1) applications. This module depends on `google-http-client`. + +## google-http-client-apache-v2 + +Apache extension to the Google HTTP Client Library for Java (`google-http-client-apache-v2`) that +contains an implementation of `HttpTransport` based on the Apache HTTP Client. This module depends +on `google-http-client`. + +## google-http-client-appengine + +Google App Engine extensions to the Google HTTP Client Library for Java +(`google-http-client-appengine`) support Java Google App Engine applications. This module depends on +`google-http-client`. + +## google-http-client-gson + +GSON extension to the Google HTTP Client Library for Java (`google-http-client-gson`) that contains +an implementation of `JsonFactory` based on the GSON API. This module depends on google-http-client. + +## google-http-client-jackson2 + +Jackson2 extension to the Google HTTP Client Library for Java (`google-http-client-jackson2`) that +contains an implementation of `JsonFactory` based on the Jackson2 API. This module depends on +`google-http-client`. + +## google-http-client-protobuf + +[Protocol buffer][protobuf] extensions to theGoogle HTTP Client Library for Java +(`google-http-client-protobuf`) support protobuf data format. This module depends on `google-http-client`. + +## google-http-client-xml + +XML extensions to the Google HTTP Client Library for Java (`google-http-client-xml`) support the XML +data format. This module depends on `google-http-client`. + +[protobuf]: https://developers.google.com/protocol-buffers/docs/overview \ No newline at end of file diff --git a/docs/exponential-backoff.md b/docs/exponential-backoff.md new file mode 100644 index 000000000..b7732e19e --- /dev/null +++ b/docs/exponential-backoff.md @@ -0,0 +1,78 @@ +--- +title: Exponential Backoff +--- + +# Exponential Backoff + +Exponential backoff is an algorithm that retries requests to the server based on certain status +codes in the server response. The retries exponentially increase the waiting time up to a certain +threshold. The idea is that if the server is down temporarily, it is not overwhelmed with requests +hitting at the same time when it comes back up. + +The exponential backoff feature of the Google HTTP Client Library for Java provides an easy way to +retry on transient failures: + +* Provide an instance of [`HttpUnsuccessfulResponseHandler`][http-unsuccessful-response-handler] to +the HTTP request in question. +* Use the library's [`HttpBackOffUnsuccessfulResponseHandler`][http-backoff-handler] implementation +to handle abnormal HTTP responses with some kind of [`BackOff`][backoff] policy. +* Use [`ExponentialBackOff`][exponential-backoff] for this backoff policy. + +Backoff is turned off by default in [`HttpRequest`][http-request]. The examples below demonstrate +how to turn it on. + +## Examples + +To set [`HttpRequest`][http-request] to use +[`HttpBackOffUnsuccessfulResponseHandler`][http-backoff-handler] with default values: + +```java +HttpRequest request = ... +request.setUnsuccessfulResponseHandler(new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff())); +// HttpBackOffUnsuccessfulResponseHandler is designed to work with only one HttpRequest at a time. +// As a result, you MUST create a new instance of HttpBackOffUnsuccessfulResponseHandler with a new +// instance of BackOff for each instance of HttpRequest. +HttpResponse = request.execute(); +``` + +To alter the detailed parameters of [`ExponentialBackOff`][exponential-backoff], use its +[`Builder`][exponential-backoff-builder] methods: + +```java +ExponentialBackOff backoff = new ExponentialBackOff.Builder() + .setInitialIntervalMillis(500) + .setMaxElapsedTimeMillis(900000) + .setMaxIntervalMillis(6000) + .setMultiplier(1.5) + .setRandomizationFactor(0.5) + .build(); +request.setUnsuccessfulResponseHandler(new HttpBackOffUnsuccessfulResponseHandler(backoff)); +``` + +To create your own implementation of [`BackOff`][backoff]: + +```java +class CustomBackOff implements BackOff { + + @Override + public long nextBackOffMillis() throws IOException { + ... + } + + @Override + public void reset() throws IOException { + ... + } +} + +request.setUnsuccessfulResponseHandler( + new HttpBackOffUnsuccessfulResponseHandler(new CustomBackOff())); +``` + + +[http-unsuccessful-response-handler]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpUnsuccessfulResponseHandler.html +[http-backoff-handler]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.html +[backoff]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/BackOff.html +[exponential-backoff]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/ExponentialBackOff.html +[http-request]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpRequest.html +[exponential-backoff-builder]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/ExponentialBackOff.Builder.html \ No newline at end of file diff --git a/docs/google-app-engine.md b/docs/google-app-engine.md new file mode 100644 index 000000000..ccd83e910 --- /dev/null +++ b/docs/google-app-engine.md @@ -0,0 +1,44 @@ +--- +title: Using the Google HTTP Client Library for Java on Google App Engine +--- + +# Using the Google HTTP Client Library for Java on Google App Engine + +Google App Engine is one of the supported Java environments for the Google HTTP Client Library for Java. + +## Data models + +### JSON + +The [JSON data model][json-package] is optimized for efficient memory usage that minimizes parsing +and serialization time. Only the fields you need are actually parsed when processing a JSON +response. + +For your JSON parser, we recommend [`JacksonFactory`][jackson-factory], which is based on the +popular Jackson library. It is considered the fastest in terms of parsing/serialization. You can +also use [`GsonFactory'][gson-factory], which is based on the [Google GSON][gson] library. It is a +lighter-weight option (smaller size) that is fairly fast, but it is not quite as fast as Jackson. + +### XML (@Beta) + +The [XML datamodel][xml-package] (`@Beta`) is optimized for efficient memory usage that minimizes +parsing and serialization time. Only the fields you need are actually parsed when processing an XML +response. + +## HTTP transport + +If you have configured Google App Engine to use [`urlfetch` as the stream handler][url-fetch], then +you will use the [`UrlFetchTransport`][url-fetch-transport] provided by +`google-http-client-appengine`. + +If you are not using `urlfetch`, then you can use any of the provided +[HttpTransport][http-transport] adapters. + +[json-package]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/package-summary.html +[jackson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/jackson2/JacksonFactory.html +[gson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/gson/GsonFactory.html +[gson]: https://github.com/google/gson +[xml-package]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/xml/package-summary.html +[url-fetch]: https://cloud.google.com/appengine/docs/standard/java/issue-requests#using_urlfetch_in_a_java_8_app +[url-fetch-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/appengine/http/UrlFetchTransport.html +[http-transport]: https://googleapis.github.io/google-http-java-client/http-transport.html \ No newline at end of file diff --git a/docs/http-transport.md b/docs/http-transport.md new file mode 100644 index 000000000..ab5b50bd8 --- /dev/null +++ b/docs/http-transport.md @@ -0,0 +1,136 @@ +--- +title: Pluggable HTTP Transport +--- + +# Pluggable HTTP Transport + +The HTTP library has a fully pluggable HTTP transport layer that allows you to build on top of the +low-level HTTP of your choice and optimize for the Java platform your application is running on. + +Thanks to this abstraction, code written for one platform works across all supported platforms, from +mobile applications such as those built for Android, to installed applications, to web applications +such as those built on Google App Engine. The HTTP library provides high-level functionality that is +compatible across these platforms, but at the same time takes advantage of lower-level functionality +when necessary. + +## Choosing a low-level HTTP transport library + +There are three built-in low-level HTTP transports: + +1. [`NetHttpTransport`][net-http-transport]: based on [`HttpURLConnection`][http-url-connection] +that is found in all Java SDKs, and thus usually the simplest choice. +1. [`ApacheHttpTransport`][apache-http-transport]: based on the popular +[Apache HttpClient][apache-http-client] that allows for more customization. +1. [`UrlFetchTransport`][url-fetch-transport]: based on the [URL Fetch Java API][url-fetch] in the +Google App Engine SDK. + +## Logging + +[`java.util.logging.Logger`][logger] is used for logging HTTP request and response details, +including URL, headers, and content. + +Normally logging is managed using a [`logging.properties`][logging-properties] file. For example: + +```properties +# Properties file which configures the operation of the JDK logging facility. +# The system will look for this config file to be specified as a system property: +# -Djava.util.logging.config.file=${project_loc:googleplus-simple-cmdline-sample}/logging.properties + +# Set up the console handler (uncomment "level" to show more fine-grained messages) +handlers = java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.level = CONFIG + +# Set up logging of HTTP requests and responses (uncomment "level" to show) +com.google.api.client.http.level = CONFIG +``` + +The following example uses the [`ConsoleHandler`][console-handler]. Another popular choice is +[`FileHandler`][file-handler]. + +Example for enabling logging in code: + +```java +import com.google.api.client.http.HttpTransport; +import java.util.logging.Handler; +import java.util.logging.Level; +import java.util.logging.LogRecord; +import java.util.logging.Logger; + +public static void enableLogging() { + Logger logger = Logger.getLogger(HttpTransport.class.getName()); + logger.setLevel(Level.CONFIG); + logger.addHandler(new Handler() { + + @Override + public void close() throws SecurityException { + } + + @Override + public void flush() { + } + + @Override + public void publish(LogRecord record) { + // Default ConsoleHandler will print >= INFO to System.err. + if (record.getLevel().intValue() < Level.INFO.intValue()) { + System.out.println(record.getMessage()); + } + } + }); +} +``` + +**Note:** When using `Level.CONFIG`, the value of the Authorization header is not shown. To show +that also, use `Level.ALL` instead of `Level.CONFIG`. + +## Handling HTTP error responses + +When an HTTP error response (an HTTP status code of 300 or higher) is received, +[`HttpRequest.execute()`][request-execute] throws an [`HttpResponseException`][response-exeception]. +Here's an example usage: + +```java +try { + request.execute() +} catch (HttpResponseException e) { + System.err.println(e.getStatusMessage()); +} +``` + +If you need to intercept error responses, it may be handy to use the +[`HttpUnsuccessfulResponseHandler`][http-unsuccessful-response-handler]. Example usage: + +```java +public static class MyInitializer implements HttpRequestInitializer, HttpUnsuccessfulResponseHandler { + + @Override + public boolean handleResponse( + HttpRequest request, HttpResponse response, boolean retrySupported) throws IOException { + System.out.println(response.getStatusCode() + " " + response.getStatusMessage()); + return false; + } + + @Override + public void initialize(HttpRequest request) throws IOException { + request.setUnsuccessfulResponseHandler(this); + } +} + +... + +HttpRequestFactory requestFactory = transport.createRequestFactory(new MyInitializer()); +``` + +[net-http-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/javanet/NetHttpTransport.html +[http-url-connection]: http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html +[apache-http-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/apache/v2/ApacheHttpTransport.html +[apache-http-client]: http://hc.apache.org/httpcomponents-client-ga/index.html +[url=fetch-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/appengine/http/UrlFetchTransport.html +[url-fetch]: https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-summary +[logger]: https://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html +[logging-properties]: https://github.com/google/google-http-java-client/blob/master/samples/googleplus-simple-cmdline-sample/logging.properties +[console-handler]: https://docs.oracle.com/javase/7/docs/api/java/util/logging/ConsoleHandler.html +[file-handler]: https://docs.oracle.com/javase/7/docs/api/java/util/logging/FileHandler.html +[request-execute]: https://googleapis.dev/java/google-http-client/latest/com/google/api/client/http/HttpRequest.html#execute-- +[response-exception]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpResponseException.html +[http-unsuccessful-response-handler]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpUnsuccessfulResponseHandler.html \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..5eb9ff04b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,49 @@ +--- +title: Overview +--- + +# Overview + +## Description + +Written by Google, the Google HTTP Client Library for Java is a flexible, efficient, and powerful +Java library for accessing any resource on the web via HTTP. The library has the following +features: + +- Pluggable HTTP transport abstraction that allows you to use any low-level library such as +`java.net.HttpURLConnection`, Apache HTTP Client, or URL Fetch on Google App Engine. +- Efficient JSON and XML data models for parsing and serialization of HTTP response and request +content. The JSON and XML libraries are also fully pluggable, and they include support for +[Jackson](https://github.com/FasterXML/jackson) and Android's GSON libraries for JSON. + +The library supports the following Java environments: + +- Java 7 (or higher) +- Android 4.0 (Ice Cream Sandwich) (or higher) +- Google App Engine + +The following related projects are built on the Google HTTP Client Library for Java: + +- [Google OAuth Client Library for Java][google-oauth-client], for the OAuth 2.0 and OAuth 1.0a +authorization standards. +- [Google APIs Client Library for Java][google-api-client], for access to Google APIs. + +This is an open-source library, and [contributions][contributions] are welcome. + +## Beta Features + +Features marked with the `@Beta` annotation at the class or method level are subject to change. They +might be modified in any way, or even removed, in any major release. You should not use beta +features if your code is a library itself (that is, if your code is used on the `CLASSPATH` of users +outside your own control). + +## Deprecated Features + +Deprecated non-beta features will be removed eighteen months after the release in which they are +first deprecated. You must fix your usages before this time. If you don't, any type of breakage +might result, and you are not guaranteed a compilation error. + +[google-oauth-client]: https://github.com/googleapis/google-oauth-java-client +[google-api-client]: https://github.com/googleapis/google-api-java-client +[contributions]: CONTRIBUTING.md + diff --git a/docs/json.md b/docs/json.md new file mode 100644 index 000000000..491d73449 --- /dev/null +++ b/docs/json.md @@ -0,0 +1,276 @@ +--- +title: JSON +--- + +# JSON + +## Pluggable streaming library + +A fully pluggable JSON streaming library abstraction allows you to take advantage of the native +platform's built-in JSON library support (for example the JSON library that is built into Android +Honeycomb). The streaming library enables you to write optimized code for efficient memory usage +that minimizes parsing and serialization time. + +A big advantage of this JSON library is that the choice of low-level streaming library is fully +pluggable. There are three built-in choices, all of which extend [`JsonFactory`][json-factory]. You +can easily plug in your own implementation. + +* [`JacksonFactory`][jackson-factory]: Based on the popular [Jackson][jackson] library, which is +considered the fastest in terms of parsing/serialization speed. Our JSON library provides +`JsonFactory` implementations based on Jackson 2. +* [`GsonFactory`][gson-factory]: Based on the [Google GSON][gson] library, which is a lighter-weight +option (small size) that is also fairly fast, though not as fast as Jackson. +* [`AndroidJsonFactory`][android-json-factory] (`@Beta`): Based on the JSON library built into +Android Honeycomb (SDK 3.0) and higher, and that is identical to the Google GSON library. + +## User-defined JSON data models + +User-defined JSON data models allow you to define Plain Old Java Objects (POJOs) and define how the +library parses and serializes them to and from JSON. The code snippets below are part of a more +complete example, [googleplus-simple-cmdline-sample][google-plus-sample], which demonstrates these +concepts. + +### Example + +The following JSON snippet shows the relevant fields of a typical Google+ activity feed: + +```json +{ + "items": [ + { + "id": "z13lwnljpxjgt5wn222hcvzimtebslkul", + "url": "https://plus.google.com/116899029375914044550/posts/HYNhBAMeA7U", + "object": { + "content": "\u003cb\u003eWho will take the title of 2011 Angry Birds College Champ?\u003c/b\u003e\u003cbr /\u003e\u003cbr /\u003e\u003cbr /\u003eIt's the 2nd anniversary of Angry Birds this Sunday, December 11, and to celebrate this break-out game we're having an intercollegiate angry birds challenge for students to compete for the title of 2011 Angry Birds College Champion. Add \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/105912662528057048457\" class=\"proflink\" oid=\"105912662528057048457\"\u003eAngry Birds College Challenge\u003c/a\u003e\u003c/span\u003e to learn more. Good luck, and have fun!", + "plusoners": { + "totalItems": 27 + } + } + }, + { + "id": "z13rtboyqt2sit45o04cdp3jxuf5cz2a3e4", + "url": "https://plus.google.com/116899029375914044550/posts/X8W8m9Hk5rE", + "object": { + "content": "CNN Heroes shines a spotlight on everyday people changing the world. Hear the top ten heroes' inspiring stories by tuning in to the CNN broadcast of "CNN Heroes: An All-Star Tribute" on Sunday, December 11, at 8pm ET/5 pm PT with host \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/106168900754103197479\" class=\"proflink\" oid=\"106168900754103197479\"\u003eAnderson Cooper 360\u003c/a\u003e\u003c/span\u003e, and donate to their causes online in a few simple steps with Google Wallet (formerly known as Google Checkout): \u003ca href=\"http://www.google.com/landing/cnnheroes/2011/\" \u003ehttp://www.google.com/landing/cnnheroes/2011/\u003c/a\u003e.", + "plusoners": { + "totalItems": 21 + } + } + }, + { + "id": "z13wtpwpqvihhzeys04cdp3jxuf5cz2a3e4", + "url": "https://plus.google.com/116899029375914044550/posts/dBnaybdLgzU", + "object": { + "content": "Today we hosted one of our Big Tent events in The Hague. \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/104233435224873922474\" class=\"proflink\" oid=\"104233435224873922474\"\u003eEric Schmidt\u003c/a\u003e\u003c/span\u003e, Dutch Foreign Minister Uri Rosenthal, U.S. Secretary of State Hillary Clinton and many others came together to discuss free expression and the Internet. The Hague is our third Big Tent, a place where we bring together various viewpoints to discuss essential topics to the future of the Internet. Read more on the Official Google Blog here: \u003ca href=\"http://goo.gl/d9cSe\" \u003ehttp://goo.gl/d9cSe\u003c/a\u003e, and watch the video below for highlights from the day.", + "plusoners": { + "totalItems": 76 + } + } + } + ] +} +``` + +Here's one possible way to design the Java data classes to represent this: + +```java +/** Feed of Google+ activities. */ +public static class ActivityFeed { + + /** List of Google+ activities. */ + @Key("items") + private List activities; + + public List getActivities() { + return activities; + } +} + +/** Google+ activity. */ +public static class Activity extends GenericJson { + + /** Activity URL. */ + @Key + private String url; + + public String getUrl() { + return url; + } + + /** Activity object. */ + @Key("object") + private ActivityObject activityObject; + + public ActivityObject getActivityObject() { + return activityObject; + } +} + +/** Google+ activity object. */ +public static class ActivityObject { + + /** HTML-formatted content. */ + @Key + private String content; + + public String getContent() { + return content; + } + + /** People who +1'd this activity. */ + @Key + private PlusOners plusoners; + + public PlusOners getPlusOners() { + return plusoners; + } +} + +/** People who +1'd an activity. */ +public static class PlusOners { + + /** Total number of people who +1'd this activity. */ + @Key + private long totalItems; + + public long getTotalItems() { + return totalItems; + } +} +``` + +A fully supported [HTTP JSON parser][json-parser] makes it easy to parse HTTP responses to objects +of these user defined classes: + +```java +private static void parseResponse(HttpResponse response) throws IOException { + ActivityFeed feed = response.parseAs(ActivityFeed.class); + if (feed.getActivities().isEmpty()) { + System.out.println("No activities found."); + } else { + for (Activity activity : feed.getActivities()) { + System.out.println(); + System.out.println("-----------------------------------------------"); + System.out.println("HTML Content: " + activity.getActivityObject().getContent()); + System.out.println("+1's: " + activity.getActivityObject().getPlusOners().getTotalItems()); + System.out.println("URL: " + activity.getUrl()); + System.out.println("ID: " + activity.get("id")); + } + } +} +``` + +### Key annotation + +Use the [`@Key`][key-annotation] annotation to indicate fields that need to be parsed from or +serialized to JSON. By default, the `@Key` annotation uses the Java field name as the JSON key. To +override this, specify the value of the `@Key` annotation. + +Fields that don't have the `@Key` annotation are considered internal data and are not parsed from or +serialized to JSON. + +### Visibility + +Visibility of the fields does not matter, nor does the existence of the getter or setter methods. So +for example, the following alternative representation for `PlusOners` would work in the example +given above: + +```java +/** People who +1'd an activity. */ +public static class AlternativePlusOnersWithPublicField { + + /** Total number of people who +1'd this activity. */ + @Key + public long totalItems; +} +``` + +### GenericJson + +Normally only the fields you declare are parsed when a JSON response is parsed. The actual Google+ +activity feed response contains a lot of content that we are not using in our example. The JSON +parser skips that other content when parsing the response from Google+. + +To retain the other content, declare your class to extend [`GenericJson`][generic-json]. Notice that +`GenericJson` implements [`Map`][map], so we can use the `get` and `put` methods to set JSON +content. See [`googleplus-simple-cmdline-sample`][google-plus-sample] for an example of how it was +used in the `Activity` class above. + +### Map + +The JSON library supports any implementation of `Map`, which works similarly to `GenericJson`. The +downside, of course, is that you lose the static type information for the fields. + +### JSON null + +One advantage of this JSON library is its ability to support JSON nulls and distinguish them from +undeclared JSON keys. Although JSON nulls are relatively rare, when they do occur they often cause +confusion. + +Google+ doesn't use JSON null values, so the following example uses fictitious JSON data to +illustrate what can happen: + +```json +{ + "items": [ + { + "id": "1", + "value": "some value" + }, + { + "id": "2", + "value": null + } + { + "id": "3" + } + ] +} +``` + +We might represent each item as follows: + +```java +public class Item { + @Key + public String id; + @Key + public String value; +} +``` + +For items 2 and 3, what should be in the value field? The problem is that there is no obvious way in +Java to distinguish between a JSON key that is undeclared and a JSON key whose value is JSON null. +This JSON library solves the problem by using Java null for the common case of an undeclared JSON +key, and a special "magic" instance of String ([`Data.NULL_STRING`][null-string]) to identify it as +a JSON null rather than a normal value. + +The following example shows how you might take advantage of this functionality: + +```java +private static void show(List items) { + for (Item item : items) { + System.out.println("ID: " + item.id); + if (item.value == null) { + System.out.println("No Value"); + } else if (Data.isNull(item.value)) { + System.out.print("Null Value"); + } else { + System.out.println("Value: '" + item.value + "'"); + } + } +} +``` + +[json-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/JsonFactory.html +[jackson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/jackson2/JacksonFactory.html +[jackson]: https://github.com/FasterXML/jackson +[gson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/gson/GsonFactory.html +[gson]: https://github.com/google/gson +[android-json-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/android/json/AndroidJsonFactory.html +[google-plus-sample]: https://github.com/googleapis/google-http-java-client/tree/master/samples/googleplus-simple-cmdline-sample +[json-parser]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/JsonParser.html +[key-annotation]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/Key.html +[generic-json]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/GenericJson.html +[map]: https://docs.oracle.com/javase/7/docs/api/java/util/Map.html +[null-string]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/Data.html#NULL_STRING diff --git a/docs/setup.md b/docs/setup.md new file mode 100644 index 000000000..ec8b6b23f --- /dev/null +++ b/docs/setup.md @@ -0,0 +1,80 @@ +--- +title: Setup Instructions +--- + +# Setup Instructions + +You can download the Google HTTP Client Library for Java and its dependencies in a zip file, or you +can use a dependency manager such as Maven or gradle to install the necessary jars from the Maven +Central repository. + +## Maven + +The Google HTTP Client Library for Java is in the central Maven repository. The Maven `groupId` for +all artifacts for this library is `com.google.http-client`. + +To ensure all dependency versions work together and to avoid having to manually choose and specify +versions for each dependency, we recommend first importing the `com.google.cloud:libraries-bom` in +the `dependencyManagement` section of your `pom.xml`: + +```xml + + + + com.google.cloud + libraries-bom + 2.2.1 + pom + import + + + +``` + +Then you add the individual dependencies you need without version numbers to the `dependencies` +section: + +```xml + + com.google.http-client + google-http-client + +``` + +On Android, you may need to explicitly exclude unused dependencies: +```xml + + com.google.http-client + google-http-client + + + xpp3 + xpp3 + + + httpclient + org.apache.httpcomponents + + + junit + junit + + + android + com.google.android + + + +``` + +## Download the library with dependencies + +Download the latest assembly zip file from Maven Central and extract it on your computer. This zip +contains the client library class jar files and the associated source jar files for each artifact +and their dependencies. You can find dependency graphs and licenses for the different libraries in +the dependencies folder. For more details about the contents of the download, see the contained +`readme.html` file. + + + + diff --git a/docs/unit-testing.md b/docs/unit-testing.md new file mode 100644 index 000000000..b5568a3ff --- /dev/null +++ b/docs/unit-testing.md @@ -0,0 +1,52 @@ +--- +title: HTTP Unit Testing +--- + +# HTTP Unit Testing + +When writing unit tests using this HTTP framework, don't make requests to a real server. Instead, +mock the HTTP transport and inject fake HTTP requests and responses. The +[pluggable HTTP transport layer][transport] of the Google HTTP Client Library for Java makes this +flexible and simple to do. + +Also, some useful testing utilities are included in the +[`com.google.api.client.testing.http`][testing-package] package (`@Beta`). + +The following simple example generates a basic `HttpResponse`: + +```java +HttpTransport transport = new MockHttpTransport(); +HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); +HttpResponse response = request.execute(); +``` + +The following example shows how to override the implementation of the `MockHttpTransport` class: + +```java +HttpTransport transport = new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse response = new MockLowLevelHttpResponse(); + response.addHeader("custom_header", "value"); + response.setStatusCode(404); + response.setContentType(Json.MEDIA_TYPE); + response.setContent("{\"error\":\"not found\"}"); + return response; + } + }; + } +}; +HttpRequest request = transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); +HttpResponse response = request.execute(); +``` + +For more examples, see the [`HttpResponseTest.java`][http-response-test] and +[`HttpRequestTest.java`][http-request-test] files. + +[transport]: https://googleapis.github.io/google-http-java-client/http-transport.html +[testing-package]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/testing/http/package-summary.html +[http-response-test]: https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +[http-request-test]: https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java \ No newline at end of file From 5862e7dacc2c5fd17970fd63d20d8ff570872f69 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 4 Sep 2019 18:10:12 +0300 Subject: [PATCH 159/983] chore(deps): update opencensus packages to v0.24.0 (#801) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 74d26649c..2050c4a65 100644 --- a/pom.xml +++ b/pom.xml @@ -547,7 +547,7 @@ 1.2 4.5.9 4.4.11 - 0.23.0 + 0.24.0 .. false From df21ebccc54dbfa4949ce6c952d2735d5e195cea Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 4 Sep 2019 08:33:23 -0700 Subject: [PATCH 160/983] fix: correct connect timeout setting for ApacheHttpRequest (#803) * fix: correct connect timeout setting for ApacheHttpRequest * test: add timeout test * test: deflake test by increasing test timeout * test: try to deflake connect timeout test * test: try a higher timeout * test: skip timeout test on windows --- .../http/apache/v2/ApacheHttpRequest.java | 2 +- .../apache/v2/ApacheHttpTransportTest.java | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java index ba58c2ef0..29bd61ee7 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java @@ -52,7 +52,7 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - requestConfig.setConnectionRequestTimeout(connectTimeout) + requestConfig.setConnectTimeout(connectTimeout) .setSocketTimeout(readTimeout); } diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index 8e61afba6..e6ca850ce 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -18,11 +18,13 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpTransport; import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.ByteArrayStreamingContent; import com.sun.net.httpserver.HttpExchange; @@ -44,6 +46,8 @@ import org.apache.http.HttpVersion; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpUriRequest; +import org.apache.http.conn.ConnectTimeoutException; +import org.apache.http.conn.HttpHostConnectException; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicHttpResponse; import org.apache.http.protocol.HttpContext; @@ -183,6 +187,23 @@ public void process(HttpRequest request, HttpContext context) assertTrue("Expected to have called our test interceptor", interceptorCalled.get()); } + @Test(timeout = 10_000L) + public void testConnectTimeout() { + // Apache HttpClient doesn't appear to behave correctly on windows + assumeTrue(!isWindows()); + + HttpTransport httpTransport = new ApacheHttpTransport(); + GenericUrl url = new GenericUrl("http://google.com:81"); + try { + httpTransport.createRequestFactory().buildGetRequest(url).setConnectTimeout(100).execute(); + fail("should have thrown an exception"); + } catch (HttpHostConnectException | ConnectTimeoutException expected) { + // expected + } catch (IOException e) { + fail("unexpected IOException: " + e.getClass().getName()); + } + } + @Test public void testNormalizedUrl() throws IOException { HttpServer server = HttpServer.create(new InetSocketAddress(0), 0); @@ -211,4 +232,8 @@ public void handle(HttpExchange httpExchange) throws IOException { assertEquals(200, response.getStatusCode()); assertEquals("/foo//bar", response.parseAsString()); } + + private boolean isWindows() { + return System.getProperty("os.name").startsWith("Windows"); + } } From d82718d0cc2f75ec9fd5db1b32f80d02e5c365a0 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 4 Sep 2019 12:45:25 -0700 Subject: [PATCH 161/983] fix: grab version from the package metadata (#806) * fix: grab version from the package metadata * test: ensure VERSION constant matches semver pattern * fix: use version from manifest, fallback to generated properties file --- google-http-client/pom.xml | 23 ++++++++++++++++++- .../google/api/client/http/HttpRequest.java | 21 ++++++++++++++++- .../resources/google-http-client.properties | 1 + .../api/client/http/HttpRequestTest.java | 7 ++++++ pom.xml | 5 ++++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 google-http-client/src/main/resources/google-http-client.properties diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f748898e4..9694723f4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -29,6 +29,17 @@ + + org.apache.maven.plugins + maven-resources-plugin + + + + resources + + + + maven-javadoc-plugin @@ -55,7 +66,10 @@ maven-jar-plugin - + + + true + ${project.build.outputDirectory}/META-INF/MANIFEST.MF com.google.api.client @@ -78,6 +92,13 @@
            + + + + src/main/resources + true + + diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index c53c10e07..f6cd29ef4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -30,6 +30,7 @@ import io.opencensus.trace.Tracer; import java.io.IOException; import java.io.InputStream; +import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Executors; @@ -53,7 +54,7 @@ public final class HttpRequest { * * @since 1.8 */ - public static final String VERSION = "1.30.0"; + public static final String VERSION = getVersion(); /** * User agent suffix for all requests. @@ -1201,4 +1202,22 @@ private static void addSpanAttribute(Span span, String key, String value) { span.putAttribute(key, AttributeValue.stringAttributeValue(value)); } } + + private static String getVersion() { + String version = HttpRequest.class.getPackage().getImplementationVersion(); + // in a non-packaged environment (local), there's no implementation version to read + if (version == null) { + // fall back to reading from a properties file - note this value is expected to be cached + try (InputStream inputStream = HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { + if (inputStream != null) { + Properties properties = new Properties(); + properties.load(inputStream); + version = properties.getProperty("google-http-client.version"); + } + } catch (IOException e) { + // ignore + } + } + return version; + } } diff --git a/google-http-client/src/main/resources/google-http-client.properties b/google-http-client/src/main/resources/google-http-client.properties new file mode 100644 index 000000000..a69f45fa8 --- /dev/null +++ b/google-http-client/src/main/resources/google-http-client.properties @@ -0,0 +1 @@ +google-http-client.version=${project.version} \ No newline at end of file diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index 66b6449eb..a76b63850 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -32,6 +32,7 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import java.util.regex.Pattern; import junit.framework.TestCase; import java.io.ByteArrayInputStream; @@ -1090,6 +1091,12 @@ public LowLevelHttpResponse execute() throws IOException { } } + public void testVersion() { + assertNotNull("version constant should not be null", HttpRequest.VERSION); + Pattern semverPattern = Pattern.compile("\\d+\\.\\d+\\.\\d+(-SNAPSHOT)?"); + assertTrue(semverPattern.matcher(HttpRequest.VERSION).matches()); + } + public void testUserAgent() { assertTrue(HttpRequest.USER_AGENT_SUFFIX.contains("Google-HTTP-Java-Client")); assertTrue(HttpRequest.USER_AGENT_SUFFIX.contains("gzip")); diff --git a/pom.xml b/pom.xml index 2050c4a65..24588605a 100644 --- a/pom.xml +++ b/pom.xml @@ -367,6 +367,11 @@ maven-dependency-plugin 3.1.1
            + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + From 8d071bb273b3386c93dc52e65968a21fcfbfeed0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Sep 2019 10:08:11 -0700 Subject: [PATCH 162/983] build: fix snapshot script to be executable (#810) --- .kokoro/release/snapshot.sh | 0 synth.metadata | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .kokoro/release/snapshot.sh diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh old mode 100644 new mode 100755 diff --git a/synth.metadata b/synth.metadata index cb616b6ec..5f820cf70 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-08-28T08:05:40.046451Z", + "updateTime": "2019-09-05T16:59:27.350769Z", "sources": [ { "template": { From cea7363945c88ec16b55d8046f2d8c495af7133a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 11 Sep 2019 10:27:31 -0700 Subject: [PATCH 163/983] build: regenerate common files from templates (#813) --- .kokoro/presubmit/integration.cfg | 24 ++++++++++++++++++++++++ synth.metadata | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index 3b017fc80..141f90c13 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -5,3 +5,27 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/synth.metadata b/synth.metadata index 5f820cf70..2e3729475 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-05T16:59:27.350769Z", + "updateTime": "2019-09-10T08:03:59.939198Z", "sources": [ { "template": { From 41cc201fc53830a74b7ba1341c2ce3727fb54cf5 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 11 Sep 2019 12:05:37 -0700 Subject: [PATCH 164/983] chore: release v1.32.0 (#815) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/README.md | 2 +- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 54 insertions(+), 54 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 366c0ee1a..0deb3a826 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.31.1-SNAPSHOT + 1.32.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.31.1-SNAPSHOT + 1.32.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.31.1-SNAPSHOT + 1.32.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c82da393c..c359ac1b8 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-android - 1.31.1-SNAPSHOT + 1.32.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 3b779b6ee..68b8489f4 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-apache-v2 - 1.31.1-SNAPSHOT + 1.32.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index e3058e637..1d27d2c76 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-appengine - 1.31.1-SNAPSHOT + 1.32.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 338e7e7e5..b97e38565 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.31.1-SNAPSHOT + 1.32.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index 59a197bee..ae6c65be3 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.31.0 + 1.32.0 pom import diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index dbd337f6b..1740a3cc0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.31.1-SNAPSHOT + 1.32.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-android - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-apache-v2 - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-appengine - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-findbugs - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-gson - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-jackson2 - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-protobuf - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-test - 1.31.1-SNAPSHOT + 1.32.0 com.google.http-client google-http-client-xml - 1.31.1-SNAPSHOT + 1.32.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 7a777325d..a030efe61 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-findbugs - 1.31.1-SNAPSHOT + 1.32.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a3c99c9dd..58cfe02e8 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-gson - 1.31.1-SNAPSHOT + 1.32.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 56da836ba..ef4b4aef8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-jackson2 - 1.31.1-SNAPSHOT + 1.32.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index c704397b6..fe3c5cf0f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-protobuf - 1.31.1-SNAPSHOT + 1.32.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index bd15aea7f..fe89dd25f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-test - 1.31.1-SNAPSHOT + 1.32.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 5dedef3b0..dbc5bc484 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client-xml - 1.31.1-SNAPSHOT + 1.32.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9694723f4..5f417a6bd 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../pom.xml google-http-client - 1.31.1-SNAPSHOT + 1.32.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 24588605a..d069a54d8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 pom Parent for the Google HTTP Client Library for Java @@ -540,7 +540,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.31.1-SNAPSHOT + 1.32.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index c7977fc01..f1772861b 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.31.1-SNAPSHOT + 1.32.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index dad3e44f7..b78b23f49 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.31.0:1.31.1-SNAPSHOT -google-http-client-bom:1.31.0:1.31.1-SNAPSHOT -google-http-client-parent:1.31.0:1.31.1-SNAPSHOT -google-http-client-android:1.31.0:1.31.1-SNAPSHOT -google-http-client-android-test:1.31.0:1.31.1-SNAPSHOT -google-http-client-apache-v2:1.31.0:1.31.1-SNAPSHOT -google-http-client-appengine:1.31.0:1.31.1-SNAPSHOT -google-http-client-assembly:1.31.0:1.31.1-SNAPSHOT -google-http-client-findbugs:1.31.0:1.31.1-SNAPSHOT -google-http-client-gson:1.31.0:1.31.1-SNAPSHOT -google-http-client-jackson2:1.31.0:1.31.1-SNAPSHOT -google-http-client-protobuf:1.31.0:1.31.1-SNAPSHOT -google-http-client-test:1.31.0:1.31.1-SNAPSHOT -google-http-client-xml:1.31.0:1.31.1-SNAPSHOT +google-http-client:1.32.0:1.32.0 +google-http-client-bom:1.32.0:1.32.0 +google-http-client-parent:1.32.0:1.32.0 +google-http-client-android:1.32.0:1.32.0 +google-http-client-android-test:1.32.0:1.32.0 +google-http-client-apache-v2:1.32.0:1.32.0 +google-http-client-appengine:1.32.0:1.32.0 +google-http-client-assembly:1.32.0:1.32.0 +google-http-client-findbugs:1.32.0:1.32.0 +google-http-client-gson:1.32.0:1.32.0 +google-http-client-jackson2:1.32.0:1.32.0 +google-http-client-protobuf:1.32.0:1.32.0 +google-http-client-test:1.32.0:1.32.0 +google-http-client-xml:1.32.0:1.32.0 From a52073b434015e0d485a86588a3241e33d926e46 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 11 Sep 2019 12:50:56 -0700 Subject: [PATCH 165/983] chore: fix missing description/developers section for staging rules --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index d069a54d8..d567a8e61 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,7 @@ 1.32.0 pom Parent for the Google HTTP Client Library for Java + Google HTTP Client Library for Java https://github.com/googleapis/google-http-java-client @@ -28,6 +29,14 @@ http://www.google.com/ + + + chingor + Jeff Ching + chingor@google.com + + + The Apache Software License, Version 2.0 From df9dac54048fb70fd2292cfb342906061aa3c4da Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 11 Sep 2019 13:34:31 -0700 Subject: [PATCH 166/983] chore: bump next snapshot (#816) --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 0deb3a826..3bc1e9893 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.32.0 + 1.32.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.32.0 + 1.32.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.32.0 + 1.32.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c359ac1b8..cb4ff8d56 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-android - 1.32.0 + 1.32.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 68b8489f4..345b56cb8 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.32.0 + 1.32.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1d27d2c76..886f5aa39 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.32.0 + 1.32.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index b97e38565..fd61568c5 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.32.0 + 1.32.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 1740a3cc0..0b65a2bf3 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.32.0 + 1.32.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-android - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-test - 1.32.0 + 1.32.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.32.0 + 1.32.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index a030efe61..6e453f88e 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.32.0 + 1.32.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 58cfe02e8..110092e03 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.32.0 + 1.32.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index ef4b4aef8..fc5fcda87 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.32.0 + 1.32.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fe3c5cf0f..7d2939b29 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.32.0 + 1.32.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index fe89dd25f..4a6d979e3 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-test - 1.32.0 + 1.32.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index dbc5bc484..2a1a2b7dc 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.32.0 + 1.32.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5f417a6bd..b6aaadd1d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../pom.xml google-http-client - 1.32.0 + 1.32.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index d567a8e61..8c1caf0f4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.32.0 + 1.32.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f1772861b..1a7d1c593 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.32.0 + 1.32.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b78b23f49..b7d362191 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.32.0:1.32.0 -google-http-client-bom:1.32.0:1.32.0 -google-http-client-parent:1.32.0:1.32.0 -google-http-client-android:1.32.0:1.32.0 -google-http-client-android-test:1.32.0:1.32.0 -google-http-client-apache-v2:1.32.0:1.32.0 -google-http-client-appengine:1.32.0:1.32.0 -google-http-client-assembly:1.32.0:1.32.0 -google-http-client-findbugs:1.32.0:1.32.0 -google-http-client-gson:1.32.0:1.32.0 -google-http-client-jackson2:1.32.0:1.32.0 -google-http-client-protobuf:1.32.0:1.32.0 -google-http-client-test:1.32.0:1.32.0 -google-http-client-xml:1.32.0:1.32.0 +google-http-client:1.32.0:1.32.1-SNAPSHOT +google-http-client-bom:1.32.0:1.32.1-SNAPSHOT +google-http-client-parent:1.32.0:1.32.1-SNAPSHOT +google-http-client-android:1.32.0:1.32.1-SNAPSHOT +google-http-client-android-test:1.32.0:1.32.1-SNAPSHOT +google-http-client-apache-v2:1.32.0:1.32.1-SNAPSHOT +google-http-client-appengine:1.32.0:1.32.1-SNAPSHOT +google-http-client-assembly:1.32.0:1.32.1-SNAPSHOT +google-http-client-findbugs:1.32.0:1.32.1-SNAPSHOT +google-http-client-gson:1.32.0:1.32.1-SNAPSHOT +google-http-client-jackson2:1.32.0:1.32.1-SNAPSHOT +google-http-client-protobuf:1.32.0:1.32.1-SNAPSHOT +google-http-client-test:1.32.0:1.32.1-SNAPSHOT +google-http-client-xml:1.32.0:1.32.1-SNAPSHOT From e05b6a8a3a7e58dc19d326724cc8323957288d34 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 11 Sep 2019 17:08:46 -0400 Subject: [PATCH 167/983] deps: update guava to 28.1-android (#817) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8c1caf0f4..b7e03a956 100644 --- a/pom.xml +++ b/pom.xml @@ -556,7 +556,7 @@ 2.8.5 2.9.9 3.9.1 - 28.0-android + 28.1-android 1.1.4c 1.2 4.5.9 From 05ea84c0d3133109393b998c8a3b24c6a8fc6e7a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 16 Sep 2019 09:56:53 -0700 Subject: [PATCH 168/983] build: enable release-please bot (#821) --- .github/.release-please.yml | 1 + synth.metadata | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .github/.release-please.yml diff --git a/.github/.release-please.yml b/.github/.release-please.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/.github/.release-please.yml @@ -0,0 +1 @@ + diff --git a/synth.metadata b/synth.metadata index 2e3729475..859f25f5d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-10T08:03:59.939198Z", + "updateTime": "2019-09-13T22:56:32.377792Z", "sources": [ { "template": { From 27e5dcf99cd04d3e8706eefa3c86adca1f032357 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 17 Sep 2019 16:39:04 -0700 Subject: [PATCH 169/983] chore: update apache httpcomponents and core (#823) This might help with #820 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b7e03a956..29a4b2bed 100644 --- a/pom.xml +++ b/pom.xml @@ -559,8 +559,8 @@ 28.1-android 1.1.4c 1.2 - 4.5.9 - 4.4.11 + 4.5.10 + 4.4.12 0.24.0 .. false From 9adfd30930207369945ab26fea427d7387b54967 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Sep 2019 09:02:24 -0700 Subject: [PATCH 170/983] build: enable release-please bot (#825) --- .github/release-please.yml | 1 + synth.metadata | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .github/release-please.yml diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1 @@ + diff --git a/synth.metadata b/synth.metadata index 859f25f5d..103a4b96d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-13T22:56:32.377792Z", + "updateTime": "2019-09-19T16:22:22.297833Z", "sources": [ { "template": { From c51b62f98df8c76b2a7d60db12da5e8ca344ab5e Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 20 Sep 2019 19:02:52 +0300 Subject: [PATCH 171/983] deps: update dependency com.google.protobuf:protobuf-java to v3.10.0 (#824) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29a4b2bed..23fd524e4 100644 --- a/pom.xml +++ b/pom.xml @@ -555,7 +555,7 @@ 3.0.2 2.8.5 2.9.9 - 3.9.1 + 3.10.0 28.1-android 1.1.4c 1.2 From ca4ac1dadc6c9f7344bb7de18f807277d330b8bb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2019 09:22:14 -0700 Subject: [PATCH 172/983] chore: release 1.32.1 (#826) * updated google-http-client-android-test/pom.xml [ci skip] * created CHANGELOG.md [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated README.md [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated versions.txt [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] * updated pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] * updated pom.xml [ci skip] --- CHANGELOG.md | 9 ++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..9203fbb1d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +### [1.32.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.32.0...v1.32.1) (2019-09-20) + + +### Dependencies + +* update dependency com.google.protobuf:protobuf-java to v3.10.0 ([#824](https://www.github.com/googleapis/google-http-java-client/issues/824)) ([c51b62f](https://www.github.com/googleapis/google-http-java-client/commit/c51b62f)) +* update guava to 28.1-android ([#817](https://www.github.com/googleapis/google-http-java-client/issues/817)) ([e05b6a8](https://www.github.com/googleapis/google-http-java-client/commit/e05b6a8)) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 3bc1e9893..d0750eb69 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.32.1-SNAPSHOT + 1.32.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.32.1-SNAPSHOT + 1.32.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.32.1-SNAPSHOT + 1.32.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index cb4ff8d56..5da49ef12 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-android - 1.32.1-SNAPSHOT + 1.32.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 345b56cb8..000d2881f 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-apache-v2 - 1.32.1-SNAPSHOT + 1.32.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 886f5aa39..4cfc1759a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-appengine - 1.32.1-SNAPSHOT + 1.32.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index fd61568c5..3de0c6cc3 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.32.1-SNAPSHOT + 1.32.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0b65a2bf3..d41a2adb7 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.32.1-SNAPSHOT + 1.32.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-android - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-apache-v2 - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-appengine - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-findbugs - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-gson - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-jackson2 - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-protobuf - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-test - 1.32.1-SNAPSHOT + 1.32.1 com.google.http-client google-http-client-xml - 1.32.1-SNAPSHOT + 1.32.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6e453f88e..0366b1c8f 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-findbugs - 1.32.1-SNAPSHOT + 1.32.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 110092e03..e2b044d21 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-gson - 1.32.1-SNAPSHOT + 1.32.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index fc5fcda87..adce0eb9d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-jackson2 - 1.32.1-SNAPSHOT + 1.32.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 7d2939b29..b7d7d0898 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-protobuf - 1.32.1-SNAPSHOT + 1.32.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 4a6d979e3..06ef4d71c 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-test - 1.32.1-SNAPSHOT + 1.32.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2a1a2b7dc..41fac5490 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client-xml - 1.32.1-SNAPSHOT + 1.32.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index b6aaadd1d..1ca11fd7a 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../pom.xml google-http-client - 1.32.1-SNAPSHOT + 1.32.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 23fd524e4..21c53a69d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.32.1-SNAPSHOT + 1.32.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 1a7d1c593..a4e87d0ff 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.32.1-SNAPSHOT + 1.32.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b7d362191..31a2b3a7c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.32.0:1.32.1-SNAPSHOT -google-http-client-bom:1.32.0:1.32.1-SNAPSHOT -google-http-client-parent:1.32.0:1.32.1-SNAPSHOT -google-http-client-android:1.32.0:1.32.1-SNAPSHOT -google-http-client-android-test:1.32.0:1.32.1-SNAPSHOT -google-http-client-apache-v2:1.32.0:1.32.1-SNAPSHOT -google-http-client-appengine:1.32.0:1.32.1-SNAPSHOT -google-http-client-assembly:1.32.0:1.32.1-SNAPSHOT -google-http-client-findbugs:1.32.0:1.32.1-SNAPSHOT -google-http-client-gson:1.32.0:1.32.1-SNAPSHOT -google-http-client-jackson2:1.32.0:1.32.1-SNAPSHOT -google-http-client-protobuf:1.32.0:1.32.1-SNAPSHOT -google-http-client-test:1.32.0:1.32.1-SNAPSHOT -google-http-client-xml:1.32.0:1.32.1-SNAPSHOT +google-http-client:1.32.1:1.32.1 +google-http-client-bom:1.32.1:1.32.1 +google-http-client-parent:1.32.1:1.32.1 +google-http-client-android:1.32.1:1.32.1 +google-http-client-android-test:1.32.1:1.32.1 +google-http-client-apache-v2:1.32.1:1.32.1 +google-http-client-appengine:1.32.1:1.32.1 +google-http-client-assembly:1.32.1:1.32.1 +google-http-client-findbugs:1.32.1:1.32.1 +google-http-client-gson:1.32.1:1.32.1 +google-http-client-jackson2:1.32.1:1.32.1 +google-http-client-protobuf:1.32.1:1.32.1 +google-http-client-test:1.32.1:1.32.1 +google-http-client-xml:1.32.1:1.32.1 From 68c1b5361adf4d3b424b9370d89632a262fa6001 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2019 10:05:03 -0700 Subject: [PATCH 173/983] chore: release 1.32.2-SNAPSHOT (#827) * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d0750eb69..762c39fa0 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.32.1 + 1.32.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.32.1 + 1.32.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.32.1 + 1.32.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 5da49ef12..60fb218cc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-android - 1.32.1 + 1.32.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 000d2881f..93804d80d 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.32.1 + 1.32.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4cfc1759a..4aa8b112f 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.32.1 + 1.32.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 3de0c6cc3..724c6dcae 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.32.1 + 1.32.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index d41a2adb7..0fe8307c9 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.32.1 + 1.32.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-android - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-test - 1.32.1 + 1.32.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.32.1 + 1.32.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 0366b1c8f..919d01a0a 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.32.1 + 1.32.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index e2b044d21..2d7c9dd78 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.32.1 + 1.32.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index adce0eb9d..11be6a4ee 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.32.1 + 1.32.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b7d7d0898..e4457f904 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.32.1 + 1.32.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 06ef4d71c..d8631e90b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-test - 1.32.1 + 1.32.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 41fac5490..db2c225bc 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.32.1 + 1.32.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1ca11fd7a..9b5480255 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../pom.xml google-http-client - 1.32.1 + 1.32.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 21c53a69d..6fd067fc6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.32.1 + 1.32.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index a4e87d0ff..b151c6d26 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.32.1 + 1.32.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 31a2b3a7c..82c88daca 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.32.1:1.32.1 -google-http-client-bom:1.32.1:1.32.1 -google-http-client-parent:1.32.1:1.32.1 -google-http-client-android:1.32.1:1.32.1 -google-http-client-android-test:1.32.1:1.32.1 -google-http-client-apache-v2:1.32.1:1.32.1 -google-http-client-appengine:1.32.1:1.32.1 -google-http-client-assembly:1.32.1:1.32.1 -google-http-client-findbugs:1.32.1:1.32.1 -google-http-client-gson:1.32.1:1.32.1 -google-http-client-jackson2:1.32.1:1.32.1 -google-http-client-protobuf:1.32.1:1.32.1 -google-http-client-test:1.32.1:1.32.1 -google-http-client-xml:1.32.1:1.32.1 +google-http-client:1.32.1:1.32.2-SNAPSHOT +google-http-client-bom:1.32.1:1.32.2-SNAPSHOT +google-http-client-parent:1.32.1:1.32.2-SNAPSHOT +google-http-client-android:1.32.1:1.32.2-SNAPSHOT +google-http-client-android-test:1.32.1:1.32.2-SNAPSHOT +google-http-client-apache-v2:1.32.1:1.32.2-SNAPSHOT +google-http-client-appengine:1.32.1:1.32.2-SNAPSHOT +google-http-client-assembly:1.32.1:1.32.2-SNAPSHOT +google-http-client-findbugs:1.32.1:1.32.2-SNAPSHOT +google-http-client-gson:1.32.1:1.32.2-SNAPSHOT +google-http-client-jackson2:1.32.1:1.32.2-SNAPSHOT +google-http-client-protobuf:1.32.1:1.32.2-SNAPSHOT +google-http-client-test:1.32.1:1.32.2-SNAPSHOT +google-http-client-xml:1.32.1:1.32.2-SNAPSHOT From 15ba3c3f7cee9e2e5362d69c1278f45531e56581 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 25 Sep 2019 19:46:25 +0300 Subject: [PATCH 174/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.9.10 (#828) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fd067fc6..ff337bb84 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ UTF-8 3.0.2 2.8.5 - 2.9.9 + 2.9.10 3.10.0 28.1-android 1.1.4c From 99d64e0d88bdcc3b00d54ee9370e052e5f949680 Mon Sep 17 00:00:00 2001 From: 0xflotus <0xflotus@gmail.com> Date: Thu, 26 Sep 2019 15:56:26 +0200 Subject: [PATCH 175/983] docs: fix HttpResponseException Markup (#829) --- docs/http-transport.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/http-transport.md b/docs/http-transport.md index ab5b50bd8..c07e4eb97 100644 --- a/docs/http-transport.md +++ b/docs/http-transport.md @@ -86,7 +86,7 @@ that also, use `Level.ALL` instead of `Level.CONFIG`. ## Handling HTTP error responses When an HTTP error response (an HTTP status code of 300 or higher) is received, -[`HttpRequest.execute()`][request-execute] throws an [`HttpResponseException`][response-exeception]. +[`HttpRequest.execute()`][request-execute] throws an [`HttpResponseException`][response-exception]. Here's an example usage: ```java @@ -133,4 +133,4 @@ HttpRequestFactory requestFactory = transport.createRequestFactory(new MyInitial [file-handler]: https://docs.oracle.com/javase/7/docs/api/java/util/logging/FileHandler.html [request-execute]: https://googleapis.dev/java/google-http-client/latest/com/google/api/client/http/HttpRequest.html#execute-- [response-exception]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpResponseException.html -[http-unsuccessful-response-handler]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpUnsuccessfulResponseHandler.html \ No newline at end of file +[http-unsuccessful-response-handler]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/HttpUnsuccessfulResponseHandler.html From ffb1a857a31948472b2b62ff4f47905fa60fe1e2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 26 Sep 2019 17:31:34 +0300 Subject: [PATCH 176/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.10.0 (#831) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff337bb84..c9e4249bf 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ UTF-8 3.0.2 2.8.5 - 2.9.10 + 2.10.0 3.10.0 28.1-android 1.1.4c From 6c50997361fee875d6b7e6db90e70d41622fc04c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 5 Oct 2019 00:25:20 +0300 Subject: [PATCH 177/983] deps: update dependency com.google.code.gson:gson to v2.8.6 (#833) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c9e4249bf..6ffe61f08 100644 --- a/pom.xml +++ b/pom.xml @@ -553,7 +553,7 @@ 1.9.71 UTF-8 3.0.2 - 2.8.5 + 2.8.6 2.10.0 3.10.0 28.1-android From d32a604e84fff6642004fe40a6fbfe67e1933a83 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 9 Oct 2019 12:27:43 -0700 Subject: [PATCH 178/983] build: explicitly specify release type (#835) --- .github/release-please.yml | 2 +- synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/release-please.yml b/.github/release-please.yml index 8b1378917..827446828 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1 +1 @@ - +releaseType: java-yoshi diff --git a/synth.metadata b/synth.metadata index 103a4b96d..614da3f7b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-09-19T16:22:22.297833Z", + "updateTime": "2019-10-08T08:05:47.325337Z", "sources": [ { "template": { From 35bb4d72da3e236a17b02a1a8619c8157e50454b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 11 Oct 2019 10:33:07 -0700 Subject: [PATCH 179/983] chore: update issue template (#836) --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- synth.metadata | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a91d98f16..d7a51c216 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - - Search the issues already opened: https://github.com/googleapis/google-http-client/issues + - Search the issues already opened: https://github.com/googleapis/google-http-java-client/issues - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform If you are still having issues, please include as much information as possible: @@ -48,4 +48,4 @@ Any relevant stacktrace here. Following these steps guarantees the quickest resolution possible. -Thanks! \ No newline at end of file +Thanks! diff --git a/synth.metadata b/synth.metadata index 614da3f7b..b4ed968a3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-08T08:05:47.325337Z", + "updateTime": "2019-10-10T08:02:08.936565Z", "sources": [ { "template": { From f16c777b234488d714b59b1cf6031e2165dfc322 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 11 Oct 2019 10:33:28 -0700 Subject: [PATCH 180/983] feat: remove opencensus (#834) * feat: remove beta OpenCensus integration * remove extra references * jsr305 dependency no longer needed after removing opencensus --- google-http-client/pom.xml | 34 --- .../google/api/client/http/HttpRequest.java | 40 --- .../api/client/http/OpenCensusUtils.java | 250 ------------------ .../client/http/HttpRequestTracingTest.java | 153 ----------- .../api/client/http/OpenCensusUtilsTest.java | 240 ----------------- pom.xml | 27 -- 6 files changed, 744 deletions(-) delete mode 100644 google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java delete mode 100644 google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java delete mode 100644 google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9b5480255..9dcf51e03 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -16,18 +16,6 @@ - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - io.opencensus:opencensus-impl - - - - org.apache.maven.plugins @@ -109,10 +97,6 @@ org.apache.httpcomponents httpcore - - com.google.code.findbugs - jsr305 - com.google.guava guava @@ -121,14 +105,6 @@ com.google.j2objc j2objc-annotations - - io.opencensus - opencensus-api - - - io.opencensus - opencensus-contrib-http-util - com.google.guava @@ -150,15 +126,5 @@ mockito-all test - - io.opencensus - opencensus-impl - test - - - io.opencensus - opencensus-testing - test - diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index f6cd29ef4..7bd959573 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -23,11 +23,6 @@ import com.google.api.client.util.StreamingContent; import com.google.api.client.util.StringUtils; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import io.opencensus.common.Scope; -import io.opencensus.contrib.http.util.HttpTraceAttributeConstants; -import io.opencensus.trace.AttributeValue; -import io.opencensus.trace.Span; -import io.opencensus.trace.Tracer; import java.io.IOException; import java.io.InputStream; import java.util.Properties; @@ -197,9 +192,6 @@ public final class HttpRequest { /** Sleeper. */ private Sleeper sleeper = Sleeper.DEFAULT; - /** OpenCensus tracing component. */ - private final Tracer tracer = OpenCensusUtils.getTracer(); - /** * Determines whether {@link HttpResponse#getContent()} of this request should return raw input * stream or not. @@ -843,13 +835,7 @@ public HttpResponse execute() throws IOException { Preconditions.checkNotNull(requestMethod); Preconditions.checkNotNull(url); - Span span = - tracer - .spanBuilder(OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE) - .setRecordEvents(OpenCensusUtils.isRecordEvent()) - .startSpan(); do { - span.addAnnotation("retry #" + (numRetries - retriesRemaining)); // Cleanup any unneeded response from a previous iteration if (response != null) { response.ignore(); @@ -864,10 +850,6 @@ public HttpResponse execute() throws IOException { } // build low-level HTTP request String urlString = url.build(); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_METHOD, requestMethod); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_HOST, url.getHost()); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_PATH, url.getRawPath()); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_URL, urlString); LowLevelHttpRequest lowLevelHttpRequest = transport.buildRequest(requestMethod, urlString); Logger logger = HttpTransport.LOGGER; @@ -897,14 +879,11 @@ public HttpResponse execute() throws IOException { if (!suppressUserAgentSuffix) { if (originalUserAgent == null) { headers.setUserAgent(USER_AGENT_SUFFIX); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_USER_AGENT, USER_AGENT_SUFFIX); } else { String newUserAgent = originalUserAgent + " " + USER_AGENT_SUFFIX; headers.setUserAgent(newUserAgent); - addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_USER_AGENT, newUserAgent); } } - OpenCensusUtils.propagateTracingContext(span, headers); // headers HttpHeaders.serializeHeaders(headers, logbuf, curlbuf, logger, lowLevelHttpRequest); @@ -988,15 +967,8 @@ public HttpResponse execute() throws IOException { lowLevelHttpRequest.setTimeout(connectTimeout, readTimeout); lowLevelHttpRequest.setWriteTimeout(writeTimeout); - // switch tracing scope to current span - @SuppressWarnings("MustBeClosedChecker") - Scope ws = tracer.withSpan(span); - OpenCensusUtils.recordSentMessageEvent(span, lowLevelHttpRequest.getContentLength()); try { LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest.execute(); - if (lowLevelHttpResponse != null) { - OpenCensusUtils.recordReceivedMessageEvent(span, lowLevelHttpResponse.getContentLength()); - } // Flag used to indicate if an exception is thrown before the response is constructed. boolean responseConstructed = false; try { @@ -1014,8 +986,6 @@ public HttpResponse execute() throws IOException { if (!retryOnExecuteIOException && (ioExceptionHandler == null || !ioExceptionHandler.handleIOException(this, retryRequest))) { - // static analysis shows response is always null here - span.end(OpenCensusUtils.getEndSpanOptions(null)); throw e; } // Save the exception in case the retries do not work and we need to re-throw it later. @@ -1023,8 +993,6 @@ public HttpResponse execute() throws IOException { if (loggable) { logger.log(Level.WARNING, "exception thrown while executing request", e); } - } finally { - ws.close(); } // Flag used to indicate if an exception is thrown before the response has completed @@ -1081,8 +1049,6 @@ public HttpResponse execute() throws IOException { } } } while (retryRequest); - span.end(OpenCensusUtils.getEndSpanOptions(response == null ? null : response.getStatusCode())); - if (response == null) { // Retries did not help resolve the execute exception, re-throw it. throw executeException; @@ -1197,12 +1163,6 @@ public HttpRequest setSleeper(Sleeper sleeper) { return this; } - private static void addSpanAttribute(Span span, String key, String value) { - if (value != null) { - span.putAttribute(key, AttributeValue.stringAttributeValue(value)); - } - } - private static String getVersion() { String version = HttpRequest.class.getPackage().getImplementationVersion(); // in a non-packaged environment (local), there's no implementation version to read diff --git a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java deleted file mode 100644 index 5b2c9d41e..000000000 --- a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright (c) 2018 Google Inc. - * - * 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 com.google.api.client.util.Beta; -import com.google.api.client.util.Preconditions; -import com.google.common.annotations.VisibleForTesting; -import com.google.common.collect.ImmutableList; -import io.opencensus.contrib.http.util.HttpPropagationUtil; -import io.opencensus.trace.BlankSpan; -import io.opencensus.trace.EndSpanOptions; -import io.opencensus.trace.MessageEvent; -import io.opencensus.trace.MessageEvent.Type; -import io.opencensus.trace.Span; -import io.opencensus.trace.Status; -import io.opencensus.trace.Tracer; -import io.opencensus.trace.Tracing; -import io.opencensus.trace.propagation.TextFormat; -import java.util.concurrent.atomic.AtomicLong; -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.annotation.Nullable; - -/** - * {@link Beta}
            - * Utilities for Census monitoring and tracing. - * - * @author Hailong Wen - * @since 1.28 - */ -@Beta -public class OpenCensusUtils { - - private static final Logger logger = Logger.getLogger(OpenCensusUtils.class.getName()); - - /** Span name for tracing {@link HttpRequest#execute()}. */ - public static final String SPAN_NAME_HTTP_REQUEST_EXECUTE = - "Sent." + HttpRequest.class.getName() + ".execute"; - - /** - * OpenCensus tracing component. When no OpenCensus implementation is provided, it will return a - * no-op tracer. - */ - private static final Tracer tracer = Tracing.getTracer(); - - /** Sequence id generator for message event. */ - private static final AtomicLong idGenerator = new AtomicLong(); - - /** Whether spans should be recorded locally. Defaults to true. */ - private static volatile boolean isRecordEvent = true; - - /** {@link TextFormat} used in tracing context propagation. */ - @Nullable @VisibleForTesting static volatile TextFormat propagationTextFormat = null; - - /** {@link TextFormat.Setter} for {@link #propagationTextFormat}. */ - @Nullable @VisibleForTesting static volatile TextFormat.Setter propagationTextFormatSetter = null; - - /** - * Sets the {@link TextFormat} used in context propagation. - * - *

            This API allows users of google-http-client to specify other text format, or disable context - * propagation by setting it to {@code null}. It should be used along with {@link - * #setPropagationTextFormatSetter} for setting purpose. - * - * @param textFormat the text format. - */ - public static void setPropagationTextFormat(@Nullable TextFormat textFormat) { - propagationTextFormat = textFormat; - } - - /** - * Sets the {@link io.opencensus.trace.propagation.TextFormat.Setter} used in context propagation. - * - *

            This API allows users of google-http-client to specify other text format setter, or disable - * context propagation by setting it to {@code null}. It should be used along with {@link - * #setPropagationTextFormat} for setting purpose. - * - * @param textFormatSetter the {@code TextFormat.Setter} for the text format. - */ - public static void setPropagationTextFormatSetter(@Nullable TextFormat.Setter textFormatSetter) { - propagationTextFormatSetter = textFormatSetter; - } - - /** - * Sets whether spans should be recorded locally. - * - *

            This API allows users of google-http-client to turn on/off local span collection. - * - * @param recordEvent record span locally if true. - */ - public static void setIsRecordEvent(boolean recordEvent) { - isRecordEvent = recordEvent; - } - - /** - * Returns the tracing component of OpenCensus. - * - * @return the tracing component of OpenCensus. - */ - public static Tracer getTracer() { - return tracer; - } - - /** - * Returns whether spans should be recorded locally. - * - * @return whether spans should be recorded locally. - */ - public static boolean isRecordEvent() { - return isRecordEvent; - } - - /** - * Propagate information of current tracing context. This information will be injected into HTTP - * header. - * - * @param span the span to be propagated. - * @param headers the headers used in propagation. - */ - public static void propagateTracingContext(Span span, HttpHeaders headers) { - Preconditions.checkArgument(span != null, "span should not be null."); - Preconditions.checkArgument(headers != null, "headers should not be null."); - if (propagationTextFormat != null && propagationTextFormatSetter != null) { - if (!span.equals(BlankSpan.INSTANCE)) { - propagationTextFormat.inject(span.getContext(), headers, propagationTextFormatSetter); - } - } - } - - /** - * Returns an {@link EndSpanOptions} to end a http span according to the status code. - * - * @param statusCode the status code, can be null to represent no valid response is returned. - * @return an {@code EndSpanOptions} that best suits the status code. - */ - public static EndSpanOptions getEndSpanOptions(@Nullable Integer statusCode) { - // Always sample the span, but optionally export it. - EndSpanOptions.Builder builder = EndSpanOptions.builder(); - if (statusCode == null) { - builder.setStatus(Status.UNKNOWN); - } else if (!HttpStatusCodes.isSuccess(statusCode)) { - switch (statusCode) { - case HttpStatusCodes.STATUS_CODE_BAD_REQUEST: - builder.setStatus(Status.INVALID_ARGUMENT); - break; - case HttpStatusCodes.STATUS_CODE_UNAUTHORIZED: - builder.setStatus(Status.UNAUTHENTICATED); - break; - case HttpStatusCodes.STATUS_CODE_FORBIDDEN: - builder.setStatus(Status.PERMISSION_DENIED); - break; - case HttpStatusCodes.STATUS_CODE_NOT_FOUND: - builder.setStatus(Status.NOT_FOUND); - break; - case HttpStatusCodes.STATUS_CODE_PRECONDITION_FAILED: - builder.setStatus(Status.FAILED_PRECONDITION); - break; - case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: - builder.setStatus(Status.UNAVAILABLE); - break; - default: - builder.setStatus(Status.UNKNOWN); - } - } else { - builder.setStatus(Status.OK); - } - return builder.build(); - } - - /** - * Records a new message event which contains the size of the request content. Note that the size - * represents the message size in application layer, i.e., content-length. - * - * @param span The {@code span} in which the send event occurs. - * @param size Size of the request. - */ - public static void recordSentMessageEvent(Span span, long size) { - recordMessageEvent(span, size, Type.SENT); - } - - /** - * Records a new message event which contains the size of the response content. Note that the size - * represents the message size in application layer, i.e., content-length. - * - * @param span The {@code span} in which the receive event occurs. - * @param size Size of the response. - */ - public static void recordReceivedMessageEvent(Span span, long size) { - recordMessageEvent(span, size, Type.RECEIVED); - } - - /** - * Records a message event of a certain {@link MessageEvent.Type}. This method is package - * protected since {@link MessageEvent} might be deprecated in future releases. - * - * @param span The {@code span} in which the event occurs. - * @param size Size of the message. - * @param eventType The {@code NetworkEvent.Type} of the message event. - */ - @VisibleForTesting - static void recordMessageEvent(Span span, long size, Type eventType) { - Preconditions.checkArgument(span != null, "span should not be null."); - if (size < 0) { - size = 0; - } - MessageEvent event = - MessageEvent.builder(eventType, idGenerator.getAndIncrement()) - .setUncompressedMessageSize(size) - .build(); - span.addMessageEvent(event); - } - - static { - try { - propagationTextFormat = HttpPropagationUtil.getCloudTraceFormat(); - propagationTextFormatSetter = - new TextFormat.Setter() { - @Override - public void put(HttpHeaders carrier, String key, String value) { - carrier.set(key, value); - } - }; - } catch (Exception e) { - logger.log( - Level.WARNING, "Cannot initialize default OpenCensus HTTP propagation text format.", e); - } - - try { - Tracing.getExportComponent() - .getSampledSpanStore() - .registerSpanNamesForCollection(ImmutableList.of(SPAN_NAME_HTTP_REQUEST_EXECUTE)); - } catch (Exception e) { - logger.log(Level.WARNING, "Cannot register default OpenCensus span names for collection.", e); - } - } - - private OpenCensusUtils() {} -} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java deleted file mode 100644 index 5d89f0350..000000000 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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 com.google.api.client.testing.http.MockHttpTransport; -import com.google.api.client.testing.http.MockLowLevelHttpRequest; -import com.google.api.client.testing.http.MockLowLevelHttpResponse; -import io.opencensus.common.Functions; -import io.opencensus.testing.export.TestHandler; -import io.opencensus.trace.AttributeValue; -import io.opencensus.trace.MessageEvent; -import io.opencensus.trace.Status; -import io.opencensus.trace.Tracing; -import io.opencensus.trace.config.TraceParams; -import io.opencensus.trace.export.SpanData; -import io.opencensus.trace.samplers.Samplers; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; -import java.util.List; - -import static com.google.api.client.http.OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class HttpRequestTracingTest { - private static final TestHandler testHandler = new TestHandler(); - - @Before - public void setupTestTracer() { - Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); - TraceParams params = - Tracing.getTraceConfig() - .getActiveTraceParams() - .toBuilder() - .setSampler(Samplers.alwaysSample()) - .build(); - Tracing.getTraceConfig().updateActiveTraceParams(params); - } - - @After - public void teardownTestTracer() { - Tracing.getExportComponent().getSpanExporter().unregisterHandler("test"); - } - - @Test(timeout = 20_000L) - public void executeCreatesSpan() throws IOException { - MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse() - .setStatusCode(200); - HttpTransport transport = new MockHttpTransport.Builder() - .setLowLevelHttpResponse(mockResponse) - .build(); - HttpRequest request = new HttpRequestFactory(transport, null) - .buildGetRequest(new GenericUrl("https://google.com/")); - request.execute(); - - // This call blocks - we set a timeout on this test to ensure we don't wait forever - List spans = testHandler.waitForExport(1); - assertEquals(1, spans.size()); - SpanData span = spans.get(0); - - // Ensure the span name is set - assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); - - // Ensure we have basic span attributes - assertAttributeEquals(span, "http.path", "/"); - assertAttributeEquals(span, "http.host", "google.com"); - assertAttributeEquals(span, "http.url", "https://google.com/"); - assertAttributeEquals(span, "http.method", "GET"); - - // Ensure we have a single annotation for starting the first attempt - assertEquals(1, span.getAnnotations().getEvents().size()); - - // Ensure we have 2 message events, SENT and RECEIVED - assertEquals(2, span.getMessageEvents().getEvents().size()); - assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); - assertEquals(MessageEvent.Type.RECEIVED, span.getMessageEvents().getEvents().get(1).getEvent().getType()); - - // Ensure we record the span status as OK - assertEquals(Status.OK, span.getStatus()); - } - - @Test(timeout = 20_000L) - public void executeExceptionCreatesSpan() throws IOException { - HttpTransport transport = new MockHttpTransport.Builder() - .setLowLevelHttpRequest(new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() throws IOException { - throw new IOException("some IOException"); - } - }) - .build(); - HttpRequest request = new HttpRequestFactory(transport, null) - .buildGetRequest(new GenericUrl("https://google.com/")); - - try { - request.execute(); - fail("expected to throw an IOException"); - } catch (IOException expected) { - } - - // This call blocks - we set a timeout on this test to ensure we don't wait forever - List spans = testHandler.waitForExport(1); - assertEquals(1, spans.size()); - SpanData span = spans.get(0); - - // Ensure the span name is set - assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); - - // Ensure we have basic span attributes - assertAttributeEquals(span, "http.path", "/"); - assertAttributeEquals(span, "http.host", "google.com"); - assertAttributeEquals(span, "http.url", "https://google.com/"); - assertAttributeEquals(span, "http.method", "GET"); - - // Ensure we have a single annotation for starting the first attempt - assertEquals(1, span.getAnnotations().getEvents().size()); - - // Ensure we have 2 message events, SENT and RECEIVED - assertEquals(1, span.getMessageEvents().getEvents().size()); - assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); - - // Ensure we record the span status as UNKNOWN - assertEquals(Status.UNKNOWN, span.getStatus()); } - - void assertAttributeEquals(SpanData span, String attributeName, String expectedValue) { - Object attributeValue = span.getAttributes().getAttributeMap().get(attributeName); - assertNotNull("expected span to contain attribute: " + attributeName, attributeValue); - assertTrue(attributeValue instanceof AttributeValue); - String value = ((AttributeValue) attributeValue).match( - Functions.returnToString(), - Functions.returnToString(), - Functions.returnToString(), - Functions.returnToString(), - Functions.returnNull()); - assertEquals(expectedValue, value); - } -} diff --git a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java deleted file mode 100644 index 8fa8624eb..000000000 --- a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright (c) 2018 Google Inc. - * - * 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 io.opencensus.trace.Annotation; -import io.opencensus.trace.AttributeValue; -import io.opencensus.trace.BlankSpan; -import io.opencensus.trace.EndSpanOptions; -import io.opencensus.trace.Link; -import io.opencensus.trace.MessageEvent; -import io.opencensus.trace.Span; -import io.opencensus.trace.SpanContext; -import io.opencensus.trace.Status; -import io.opencensus.trace.Tracer; -import io.opencensus.trace.propagation.TextFormat; -import java.util.List; -import java.util.Map; -import junit.framework.TestCase; - -/** - * Tests {@link OpenCensusUtils}. - * - * @author Hailong Wen - */ -public class OpenCensusUtilsTest extends TestCase { - - TextFormat mockTextFormat; - TextFormat.Setter mockTextFormatSetter; - TextFormat originTextFormat; - TextFormat.Setter originTextFormatSetter; - Span mockSpan; - HttpHeaders headers; - Tracer tracer; - - public OpenCensusUtilsTest(String testName) { - super(testName); - } - - @Override - public void setUp() { - mockTextFormat = - new TextFormat() { - @Override - public List fields() { - throw new UnsupportedOperationException("TextFormat.fields"); - } - - @Override - public void inject(SpanContext spanContext, C carrier, Setter setter) { - throw new UnsupportedOperationException("TextFormat.inject"); - } - - @Override - public SpanContext extract(C carrier, Getter getter) { - throw new UnsupportedOperationException("TextFormat.extract"); - } - }; - mockTextFormatSetter = - new TextFormat.Setter() { - @Override - public void put(HttpHeaders carrier, String key, String value) { - throw new UnsupportedOperationException("TextFormat.Setter.put"); - } - }; - headers = new HttpHeaders(); - tracer = OpenCensusUtils.getTracer(); - mockSpan = - new Span(tracer.getCurrentSpan().getContext(), null) { - - @Override - public void addAnnotation(String description, Map attributes) {} - - @Override - public void addAnnotation(Annotation annotation) {} - - @Override - public void addMessageEvent(MessageEvent event) { - throw new UnsupportedOperationException("Span.addMessageEvent"); - } - - @Override - public void addLink(Link link) {} - - @Override - public void end(EndSpanOptions options) {} - }; - originTextFormat = OpenCensusUtils.propagationTextFormat; - originTextFormatSetter = OpenCensusUtils.propagationTextFormatSetter; - } - - @Override - public void tearDown() { - OpenCensusUtils.setPropagationTextFormat(originTextFormat); - OpenCensusUtils.setPropagationTextFormatSetter(originTextFormatSetter); - } - - public void testInitializatoin() { - assertNotNull(OpenCensusUtils.getTracer()); - assertNotNull(OpenCensusUtils.propagationTextFormat); - assertNotNull(OpenCensusUtils.propagationTextFormatSetter); - } - - public void testSetPropagationTextFormat() { - OpenCensusUtils.setPropagationTextFormat(mockTextFormat); - assertEquals(mockTextFormat, OpenCensusUtils.propagationTextFormat); - } - - public void testSetPropagationTextFormatSetter() { - OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); - assertEquals(mockTextFormatSetter, OpenCensusUtils.propagationTextFormatSetter); - } - - public void testPropagateTracingContextInjection() { - OpenCensusUtils.setPropagationTextFormat(mockTextFormat); - try { - OpenCensusUtils.propagateTracingContext(mockSpan, headers); - fail("expected " + UnsupportedOperationException.class); - } catch (UnsupportedOperationException e) { - assertEquals(e.getMessage(), "TextFormat.inject"); - } - } - - public void testPropagateTracingContextHeader() { - OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); - try { - OpenCensusUtils.propagateTracingContext(mockSpan, headers); - fail("expected " + UnsupportedOperationException.class); - } catch (UnsupportedOperationException e) { - assertEquals(e.getMessage(), "TextFormat.Setter.put"); - } - } - - public void testPropagateTracingContextNullSpan() { - OpenCensusUtils.setPropagationTextFormat(mockTextFormat); - try { - OpenCensusUtils.propagateTracingContext(null, headers); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), "span should not be null."); - } - } - - public void testPropagateTracingContextNullHeaders() { - OpenCensusUtils.setPropagationTextFormat(mockTextFormat); - try { - OpenCensusUtils.propagateTracingContext(mockSpan, null); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), "headers should not be null."); - } - } - - public void testPropagateTracingContextInvalidSpan() { - OpenCensusUtils.setPropagationTextFormat(mockTextFormat); - // No injection. No exceptions should be thrown. - OpenCensusUtils.propagateTracingContext(BlankSpan.INSTANCE, headers); - } - - public void testGetEndSpanOptionsNoResponse() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(null)); - } - - public void testGetEndSpanOptionsSuccess() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.OK).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(200)); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(201)); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(202)); - } - - public void testGetEndSpanOptionsBadRequest() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.INVALID_ARGUMENT).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(400)); - } - - public void testGetEndSpanOptionsUnauthorized() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAUTHENTICATED).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(401)); - } - - public void testGetEndSpanOptionsForbidden() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.PERMISSION_DENIED).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(403)); - } - - public void testGetEndSpanOptionsNotFound() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.NOT_FOUND).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(404)); - } - - public void testGetEndSpanOptionsPreconditionFailed() { - EndSpanOptions expected = - EndSpanOptions.builder().setStatus(Status.FAILED_PRECONDITION).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(412)); - } - - public void testGetEndSpanOptionsServerError() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAVAILABLE).build(); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(500)); - } - - public void testGetEndSpanOptionsOther() { - EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); - // test some random unsupported statuses - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(301)); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(402)); - assertEquals(expected, OpenCensusUtils.getEndSpanOptions(501)); - } - - public void testRecordMessageEventInNullSpan() { - try { - OpenCensusUtils.recordMessageEvent(null, 0, MessageEvent.Type.SENT); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { - assertEquals(e.getMessage(), "span should not be null."); - } - } - - public void testRecordMessageEvent() { - try { - OpenCensusUtils.recordMessageEvent(mockSpan, 0, MessageEvent.Type.SENT); - fail("expected " + UnsupportedOperationException.class); - } catch (UnsupportedOperationException e) { - assertEquals(e.getMessage(), "Span.addMessageEvent"); - } - } -} diff --git a/pom.xml b/pom.xml index 6ffe61f08..41ff12989 100644 --- a/pom.xml +++ b/pom.xml @@ -166,11 +166,6 @@ guava-testlib ${project.guava.version} - - com.google.code.findbugs - jsr305 - ${project.jsr305.version} - com.google.protobuf protobuf-java @@ -241,26 +236,6 @@ j2objc-annotations 1.3 - - io.opencensus - opencensus-api - ${project.opencensus.version} - - - io.opencensus - opencensus-contrib-http-util - ${project.opencensus.version} - - - io.opencensus - opencensus-impl - ${project.opencensus.version} - - - io.opencensus - opencensus-testing - ${project.opencensus.version} - @@ -552,7 +527,6 @@ 1.32.2-SNAPSHOT 1.9.71 UTF-8 - 3.0.2 2.8.6 2.10.0 3.10.0 @@ -561,7 +535,6 @@ 1.2 4.5.10 4.4.12 - 0.24.0 .. false From ea09fd51cccaab307a5c05422ab0ef03fd1d2634 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 11 Oct 2019 13:54:27 -0700 Subject: [PATCH 181/983] revert: "feat: remove opencensus (#834)" (#837) This reverts commit f16c777b234488d714b59b1cf6031e2165dfc322. --- google-http-client/pom.xml | 34 +++ .../google/api/client/http/HttpRequest.java | 40 +++ .../api/client/http/OpenCensusUtils.java | 250 ++++++++++++++++++ .../client/http/HttpRequestTracingTest.java | 153 +++++++++++ .../api/client/http/OpenCensusUtilsTest.java | 240 +++++++++++++++++ pom.xml | 27 ++ 6 files changed, 744 insertions(+) create mode 100644 google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java create mode 100644 google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java create mode 100644 google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9dcf51e03..9b5480255 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -16,6 +16,18 @@ + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.1 + + io.opencensus:opencensus-impl + + + + org.apache.maven.plugins @@ -97,6 +109,10 @@ org.apache.httpcomponents httpcore + + com.google.code.findbugs + jsr305 + com.google.guava guava @@ -105,6 +121,14 @@ com.google.j2objc j2objc-annotations + + io.opencensus + opencensus-api + + + io.opencensus + opencensus-contrib-http-util + com.google.guava @@ -126,5 +150,15 @@ mockito-all test + + io.opencensus + opencensus-impl + test + + + io.opencensus + opencensus-testing + test + diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 7bd959573..f6cd29ef4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -23,6 +23,11 @@ import com.google.api.client.util.StreamingContent; import com.google.api.client.util.StringUtils; import com.google.common.util.concurrent.ThreadFactoryBuilder; +import io.opencensus.common.Scope; +import io.opencensus.contrib.http.util.HttpTraceAttributeConstants; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.Span; +import io.opencensus.trace.Tracer; import java.io.IOException; import java.io.InputStream; import java.util.Properties; @@ -192,6 +197,9 @@ public final class HttpRequest { /** Sleeper. */ private Sleeper sleeper = Sleeper.DEFAULT; + /** OpenCensus tracing component. */ + private final Tracer tracer = OpenCensusUtils.getTracer(); + /** * Determines whether {@link HttpResponse#getContent()} of this request should return raw input * stream or not. @@ -835,7 +843,13 @@ public HttpResponse execute() throws IOException { Preconditions.checkNotNull(requestMethod); Preconditions.checkNotNull(url); + Span span = + tracer + .spanBuilder(OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE) + .setRecordEvents(OpenCensusUtils.isRecordEvent()) + .startSpan(); do { + span.addAnnotation("retry #" + (numRetries - retriesRemaining)); // Cleanup any unneeded response from a previous iteration if (response != null) { response.ignore(); @@ -850,6 +864,10 @@ public HttpResponse execute() throws IOException { } // build low-level HTTP request String urlString = url.build(); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_METHOD, requestMethod); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_HOST, url.getHost()); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_PATH, url.getRawPath()); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_URL, urlString); LowLevelHttpRequest lowLevelHttpRequest = transport.buildRequest(requestMethod, urlString); Logger logger = HttpTransport.LOGGER; @@ -879,11 +897,14 @@ public HttpResponse execute() throws IOException { if (!suppressUserAgentSuffix) { if (originalUserAgent == null) { headers.setUserAgent(USER_AGENT_SUFFIX); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_USER_AGENT, USER_AGENT_SUFFIX); } else { String newUserAgent = originalUserAgent + " " + USER_AGENT_SUFFIX; headers.setUserAgent(newUserAgent); + addSpanAttribute(span, HttpTraceAttributeConstants.HTTP_USER_AGENT, newUserAgent); } } + OpenCensusUtils.propagateTracingContext(span, headers); // headers HttpHeaders.serializeHeaders(headers, logbuf, curlbuf, logger, lowLevelHttpRequest); @@ -967,8 +988,15 @@ public HttpResponse execute() throws IOException { lowLevelHttpRequest.setTimeout(connectTimeout, readTimeout); lowLevelHttpRequest.setWriteTimeout(writeTimeout); + // switch tracing scope to current span + @SuppressWarnings("MustBeClosedChecker") + Scope ws = tracer.withSpan(span); + OpenCensusUtils.recordSentMessageEvent(span, lowLevelHttpRequest.getContentLength()); try { LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest.execute(); + if (lowLevelHttpResponse != null) { + OpenCensusUtils.recordReceivedMessageEvent(span, lowLevelHttpResponse.getContentLength()); + } // Flag used to indicate if an exception is thrown before the response is constructed. boolean responseConstructed = false; try { @@ -986,6 +1014,8 @@ public HttpResponse execute() throws IOException { if (!retryOnExecuteIOException && (ioExceptionHandler == null || !ioExceptionHandler.handleIOException(this, retryRequest))) { + // static analysis shows response is always null here + span.end(OpenCensusUtils.getEndSpanOptions(null)); throw e; } // Save the exception in case the retries do not work and we need to re-throw it later. @@ -993,6 +1023,8 @@ public HttpResponse execute() throws IOException { if (loggable) { logger.log(Level.WARNING, "exception thrown while executing request", e); } + } finally { + ws.close(); } // Flag used to indicate if an exception is thrown before the response has completed @@ -1049,6 +1081,8 @@ public HttpResponse execute() throws IOException { } } } while (retryRequest); + span.end(OpenCensusUtils.getEndSpanOptions(response == null ? null : response.getStatusCode())); + if (response == null) { // Retries did not help resolve the execute exception, re-throw it. throw executeException; @@ -1163,6 +1197,12 @@ public HttpRequest setSleeper(Sleeper sleeper) { return this; } + private static void addSpanAttribute(Span span, String key, String value) { + if (value != null) { + span.putAttribute(key, AttributeValue.stringAttributeValue(value)); + } + } + private static String getVersion() { String version = HttpRequest.class.getPackage().getImplementationVersion(); // in a non-packaged environment (local), there's no implementation version to read diff --git a/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java new file mode 100644 index 000000000..5b2c9d41e --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2018 Google Inc. + * + * 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 com.google.api.client.util.Beta; +import com.google.api.client.util.Preconditions; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.ImmutableList; +import io.opencensus.contrib.http.util.HttpPropagationUtil; +import io.opencensus.trace.BlankSpan; +import io.opencensus.trace.EndSpanOptions; +import io.opencensus.trace.MessageEvent; +import io.opencensus.trace.MessageEvent.Type; +import io.opencensus.trace.Span; +import io.opencensus.trace.Status; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.propagation.TextFormat; +import java.util.concurrent.atomic.AtomicLong; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.annotation.Nullable; + +/** + * {@link Beta}
            + * Utilities for Census monitoring and tracing. + * + * @author Hailong Wen + * @since 1.28 + */ +@Beta +public class OpenCensusUtils { + + private static final Logger logger = Logger.getLogger(OpenCensusUtils.class.getName()); + + /** Span name for tracing {@link HttpRequest#execute()}. */ + public static final String SPAN_NAME_HTTP_REQUEST_EXECUTE = + "Sent." + HttpRequest.class.getName() + ".execute"; + + /** + * OpenCensus tracing component. When no OpenCensus implementation is provided, it will return a + * no-op tracer. + */ + private static final Tracer tracer = Tracing.getTracer(); + + /** Sequence id generator for message event. */ + private static final AtomicLong idGenerator = new AtomicLong(); + + /** Whether spans should be recorded locally. Defaults to true. */ + private static volatile boolean isRecordEvent = true; + + /** {@link TextFormat} used in tracing context propagation. */ + @Nullable @VisibleForTesting static volatile TextFormat propagationTextFormat = null; + + /** {@link TextFormat.Setter} for {@link #propagationTextFormat}. */ + @Nullable @VisibleForTesting static volatile TextFormat.Setter propagationTextFormatSetter = null; + + /** + * Sets the {@link TextFormat} used in context propagation. + * + *

            This API allows users of google-http-client to specify other text format, or disable context + * propagation by setting it to {@code null}. It should be used along with {@link + * #setPropagationTextFormatSetter} for setting purpose. + * + * @param textFormat the text format. + */ + public static void setPropagationTextFormat(@Nullable TextFormat textFormat) { + propagationTextFormat = textFormat; + } + + /** + * Sets the {@link io.opencensus.trace.propagation.TextFormat.Setter} used in context propagation. + * + *

            This API allows users of google-http-client to specify other text format setter, or disable + * context propagation by setting it to {@code null}. It should be used along with {@link + * #setPropagationTextFormat} for setting purpose. + * + * @param textFormatSetter the {@code TextFormat.Setter} for the text format. + */ + public static void setPropagationTextFormatSetter(@Nullable TextFormat.Setter textFormatSetter) { + propagationTextFormatSetter = textFormatSetter; + } + + /** + * Sets whether spans should be recorded locally. + * + *

            This API allows users of google-http-client to turn on/off local span collection. + * + * @param recordEvent record span locally if true. + */ + public static void setIsRecordEvent(boolean recordEvent) { + isRecordEvent = recordEvent; + } + + /** + * Returns the tracing component of OpenCensus. + * + * @return the tracing component of OpenCensus. + */ + public static Tracer getTracer() { + return tracer; + } + + /** + * Returns whether spans should be recorded locally. + * + * @return whether spans should be recorded locally. + */ + public static boolean isRecordEvent() { + return isRecordEvent; + } + + /** + * Propagate information of current tracing context. This information will be injected into HTTP + * header. + * + * @param span the span to be propagated. + * @param headers the headers used in propagation. + */ + public static void propagateTracingContext(Span span, HttpHeaders headers) { + Preconditions.checkArgument(span != null, "span should not be null."); + Preconditions.checkArgument(headers != null, "headers should not be null."); + if (propagationTextFormat != null && propagationTextFormatSetter != null) { + if (!span.equals(BlankSpan.INSTANCE)) { + propagationTextFormat.inject(span.getContext(), headers, propagationTextFormatSetter); + } + } + } + + /** + * Returns an {@link EndSpanOptions} to end a http span according to the status code. + * + * @param statusCode the status code, can be null to represent no valid response is returned. + * @return an {@code EndSpanOptions} that best suits the status code. + */ + public static EndSpanOptions getEndSpanOptions(@Nullable Integer statusCode) { + // Always sample the span, but optionally export it. + EndSpanOptions.Builder builder = EndSpanOptions.builder(); + if (statusCode == null) { + builder.setStatus(Status.UNKNOWN); + } else if (!HttpStatusCodes.isSuccess(statusCode)) { + switch (statusCode) { + case HttpStatusCodes.STATUS_CODE_BAD_REQUEST: + builder.setStatus(Status.INVALID_ARGUMENT); + break; + case HttpStatusCodes.STATUS_CODE_UNAUTHORIZED: + builder.setStatus(Status.UNAUTHENTICATED); + break; + case HttpStatusCodes.STATUS_CODE_FORBIDDEN: + builder.setStatus(Status.PERMISSION_DENIED); + break; + case HttpStatusCodes.STATUS_CODE_NOT_FOUND: + builder.setStatus(Status.NOT_FOUND); + break; + case HttpStatusCodes.STATUS_CODE_PRECONDITION_FAILED: + builder.setStatus(Status.FAILED_PRECONDITION); + break; + case HttpStatusCodes.STATUS_CODE_SERVER_ERROR: + builder.setStatus(Status.UNAVAILABLE); + break; + default: + builder.setStatus(Status.UNKNOWN); + } + } else { + builder.setStatus(Status.OK); + } + return builder.build(); + } + + /** + * Records a new message event which contains the size of the request content. Note that the size + * represents the message size in application layer, i.e., content-length. + * + * @param span The {@code span} in which the send event occurs. + * @param size Size of the request. + */ + public static void recordSentMessageEvent(Span span, long size) { + recordMessageEvent(span, size, Type.SENT); + } + + /** + * Records a new message event which contains the size of the response content. Note that the size + * represents the message size in application layer, i.e., content-length. + * + * @param span The {@code span} in which the receive event occurs. + * @param size Size of the response. + */ + public static void recordReceivedMessageEvent(Span span, long size) { + recordMessageEvent(span, size, Type.RECEIVED); + } + + /** + * Records a message event of a certain {@link MessageEvent.Type}. This method is package + * protected since {@link MessageEvent} might be deprecated in future releases. + * + * @param span The {@code span} in which the event occurs. + * @param size Size of the message. + * @param eventType The {@code NetworkEvent.Type} of the message event. + */ + @VisibleForTesting + static void recordMessageEvent(Span span, long size, Type eventType) { + Preconditions.checkArgument(span != null, "span should not be null."); + if (size < 0) { + size = 0; + } + MessageEvent event = + MessageEvent.builder(eventType, idGenerator.getAndIncrement()) + .setUncompressedMessageSize(size) + .build(); + span.addMessageEvent(event); + } + + static { + try { + propagationTextFormat = HttpPropagationUtil.getCloudTraceFormat(); + propagationTextFormatSetter = + new TextFormat.Setter() { + @Override + public void put(HttpHeaders carrier, String key, String value) { + carrier.set(key, value); + } + }; + } catch (Exception e) { + logger.log( + Level.WARNING, "Cannot initialize default OpenCensus HTTP propagation text format.", e); + } + + try { + Tracing.getExportComponent() + .getSampledSpanStore() + .registerSpanNamesForCollection(ImmutableList.of(SPAN_NAME_HTTP_REQUEST_EXECUTE)); + } catch (Exception e) { + logger.log(Level.WARNING, "Cannot register default OpenCensus span names for collection.", e); + } + } + + private OpenCensusUtils() {} +} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java new file mode 100644 index 000000000..5d89f0350 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -0,0 +1,153 @@ +/* + * 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 com.google.api.client.testing.http.MockHttpTransport; +import com.google.api.client.testing.http.MockLowLevelHttpRequest; +import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import io.opencensus.common.Functions; +import io.opencensus.testing.export.TestHandler; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.MessageEvent; +import io.opencensus.trace.Status; +import io.opencensus.trace.Tracing; +import io.opencensus.trace.config.TraceParams; +import io.opencensus.trace.export.SpanData; +import io.opencensus.trace.samplers.Samplers; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.io.IOException; +import java.util.List; + +import static com.google.api.client.http.OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class HttpRequestTracingTest { + private static final TestHandler testHandler = new TestHandler(); + + @Before + public void setupTestTracer() { + Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); + TraceParams params = + Tracing.getTraceConfig() + .getActiveTraceParams() + .toBuilder() + .setSampler(Samplers.alwaysSample()) + .build(); + Tracing.getTraceConfig().updateActiveTraceParams(params); + } + + @After + public void teardownTestTracer() { + Tracing.getExportComponent().getSpanExporter().unregisterHandler("test"); + } + + @Test(timeout = 20_000L) + public void executeCreatesSpan() throws IOException { + MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse() + .setStatusCode(200); + HttpTransport transport = new MockHttpTransport.Builder() + .setLowLevelHttpResponse(mockResponse) + .build(); + HttpRequest request = new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); + request.execute(); + + // This call blocks - we set a timeout on this test to ensure we don't wait forever + List spans = testHandler.waitForExport(1); + assertEquals(1, spans.size()); + SpanData span = spans.get(0); + + // Ensure the span name is set + assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); + + // Ensure we have basic span attributes + assertAttributeEquals(span, "http.path", "/"); + assertAttributeEquals(span, "http.host", "google.com"); + assertAttributeEquals(span, "http.url", "https://google.com/"); + assertAttributeEquals(span, "http.method", "GET"); + + // Ensure we have a single annotation for starting the first attempt + assertEquals(1, span.getAnnotations().getEvents().size()); + + // Ensure we have 2 message events, SENT and RECEIVED + assertEquals(2, span.getMessageEvents().getEvents().size()); + assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + assertEquals(MessageEvent.Type.RECEIVED, span.getMessageEvents().getEvents().get(1).getEvent().getType()); + + // Ensure we record the span status as OK + assertEquals(Status.OK, span.getStatus()); + } + + @Test(timeout = 20_000L) + public void executeExceptionCreatesSpan() throws IOException { + HttpTransport transport = new MockHttpTransport.Builder() + .setLowLevelHttpRequest(new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + throw new IOException("some IOException"); + } + }) + .build(); + HttpRequest request = new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); + + try { + request.execute(); + fail("expected to throw an IOException"); + } catch (IOException expected) { + } + + // This call blocks - we set a timeout on this test to ensure we don't wait forever + List spans = testHandler.waitForExport(1); + assertEquals(1, spans.size()); + SpanData span = spans.get(0); + + // Ensure the span name is set + assertEquals(SPAN_NAME_HTTP_REQUEST_EXECUTE, span.getName()); + + // Ensure we have basic span attributes + assertAttributeEquals(span, "http.path", "/"); + assertAttributeEquals(span, "http.host", "google.com"); + assertAttributeEquals(span, "http.url", "https://google.com/"); + assertAttributeEquals(span, "http.method", "GET"); + + // Ensure we have a single annotation for starting the first attempt + assertEquals(1, span.getAnnotations().getEvents().size()); + + // Ensure we have 2 message events, SENT and RECEIVED + assertEquals(1, span.getMessageEvents().getEvents().size()); + assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + + // Ensure we record the span status as UNKNOWN + assertEquals(Status.UNKNOWN, span.getStatus()); } + + void assertAttributeEquals(SpanData span, String attributeName, String expectedValue) { + Object attributeValue = span.getAttributes().getAttributeMap().get(attributeName); + assertNotNull("expected span to contain attribute: " + attributeName, attributeValue); + assertTrue(attributeValue instanceof AttributeValue); + String value = ((AttributeValue) attributeValue).match( + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnNull()); + assertEquals(expectedValue, value); + } +} diff --git a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java new file mode 100644 index 000000000..8fa8624eb --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2018 Google Inc. + * + * 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 io.opencensus.trace.Annotation; +import io.opencensus.trace.AttributeValue; +import io.opencensus.trace.BlankSpan; +import io.opencensus.trace.EndSpanOptions; +import io.opencensus.trace.Link; +import io.opencensus.trace.MessageEvent; +import io.opencensus.trace.Span; +import io.opencensus.trace.SpanContext; +import io.opencensus.trace.Status; +import io.opencensus.trace.Tracer; +import io.opencensus.trace.propagation.TextFormat; +import java.util.List; +import java.util.Map; +import junit.framework.TestCase; + +/** + * Tests {@link OpenCensusUtils}. + * + * @author Hailong Wen + */ +public class OpenCensusUtilsTest extends TestCase { + + TextFormat mockTextFormat; + TextFormat.Setter mockTextFormatSetter; + TextFormat originTextFormat; + TextFormat.Setter originTextFormatSetter; + Span mockSpan; + HttpHeaders headers; + Tracer tracer; + + public OpenCensusUtilsTest(String testName) { + super(testName); + } + + @Override + public void setUp() { + mockTextFormat = + new TextFormat() { + @Override + public List fields() { + throw new UnsupportedOperationException("TextFormat.fields"); + } + + @Override + public void inject(SpanContext spanContext, C carrier, Setter setter) { + throw new UnsupportedOperationException("TextFormat.inject"); + } + + @Override + public SpanContext extract(C carrier, Getter getter) { + throw new UnsupportedOperationException("TextFormat.extract"); + } + }; + mockTextFormatSetter = + new TextFormat.Setter() { + @Override + public void put(HttpHeaders carrier, String key, String value) { + throw new UnsupportedOperationException("TextFormat.Setter.put"); + } + }; + headers = new HttpHeaders(); + tracer = OpenCensusUtils.getTracer(); + mockSpan = + new Span(tracer.getCurrentSpan().getContext(), null) { + + @Override + public void addAnnotation(String description, Map attributes) {} + + @Override + public void addAnnotation(Annotation annotation) {} + + @Override + public void addMessageEvent(MessageEvent event) { + throw new UnsupportedOperationException("Span.addMessageEvent"); + } + + @Override + public void addLink(Link link) {} + + @Override + public void end(EndSpanOptions options) {} + }; + originTextFormat = OpenCensusUtils.propagationTextFormat; + originTextFormatSetter = OpenCensusUtils.propagationTextFormatSetter; + } + + @Override + public void tearDown() { + OpenCensusUtils.setPropagationTextFormat(originTextFormat); + OpenCensusUtils.setPropagationTextFormatSetter(originTextFormatSetter); + } + + public void testInitializatoin() { + assertNotNull(OpenCensusUtils.getTracer()); + assertNotNull(OpenCensusUtils.propagationTextFormat); + assertNotNull(OpenCensusUtils.propagationTextFormatSetter); + } + + public void testSetPropagationTextFormat() { + OpenCensusUtils.setPropagationTextFormat(mockTextFormat); + assertEquals(mockTextFormat, OpenCensusUtils.propagationTextFormat); + } + + public void testSetPropagationTextFormatSetter() { + OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); + assertEquals(mockTextFormatSetter, OpenCensusUtils.propagationTextFormatSetter); + } + + public void testPropagateTracingContextInjection() { + OpenCensusUtils.setPropagationTextFormat(mockTextFormat); + try { + OpenCensusUtils.propagateTracingContext(mockSpan, headers); + fail("expected " + UnsupportedOperationException.class); + } catch (UnsupportedOperationException e) { + assertEquals(e.getMessage(), "TextFormat.inject"); + } + } + + public void testPropagateTracingContextHeader() { + OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); + try { + OpenCensusUtils.propagateTracingContext(mockSpan, headers); + fail("expected " + UnsupportedOperationException.class); + } catch (UnsupportedOperationException e) { + assertEquals(e.getMessage(), "TextFormat.Setter.put"); + } + } + + public void testPropagateTracingContextNullSpan() { + OpenCensusUtils.setPropagationTextFormat(mockTextFormat); + try { + OpenCensusUtils.propagateTracingContext(null, headers); + fail("expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), "span should not be null."); + } + } + + public void testPropagateTracingContextNullHeaders() { + OpenCensusUtils.setPropagationTextFormat(mockTextFormat); + try { + OpenCensusUtils.propagateTracingContext(mockSpan, null); + fail("expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), "headers should not be null."); + } + } + + public void testPropagateTracingContextInvalidSpan() { + OpenCensusUtils.setPropagationTextFormat(mockTextFormat); + // No injection. No exceptions should be thrown. + OpenCensusUtils.propagateTracingContext(BlankSpan.INSTANCE, headers); + } + + public void testGetEndSpanOptionsNoResponse() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(null)); + } + + public void testGetEndSpanOptionsSuccess() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.OK).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(200)); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(201)); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(202)); + } + + public void testGetEndSpanOptionsBadRequest() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.INVALID_ARGUMENT).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(400)); + } + + public void testGetEndSpanOptionsUnauthorized() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAUTHENTICATED).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(401)); + } + + public void testGetEndSpanOptionsForbidden() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.PERMISSION_DENIED).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(403)); + } + + public void testGetEndSpanOptionsNotFound() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.NOT_FOUND).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(404)); + } + + public void testGetEndSpanOptionsPreconditionFailed() { + EndSpanOptions expected = + EndSpanOptions.builder().setStatus(Status.FAILED_PRECONDITION).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(412)); + } + + public void testGetEndSpanOptionsServerError() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAVAILABLE).build(); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(500)); + } + + public void testGetEndSpanOptionsOther() { + EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); + // test some random unsupported statuses + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(301)); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(402)); + assertEquals(expected, OpenCensusUtils.getEndSpanOptions(501)); + } + + public void testRecordMessageEventInNullSpan() { + try { + OpenCensusUtils.recordMessageEvent(null, 0, MessageEvent.Type.SENT); + fail("expected " + IllegalArgumentException.class); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), "span should not be null."); + } + } + + public void testRecordMessageEvent() { + try { + OpenCensusUtils.recordMessageEvent(mockSpan, 0, MessageEvent.Type.SENT); + fail("expected " + UnsupportedOperationException.class); + } catch (UnsupportedOperationException e) { + assertEquals(e.getMessage(), "Span.addMessageEvent"); + } + } +} diff --git a/pom.xml b/pom.xml index 41ff12989..6ffe61f08 100644 --- a/pom.xml +++ b/pom.xml @@ -166,6 +166,11 @@ guava-testlib ${project.guava.version} + + com.google.code.findbugs + jsr305 + ${project.jsr305.version} + com.google.protobuf protobuf-java @@ -236,6 +241,26 @@ j2objc-annotations 1.3 + + io.opencensus + opencensus-api + ${project.opencensus.version} + + + io.opencensus + opencensus-contrib-http-util + ${project.opencensus.version} + + + io.opencensus + opencensus-impl + ${project.opencensus.version} + + + io.opencensus + opencensus-testing + ${project.opencensus.version} + @@ -527,6 +552,7 @@ 1.32.2-SNAPSHOT 1.9.71 UTF-8 + 3.0.2 2.8.6 2.10.0 3.10.0 @@ -535,6 +561,7 @@ 1.2 4.5.10 4.4.12 + 0.24.0 .. false From 5d15646e905ead4a2667560291ec2c58867d3a90 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 17 Oct 2019 15:59:22 -0700 Subject: [PATCH 182/983] chore: update common templates (#844) --- .kokoro/release/snapshot.sh | 5 ++++- synth.metadata | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh index bf738c56d..098168a73 100755 --- a/.kokoro/release/snapshot.sh +++ b/.kokoro/release/snapshot.sh @@ -19,6 +19,9 @@ source $(dirname "$0")/common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml pushd $(dirname "$0")/../../ +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + setup_environment_secrets create_settings_xml_file "settings.xml" @@ -27,4 +30,4 @@ mvn clean install deploy -B \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} \ No newline at end of file + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/synth.metadata b/synth.metadata index b4ed968a3..2d4302a10 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-10T08:02:08.936565Z", + "updateTime": "2019-10-15T08:01:28.284647Z", "sources": [ { "template": { From b5bce9b7b1d328518c5c88e7711b78b4d9e4c9da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 18 Oct 2019 07:56:47 -0700 Subject: [PATCH 183/983] chore: update common templates (#848) --- .kokoro/build.sh | 2 ++ .kokoro/coerce_logs.sh | 38 +++++++++++++++++++++++++++++++++++ .kokoro/continuous/common.cfg | 1 + .kokoro/nightly/common.cfg | 1 + .kokoro/presubmit/common.cfg | 1 + .kokoro/release/stage.sh | 1 + synth.metadata | 4 ++-- 7 files changed, 46 insertions(+), 2 deletions(-) create mode 100755 .kokoro/coerce_logs.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 2ffb5ef7f..bcd1e410c 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -39,6 +39,7 @@ case ${JOB_TYPE} in test) mvn test -B bash ${KOKORO_GFILE_DIR}/codecov.sh + bash .kokoro/coerce_logs.sh ;; lint) mvn com.coveo:fmt-maven-plugin:check @@ -48,6 +49,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + bash .kokoro/coerce_logs.sh ;; *) ;; diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 000000000..5cf7ba49e --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# 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. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + echo "processing ${xml}" + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg index a5178e08c..5ba7070f2 100644 --- a/.kokoro/continuous/common.cfg +++ b/.kokoro/continuous/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg index a5178e08c..5ba7070f2 100644 --- a/.kokoro/nightly/common.cfg +++ b/.kokoro/nightly/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index 709e429bf..ad5913e48 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -4,6 +4,7 @@ action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" } } diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index b1b1b01c6..3c482cbc5 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -28,6 +28,7 @@ create_settings_xml_file "settings.xml" mvn clean install deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ diff --git a/synth.metadata b/synth.metadata index 2d4302a10..556bc58a3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,11 +1,11 @@ { - "updateTime": "2019-10-15T08:01:28.284647Z", + "updateTime": "2019-10-18T07:51:39.452073Z", "sources": [ { "template": { "name": "java_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ] From 1522eb5c011b4f20199e2ec8cb5ec58d10cc399a Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 18 Oct 2019 18:10:05 +0300 Subject: [PATCH 184/983] deps: update dependency mysql:mysql-connector-java to v8.0.18 (#839) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ffe61f08..f97a4f7d2 100644 --- a/pom.xml +++ b/pom.xml @@ -234,7 +234,7 @@ mysql mysql-connector-java - 8.0.17 + 8.0.18 com.google.j2objc From 087a428390a334bd761a8a3d66475aa4dde72ed1 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Fri, 18 Oct 2019 11:36:11 -0600 Subject: [PATCH 185/983] feat: wrap GZIPInputStream for connection reuse (#840) If a connection is closed and there are some bytes that have not been read that connection can't be reused. Now GZIPInputStream will have all of its bytes read on close automatically to promote connection reuse. Cherry-picked: #749 Fixes: #367 --- .../api/client/http/ConsumingInputStream.java | 47 ++++++++++++++ .../google/api/client/http/HttpResponse.java | 3 +- .../client/http/ConsumingInputStreamTest.java | 65 +++++++++++++++++++ .../api/client/http/HttpResponseTest.java | 38 +++++++++++ 4 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java create mode 100644 google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java b/google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java new file mode 100644 index 000000000..f0170a61b --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java @@ -0,0 +1,47 @@ +/* + * 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 + * + * https://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 com.google.common.io.ByteStreams; +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; + +/** + * This class in meant to wrap an {@link InputStream} so that all bytes in the steam are read and + * discarded on {@link InputStream#close()}. This ensures that the underlying connection has the + * option to be reused. + */ +final class ConsumingInputStream extends FilterInputStream { + private boolean closed = false; + + ConsumingInputStream(InputStream inputStream) { + super(inputStream); + } + + @Override + public void close() throws IOException { + if (!closed && in != null) { + try { + ByteStreams.exhaust(this); + super.in.close(); + } finally { + this.closed = true; + } + } + } +} diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 90c3812f0..d972ab0d4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -331,7 +331,8 @@ public InputStream getContent() throws IOException { if (!returnRawInputStream && contentEncoding != null && contentEncoding.contains("gzip")) { - lowLevelResponseContent = new GZIPInputStream(lowLevelResponseContent); + lowLevelResponseContent = + new ConsumingInputStream(new GZIPInputStream(lowLevelResponseContent)); } // logging (wrap content with LoggingInputStream) Logger logger = HttpTransport.LOGGER; diff --git a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java new file mode 100644 index 000000000..d55b5a0d4 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java @@ -0,0 +1,65 @@ +/* + * 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 + * + * https://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 static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import org.junit.Test; + +public class ConsumingInputStreamTest { + + @Test + public void testClose_drainsBytesOnClose() throws IOException { + MockInputStream mockInputStream = new MockInputStream("abc123".getBytes(StandardCharsets.UTF_8)); + InputStream consumingInputStream = new ConsumingInputStream(mockInputStream); + + assertEquals(6, mockInputStream.getBytesToRead()); + + // read one byte + consumingInputStream.read(); + assertEquals(5, mockInputStream.getBytesToRead()); + + // closing the stream should read the remaining bytes + consumingInputStream.close(); + assertEquals(0, mockInputStream.getBytesToRead()); + } + + private class MockInputStream extends InputStream { + private int bytesToRead; + + MockInputStream(byte[] data) { + this.bytesToRead = data.length; + } + + @Override + public int read() throws IOException { + if (bytesToRead == 0) { + return -1; + } + bytesToRead--; + return 1; + } + + int getBytesToRead() { + return bytesToRead; + } + } +} diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index 7846778e5..a611d774a 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -26,10 +26,12 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; import java.text.NumberFormat; import java.util.Arrays; import java.util.logging.Level; import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; import junit.framework.TestCase; /** @@ -457,4 +459,40 @@ public LowLevelHttpResponse execute() throws IOException { "it should not decompress stream", request.execute().getContent() instanceof GZIPInputStream); } + + public void testGetContent_gzipEncoding_finishReading() throws IOException { + byte[] dataToCompress = "abcd".getBytes(StandardCharsets.UTF_8); + byte[] mockBytes; + try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(dataToCompress.length)) { + GZIPOutputStream zipStream = new GZIPOutputStream((byteStream)); + zipStream.write(dataToCompress); + zipStream.close(); + mockBytes = byteStream.toByteArray(); + } + final MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse(); + mockResponse.setContent(mockBytes); + mockResponse.setContentEncoding("gzip"); + mockResponse.setContentType("text/plain"); + + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + return mockResponse; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpResponse response = request.execute(); + TestableByteArrayInputStream output = (TestableByteArrayInputStream) mockResponse.getContent(); + assertFalse(output.isClosed()); + assertEquals("abcd", response.parseAsString()); + assertTrue(output.isClosed()); + } } From ade23dc9304908829bf667944d3053ccc97bf328 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 21 Oct 2019 08:03:54 -0700 Subject: [PATCH 186/983] build: split clirr into separate check (#852) --- .kokoro/build.sh | 8 ++++++-- .kokoro/presubmit/clirr.cfg | 13 +++++++++++++ synth.metadata | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .kokoro/presubmit/clirr.cfg diff --git a/.kokoro/build.sh b/.kokoro/build.sh index bcd1e410c..fa132f410 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -26,6 +26,7 @@ echo ${JOB_TYPE} mvn install -B -V \ -DskipTests=true \ + -Dclirr.skip=true \ -Dmaven.javadoc.skip=true \ -Dgcloud.download.skip=true \ -T 1C @@ -37,7 +38,7 @@ fi case ${JOB_TYPE} in test) - mvn test -B + mvn test -B -Dclirr.skip=true bash ${KOKORO_GFILE_DIR}/codecov.sh bash .kokoro/coerce_logs.sh ;; @@ -48,9 +49,12 @@ javadoc) mvn javadoc:javadoc javadoc:test-javadoc ;; integration) - mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -fae verify + mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify bash .kokoro/coerce_logs.sh ;; +clirr) + mvn -B clirr:check + ;; *) ;; esac \ No newline at end of file diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 000000000..ec572442e --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 556bc58a3..69f5abdfe 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-18T07:51:39.452073Z", + "updateTime": "2019-10-19T07:50:26.035482Z", "sources": [ { "template": { From 5253c6c5e2b2312206000fd887fe6f0d89a26570 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 21 Oct 2019 20:35:41 -0400 Subject: [PATCH 187/983] docs: use libraries-bom 2.6.0 in setup instructions (#847) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index ec8b6b23f..d9b37be65 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 2.2.1 + 2.6.0 pom import From 57fd1d859dad486b37b4b4c4ccda5c7f8fa1b356 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 23 Oct 2019 09:53:35 -0700 Subject: [PATCH 188/983] docs: include HTTP Transport page in navigation, add support page (#854) * docs: include HTTP Transport page in navigation * docs: add support page * docs: fix casing, typo --- docs/_data/navigation.yml | 6 +++++- docs/http-transport.md | 2 +- docs/support.md | 45 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 docs/support.md diff --git a/docs/_data/navigation.yml b/docs/_data/navigation.yml index f2d85a0d1..827f1ce91 100644 --- a/docs/_data/navigation.yml +++ b/docs/_data/navigation.yml @@ -9,9 +9,13 @@ toc: url: android.html - page: Google App Engine url: google-app-engine.html + - page: HTTP Transport + url: http-transport.html - page: JSON url: json.html - page: Exponential Backoff url: exponential-backoff.html - page: Unit Testing - url: unit-testing.html \ No newline at end of file + url: unit-testing.html + - page: Support + url: support.html \ No newline at end of file diff --git a/docs/http-transport.md b/docs/http-transport.md index c07e4eb97..0167db4ac 100644 --- a/docs/http-transport.md +++ b/docs/http-transport.md @@ -125,7 +125,7 @@ HttpRequestFactory requestFactory = transport.createRequestFactory(new MyInitial [http-url-connection]: http://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html [apache-http-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/http/apache/v2/ApacheHttpTransport.html [apache-http-client]: http://hc.apache.org/httpcomponents-client-ga/index.html -[url=fetch-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/appengine/http/UrlFetchTransport.html +[url-fetch-transport]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/appengine/http/UrlFetchTransport.html [url-fetch]: https://cloud.google.com/appengine/docs/java/javadoc/com/google/appengine/api/urlfetch/package-summary [logger]: https://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html [logging-properties]: https://github.com/google/google-http-java-client/blob/master/samples/googleplus-simple-cmdline-sample/logging.properties diff --git a/docs/support.md b/docs/support.md new file mode 100644 index 000000000..1f20a477c --- /dev/null +++ b/docs/support.md @@ -0,0 +1,45 @@ +--- +title: Support +--- + +# Support + +## The Google HTTP Client Library for Java Community + +### Ask development questions + +Ask questions on StackOverflow: + +* Use the [google-api][so-google-api] tag, and optionally [java][so-java] or [android][so-android] + or [java google-app-engine][so-java-gae]. +* You can also use the [google-http-java-client][so-http-client] tag. +* For tips on asking StackOverflow questions, see [How to Ask][so-how-to-ask]. + +**Note:** Please do not email the project contributors directly. + +### File feature requests and defects + +You can suggest features and report issues on our public [Issue Tracker][issues]. This is a great +place for the community to discuss and track implementations of features or resolution of bug fixes, +as well as share workarounds and patches. + +If you find a bug: + +* View [known bugs][issues], and if a known bug corresponds to the issue you are seeing, "star" it + or comment on it. +* If the issue you are seeing has not yet been reported, [file a bug report][new-issue]. + +### Contribute + +This is an [open-source][http-client] library, and [contributions][contributions] are welcome. + +[so-google-api]: http://stackoverflow.com/questions/tagged/google-api +[so-java]: http://stackoverflow.com/questions/tagged/google-api+java +[so-android]: http://stackoverflow.com/questions/tagged/google-api+android +[so-java-gae]: http://stackoverflow.com/questions/tagged/google-api+java+google-app-engine +[so-http-client]: http://stackoverflow.com/questions/tagged/google-http-java-client +[so-how-to-ask]: http://stackoverflow.com/questions/ask +[issues]: https://github.com/googleapis/google-http-java-client/issues +[new-issue]: https://github.com/google/google-http-java-client/issues/new +[http-client]: https://github.com/googleapis/google-http-java-client +[contributions]: https://github.com/googleapis/google-http-java-client/blob/master/CONTRIBUTING.md From 238f4c52086defc5a055f2e8d91e7450454d5792 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 24 Oct 2019 15:17:52 -0400 Subject: [PATCH 189/983] fix: use platform default TCP buffer sizes (#855) * remove obsolete and deprecated parent * use platform default TCP buffer sizes --- .../client/http/apache/v2/ApacheHttpTransport.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 0e735f174..864dd072f 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -29,7 +29,6 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpTrace; -import org.apache.http.config.SocketConfig; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; @@ -74,7 +73,7 @@ public ApacheHttpTransport() { * Constructor that allows an alternative Apache HTTP client to be used. * *

            - * Note that in the previous version, we overrode several settings, however, we are no longer able + * Note that in the previous version, we overrode several settings. However, we are no longer able * to do so. *

            * @@ -102,12 +101,11 @@ public ApacheHttpTransport(HttpClient httpClient) { *

            * * @@ -127,7 +125,6 @@ public static HttpClient newDefaultHttpClient() { *

            *
              *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
            • - *
            • The socket buffer size is set to 8192 using {@link SocketConfig}.
            • *
            • *
            • The route planner uses {@link SystemDefaultRoutePlanner} with @@ -140,17 +137,10 @@ public static HttpClient newDefaultHttpClient() { * @since 1.31 */ public static HttpClientBuilder newDefaultHttpClientBuilder() { - // Set socket buffer sizes to 8192 - SocketConfig socketConfig = - SocketConfig.custom() - .setRcvBufSize(8192) - .setSndBufSize(8192) - .build(); return HttpClientBuilder.create() .useSystemProperties() .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) - .setDefaultSocketConfig(socketConfig) .setMaxConnTotal(200) .setMaxConnPerRoute(20) .setConnectionTimeToLive(-1, TimeUnit.MILLISECONDS) From 95495aa4296c85682a88e08218b45856b02af4eb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Oct 2019 10:47:33 -0700 Subject: [PATCH 190/983] chore: clean up release configs (#856) --- .kokoro/release/drop.cfg | 3 --- .kokoro/release/promote.cfg | 4 ---- synth.metadata | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg index 48da9c343..d3aa1e160 100644 --- a/.kokoro/release/drop.cfg +++ b/.kokoro/release/drop.cfg @@ -4,6 +4,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/drop.sh" } - -# Download staging properties file. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-http-java-client" \ No newline at end of file diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg index 2fb22c3fe..603f45172 100644 --- a/.kokoro/release/promote.cfg +++ b/.kokoro/release/promote.cfg @@ -4,7 +4,3 @@ env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/promote.sh" } - -# Download staging properties file. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/google-http-java-client" - diff --git a/synth.metadata b/synth.metadata index 69f5abdfe..635b2ec08 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-19T07:50:26.035482Z", + "updateTime": "2019-10-26T07:51:02.270792Z", "sources": [ { "template": { From eee85cd8aaaacd6e38271841a6eafe27a0c9d6ec Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 28 Oct 2019 13:48:06 -0400 Subject: [PATCH 191/983] docs: remove theme details (#859) Where the page is hosted is not something readers want to know --- docs/_layouts/default.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index b3e7d30e6..e83dfcd2a 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -35,9 +35,6 @@

              {{ site.title | default: site.github.repository_name }}

              {{ content }} - {% if site.google_analytics %} @@ -51,4 +48,4 @@

              {{ site.title | default: site.github.repository_name }}

              {% endif %} - \ No newline at end of file + From cc2ea1697aceb5d3693b02fa87b0f8379f5d7a2b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 28 Oct 2019 13:49:56 -0400 Subject: [PATCH 192/983] docs: update libraries-bom to 2.7.1 in setup (#857) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index d9b37be65..d654e2ff6 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 2.6.0 + 2.7.1 pom import From 9c73e1db7ab371c57ff6246fa39fa514051ef99c Mon Sep 17 00:00:00 2001 From: Edward Savage Date: Tue, 29 Oct 2019 16:09:32 -0400 Subject: [PATCH 193/983] fix: HttpResponse GZip content encoding equality change (#843) * Issue #842 - HttpResponse GZip content encoding equality change * Issue #842 - Added unit test, PR updates * Issue #842 - Adjusted spacing, dropped ignoreCase on comparison * Issue #842 - Enforce locale on encoding comparison, add unit tests * Issue #842 - Removed final, fixed spelling * Issue #842 - test updates --- .../google/api/client/http/HttpResponse.java | 19 ++++-- .../api/client/http/HttpResponseTest.java | 59 +++++++++++++++++-- 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index d972ab0d4..5273300f6 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -26,6 +26,7 @@ import java.io.OutputStream; import java.lang.reflect.Type; import java.nio.charset.Charset; +import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.GZIPInputStream; @@ -80,6 +81,12 @@ public final class HttpResponse { /** Whether {@link #getContent()} should return raw input stream. */ private final boolean returnRawInputStream; + /** Content encoding for GZip */ + private static final String CONTENT_ENCODING_GZIP = "gzip"; + + /** Content encoding for GZip (legacy) */ + private static final String CONTENT_ENCODING_XGZIP = "x-gzip"; + /** * Determines the limit to the content size that will be logged during {@link #getContent()}. * @@ -327,12 +334,12 @@ public InputStream getContent() throws IOException { boolean contentProcessed = false; try { // gzip encoding (wrap content with GZipInputStream) - String contentEncoding = this.contentEncoding; - if (!returnRawInputStream - && contentEncoding != null - && contentEncoding.contains("gzip")) { - lowLevelResponseContent = - new ConsumingInputStream(new GZIPInputStream(lowLevelResponseContent)); + if (!returnRawInputStream && this.contentEncoding != null) { + String oontentencoding = this.contentEncoding.trim().toLowerCase(Locale.ENGLISH); + if (CONTENT_ENCODING_GZIP.equals(oontentencoding) || CONTENT_ENCODING_XGZIP.equals(oontentencoding)) { + lowLevelResponseContent = + new ConsumingInputStream(new GZIPInputStream(lowLevelResponseContent)); + } } // logging (wrap content with LoggingInputStream) Logger logger = HttpTransport.LOGGER; diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index a611d774a..a3efdb305 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -29,6 +29,7 @@ import java.nio.charset.StandardCharsets; import java.text.NumberFormat; import java.util.Arrays; +import java.util.Locale; import java.util.logging.Level; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; @@ -461,17 +462,37 @@ public LowLevelHttpResponse execute() throws IOException { } public void testGetContent_gzipEncoding_finishReading() throws IOException { + do_testGetContent_gzipEncoding_finishReading("gzip"); + } + + public void testGetContent_gzipEncoding_finishReadingWithUppercaseContentEncoding() throws IOException { + do_testGetContent_gzipEncoding_finishReading("GZIP"); + } + + public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() throws IOException { + Locale originalDefaultLocale = Locale.getDefault(); + try { + Locale.setDefault(Locale.forLanguageTag("tr-TR")); + do_testGetContent_gzipEncoding_finishReading("GZIP"); + } finally { + Locale.setDefault(originalDefaultLocale); + } + } + + private void do_testGetContent_gzipEncoding_finishReading(String contentEncoding) throws IOException { byte[] dataToCompress = "abcd".getBytes(StandardCharsets.UTF_8); byte[] mockBytes; - try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(dataToCompress.length)) { - GZIPOutputStream zipStream = new GZIPOutputStream((byteStream)); + try ( + ByteArrayOutputStream byteStream = new ByteArrayOutputStream(dataToCompress.length); + GZIPOutputStream zipStream = new GZIPOutputStream((byteStream)) + ) { zipStream.write(dataToCompress); zipStream.close(); mockBytes = byteStream.toByteArray(); } final MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse(); mockResponse.setContent(mockBytes); - mockResponse.setContentEncoding("gzip"); + mockResponse.setContentEncoding(contentEncoding); mockResponse.setContentType("text/plain"); HttpTransport transport = @@ -490,9 +511,35 @@ public LowLevelHttpResponse execute() throws IOException { HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); - TestableByteArrayInputStream output = (TestableByteArrayInputStream) mockResponse.getContent(); - assertFalse(output.isClosed()); + try (TestableByteArrayInputStream output = (TestableByteArrayInputStream) mockResponse.getContent()) { + assertFalse(output.isClosed()); + assertEquals("abcd", response.parseAsString()); + assertTrue(output.isClosed()); + } + } + + public void testGetContent_otherEncodingWithgzipInItsName_GzipIsNotUsed() throws IOException { + final MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse(); + mockResponse.setContent("abcd"); + mockResponse.setContentEncoding("otherEncodingWithgzipInItsName"); + mockResponse.setContentType("text/plain"); + + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, final String url) + throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + return mockResponse; + } + }; + } + }; + HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); + // If gzip was used on this response, an exception would be thrown + HttpResponse response = request.execute(); assertEquals("abcd", response.parseAsString()); - assertTrue(output.isClosed()); } } From d9354fe9da299a7c27d9a6458f993ef70da92d03 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 30 Oct 2019 10:40:08 -0700 Subject: [PATCH 194/983] chore: release v1.32.2 (#861) --- CHANGELOG.md | 27 ++++++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 80 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9203fbb1d..3165b015c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [1.32.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.32.1...v1.32.2) (2019-10-29) + + +### Bug Fixes + +* wrap GZIPInputStream for connection reuse ([#840](https://www.github.com/googleapis/google-http-java-client/issues/840)) ([087a428](https://www.github.com/googleapis/google-http-java-client/commit/087a428390a334bd761a8a3d66475aa4dde72ed1)), closes [#749](https://www.github.com/googleapis/google-http-java-client/issues/749) [#367](https://www.github.com/googleapis/google-http-java-client/issues/367) +* HttpResponse GZip content encoding equality change ([#843](https://www.github.com/googleapis/google-http-java-client/issues/843)) ([9c73e1d](https://www.github.com/googleapis/google-http-java-client/commit/9c73e1db7ab371c57ff6246fa39fa514051ef99c)), closes [#842](https://www.github.com/googleapis/google-http-java-client/issues/842) [#842](https://www.github.com/googleapis/google-http-java-client/issues/842) [#842](https://www.github.com/googleapis/google-http-java-client/issues/842) [#842](https://www.github.com/googleapis/google-http-java-client/issues/842) [#842](https://www.github.com/googleapis/google-http-java-client/issues/842) +* use platform default TCP buffer sizes ([#855](https://www.github.com/googleapis/google-http-java-client/issues/855)) ([238f4c5](https://www.github.com/googleapis/google-http-java-client/commit/238f4c52086defc5a055f2e8d91e7450454d5792)) + + + +### Documentation + +* fix HttpResponseException Markup ([#829](https://www.github.com/googleapis/google-http-java-client/issues/829)) ([99d64e0](https://www.github.com/googleapis/google-http-java-client/commit/99d64e0d88bdcc3b00d54ee9370e052e5f949680)) +* include HTTP Transport page in navigation, add support page ([#854](https://www.github.com/googleapis/google-http-java-client/issues/854)) ([57fd1d8](https://www.github.com/googleapis/google-http-java-client/commit/57fd1d859dad486b37b4b4c4ccda5c7f8fa1b356)) +* remove theme details ([#859](https://www.github.com/googleapis/google-http-java-client/issues/859)) ([eee85cd](https://www.github.com/googleapis/google-http-java-client/commit/eee85cd8aaaacd6e38271841a6eafe27a0c9d6ec)) +* update libraries-bom to 2.7.1 in setup ([#857](https://www.github.com/googleapis/google-http-java-client/issues/857)) ([cc2ea16](https://www.github.com/googleapis/google-http-java-client/commit/cc2ea1697aceb5d3693b02fa87b0f8379f5d7a2b)) +* use libraries-bom 2.6.0 in setup instructions ([#847](https://www.github.com/googleapis/google-http-java-client/issues/847)) ([5253c6c](https://www.github.com/googleapis/google-http-java-client/commit/5253c6c5e2b2312206000fd887fe6f0d89a26570)) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.10.0 ([#831](https://www.github.com/googleapis/google-http-java-client/issues/831)) ([ffb1a85](https://www.github.com/googleapis/google-http-java-client/commit/ffb1a857a31948472b2b62ff4f47905fa60fe1e2)) +* update dependency com.fasterxml.jackson.core:jackson-core to v2.9.10 ([#828](https://www.github.com/googleapis/google-http-java-client/issues/828)) ([15ba3c3](https://www.github.com/googleapis/google-http-java-client/commit/15ba3c3f7cee9e2e5362d69c1278f45531e56581)) +* update dependency com.google.code.gson:gson to v2.8.6 ([#833](https://www.github.com/googleapis/google-http-java-client/issues/833)) ([6c50997](https://www.github.com/googleapis/google-http-java-client/commit/6c50997361fee875d6b7e6db90e70d41622fc04c)) +* update dependency mysql:mysql-connector-java to v8.0.18 ([#839](https://www.github.com/googleapis/google-http-java-client/issues/839)) ([1522eb5](https://www.github.com/googleapis/google-http-java-client/commit/1522eb5c011b4f20199e2ec8cb5ec58d10cc399a)) + ### [1.32.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.32.0...v1.32.1) (2019-09-20) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 762c39fa0..ff9d93d4c 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.32.2-SNAPSHOT + 1.33.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.32.2-SNAPSHOT + 1.33.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.32.2-SNAPSHOT + 1.33.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 60fb218cc..b1a2540ad 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-android - 1.32.2-SNAPSHOT + 1.33.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 93804d80d..a7a17187a 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-apache-v2 - 1.32.2-SNAPSHOT + 1.33.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4aa8b112f..35915b158 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-appengine - 1.32.2-SNAPSHOT + 1.33.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 724c6dcae..1c680cd26 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.32.2-SNAPSHOT + 1.33.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0fe8307c9..f7752666c 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.32.2-SNAPSHOT + 1.33.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-android - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-apache-v2 - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-appengine - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-findbugs - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-gson - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-jackson2 - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-protobuf - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-test - 1.32.2-SNAPSHOT + 1.33.0 com.google.http-client google-http-client-xml - 1.32.2-SNAPSHOT + 1.33.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 919d01a0a..205098d73 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-findbugs - 1.32.2-SNAPSHOT + 1.33.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 2d7c9dd78..121ceac5f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-gson - 1.32.2-SNAPSHOT + 1.33.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 11be6a4ee..8217d9c05 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-jackson2 - 1.32.2-SNAPSHOT + 1.33.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index e4457f904..57de6004d 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-protobuf - 1.32.2-SNAPSHOT + 1.33.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d8631e90b..aea2a9127 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-test - 1.32.2-SNAPSHOT + 1.33.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index db2c225bc..2a07db064 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client-xml - 1.32.2-SNAPSHOT + 1.33.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9b5480255..7ae1608ff 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../pom.xml google-http-client - 1.32.2-SNAPSHOT + 1.33.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f97a4f7d2..700d2bee0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.32.2-SNAPSHOT + 1.33.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b151c6d26..8bcb8fb13 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.32.2-SNAPSHOT + 1.33.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 82c88daca..1acfb9096 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.32.1:1.32.2-SNAPSHOT -google-http-client-bom:1.32.1:1.32.2-SNAPSHOT -google-http-client-parent:1.32.1:1.32.2-SNAPSHOT -google-http-client-android:1.32.1:1.32.2-SNAPSHOT -google-http-client-android-test:1.32.1:1.32.2-SNAPSHOT -google-http-client-apache-v2:1.32.1:1.32.2-SNAPSHOT -google-http-client-appengine:1.32.1:1.32.2-SNAPSHOT -google-http-client-assembly:1.32.1:1.32.2-SNAPSHOT -google-http-client-findbugs:1.32.1:1.32.2-SNAPSHOT -google-http-client-gson:1.32.1:1.32.2-SNAPSHOT -google-http-client-jackson2:1.32.1:1.32.2-SNAPSHOT -google-http-client-protobuf:1.32.1:1.32.2-SNAPSHOT -google-http-client-test:1.32.1:1.32.2-SNAPSHOT -google-http-client-xml:1.32.1:1.32.2-SNAPSHOT +google-http-client:1.33.0:1.33.0 +google-http-client-bom:1.33.0:1.33.0 +google-http-client-parent:1.33.0:1.33.0 +google-http-client-android:1.33.0:1.33.0 +google-http-client-android-test:1.33.0:1.33.0 +google-http-client-apache-v2:1.33.0:1.33.0 +google-http-client-appengine:1.33.0:1.33.0 +google-http-client-assembly:1.33.0:1.33.0 +google-http-client-findbugs:1.33.0:1.33.0 +google-http-client-gson:1.33.0:1.33.0 +google-http-client-jackson2:1.33.0:1.33.0 +google-http-client-protobuf:1.33.0:1.33.0 +google-http-client-test:1.33.0:1.33.0 +google-http-client-xml:1.33.0:1.33.0 From b06f0e99702c2c5d93913b4683d0263c88507baf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2019 15:01:47 -0700 Subject: [PATCH 195/983] chore: release 1.33.1-SNAPSHOT (#863) * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index ff9d93d4c..d5b444586 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.33.0 + 1.33.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.33.0 + 1.33.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.33.0 + 1.33.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index b1a2540ad..a4d6c05e8 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-android - 1.33.0 + 1.33.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a7a17187a..35f04ac9d 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.33.0 + 1.33.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 35915b158..bad8c9973 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.33.0 + 1.33.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 1c680cd26..f87c5c514 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.33.0 + 1.33.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index f7752666c..e71a10000 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.33.0 + 1.33.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-android - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-test - 1.33.0 + 1.33.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.33.0 + 1.33.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 205098d73..4c1bfbd43 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.33.0 + 1.33.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 121ceac5f..b4cd29b11 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.33.0 + 1.33.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 8217d9c05..a0ff9f4a0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.33.0 + 1.33.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 57de6004d..fe577e0bc 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.33.0 + 1.33.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index aea2a9127..fe6b8db8a 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-test - 1.33.0 + 1.33.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2a07db064..6e79c4cbe 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.33.0 + 1.33.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 7ae1608ff..aba47c3e2 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../pom.xml google-http-client - 1.33.0 + 1.33.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 700d2bee0..376774def 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.33.0 + 1.33.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8bcb8fb13..2f90ac64f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.33.0 + 1.33.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 1acfb9096..08ce6e975 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.33.0:1.33.0 -google-http-client-bom:1.33.0:1.33.0 -google-http-client-parent:1.33.0:1.33.0 -google-http-client-android:1.33.0:1.33.0 -google-http-client-android-test:1.33.0:1.33.0 -google-http-client-apache-v2:1.33.0:1.33.0 -google-http-client-appengine:1.33.0:1.33.0 -google-http-client-assembly:1.33.0:1.33.0 -google-http-client-findbugs:1.33.0:1.33.0 -google-http-client-gson:1.33.0:1.33.0 -google-http-client-jackson2:1.33.0:1.33.0 -google-http-client-protobuf:1.33.0:1.33.0 -google-http-client-test:1.33.0:1.33.0 -google-http-client-xml:1.33.0:1.33.0 +google-http-client:1.33.0:1.33.1-SNAPSHOT +google-http-client-bom:1.33.0:1.33.1-SNAPSHOT +google-http-client-parent:1.33.0:1.33.1-SNAPSHOT +google-http-client-android:1.33.0:1.33.1-SNAPSHOT +google-http-client-android-test:1.33.0:1.33.1-SNAPSHOT +google-http-client-apache-v2:1.33.0:1.33.1-SNAPSHOT +google-http-client-appengine:1.33.0:1.33.1-SNAPSHOT +google-http-client-assembly:1.33.0:1.33.1-SNAPSHOT +google-http-client-findbugs:1.33.0:1.33.1-SNAPSHOT +google-http-client-gson:1.33.0:1.33.1-SNAPSHOT +google-http-client-jackson2:1.33.0:1.33.1-SNAPSHOT +google-http-client-protobuf:1.33.0:1.33.1-SNAPSHOT +google-http-client-test:1.33.0:1.33.1-SNAPSHOT +google-http-client-xml:1.33.0:1.33.1-SNAPSHOT From a594fbdb14d35fe4237cee3236256b639e651d90 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 4 Nov 2019 16:45:26 +0200 Subject: [PATCH 196/983] chore(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.2.0 (#874) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 376774def..c6b5a6a2b 100644 --- a/pom.xml +++ b/pom.xml @@ -324,7 +324,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.2.0 From 9108f64288748fe05536778acc8765e8bb1e2732 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 6 Nov 2019 17:45:51 +0200 Subject: [PATCH 197/983] chore(deps): update dependency org.apache.maven.plugins:maven-source-plugin to v3.2.0 (#875) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6b5a6a2b..09ca2caeb 100644 --- a/pom.xml +++ b/pom.xml @@ -298,7 +298,7 @@ org.apache.maven.plugins maven-source-plugin - 3.1.0 + 3.2.0 attach-sources From a64d3d11b90e676e8740df5b119ae2e08b0c81da Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 10 Nov 2019 12:39:13 +0100 Subject: [PATCH 198/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.10.1 (#878) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09ca2caeb..ec18dc408 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ UTF-8 3.0.2 2.8.6 - 2.10.0 + 2.10.1 3.10.0 28.1-android 1.1.4c From 501ede83ef332207f0ed67c3d7120b20a1416cec Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Thu, 14 Nov 2019 14:11:15 -0500 Subject: [PATCH 199/983] fix: redirect on 308 (Permanent Redirect) too (#876) * Redirect on 308 too * Fix copyright --- .../api/client/http/HttpStatusCodes.java | 6 +++- .../api/client/http/HttpStatusCodesTest.java | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java 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 1f46eaadc..4f7e18be3 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 static boolean isSuccess(int statusCode) { /** * 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 static boolean isRedirect(int statusCode) { 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/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 000000000..58b43f024 --- /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)); + } +} From dbb398aa332944e417fafde494a084bc3e8ec619 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Nov 2019 10:09:44 -0800 Subject: [PATCH 200/983] chore: regenerate common templates (#885) --- .github/release-please.yml | 1 + .kokoro/build.sh | 5 +++-- .kokoro/dependencies.sh | 6 +++++- .kokoro/release/publish_javadoc.sh | 2 +- synth.metadata | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/release-please.yml b/.github/release-please.yml index 827446828..dce2c8450 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -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 fa132f410..aa6d4f647 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 8e909db98..ccd3fe690 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 b65eb9f90..8cccf5658 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/synth.metadata b/synth.metadata index 635b2ec08..9fb65cccb 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": { From c9d172fb37298f29bc58d22b2a963d0a3f8d7999 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 19 Nov 2019 15:19:59 -0500 Subject: [PATCH 201/983] BOM 2.9.0 (#883) @chingor13 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index d654e2ff6..b184d0061 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 2.7.1 + 2.9.0 pom import From e24f3f23448b7a16118a5dba28aeb86c01ebb943 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 19 Nov 2019 15:20:15 -0500 Subject: [PATCH 202/983] Remove old jackson 1 reference (#880) @chingor13 --- google-http-client-assembly/classpath-include | 1 - 1 file changed, 1 deletion(-) diff --git a/google-http-client-assembly/classpath-include b/google-http-client-assembly/classpath-include index b72018813..c1bd80328 100644 --- a/google-http-client-assembly/classpath-include +++ b/google-http-client-assembly/classpath-include @@ -3,7 +3,6 @@ - From 9d81ee306514b3c1cfccd564398b0850d74d6768 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Nov 2019 12:33:36 -0800 Subject: [PATCH 203/983] chore: update common templates (#886) --- .kokoro/build.sh | 9 +++++++-- synth.metadata | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index aa6d4f647..dc2936ef7 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -50,11 +50,16 @@ javadoc) mvn javadoc:javadoc javadoc:test-javadoc ;; integration) - mvn -B ${INTEGRATION_TEST_ARGS} -DtrimStackTrace=false -Dclirr.skip=true -fae verify + mvn -B ${INTEGRATION_TEST_ARGS} \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify bash .kokoro/coerce_logs.sh ;; clirr) - mvn -B clirr:check + mvn -B -Denforcer.skip=true clirr:check ;; *) ;; diff --git a/synth.metadata b/synth.metadata index 9fb65cccb..5f286961a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-19T08:39:04.107173Z", + "updateTime": "2019-11-19T19:37:30.852037Z", "sources": [ { "template": { From 2c4f49e0e5f9c6b8f21f35edae373eaada87119b Mon Sep 17 00:00:00 2001 From: Ioannis Canellos Date: Wed, 20 Nov 2019 20:30:26 +0200 Subject: [PATCH 204/983] feat: add option to pass redirect Location: header value as-is without encoding, decoding, or escaping (#871) --- .../google/api/client/http/GenericUrl.java | 118 ++++++++++++++---- .../google/api/client/http/HttpRequest.java | 26 +++- .../google/api/client/http/UriTemplate.java | 2 +- .../api/client/http/UrlEncodedParser.java | 47 ++++++- .../api/client/http/GenericUrlTest.java | 12 +- 5 files changed, 170 insertions(+), 35 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java index e18810c89..68c5ea6c3 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java @@ -80,6 +80,13 @@ public class GenericUrl extends GenericData { /** Fragment component or {@code null} for none. */ private String fragment; + /** + * If true, the URL string originally given is used as is (without encoding, decoding and + * escaping) whenever referenced; otherwise, part of the URL string may be encoded or decoded as + * deemed appropriate or necessary. + */ + private boolean verbatim; + public GenericUrl() {} /** @@ -99,9 +106,26 @@ public GenericUrl() {} * @throws IllegalArgumentException if URL has a syntax error */ public GenericUrl(String encodedUrl) { - this(parseURL(encodedUrl)); + this(encodedUrl, false); + } + + /** + * Constructs from an encoded URL. + * + *

              Any known query parameters with pre-defined fields as data keys are parsed based on + * their data type. Any unrecognized query parameter are always parsed as a string. + * + *

              Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. + * + * @param encodedUrl encoded URL, including any existing query parameters that should be parsed + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @throws IllegalArgumentException if URL has a syntax error + */ + public GenericUrl(String encodedUrl, boolean verbatim) { + this(parseURL(encodedUrl), verbatim); } + /** * Constructs from a URI. * @@ -109,6 +133,16 @@ public GenericUrl(String encodedUrl) { * @since 1.14 */ public GenericUrl(URI uri) { + this(uri, false); + } + + /** + * Constructs from a URI. + * + * @param uri URI + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + */ + public GenericUrl(URI uri, boolean verbatim) { this( uri.getScheme(), uri.getHost(), @@ -116,7 +150,8 @@ public GenericUrl(URI uri) { uri.getRawPath(), uri.getRawFragment(), uri.getRawQuery(), - uri.getRawUserInfo()); + uri.getRawUserInfo(), + verbatim); } /** @@ -126,6 +161,17 @@ public GenericUrl(URI uri) { * @since 1.14 */ public GenericUrl(URL url) { + this(url, false); + } + + /** + * Constructs from a URL. + * + * @param url URL + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @since 1.14 + */ + public GenericUrl(URL url, boolean verbatim) { this( url.getProtocol(), url.getHost(), @@ -133,7 +179,8 @@ public GenericUrl(URL url) { url.getPath(), url.getRef(), url.getQuery(), - url.getUserInfo()); + url.getUserInfo(), + verbatim); } private GenericUrl( @@ -143,16 +190,26 @@ private GenericUrl( String path, String fragment, String query, - String userInfo) { + String userInfo, + boolean verbatim) { this.scheme = scheme.toLowerCase(Locale.US); this.host = host; this.port = port; - this.pathParts = toPathParts(path); - this.fragment = fragment != null ? CharEscapers.decodeUri(fragment) : null; - if (query != null) { - UrlEncodedParser.parse(query, this); - } - this.userInfo = userInfo != null ? CharEscapers.decodeUri(userInfo) : null; + this.pathParts = toPathParts(path, verbatim); + this.verbatim = verbatim; + if (verbatim) { + this.fragment = fragment; + if (query != null) { + UrlEncodedParser.parse(query, this, false); + } + this.userInfo = userInfo; + } else { + this.fragment = fragment != null ? CharEscapers.decodeUri(fragment) : null; + if (query != null) { + UrlEncodedParser.parse(query, this); + } + this.userInfo = userInfo != null ? CharEscapers.decodeUri(userInfo) : null; + } } @Override @@ -333,7 +390,7 @@ public final String buildAuthority() { buf.append(Preconditions.checkNotNull(scheme)); buf.append("://"); if (userInfo != null) { - buf.append(CharEscapers.escapeUriUserInfo(userInfo)).append('@'); + buf.append(verbatim ? userInfo : CharEscapers.escapeUriUserInfo(userInfo)).append('@'); } buf.append(Preconditions.checkNotNull(host)); int port = this.port; @@ -357,12 +414,12 @@ public final String buildRelativeUrl() { if (pathParts != null) { appendRawPathFromParts(buf); } - addQueryParams(entrySet(), buf); + addQueryParams(entrySet(), buf, verbatim); // URL fragment String fragment = this.fragment; if (fragment != null) { - buf.append('#').append(URI_FRAGMENT_ESCAPER.escape(fragment)); + buf.append('#').append(verbatim ? fragment : URI_FRAGMENT_ESCAPER.escape(fragment)); } return buf.toString(); } @@ -467,7 +524,7 @@ public String getRawPath() { * @param encodedPath raw encoded path or {@code null} to set {@link #pathParts} to {@code null} */ public void setRawPath(String encodedPath) { - pathParts = toPathParts(encodedPath); + pathParts = toPathParts(encodedPath, verbatim); } /** @@ -482,7 +539,7 @@ public void setRawPath(String encodedPath) { */ public void appendRawPath(String encodedPath) { if (encodedPath != null && encodedPath.length() != 0) { - List appendedPathParts = toPathParts(encodedPath); + List appendedPathParts = toPathParts(encodedPath, verbatim); if (pathParts == null || pathParts.isEmpty()) { this.pathParts = appendedPathParts; } else { @@ -492,7 +549,6 @@ public void appendRawPath(String encodedPath) { } } } - /** * Returns the decoded path parts for the given encoded path. * @@ -503,6 +559,20 @@ public void appendRawPath(String encodedPath) { * or {@code ""} input */ public static List toPathParts(String encodedPath) { + return toPathParts(encodedPath, false); + } + + /** + * Returns the path parts (decoded if not {@code verbatim}). + * + * @param encodedPath slash-prefixed encoded path, for example {@code + * "/m8/feeds/contacts/default/full"} + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @return path parts (decoded if not {@code verbatim}), with each part assumed to be preceded by a {@code '/'}, for example + * {@code "", "m8", "feeds", "contacts", "default", "full"}, or {@code null} for {@code null} + * or {@code ""} input + */ + public static List toPathParts(String encodedPath, boolean verbatim) { if (encodedPath == null || encodedPath.length() == 0) { return null; } @@ -518,7 +588,7 @@ public static List toPathParts(String encodedPath) { } else { sub = encodedPath.substring(cur); } - result.add(CharEscapers.decodeUri(sub)); + result.add(verbatim ? sub : CharEscapers.decodeUri(sub)); cur = slash + 1; } return result; @@ -532,32 +602,32 @@ private void appendRawPathFromParts(StringBuilder buf) { buf.append('/'); } if (pathPart.length() != 0) { - buf.append(CharEscapers.escapeUriPath(pathPart)); + buf.append(verbatim ? pathPart : CharEscapers.escapeUriPath(pathPart)); } } } /** Adds query parameters from the provided entrySet into the buffer. */ - static void addQueryParams(Set> entrySet, StringBuilder buf) { + static void addQueryParams(Set> entrySet, StringBuilder buf, boolean verbatim) { // (similar to UrlEncodedContent) boolean first = true; for (Map.Entry nameValueEntry : entrySet) { Object value = nameValueEntry.getValue(); if (value != null) { - String name = CharEscapers.escapeUriQuery(nameValueEntry.getKey()); + String name = verbatim ? nameValueEntry.getKey() : CharEscapers.escapeUriQuery(nameValueEntry.getKey()); if (value instanceof Collection) { Collection collectionValue = (Collection) value; for (Object repeatedValue : collectionValue) { - first = appendParam(first, buf, name, repeatedValue); + first = appendParam(first, buf, name, repeatedValue, verbatim); } } else { - first = appendParam(first, buf, name, value); + first = appendParam(first, buf, name, value, verbatim); } } } } - private static boolean appendParam(boolean first, StringBuilder buf, String name, Object value) { + private static boolean appendParam(boolean first, StringBuilder buf, String name, Object value, boolean verbatim) { if (first) { first = false; buf.append('?'); @@ -565,7 +635,7 @@ private static boolean appendParam(boolean first, StringBuilder buf, String name buf.append('&'); } buf.append(name); - String stringValue = CharEscapers.escapeUriQuery(value.toString()); + String stringValue = verbatim ? value.toString() : CharEscapers.escapeUriQuery(value.toString()); if (stringValue.length() != 0) { buf.append('=').append(stringValue); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index f6cd29ef4..a2c01d425 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -141,7 +141,7 @@ public final class HttpRequest { /** HTTP request URL. */ private GenericUrl url; - + /** Timeout in milliseconds to establish a connection or {@code 0} for an infinite timeout. */ private int connectTimeout = 20 * 1000; @@ -172,9 +172,12 @@ public final class HttpRequest { /** The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. */ @Deprecated @Beta private BackOffPolicy backOffPolicy; - /** Whether to automatically follow redirects ({@code true} by default). */ + /** Whether to automatically follow redirects ({@code true} by default). */ private boolean followRedirects = true; + /** Whether to use raw redirect URLs ({@code false} by default). */ + private boolean useRawRedirectUrls = false; + /** * Whether to throw an exception at the end of {@link #execute()} on an HTTP error code (non-2XX) * after all retries and response handlers have been exhausted ({@code true} by default). @@ -695,6 +698,23 @@ public HttpRequest setFollowRedirects(boolean followRedirects) { return this; } + /** + * Return whether to use raw redirect URLs. + */ + public boolean getUseRawRedirectUrls() { + return useRawRedirectUrls; + } + + /** + * Sets whether to use raw redirect URLs. + * + *

              The default value is {@code false}. + */ + public HttpRequest setUseRawRedirectUrls(boolean useRawRedirectUrls) { + this.useRawRedirectUrls = useRawRedirectUrls; + return this; + } + /** * Returns whether to throw an exception at the end of {@link #execute()} on an HTTP error code * (non-2XX) after all retries and response handlers have been exhausted. @@ -1159,7 +1179,7 @@ public boolean handleRedirect(int statusCode, HttpHeaders responseHeaders) { && HttpStatusCodes.isRedirect(statusCode) && redirectLocation != null) { // resolve the redirect location relative to the current location - setUrl(new GenericUrl(url.toURL(redirectLocation))); + setUrl(new GenericUrl(url.toURL(redirectLocation), useRawRedirectUrls)); // on 303 change method to GET if (statusCode == HttpStatusCodes.STATUS_CODE_SEE_OTHER) { setRequestMethod(HttpMethods.GET); diff --git a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java index f3e7d63d1..fcf25fa49 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java @@ -318,7 +318,7 @@ public static String expand( } if (addUnusedParamsAsQueryParams) { // Add the parameters remaining in the variableMap as query parameters. - GenericUrl.addQueryParams(variableMap.entrySet(), pathBuf); + GenericUrl.addQueryParams(variableMap.entrySet(), pathBuf, false); } return pathBuf.toString(); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java index cd5e8a63a..fb5ec5375 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java @@ -73,7 +73,6 @@ public class UrlEncodedParser implements ObjectParser { */ public static final String MEDIA_TYPE = new HttpMediaType(UrlEncodedParser.CONTENT_TYPE).setCharsetParameter(Charsets.UTF_8).build(); - /** * Parses the given URL-encoded content into the given data object of data key name/value pairs * using {@link #parse(Reader, Object)}. @@ -82,17 +81,28 @@ public class UrlEncodedParser implements ObjectParser { * @param data data key name/value pairs */ public static void parse(String content, Object data) { + parse(content, data, true); + } + + /** + * Parses the given URL-encoded content into the given data object of data key name/value pairs + * using {@link #parse(Reader, Object)}. + * + * @param content URL-encoded content or {@code null} to ignore content + * @param data data key name/value pairs + * @param decodeEnabled flag that specifies whether decoding should be enabled. + */ + public static void parse(String content, Object data, boolean decodeEnabled) { if (content == null) { return; } try { - parse(new StringReader(content), data); + parse(new StringReader(content), data, decodeEnabled); } catch (IOException exception) { // I/O exception not expected on a string throw Throwables.propagate(exception); } } - /** * Parses the given URL-encoded content into the given data object of data key name/value pairs, * including support for repeating data key names. @@ -113,7 +123,32 @@ public static void parse(String content, Object data) { * @param data data key name/value pairs * @since 1.14 */ - public static void parse(Reader reader, Object data) throws IOException { + public static void parse(Reader reader, Object data) throws IOException { + parse(reader, data, true); + } + + /** + * Parses the given URL-encoded content into the given data object of data key name/value pairs, + * including support for repeating data key names. + * + *

              Declared fields of a "primitive" type (as defined by {@link Data#isPrimitive(Type)} are + * parsed using {@link Data#parsePrimitiveValue(Type, String)} where the {@link Class} parameter + * is the declared field class. Declared fields of type {@link Collection} are used to support + * repeating data key names, so each member of the collection is an additional data key value. + * They are parsed the same as "primitive" fields, except that the generic type parameter of the + * collection is used as the {@link Class} parameter. + * + *

              If there is no declared field for an input parameter name, it is ignored unless the + * input {@code data} parameter is a {@link Map}. If it is a map, the parameter value is + * stored either as a string, or as a {@link ArrayList}<String> in the case of repeated + * parameters. + * + * @param reader URL-encoded reader + * @param data data key name/value pairs + * @param decodeEnabled flag that specifies whether data should be decoded. + * @since 1.14 + */ + public static void parse(Reader reader, Object data, boolean decodeEnabled) throws IOException { Class clazz = data.getClass(); ClassInfo classInfo = ClassInfo.of(clazz); List context = Arrays.asList(clazz); @@ -132,9 +167,9 @@ public static void parse(Reader reader, Object data) throws IOException { // falls through case '&': // parse name/value pair - String name = CharEscapers.decodeUri(nameWriter.toString()); + String name = decodeEnabled ? CharEscapers.decodeUri(nameWriter.toString()) : nameWriter.toString(); if (name.length() != 0) { - String stringValue = CharEscapers.decodeUri(valueWriter.toString()); + String stringValue = decodeEnabled ? CharEscapers.decodeUri(valueWriter.toString()) : valueWriter.toString(); // get the field from the type information FieldInfo fieldInfo = classInfo.getFieldInfo(name); if (fieldInfo != null) { diff --git a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java index 3ef972479..c83acc7ff 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java @@ -150,6 +150,10 @@ public TestUrl() {} public TestUrl(String encodedUrl) { super(encodedUrl); } + + public TestUrl(String encodedUrl, boolean verbatim) { + super(encodedUrl, verbatim); + } } private static final String FULL = @@ -193,6 +197,12 @@ public void testParse_full() { assertEquals("bar", url.foo); } + public void testParse_full_verbatim() { + TestUrl url = new TestUrl(FULL, true); + assertNull(url.hidden); + assertEquals("Go%3D%23/%25%26%20?%3Co%3Egle", url.getFirst("q")); + } + public void testConstructor_url() throws MalformedURLException { GenericUrl url = new GenericUrl(new URL(FULL)); subtestFull(url); @@ -473,7 +483,7 @@ public void testToPathParts() { } private void subtestToPathParts(String encodedPath, String... expectedDecodedParts) { - List result = GenericUrl.toPathParts(encodedPath); + List result = GenericUrl.toPathParts(encodedPath, false); if (encodedPath == null) { assertNull(result); } else { From 0ccf131eec2b0080306cd930826fc5f9e0815a85 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 20 Nov 2019 15:32:02 -0600 Subject: [PATCH 205/983] chore: fix distribution_name (#884) --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 8825ad582..db2d13700 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -6,5 +6,5 @@ "language": "java", "repo": "googleapis/google-http-java-client", "repo_short": "google-http-java-client", - "distribution_name": "google-http-java-client" + "distribution_name": "com.google.http-client:google-http-client" } From 4ce0c1788894b81acbf91941ef865841c1ab30cb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 21 Nov 2019 10:10:11 -0800 Subject: [PATCH 206/983] chore: update common templates (#891) --- .kokoro/release/publish_javadoc.sh | 2 +- synth.metadata | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 8cccf5658..b65eb9f90 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-java-client +NAME=google-http-client VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs diff --git a/synth.metadata b/synth.metadata index 5f286961a..aa3ceb00b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-19T19:37:30.852037Z", + "updateTime": "2019-11-21T08:36:32.990208Z", "sources": [ { "template": { From 832abc9f621ec86cd41c684395c48470fb822928 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 22 Nov 2019 22:59:34 +0100 Subject: [PATCH 207/983] chore(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.0.0-m3 (#893) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ec18dc408..008d49835 100644 --- a/pom.xml +++ b/pom.xml @@ -387,7 +387,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M2 + 3.0.0-M3 enforce-maven From 38e3a533eaed4d4d163a55589a9a981b42975dd0 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 25 Nov 2019 16:16:35 -0500 Subject: [PATCH 208/983] fix millisecond parsing errors (#895) * fix millisecond parsing errors * nits --- .../com/google/api/client/util/DateTime.java | 11 +++++----- .../google/api/client/util/DateTimeTest.java | 20 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java index cd0dcd777..4caf768ce 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java @@ -273,7 +273,7 @@ public int hashCode() { * exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it contains a * time zone shift but no time. */ - public static DateTime parseRfc3339(String str) throws NumberFormatException { + public static DateTime parseRfc3339(String str) { return parseRfc3339WithNanoSeconds(str).toDateTime(); } @@ -285,9 +285,9 @@ public static DateTime parseRfc3339(String str) throws NumberFormatException { * exception is thrown if {@code str} doesn't match {@code RFC3339_REGEX} or if it contains a * time zone shift but no time. */ - public static SecondsAndNanos parseRfc3339ToSecondsAndNanos(String str) - throws IllegalArgumentException { - return parseRfc3339WithNanoSeconds(str).toSecondsAndNanos(); + public static SecondsAndNanos parseRfc3339ToSecondsAndNanos(String str) { + Rfc3339ParseResult time = parseRfc3339WithNanoSeconds(str); + return time.toSecondsAndNanos(); } /** A timestamp represented as the number of seconds and nanoseconds since Epoch. */ @@ -335,7 +335,7 @@ public String toString() { } } - /** Result of parsing a Rfc3339 string. */ + /** Result of parsing an RFC 3339 string. */ private static class Rfc3339ParseResult implements Serializable { private final long seconds; private final int nanos; @@ -400,6 +400,7 @@ private static Rfc3339ParseResult parseRfc3339WithNanoSeconds(String str) } } Calendar dateTime = new GregorianCalendar(GMT); + dateTime.clear(); dateTime.set(year, month, day, hourOfDay, minute, second); long value = dateTime.getTimeInMillis(); diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index c8b9cd513..a5298a3e8 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -28,12 +28,6 @@ public class DateTimeTest extends TestCase { private TimeZone originalTimeZone; - public DateTimeTest() {} - - public DateTimeTest(String testName) { - super(testName); - } - @Override protected void setUp() throws Exception { originalTimeZone = TimeZone.getDefault(); @@ -225,8 +219,18 @@ public void testParseRfc3339ToSecondsAndNanos() { assertParsedRfc3339( "2018-03-01T10:11:12.1000Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000000)); } + + public void testEpoch() { + assertParsedRfc3339( + "1970-01-01T00:00:00.000Z", SecondsAndNanos.ofSecondsAndNanos(0, 0)); + } + + public void testOneSecondBeforeEpoch() { + assertParsedRfc3339( + "1969-12-31T23:59:59.000Z", SecondsAndNanos.ofSecondsAndNanos(-1, 0)); + } - private void assertParsedRfc3339(String input, SecondsAndNanos expected) { + private static void assertParsedRfc3339(String input, SecondsAndNanos expected) { SecondsAndNanos actual = DateTime.parseRfc3339ToSecondsAndNanos(input); assertEquals( "Seconds for " + input + " do not match", expected.getSeconds(), actual.getSeconds()); @@ -249,7 +253,7 @@ public void testParseAndFormatRfc3339() { assertEquals(expected, output); } - private void expectExceptionForParseRfc3339(String input) { + private static void expectExceptionForParseRfc3339(String input) { try { DateTime.parseRfc3339(input); fail("expected NumberFormatException"); From 87c996e8f22ae6bb71ec0232fbda5561fb5fa682 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 2 Dec 2019 15:11:29 +0100 Subject: [PATCH 209/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.11.0 (#897) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 008d49835..e30089571 100644 --- a/pom.xml +++ b/pom.xml @@ -555,7 +555,7 @@ 3.0.2 2.8.6 2.10.1 - 3.10.0 + 3.11.0 28.1-android 1.1.4c 1.2 From f7b14f9da1a99c5fa723b7d3778106a857b9182d Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 2 Dec 2019 13:38:27 -0500 Subject: [PATCH 210/983] chore(docs): BOM 3.0.0 (#901) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index b184d0061..f709502e5 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 2.9.0 + 3.0.0 pom import From 60aaea9176fee84cc02eddd1cb4c2b63e9c33beb Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 3 Dec 2019 12:30:30 +0100 Subject: [PATCH 211/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.11.1 (#902) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e30089571..a1a8061aa 100644 --- a/pom.xml +++ b/pom.xml @@ -555,7 +555,7 @@ 3.0.2 2.8.6 2.10.1 - 3.11.0 + 3.11.1 28.1-android 1.1.4c 1.2 From ee2c27e8b07a4906b93bcf1f7e44a9bfdc2c12dd Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 9 Dec 2019 15:14:03 -0500 Subject: [PATCH 212/983] Adding test for Gregorian Calendar beginning day (#898) --- .../test/java/com/google/api/client/util/DateTimeTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index a5298a3e8..785ab40d5 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -148,6 +148,11 @@ public void testParseRfc3339() { DateTime.parseRfc3339( "2018-12-31T23:59:59.9999Z"), // This value would be truncated prior to version 1.30.2 DateTime.parseRfc3339("2018-12-31T23:59:59.999Z")); + + // The beginning of Gregorian Calendar + assertEquals( + -12219287774877L, // Result from Joda time's Instant.parse + DateTime.parseRfc3339("1582-10-15T01:23:45.123Z").getValue()); } /** From 53c50d2805a0b14b78da1ac44d5c070a39909475 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 9 Dec 2019 19:05:08 -0500 Subject: [PATCH 213/983] chore(docs): update libraries-bom to 3.1.0 (#907) Libraries-bom 3.1.0 release --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index f709502e5..ca52aeb0c 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 3.0.0 + 3.1.0 pom import From 7ea53ebdb641a9611cbf5736c55f08a83606101e Mon Sep 17 00:00:00 2001 From: jmorrise Date: Tue, 10 Dec 2019 13:21:57 -0800 Subject: [PATCH 214/983] fix: set mediaType to null if contentType cannot be parsed (#911) * fix: mediaType=null if contentType can't be parsed Avoids users hitting a runtime exception when the contentType is invalid. * fix: add a contentType with params --- .../google/api/client/http/HttpResponse.java | 18 ++++- .../api/client/http/HttpResponseTest.java | 79 +++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 5273300f6..3341720a6 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -150,7 +150,7 @@ public final class HttpResponse { contentType = request.getResponseHeaders().getContentType(); } this.contentType = contentType; - mediaType = contentType == null ? null : new HttpMediaType(contentType); + this.mediaType = parseMediaType(contentType); // log from buffer if (loggable) { @@ -158,6 +158,22 @@ public final class HttpResponse { } } + /** + * Returns an {@link HttpMediaType} object parsed from {@link #contentType}, or {@code null} if + * if {@link #contentType} cannot be parsed or {@link #contentType} is {@code null}. + */ + private static HttpMediaType parseMediaType(String contentType) { + if (contentType == null) { + return null; + } + try { + return new HttpMediaType(contentType); + } catch (IllegalArgumentException e) { + // contentType is invalid and cannot be parsed. + return null; + } + } + /** * Returns the limit to the content size that will be logged during {@link #getContent()}. * diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index a3efdb305..f7638d675 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -58,6 +58,10 @@ public void testParseAsString_none() throws Exception { private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; private static final String SAMPLE2 = "123abc"; + private static final String VALID_CONTENT_TYPE = "text/plain"; + private static final String VALID_CONTENT_TYPE_WITH_PARAMS = + "application/vnd.com.google.datastore.entity+json; charset=utf-8; version=v1; q=0.9"; + private static final String INVALID_CONTENT_TYPE = "!!!invalid!!!"; public void testParseAsString_utf8() throws Exception { HttpTransport transport = @@ -102,6 +106,81 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(SAMPLE2, response.parseAsString()); } + public void testParseAsString_validContentType() throws Exception { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(SAMPLE2); + result.setContentType(VALID_CONTENT_TYPE); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + + HttpResponse response = request.execute(); + assertEquals(SAMPLE2, response.parseAsString()); + assertEquals(VALID_CONTENT_TYPE, response.getContentType()); + assertNotNull(response.getMediaType()); + } + + public void testParseAsString_validContentTypeWithParams() throws Exception { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(SAMPLE2); + result.setContentType(VALID_CONTENT_TYPE_WITH_PARAMS); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + + HttpResponse response = request.execute(); + assertEquals(SAMPLE2, response.parseAsString()); + assertEquals(VALID_CONTENT_TYPE_WITH_PARAMS, response.getContentType()); + assertNotNull(response.getMediaType()); + } + + public void testParseAsString_invalidContentType() throws Exception { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(SAMPLE2); + result.setContentType(INVALID_CONTENT_TYPE); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + + HttpResponse response = request.execute(); + assertEquals(SAMPLE2, response.parseAsString()); + assertEquals(INVALID_CONTENT_TYPE, response.getContentType()); + assertNull(response.getMediaType()); + } + public void testStatusCode_negative_dontThrowException() throws Exception { subtestStatusCode_negative(false); } From 853ab4ba1bd81420f7b236c2c8f40c4a253a482e Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Tue, 17 Dec 2019 11:46:05 -0500 Subject: [PATCH 215/983] fix: update HttpRequest#getVersion to use stable logic (#919) The original implementation of `getVersion` used the implementation version of the package of the declaring class, however there is differing behavior between Android and openjdk based jvms. In order to be consistent across platforms we will now always resolve the value from the `google-http-client.properties` file that is generated during the build. This method should be stable as it based on loading a classpath resource which has cross jvm support. Fixes #892 --- .../google/api/client/http/HttpRequest.java | 22 +++++++++---------- .../api/client/http/HttpRequestTest.java | 17 +++++++++----- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index a2c01d425..23ec3e168 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1224,19 +1224,17 @@ private static void addSpanAttribute(Span span, String key, String value) { } private static String getVersion() { - String version = HttpRequest.class.getPackage().getImplementationVersion(); - // in a non-packaged environment (local), there's no implementation version to read - if (version == null) { - // fall back to reading from a properties file - note this value is expected to be cached - try (InputStream inputStream = HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { - if (inputStream != null) { - Properties properties = new Properties(); - properties.load(inputStream); - version = properties.getProperty("google-http-client.version"); - } - } catch (IOException e) { - // ignore + // attempt to read the library's version from a properties file generated during the build + // this value should be read and cached for later use + String version = "unknown-version"; + try (InputStream inputStream = HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { + if (inputStream != null) { + final Properties properties = new Properties(); + properties.load(inputStream); + version = properties.getProperty("google-http-client.version"); } + } catch (IOException e) { + // ignore } return version; } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index a76b63850..154f3af16 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -31,10 +31,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; - -import java.util.regex.Pattern; -import junit.framework.TestCase; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Arrays; @@ -45,7 +41,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.logging.Level; - +import java.util.regex.Pattern; +import junit.framework.TestCase; import org.junit.Assert; /** @@ -1267,4 +1264,14 @@ public void testExecute_curlLoggerWithContentEncoding() throws Exception { } assertTrue(found); } + + public void testVersion_matchesAcceptablePatterns() throws Exception { + String acceptableVersionPattern = + "unknown-version|(?:\\d+\\.\\d+\\.\\d+(?:-.*?)?(?:-SNAPSHOT)?)"; + String version = HttpRequest.VERSION; + assertTrue( + String.format("the loaded version '%s' did not match the acceptable pattern", version), + version.matches(acceptableVersionPattern) + ); + } } From 7d4a048233d0d3e7c0266b7faaac9f61141aeef9 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Tue, 17 Dec 2019 10:10:38 -0700 Subject: [PATCH 216/983] feat: decode uri path components correctly (#913) * feat: decode uri path components correctly The old implementation was incorrecly treating '+' as a space. Now the only things that get decoded in the path are uri escaped sequences. Fixes #398 * tweak javadoc * remove hardcoded string --- .../google/api/client/http/GenericUrl.java | 49 +++++++++++-------- .../api/client/util/escape/CharEscapers.java | 26 +++++++++- .../client/util/escape/PercentEscaper.java | 2 +- .../api/client/http/GenericUrlTest.java | 2 + .../client/util/escape/CharEscapersTest.java | 49 +++++++++++++++++++ 5 files changed, 106 insertions(+), 22 deletions(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java index 68c5ea6c3..45e9d5ab5 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java @@ -81,10 +81,10 @@ public class GenericUrl extends GenericData { private String fragment; /** - * If true, the URL string originally given is used as is (without encoding, decoding and - * escaping) whenever referenced; otherwise, part of the URL string may be encoded or decoded as - * deemed appropriate or necessary. - */ + * If true, the URL string originally given is used as is (without encoding, decoding and + * escaping) whenever referenced; otherwise, part of the URL string may be encoded or decoded as + * deemed appropriate or necessary. + */ private boolean verbatim; public GenericUrl() {} @@ -112,20 +112,20 @@ public GenericUrl(String encodedUrl) { /** * Constructs from an encoded URL. * - *

              Any known query parameters with pre-defined fields as data keys are parsed based on - * their data type. Any unrecognized query parameter are always parsed as a string. + *

              Any known query parameters with pre-defined fields as data keys are parsed based on their + * data type. Any unrecognized query parameter are always parsed as a string. * *

              Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * * @param encodedUrl encoded URL, including any existing query parameters that should be parsed - * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and + * escaping) * @throws IllegalArgumentException if URL has a syntax error */ public GenericUrl(String encodedUrl, boolean verbatim) { this(parseURL(encodedUrl), verbatim); } - /** * Constructs from a URI. * @@ -140,7 +140,8 @@ public GenericUrl(URI uri) { * Constructs from a URI. * * @param uri URI - * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and + * escaping) */ public GenericUrl(URI uri, boolean verbatim) { this( @@ -168,7 +169,8 @@ public GenericUrl(URL url) { * Constructs from a URL. * * @param url URL - * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and + * escaping) * @since 1.14 */ public GenericUrl(URL url, boolean verbatim) { @@ -209,7 +211,7 @@ private GenericUrl( UrlEncodedParser.parse(query, this); } this.userInfo = userInfo != null ? CharEscapers.decodeUri(userInfo) : null; - } + } } @Override @@ -567,10 +569,11 @@ public static List toPathParts(String encodedPath) { * * @param encodedPath slash-prefixed encoded path, for example {@code * "/m8/feeds/contacts/default/full"} - * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and escaping) - * @return path parts (decoded if not {@code verbatim}), with each part assumed to be preceded by a {@code '/'}, for example - * {@code "", "m8", "feeds", "contacts", "default", "full"}, or {@code null} for {@code null} - * or {@code ""} input + * @param verbatim flag, to specify if URL should be used as is (without encoding, decoding and + * escaping) + * @return path parts (decoded if not {@code verbatim}), with each part assumed to be preceded by + * a {@code '/'}, for example {@code "", "m8", "feeds", "contacts", "default", "full"}, or + * {@code null} for {@code null} or {@code ""} input */ public static List toPathParts(String encodedPath, boolean verbatim) { if (encodedPath == null || encodedPath.length() == 0) { @@ -588,7 +591,7 @@ public static List toPathParts(String encodedPath, boolean verbatim) { } else { sub = encodedPath.substring(cur); } - result.add(verbatim ? sub : CharEscapers.decodeUri(sub)); + result.add(verbatim ? sub : CharEscapers.decodeUriPath(sub)); cur = slash + 1; } return result; @@ -608,13 +611,17 @@ private void appendRawPathFromParts(StringBuilder buf) { } /** Adds query parameters from the provided entrySet into the buffer. */ - static void addQueryParams(Set> entrySet, StringBuilder buf, boolean verbatim) { + static void addQueryParams( + Set> entrySet, StringBuilder buf, boolean verbatim) { // (similar to UrlEncodedContent) boolean first = true; for (Map.Entry nameValueEntry : entrySet) { Object value = nameValueEntry.getValue(); if (value != null) { - String name = verbatim ? nameValueEntry.getKey() : CharEscapers.escapeUriQuery(nameValueEntry.getKey()); + String name = + verbatim + ? nameValueEntry.getKey() + : CharEscapers.escapeUriQuery(nameValueEntry.getKey()); if (value instanceof Collection) { Collection collectionValue = (Collection) value; for (Object repeatedValue : collectionValue) { @@ -627,7 +634,8 @@ static void addQueryParams(Set> entrySet, StringBuilder bu } } - private static boolean appendParam(boolean first, StringBuilder buf, String name, Object value, boolean verbatim) { + private static boolean appendParam( + boolean first, StringBuilder buf, String name, Object value, boolean verbatim) { if (first) { first = false; buf.append('?'); @@ -635,7 +643,8 @@ private static boolean appendParam(boolean first, StringBuilder buf, String name buf.append('&'); } buf.append(name); - String stringValue = verbatim ? value.toString() : CharEscapers.escapeUriQuery(value.toString()); + String stringValue = + verbatim ? value.toString() : CharEscapers.escapeUriQuery(value.toString()); if (stringValue.length() != 0) { buf.append('=').append(stringValue); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index b8ed2c11b..b6172cc98 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -16,6 +16,8 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; /** * Utility functions for dealing with {@code CharEscaper}s, and some commonly used {@code @@ -83,7 +85,29 @@ public static String escapeUri(String value) { */ public static String decodeUri(String uri) { try { - return URLDecoder.decode(uri, "UTF-8"); + return URLDecoder.decode(uri, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + // UTF-8 encoding guaranteed to be supported by JVM + throw new RuntimeException(e); + } + } + + /** + * Decodes the path component of a URI. This must be done via a method that does not try to + * convert + into spaces(the behavior of {@link java.net.URLDecoder#decode(String, String)}). This + * method transforms URI encoded values into their decoded symbols. + * + *

              i.e: {@code decodePath("%3Co%3E")} would return {@code ""} + * + * @param path the value to be decoded + * @return decoded version of {@code path} + */ + public static String decodeUriPath(String path) { + if (path == null) { + return null; + } + try { + return URLDecoder.decode(path.replace("+", "%2B"), StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { // UTF-8 encoding guaranteed to be supported by JVM throw new RuntimeException(e); diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index cedd09afb..a4437095c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -62,7 +62,7 @@ public class PercentEscaper extends UnicodeEscaper { * specified in RFC 3986. Note that some of these characters do need to be escaped when used in * other parts of the URI. */ - public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;="; + public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=+"; /** * Contains the save characters plus all reserved characters. This happens to be the safe path diff --git a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java index c83acc7ff..dbe1cc931 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java @@ -480,6 +480,8 @@ public void testToPathParts() { subtestToPathParts("/path/to/resource", "", "path", "to", "resource"); subtestToPathParts("/path/to/resource/", "", "path", "to", "resource", ""); subtestToPathParts("/Go%3D%23%2F%25%26%20?%3Co%3Egle/2nd", "", "Go=#/%& ?gle", "2nd"); + subtestToPathParts("/plus+test/resource", "", "plus+test", "resource"); + subtestToPathParts("/plus%2Btest/resource", "", "plus+test", "resource"); } private void subtestToPathParts(String encodedPath, String... expectedDecodedParts) { diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java new file mode 100644 index 000000000..0ad3d1e58 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java @@ -0,0 +1,49 @@ +/* + * 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.util.escape; + +import junit.framework.TestCase; + +public class CharEscapersTest extends TestCase { + + public void testDecodeUriPath() { + subtestDecodeUriPath(null, null); + subtestDecodeUriPath("", ""); + subtestDecodeUriPath("abc", "abc"); + subtestDecodeUriPath("a+b%2Bc", "a+b+c"); + subtestDecodeUriPath("Go%3D%23%2F%25%26%20?%3Co%3Egle", "Go=#/%& ?gle"); + } + + private void subtestDecodeUriPath(String input, String expected) { + String actual = CharEscapers.decodeUriPath(input); + assertEquals(expected, actual); + } + + public void testDecodeUri_IllegalArgumentException() { + subtestDecodeUri_IllegalArgumentException("abc%-1abc"); + subtestDecodeUri_IllegalArgumentException("%JJ"); + subtestDecodeUri_IllegalArgumentException("abc%0"); + } + + private void subtestDecodeUri_IllegalArgumentException(String input) { + boolean thrown = false; + try { + CharEscapers.decodeUriPath(input); + } catch (IllegalArgumentException e) { + thrown = true; + } + assertTrue(thrown); + } +} From b8d6abe0367bd497b68831263753ad262914aa97 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Tue, 17 Dec 2019 10:20:24 -0700 Subject: [PATCH 217/983] feat: support chunked transfer encoding (#910) Currently any time HttpRequest works with encoded data it encodes the data twice. Once for the actual stream and once for checking the length of the stream. Instead, when there is encoding just don't set the content length. This will cause the underlying transports, with a few tweaks, to use Transfer-Encoding: chunked. Fixes #648 --- .../http/apache/v2/ApacheHttpRequest.java | 24 ++++---- .../http/apache/v2/ApacheHttpRequestTest.java | 59 +++++++++++++++++++ .../apache/v2/ApacheHttpTransportTest.java | 5 +- .../google/api/client/http/HttpRequest.java | 16 ++--- .../client/http/apache/ApacheHttpRequest.java | 10 ++-- .../client/http/javanet/NetHttpRequest.java | 5 ++ .../http/javanet/MockHttpURLConnection.java | 4 ++ .../api/client/http/HttpRequestTest.java | 10 +++- .../http/javanet/NetHttpRequestTest.java | 36 ++++++++++- 9 files changed, 135 insertions(+), 34 deletions(-) create mode 100644 google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java index 29bd61ee7..ae2aac763 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java @@ -23,9 +23,7 @@ import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpRequestBase; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; @@ -38,11 +36,12 @@ final class ApacheHttpRequest extends LowLevelHttpRequest { this.httpClient = httpClient; this.request = request; // disable redirects as google-http-client handles redirects - this.requestConfig = RequestConfig.custom() - .setRedirectsEnabled(false) - .setNormalizeUri(false) - // TODO(chingor): configure in HttpClientBuilder when available - .setStaleConnectionCheckEnabled(false); + this.requestConfig = + RequestConfig.custom() + .setRedirectsEnabled(false) + .setNormalizeUri(false) + // TODO(chingor): configure in HttpClientBuilder when available + .setStaleConnectionCheckEnabled(false); } @Override @@ -52,19 +51,22 @@ public void addHeader(String name, String value) { @Override public void setTimeout(int connectTimeout, int readTimeout) throws IOException { - requestConfig.setConnectTimeout(connectTimeout) - .setSocketTimeout(readTimeout); + requestConfig.setConnectTimeout(connectTimeout).setSocketTimeout(readTimeout); } @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, + Preconditions.checkState( + request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); entity.setContentEncoding(getContentEncoding()); entity.setContentType(getContentType()); + if (getContentLength() == -1) { + entity.setChunked(true); + } ((HttpEntityEnclosingRequest) request).setEntity(entity); } request.setConfig(requestConfig.build()); diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java new file mode 100644 index 000000000..74c97244a --- /dev/null +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java @@ -0,0 +1,59 @@ +/* + * 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.apache.v2; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.testing.http.apache.MockHttpClient; +import java.io.ByteArrayInputStream; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import org.junit.Test; + +public class ApacheHttpRequestTest { + + @Test + public void testContentLengthSet() throws Exception { + HttpExtensionMethod base = new HttpExtensionMethod("POST", "http://www.google.com"); + ApacheHttpRequest request = new ApacheHttpRequest(new MockHttpClient(), base); + HttpContent content = + new ByteArrayContent("text/plain", "sample".getBytes(StandardCharsets.UTF_8)); + request.setStreamingContent(content); + request.setContentLength(content.getLength()); + request.execute(); + + assertFalse(base.getEntity().isChunked()); + assertEquals(6, base.getEntity().getContentLength()); + } + + @Test + public void testChunked() throws Exception { + byte[] buf = new byte[300]; + Arrays.fill(buf, (byte) ' '); + HttpExtensionMethod base = new HttpExtensionMethod("POST", "http://www.google.com"); + ApacheHttpRequest request = new ApacheHttpRequest(new MockHttpClient(), base); + HttpContent content = new InputStreamContent("text/plain", new ByteArrayInputStream(buf)); + request.setStreamingContent(content); + request.execute(); + + assertTrue(base.getEntity().isChunked()); + assertEquals(-1, base.getEntity().getContentLength()); + } +} diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index e6ca850ce..e9b93e9be 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -34,7 +34,6 @@ import java.io.OutputStream; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; -import java.util.Random; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.http.Header; @@ -123,8 +122,8 @@ private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, St throws IOException { try { execute(request); - fail("expected " + IllegalArgumentException.class); - } catch (IllegalArgumentException e) { + fail("expected " + IllegalStateException.class); + } catch (IllegalStateException e) { // expected assertEquals(e.getMessage(), "Apache HTTP client does not support " + method + " requests with content."); diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 23ec3e168..9124e4906 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.Beta; -import com.google.api.client.util.IOUtils; import com.google.api.client.util.LoggingStreamingContent; import com.google.api.client.util.ObjectParser; import com.google.api.client.util.Preconditions; @@ -141,7 +140,7 @@ public final class HttpRequest { /** HTTP request URL. */ private GenericUrl url; - + /** Timeout in milliseconds to establish a connection or {@code 0} for an infinite timeout. */ private int connectTimeout = 20 * 1000; @@ -172,7 +171,7 @@ public final class HttpRequest { /** The {@link BackOffPolicy} to use between retry attempts or {@code null} for none. */ @Deprecated @Beta private BackOffPolicy backOffPolicy; - /** Whether to automatically follow redirects ({@code true} by default). */ + /** Whether to automatically follow redirects ({@code true} by default). */ private boolean followRedirects = true; /** Whether to use raw redirect URLs ({@code false} by default). */ @@ -698,15 +697,13 @@ public HttpRequest setFollowRedirects(boolean followRedirects) { return this; } - /** - * Return whether to use raw redirect URLs. - */ + /** Return whether to use raw redirect URLs. */ public boolean getUseRawRedirectUrls() { return useRawRedirectUrls; } /** - * Sets whether to use raw redirect URLs. + * Sets whether to use raw redirect URLs. * *

              The default value is {@code false}. */ @@ -938,7 +935,7 @@ public HttpResponse execute() throws IOException { final boolean contentRetrySupported = streamingContent == null || content.retrySupported(); if (streamingContent != null) { final String contentEncoding; - final long contentLength; + long contentLength = -1; final String contentType = content.getType(); // log content if (loggable) { @@ -953,7 +950,6 @@ public HttpResponse execute() throws IOException { } else { contentEncoding = encoding.getName(); streamingContent = new HttpEncodingStreamingContent(streamingContent, encoding); - contentLength = contentRetrySupported ? IOUtils.computeLength(streamingContent) : -1; } // append content headers to log buffer if (loggable) { @@ -1222,7 +1218,7 @@ private static void addSpanAttribute(Span span, String key, String value) { span.putAttribute(key, AttributeValue.stringAttributeValue(value)); } } - + private static String getVersion() { // attempt to read the library's version from a properties file generated during the build // this value should be read and cached for later use diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java index b31b20594..355acfcd0 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java @@ -25,9 +25,7 @@ import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ApacheHttpRequest extends LowLevelHttpRequest { private final HttpClient httpClient; @@ -54,12 +52,16 @@ public void setTimeout(int connectTimeout, int readTimeout) throws IOException { @Override public LowLevelHttpResponse execute() throws IOException { if (getStreamingContent() != null) { - Preconditions.checkArgument(request instanceof HttpEntityEnclosingRequest, + Preconditions.checkState( + request instanceof HttpEntityEnclosingRequest, "Apache HTTP client does not support %s requests with content.", request.getRequestLine().getMethod()); ContentEntity entity = new ContentEntity(getContentLength(), getStreamingContent()); entity.setContentEncoding(getContentEncoding()); entity.setContentType(getContentType()); + if (getContentLength() == -1) { + entity.setChunked(true); + } ((HttpEntityEnclosingRequest) request).setEntity(entity); } return new ApacheHttpResponse(request, httpClient.execute(request)); diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java index aa0d8e3e4..1d043472b 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java @@ -49,6 +49,11 @@ public void addHeader(String name, String value) { connection.addRequestProperty(name, value); } + @VisibleForTesting + String getRequestProperty(String name) { + return connection.getRequestProperty(name); + } + @Override public void setTimeout(int connectTimeout, int readTimeout) { connection.setReadTimeout(readTimeout); diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java index 467f495f4..2fba28b48 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java @@ -201,4 +201,8 @@ public String getHeaderField(String name) { List values = headers.get(name); return values == null ? null : values.get(0); } + + public int getChunkLength() { + return chunkLength; + } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index 154f3af16..bb47e98d7 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -987,7 +987,7 @@ public LowLevelHttpResponse execute() throws IOException { if (expectGZip) { assertEquals(HttpEncodingStreamingContent.class, getStreamingContent().getClass()); assertEquals("gzip", getContentEncoding()); - assertEquals(25, getContentLength()); + assertEquals(-1, getContentLength()); } else { assertFalse( getStreamingContent().getClass().equals(HttpEncodingStreamingContent.class)); @@ -1227,7 +1227,9 @@ public void testExecute_curlLogger() throws Exception { if (message.startsWith("curl")) { found = true; assertTrue(message.contains("curl -v --compressed -H 'Accept-Encoding: gzip'")); - assertTrue(message.contains("-H 'User-Agent: Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)'")); + assertTrue( + message.contains( + "-H 'User-Agent: Google-HTTP-Java-Client/" + HttpRequest.VERSION + " (gzip)'")); assertTrue(message.contains("' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c'")); } } @@ -1258,7 +1260,9 @@ public void testExecute_curlLoggerWithContentEncoding() throws Exception { found = true; assertTrue(message.contains("curl -v --compressed -X POST -H 'Accept-Encoding: gzip'")); assertTrue(message.contains("-H 'User-Agent: " + HttpRequest.USER_AGENT_SUFFIX + "'")); - assertTrue(message.contains("-H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip'")); + assertTrue( + message.contains( + "-H 'Content-Type: text/plain; charset=UTF-8' -H 'Content-Encoding: gzip'")); assertTrue(message.contains("-d '@-' -- 'http://google.com/#q=a'\"'\"'b'\"'\"'c' << $$$")); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java index d4118328e..ae3606ca5 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java @@ -1,9 +1,8 @@ package com.google.api.client.http.javanet; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; +import com.google.api.client.http.ByteArrayContent; import com.google.api.client.http.HttpContent; import com.google.api.client.http.InputStreamContent; import com.google.api.client.http.LowLevelHttpResponse; @@ -15,6 +14,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.concurrent.TimeoutException; import org.junit.Test; @@ -203,4 +203,34 @@ public void close() throws IOException { assertEquals("Error during close", e.getMessage()); } } + + @Test + public void testChunkedLengthSet() throws Exception { + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.setRequestMethod("POST"); + NetHttpRequest request = new NetHttpRequest(connection); + InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); + HttpContent content = new InputStreamContent("text/plain", is); + request.setStreamingContent(content); + request.setContentEncoding("gzip"); + request.execute(); + + assertEquals(4096, connection.getChunkLength()); + assertNull(request.getRequestProperty("Content-Length")); + } + + @Test + public void testChunkedLengthNotSet() throws Exception { + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.setRequestMethod("POST"); + NetHttpRequest request = new NetHttpRequest(connection); + HttpContent content = + new ByteArrayContent("text/plain", "sample".getBytes(StandardCharsets.UTF_8)); + request.setStreamingContent(content); + request.setContentLength(content.getLength()); + request.execute(); + + assertEquals(connection.getChunkLength(), -1); + assertEquals("6", request.getRequestProperty("Content-Length")); + } } From 7f2287fb32383b438a3abb6fa1ec27498a50970a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2019 09:57:53 -0800 Subject: [PATCH 218/983] chore: release 1.34.0 (#908) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] * updated pom.xml [ci skip] --- CHANGELOG.md | 16 +++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 69 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3165b015c..8b8f96d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [1.34.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.33.0...v1.34.0) (2019-12-17) + + +### Features + +* add option to pass redirect Location: header value as-is without encoding, decoding, or escaping ([#871](https://www.github.com/googleapis/google-http-java-client/issues/871)) ([2c4f49e](https://www.github.com/googleapis/google-http-java-client/commit/2c4f49e0e5f9c6b8f21f35edae373eaada87119b)) +* decode uri path components correctly ([#913](https://www.github.com/googleapis/google-http-java-client/issues/913)) ([7d4a048](https://www.github.com/googleapis/google-http-java-client/commit/7d4a048233d0d3e7c0266b7faaac9f61141aeef9)), closes [#398](https://www.github.com/googleapis/google-http-java-client/issues/398) +* support chunked transfer encoding ([#910](https://www.github.com/googleapis/google-http-java-client/issues/910)) ([b8d6abe](https://www.github.com/googleapis/google-http-java-client/commit/b8d6abe0367bd497b68831263753ad262914aa97)), closes [#648](https://www.github.com/googleapis/google-http-java-client/issues/648) + + +### Bug Fixes + +* redirect on 308 (Permanent Redirect) too ([#876](https://www.github.com/googleapis/google-http-java-client/issues/876)) ([501ede8](https://www.github.com/googleapis/google-http-java-client/commit/501ede83ef332207f0ed67c3d7120b20a1416cec)) +* set mediaType to null if contentType cannot be parsed ([#911](https://www.github.com/googleapis/google-http-java-client/issues/911)) ([7ea53eb](https://www.github.com/googleapis/google-http-java-client/commit/7ea53ebdb641a9611cbf5736c55f08a83606101e)) +* update HttpRequest#getVersion to use stable logic ([#919](https://www.github.com/googleapis/google-http-java-client/issues/919)) ([853ab4b](https://www.github.com/googleapis/google-http-java-client/commit/853ab4ba1bd81420f7b236c2c8f40c4a253a482e)), closes [#892](https://www.github.com/googleapis/google-http-java-client/issues/892) + ## [1.32.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.32.1...v1.32.2) (2019-10-29) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d5b444586..78055ae04 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.33.1-SNAPSHOT + 1.34.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.33.1-SNAPSHOT + 1.34.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.33.1-SNAPSHOT + 1.34.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index a4d6c05e8..196b5b758 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-android - 1.33.1-SNAPSHOT + 1.34.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 35f04ac9d..9bc7577ce 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-apache-v2 - 1.33.1-SNAPSHOT + 1.34.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index bad8c9973..aff13f076 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-appengine - 1.33.1-SNAPSHOT + 1.34.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f87c5c514..c7e8fed28 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.33.1-SNAPSHOT + 1.34.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e71a10000..8f2e11e5a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.33.1-SNAPSHOT + 1.34.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-android - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-apache-v2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-appengine - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-findbugs - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-gson - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-jackson2 - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-protobuf - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-test - 1.33.1-SNAPSHOT + 1.34.0 com.google.http-client google-http-client-xml - 1.33.1-SNAPSHOT + 1.34.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 4c1bfbd43..b0da7f007 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-findbugs - 1.33.1-SNAPSHOT + 1.34.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index b4cd29b11..3854f0010 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-gson - 1.33.1-SNAPSHOT + 1.34.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a0ff9f4a0..c1ca279d2 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-jackson2 - 1.33.1-SNAPSHOT + 1.34.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fe577e0bc..3afa4286c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-protobuf - 1.33.1-SNAPSHOT + 1.34.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index fe6b8db8a..a41ca95f3 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-test - 1.33.1-SNAPSHOT + 1.34.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 6e79c4cbe..a874b854b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client-xml - 1.33.1-SNAPSHOT + 1.34.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index aba47c3e2..39c779836 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../pom.xml google-http-client - 1.33.1-SNAPSHOT + 1.34.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a1a8061aa..15dd16912 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.33.1-SNAPSHOT + 1.34.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2f90ac64f..77c7d8973 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.33.1-SNAPSHOT + 1.34.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 08ce6e975..28bd1f958 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.33.0:1.33.1-SNAPSHOT -google-http-client-bom:1.33.0:1.33.1-SNAPSHOT -google-http-client-parent:1.33.0:1.33.1-SNAPSHOT -google-http-client-android:1.33.0:1.33.1-SNAPSHOT -google-http-client-android-test:1.33.0:1.33.1-SNAPSHOT -google-http-client-apache-v2:1.33.0:1.33.1-SNAPSHOT -google-http-client-appengine:1.33.0:1.33.1-SNAPSHOT -google-http-client-assembly:1.33.0:1.33.1-SNAPSHOT -google-http-client-findbugs:1.33.0:1.33.1-SNAPSHOT -google-http-client-gson:1.33.0:1.33.1-SNAPSHOT -google-http-client-jackson2:1.33.0:1.33.1-SNAPSHOT -google-http-client-protobuf:1.33.0:1.33.1-SNAPSHOT -google-http-client-test:1.33.0:1.33.1-SNAPSHOT -google-http-client-xml:1.33.0:1.33.1-SNAPSHOT +google-http-client:1.34.0:1.34.0 +google-http-client-bom:1.34.0:1.34.0 +google-http-client-parent:1.34.0:1.34.0 +google-http-client-android:1.34.0:1.34.0 +google-http-client-android-test:1.34.0:1.34.0 +google-http-client-apache-v2:1.34.0:1.34.0 +google-http-client-appengine:1.34.0:1.34.0 +google-http-client-assembly:1.34.0:1.34.0 +google-http-client-findbugs:1.34.0:1.34.0 +google-http-client-gson:1.34.0:1.34.0 +google-http-client-jackson2:1.34.0:1.34.0 +google-http-client-protobuf:1.34.0:1.34.0 +google-http-client-test:1.34.0:1.34.0 +google-http-client-xml:1.34.0:1.34.0 From 61261cb3be4e4579877a0e616fab0676d04af2d1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2019 11:03:37 -0800 Subject: [PATCH 219/983] chore: release 1.34.1-SNAPSHOT (#920) * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 78055ae04..37bdde14e 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.0 + 1.34.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.0 + 1.34.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.0 + 1.34.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 196b5b758..3fddf9b74 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-android - 1.34.0 + 1.34.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 9bc7577ce..eab639963 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.34.0 + 1.34.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index aff13f076..516262727 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.34.0 + 1.34.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index c7e8fed28..8dd0401ec 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.34.0 + 1.34.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 8f2e11e5a..712a4eb64 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.0 + 1.34.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-android - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-test - 1.34.0 + 1.34.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.34.0 + 1.34.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index b0da7f007..e6e433ad6 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.34.0 + 1.34.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 3854f0010..9bc78ddf3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.34.0 + 1.34.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c1ca279d2..cfe69649b 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.34.0 + 1.34.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 3afa4286c..465d4c27c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.34.0 + 1.34.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index a41ca95f3..d11c2ae29 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-test - 1.34.0 + 1.34.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index a874b854b..0c46baef9 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.34.0 + 1.34.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 39c779836..3d43747a8 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../pom.xml google-http-client - 1.34.0 + 1.34.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 15dd16912..cc4014a3c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -549,7 +549,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.0 + 1.34.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 77c7d8973..a30dfc329 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.0 + 1.34.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 28bd1f958..250b4fa9f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.0:1.34.0 -google-http-client-bom:1.34.0:1.34.0 -google-http-client-parent:1.34.0:1.34.0 -google-http-client-android:1.34.0:1.34.0 -google-http-client-android-test:1.34.0:1.34.0 -google-http-client-apache-v2:1.34.0:1.34.0 -google-http-client-appengine:1.34.0:1.34.0 -google-http-client-assembly:1.34.0:1.34.0 -google-http-client-findbugs:1.34.0:1.34.0 -google-http-client-gson:1.34.0:1.34.0 -google-http-client-jackson2:1.34.0:1.34.0 -google-http-client-protobuf:1.34.0:1.34.0 -google-http-client-test:1.34.0:1.34.0 -google-http-client-xml:1.34.0:1.34.0 +google-http-client:1.34.0:1.34.1-SNAPSHOT +google-http-client-bom:1.34.0:1.34.1-SNAPSHOT +google-http-client-parent:1.34.0:1.34.1-SNAPSHOT +google-http-client-android:1.34.0:1.34.1-SNAPSHOT +google-http-client-android-test:1.34.0:1.34.1-SNAPSHOT +google-http-client-apache-v2:1.34.0:1.34.1-SNAPSHOT +google-http-client-appengine:1.34.0:1.34.1-SNAPSHOT +google-http-client-assembly:1.34.0:1.34.1-SNAPSHOT +google-http-client-findbugs:1.34.0:1.34.1-SNAPSHOT +google-http-client-gson:1.34.0:1.34.1-SNAPSHOT +google-http-client-jackson2:1.34.0:1.34.1-SNAPSHOT +google-http-client-protobuf:1.34.0:1.34.1-SNAPSHOT +google-http-client-test:1.34.0:1.34.1-SNAPSHOT +google-http-client-xml:1.34.0:1.34.1-SNAPSHOT From 7e0b952a0d9c84ac43dff43914567c98f3e81f66 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 23 Dec 2019 10:28:41 -0500 Subject: [PATCH 220/983] docs: libraries-bom 3.3.0 (#921) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index ca52aeb0c..a9b039293 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 3.1.0 + 3.3.0 pom import From d1fe119b84a7c2e12c2348bf38aa5657fc268989 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 23 Dec 2019 19:35:55 +0200 Subject: [PATCH 221/983] chore(deps): update dependency org.apache.maven.plugins:maven-source-plugin to v3.2.1 (#924) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc4014a3c..9c799490a 100644 --- a/pom.xml +++ b/pom.xml @@ -298,7 +298,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.2.1 attach-sources From 91c20a3dfb654e85104b1c09a0b2befbae356c19 Mon Sep 17 00:00:00 2001 From: Dmitry <58846611+dmitry-fa@users.noreply.github.com> Date: Tue, 31 Dec 2019 01:26:10 +0300 Subject: [PATCH 222/983] fix: use random UUID for multipart boundary delimiter (#916) * fix: use random uuid string as boundary * fix: use random uuid string as boundary --- .../api/client/http/MultipartContent.java | 15 ++- .../api/client/http/MultipartContentTest.java | 106 +++++++++++------- 2 files changed, 74 insertions(+), 47 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java index 4fdc0b586..43a58b446 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java @@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.UUID; /** * Serializes MIME multipart content as specified by RFC 2046: Multipurpose Internet * Mail Extensions: The Multipart/mixed (primary) subtype. * - *

              By default the media type is {@code "multipart/related; boundary=__END_OF_PART__"}, but this + *

              By default the media type is {@code "multipart/related; boundary=__END_OF_PART____"}, but this * may be customized by calling {@link #setMediaType(HttpMediaType)}, {@link #getMediaType()}, or * {@link #setBoundary(String)}. * @@ -47,10 +48,14 @@ public class MultipartContent extends AbstractHttpContent { private static final String TWO_DASHES = "--"; /** Parts of the HTTP multipart request. */ - private ArrayList parts = new ArrayList(); + private ArrayList parts = new ArrayList<>(); public MultipartContent() { - super(new HttpMediaType("multipart/related").setParameter("boundary", "__END_OF_PART__")); + this("__END_OF_PART__" + UUID.randomUUID().toString() + "__"); + } + + public MultipartContent(String boundary) { + super(new HttpMediaType("multipart/related").setParameter("boundary", boundary)); } public void writeTo(OutputStream out) throws IOException { @@ -152,7 +157,7 @@ public MultipartContent addPart(Part part) { * changing the return type, but nothing else. */ public MultipartContent setParts(Collection parts) { - this.parts = new ArrayList(parts); + this.parts = new ArrayList<>(parts); return this; } @@ -164,7 +169,7 @@ public MultipartContent setParts(Collection parts) { * changing the return type, but nothing else. */ public MultipartContent setContentParts(Collection contentParts) { - this.parts = new ArrayList(contentParts.size()); + this.parts = new ArrayList<>(contentParts.size()); for (HttpContent contentPart : contentParts) { addPart(new Part(contentPart)); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java index 76f725b61..14e0e5990 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java @@ -15,6 +15,7 @@ package com.google.api.client.http; import com.google.api.client.json.Json; +import com.google.api.client.util.Charsets; import com.google.api.client.util.StringUtils; import java.io.ByteArrayOutputStream; import junit.framework.TestCase; @@ -26,55 +27,76 @@ */ public class MultipartContentTest extends TestCase { + private static final String BOUNDARY = "__END_OF_PART__"; private static final String CRLF = "\r\n"; private static final String CONTENT_TYPE = Json.MEDIA_TYPE; - private static final String HEADERS = - "Content-Length: 3" - + CRLF - + "Content-Type: application/json; charset=UTF-8" - + CRLF - + "content-transfer-encoding: binary" - + CRLF; + private static final String HEADERS = headers("application/json; charset=UTF-8", "foo"); + + private static String headers(String contentType, String value) { + return "Content-Length: " + value.length() + CRLF + + "Content-Type: " + contentType + CRLF + + "content-transfer-encoding: binary" + CRLF; + } + + public void testRandomContent() throws Exception { + MultipartContent content = new MultipartContent(); + String boundaryString = content.getBoundary(); + assertNotNull(boundaryString); + assertTrue(boundaryString.startsWith(BOUNDARY)); + assertTrue(boundaryString.endsWith("__")); + assertEquals("multipart/related; boundary=" + boundaryString, content.getType()); + + final String[][] VALUES = new String[][] { + {"Hello world", "text/plain"}, + {"Hi", "application/xml"}, + {"{x:1,y:2}", "application/json"} + }; + StringBuilder expectedStringBuilder = new StringBuilder(); + for (String[] valueTypePair: VALUES) { + String contentValue = valueTypePair[0]; + String contentType = valueTypePair[1]; + content.addPart(new MultipartContent.Part(ByteArrayContent.fromString(contentType, contentValue))); + expectedStringBuilder.append("--").append(boundaryString).append(CRLF) + .append(headers(contentType, contentValue)).append(CRLF) + .append(contentValue).append(CRLF); + } + expectedStringBuilder.append("--").append(boundaryString).append("--").append(CRLF); + // write to string + ByteArrayOutputStream out = new ByteArrayOutputStream(); + content.writeTo(out); + String expectedContent = expectedStringBuilder.toString(); + assertEquals(expectedContent, out.toString(Charsets.UTF_8.name())); + assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); + } public void testContent() throws Exception { - subtestContent("--__END_OF_PART__--" + CRLF, null); + subtestContent("--" + BOUNDARY + "--" + CRLF, null); subtestContent( - "--__END_OF_PART__" + CRLF + HEADERS + CRLF + "foo" + CRLF + "--__END_OF_PART__--" + CRLF, - null, + "--" + BOUNDARY + CRLF + + HEADERS + CRLF + + "foo" + CRLF + + "--" + BOUNDARY + "--" + CRLF, + null, "foo"); subtestContent( - "--__END_OF_PART__" - + CRLF - + HEADERS - + CRLF - + "foo" - + CRLF - + "--__END_OF_PART__" - + CRLF - + HEADERS - + CRLF - + "bar" - + CRLF - + "--__END_OF_PART__--" - + CRLF, - null, + "--" + BOUNDARY + CRLF + + HEADERS + CRLF + + "foo" + CRLF + + "--" + BOUNDARY + CRLF + + HEADERS + CRLF + + "bar" + CRLF + + "--" + BOUNDARY + "--" + CRLF, + null, "foo", "bar"); subtestContent( - "--myboundary" - + CRLF - + HEADERS - + CRLF - + "foo" - + CRLF - + "--myboundary" - + CRLF - + HEADERS - + CRLF - + "bar" - + CRLF - + "--myboundary--" - + CRLF, + "--myboundary" + CRLF + + HEADERS + CRLF + + "foo" + CRLF + + "--myboundary" + CRLF + + HEADERS + CRLF + + "bar" + CRLF + + "--myboundary--" + CRLF, "myboundary", "foo", "bar"); @@ -83,7 +105,7 @@ public void testContent() throws Exception { private void subtestContent(String expectedContent, String boundaryString, String... contents) throws Exception { // multipart content - MultipartContent content = new MultipartContent(); + MultipartContent content = new MultipartContent(boundaryString == null ? BOUNDARY : boundaryString); for (String contentValue : contents) { content.addPart( new MultipartContent.Part(ByteArrayContent.fromString(CONTENT_TYPE, contentValue))); @@ -94,11 +116,11 @@ private void subtestContent(String expectedContent, String boundaryString, Strin // write to string ByteArrayOutputStream out = new ByteArrayOutputStream(); content.writeTo(out); - assertEquals(expectedContent, out.toString()); + assertEquals(expectedContent, out.toString(Charsets.UTF_8.name())); assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); assertEquals( boundaryString == null - ? "multipart/related; boundary=__END_OF_PART__" + ? "multipart/related; boundary=" + BOUNDARY : "multipart/related; boundary=" + boundaryString, content.getType()); } From c6dd9b9ece1115d000566fcc4dc31b344d7c54ed Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 1 Jan 2020 21:29:17 +0200 Subject: [PATCH 223/983] chore(deps): update dependency junit:junit to v4.13 (#928) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9c799490a..0f645add1 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ junit junit - 4.12 + 4.13 com.google.truth From 0f8db399c1a1f5d20686f6f4d8b4a88766f5c969 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 5 Jan 2020 13:16:52 +0200 Subject: [PATCH 224/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.10.2 (#930) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f645add1..7cb05adc7 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ UTF-8 3.0.2 2.8.6 - 2.10.1 + 2.10.2 3.11.1 28.1-android 1.1.4c From 029bbbfb5ddfefe64e64ecca4b1413ae1c93ddd8 Mon Sep 17 00:00:00 2001 From: Kevin Binswanger Date: Mon, 6 Jan 2020 14:44:00 -0600 Subject: [PATCH 225/983] docs: fix various paragraph issues in javadoc (#867) --- .../google/api/client/http/AbstractInputStreamContent.java | 2 -- .../google/api/client/http/ExponentialBackOffPolicy.java | 2 +- .../main/java/com/google/api/client/json/JsonParser.java | 2 -- .../main/java/com/google/api/client/json/JsonString.java | 6 +++--- .../api/client/testing/json/webtoken/TestCertificates.java | 2 +- .../src/main/java/com/google/api/client/util/PemReader.java | 4 +--- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java b/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java index 789fab5ec..96ed50193 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java @@ -29,8 +29,6 @@ * amount of content read from the input stream, you may use {@link ByteStreams#limit(InputStream, * long)}. * - *

              - * *

              Implementations don't need to be thread-safe. * * @since 1.4 diff --git a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java index 2384c8a89..20d8859bf 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java +++ b/google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java @@ -31,7 +31,7 @@ * retry_interval * (random value in range [1 - randomization_factor, 1 + randomization_factor]) * * - * In other words {@link #getNextBackOffMillis()} will range between the randomization factor + *

              In other words {@link #getNextBackOffMillis()} will range between the randomization factor * percentage below and above the retry interval. For example, using 2 seconds as the base retry * interval and 0.5 as the randomization factor, the actual back off period used in the next retry * attempt will be between 1 and 3 seconds. diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index 9bb1184f0..7ac07ff56 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -50,8 +50,6 @@ *

              Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily * thread-safe. * - *

              - * *

              If a JSON map is encountered while using a destination class of type Map, then an {@link * java.util.ArrayMap} is used by default for the parsed values. * diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java index 6b93bbe21..68b3b2f9c 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java @@ -32,7 +32,7 @@ * * * - * can be used for this JSON content: + *

              can be used for this JSON content: * *

                * 
              @@ -40,7 +40,7 @@
                * 
                * 
              * - * However, if instead the JSON content uses a JSON String to store the value, one needs to use the + *

              However, if instead the JSON content uses a JSON String to store the value, one needs to use the * {@link JsonString} annotation. For example: * *

              @@ -51,7 +51,7 @@
                * 
                * 
              * - * can be used for this JSON content: + *

              can be used for this JSON content: * *

                * 
              diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java
              index 5c3457af6..2ae6b08cc 100644
              --- a/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java
              +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java
              @@ -240,7 +240,7 @@ public X509TrustManager getTrustManager() throws IOException, GeneralSecurityExc
                  * {"foo":"bar"}
                  * 
              * - * The message is signed using {@code FOO_BAR_COM_KEY}. + *

              The message is signed using {@code FOO_BAR_COM_KEY}. */ public static final String JWS_SIGNATURE = "eyJhbGciOiJSUzI1NiIsIng1YyI6WyJNSUlDNlRDQ0FkRUNBU293RFFZSktvWklo" diff --git a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java index a1f06a3bc..607d80de0 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java +++ b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java @@ -36,9 +36,7 @@ * *

              Limitations: * - *

              - * - *

                + *

                  *
                • Assumes the PEM file section content is not encrypted and cannot handle the case of any * headers inside the BEGIN and END tag. *
                • It also ignores any attributes associated with any PEM file section. From 290e3ef6197b56b73256d38f551e3aa044c1c8ff Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 7 Jan 2020 08:59:00 -0800 Subject: [PATCH 226/983] chore: update common templates (#931) --- .kokoro/build.sh | 15 +- .kokoro/continuous/samples.cfg | 31 + .kokoro/nightly/samples.cfg | 31 + .kokoro/presubmit/samples.cfg | 31 + CONTRIBUTING.md | 104 ++- synth.metadata | 1393 +++++++++++++++++++++++++++++++- 6 files changed, 1602 insertions(+), 3 deletions(-) create mode 100644 .kokoro/continuous/samples.cfg create mode 100644 .kokoro/nightly/samples.cfg create mode 100644 .kokoro/presubmit/samples.cfg diff --git a/.kokoro/build.sh b/.kokoro/build.sh index dc2936ef7..f1ae58408 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -44,13 +44,26 @@ test) bash .kokoro/coerce_logs.sh ;; lint) - mvn com.coveo:fmt-maven-plugin:check + mvn \ + -Penable-samples \ + com.coveo:fmt-maven-plugin:check ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + bash .kokoro/coerce_logs.sh + ;; +samples) + mvn -B \ + -Penable-samples \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ diff --git a/.kokoro/continuous/samples.cfg b/.kokoro/continuous/samples.cfg new file mode 100644 index 000000000..fa7b493d0 --- /dev/null +++ b/.kokoro/continuous/samples.cfg @@ -0,0 +1,31 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 000000000..9a9102490 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,31 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 000000000..fa7b493d0 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,31 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebbb59e53..085021dde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,4 +25,106 @@ information on using pull requests. ## Community Guidelines This project follows -[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). \ No newline at end of file +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/synth.metadata b/synth.metadata index aa3ceb00b..7b71dfbb3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-21T08:36:32.990208Z", + "updateTime": "2020-01-07T08:32:34.360210Z", "sources": [ { "template": { @@ -8,5 +8,1396 @@ "version": "2019.10.17" } } + ], + "newFiles": [ + { + "path": ".repo-metadata.json" + }, + { + "path": "checkstyle.xml" + }, + { + "path": "renovate.json" + }, + { + "path": "findbugs-exclude.xml" + }, + { + "path": "synth.py" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "codecov.yaml" + }, + { + "path": "LICENSE" + }, + { + "path": "instructions.html" + }, + { + "path": "checkstyle-suppressions.xml" + }, + { + "path": ".gitignore" + }, + { + "path": "pom.xml" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": ".travis.yml" + }, + { + "path": "synth.metadata" + }, + { + "path": "README.md" + }, + { + "path": "versions.txt" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "clirr-ignored-differences.xml" + }, + { + "path": "google-http-client-assembly/readme.html" + }, + { + "path": "google-http-client-assembly/LICENSE.txt" + }, + { + "path": "google-http-client-assembly/pom.xml" + }, + { + "path": "google-http-client-assembly/proguard-google-http-client.txt" + }, + { + "path": "google-http-client-assembly/classpath-include" + }, + { + "path": "google-http-client-assembly/assembly.xml" + }, + { + "path": "google-http-client-assembly/licenses/CDDL-LICENSE.txt" + }, + { + "path": "google-http-client-assembly/licenses/xpp3_LICENSE.txt" + }, + { + "path": "google-http-client-assembly/licenses/APACHE-LICENSE.txt" + }, + { + "path": "google-http-client-assembly/licenses/BSD-LICENSE.txt" + }, + { + "path": "google-http-client-assembly/properties/google-http-client.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-android.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-gson.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-jackson2.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/protobuf-java.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/jackson-core.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-xml.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/gson.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties" + }, + { + "path": "google-http-client-assembly/properties/google-http-client-protobuf.jar.properties" + }, + { + "path": "google-http-client-protobuf/pom.xml" + }, + { + "path": "google-http-client-protobuf/src/test/proto/simple_proto.proto" + }, + { + "path": "google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java" + }, + { + "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java" + }, + { + "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java" + }, + { + "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java" + }, + { + "path": "google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java" + }, + { + "path": "google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java" + }, + { + "path": "google-http-client-xml/pom.xml" + }, + { + "path": "google-http-client-xml/src/test/resources/sample-atom.xml" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java" + }, + { + "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java" + }, + { + "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java" + }, + { + "path": "google-http-client-gson/pom.xml" + }, + { + "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java" + }, + { + "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java" + }, + { + "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonGeneratorTest.java" + }, + { + "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java" + }, + { + "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java" + }, + { + "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java" + }, + { + "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java" + }, + { + "path": "google-http-client-jackson2/pom.xml" + }, + { + "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java" + }, + { + "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonGeneratorTest.java" + }, + { + "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java" + }, + { + "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java" + }, + { + "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java" + }, + { + "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java" + }, + { + "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java" + }, + { + "path": "google-http-client-appengine/pom.xml" + }, + { + "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactoryTest.java" + }, + { + "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java" + }, + { + "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java" + }, + { + "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/logging.properties" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/instructions.html" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/pom.xml" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs" + }, + { + "path": "samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java" + }, + { + "path": "google-http-client-android/AndroidManifest.xml" + }, + { + "path": "google-http-client-android/project.properties" + }, + { + "path": "google-http-client-android/pom.xml" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java" + }, + { + "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java" + }, + { + "path": "google-http-client-test/pom.xml" + }, + { + "path": "google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java" + }, + { + "path": "google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java" + }, + { + "path": "google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java" + }, + { + "path": ".kokoro/build.bat" + }, + { + "path": ".kokoro/build.sh" + }, + { + "path": ".kokoro/dependencies.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/coerce_logs.sh" + }, + { + "path": ".kokoro/linkage-monitor.sh" + }, + { + "path": ".kokoro/continuous/dependencies.cfg" + }, + { + "path": ".kokoro/continuous/samples.cfg" + }, + { + "path": ".kokoro/continuous/java7.cfg" + }, + { + "path": ".kokoro/continuous/java8-osx.cfg" + }, + { + "path": ".kokoro/continuous/java10.cfg" + }, + { + "path": ".kokoro/continuous/java8-win.cfg" + }, + { + "path": ".kokoro/continuous/propose_release.sh" + }, + { + "path": ".kokoro/continuous/lint.cfg" + }, + { + "path": ".kokoro/continuous/java11.cfg" + }, + { + "path": ".kokoro/continuous/common.cfg" + }, + { + "path": ".kokoro/continuous/propose_release.cfg" + }, + { + "path": ".kokoro/continuous/java8.cfg" + }, + { + "path": ".kokoro/continuous/integration.cfg" + }, + { + "path": ".kokoro/release/drop.sh" + }, + { + "path": ".kokoro/release/stage.cfg" + }, + { + "path": ".kokoro/release/promote.cfg" + }, + { + "path": ".kokoro/release/publish_javadoc.cfg" + }, + { + "path": ".kokoro/release/bump_snapshot.cfg" + }, + { + "path": ".kokoro/release/promote.sh" + }, + { + "path": ".kokoro/release/stage.sh" + }, + { + "path": ".kokoro/release/snapshot.sh" + }, + { + "path": ".kokoro/release/snapshot.cfg" + }, + { + "path": ".kokoro/release/common.cfg" + }, + { + "path": ".kokoro/release/bump_snapshot.sh" + }, + { + "path": ".kokoro/release/common.sh" + }, + { + "path": ".kokoro/release/drop.cfg" + }, + { + "path": ".kokoro/release/publish_javadoc.sh" + }, + { + "path": ".kokoro/presubmit/dependencies.cfg" + }, + { + "path": ".kokoro/presubmit/samples.cfg" + }, + { + "path": ".kokoro/presubmit/java7.cfg" + }, + { + "path": ".kokoro/presubmit/java8-osx.cfg" + }, + { + "path": ".kokoro/presubmit/linkage-monitor.cfg" + }, + { + "path": ".kokoro/presubmit/java10.cfg" + }, + { + "path": ".kokoro/presubmit/java8-win.cfg" + }, + { + "path": ".kokoro/presubmit/lint.cfg" + }, + { + "path": ".kokoro/presubmit/java11.cfg" + }, + { + "path": ".kokoro/presubmit/common.cfg" + }, + { + "path": ".kokoro/presubmit/clirr.cfg" + }, + { + "path": ".kokoro/presubmit/java8.cfg" + }, + { + "path": ".kokoro/presubmit/integration.cfg" + }, + { + "path": ".kokoro/nightly/dependencies.cfg" + }, + { + "path": ".kokoro/nightly/samples.cfg" + }, + { + "path": ".kokoro/nightly/java7.cfg" + }, + { + "path": ".kokoro/nightly/java8-osx.cfg" + }, + { + "path": ".kokoro/nightly/java8-win.cfg" + }, + { + "path": ".kokoro/nightly/lint.cfg" + }, + { + "path": ".kokoro/nightly/java11.cfg" + }, + { + "path": ".kokoro/nightly/common.cfg" + }, + { + "path": ".kokoro/nightly/java8.cfg" + }, + { + "path": ".kokoro/nightly/integration.cfg" + }, + { + "path": "google-http-client/pom.xml" + }, + { + "path": "google-http-client/src/test/resources/file.txt" + }, + { + "path": "google-http-client/src/test/resources/com/google/api/client/util/secret.pem" + }, + { + "path": "google-http-client/src/test/resources/com/google/api/client/util/secret.p12" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/DataTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/TypesTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/Base64Test.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/ClockTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java" + }, + { + "path": "google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java" + }, + { + "path": "google-http-client/src/main/resources/google-http-client.properties" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonToken.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/Json.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/GenericJson.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/JsonString.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/FileContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/json/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Maps.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/NullValue.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/SslUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Lists.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/GenericData.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Types.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Collections2.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Key.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/BackOff.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Joiner.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Clock.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/DateTime.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/StringUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Beta.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ByteCountingOutputStream.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Data.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/DataMap.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Sleeper.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Value.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/NanoClock.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Throwables.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/IOUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Charsets.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Objects.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Base64.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Preconditions.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Strings.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/PemReader.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/Sets.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java" + }, + { + "path": "google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java" + }, + { + "path": ".github/CODEOWNERS" + }, + { + "path": ".github/.release-please.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": "__pycache__/synth.cpython-36.pyc" + }, + { + "path": "google-http-client-findbugs/pom.xml" + }, + { + "path": "google-http-client-findbugs/src/main/resources/messages.xml" + }, + { + "path": "google-http-client-findbugs/src/main/resources/bugrank.txt" + }, + { + "path": "google-http-client-findbugs/src/main/resources/findbugs.xml" + }, + { + "path": "google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java" + }, + { + "path": "google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/.project" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/.classpath" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/pom.xml" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/.settings/org.eclipse.jdt.core.prefs" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/.settings/org.eclipse.jdt.ui.prefs" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass2.java" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/Test.java" + }, + { + "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java" + }, + { + "path": ".git/index" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/config" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/objects/pack/pack-05aa278ffdf8a410aeb04cb592a33d2cb1daf479.idx" + }, + { + "path": ".git/objects/pack/pack-05aa278ffdf8a410aeb04cb592a33d2cb1daf479.pack" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/logs/HEAD" + }, + { + "path": ".git/logs/refs/remotes/origin/HEAD" + }, + { + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": "google-http-client-apache-v2/pom.xml" + }, + { + "path": "google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java" + }, + { + "path": "google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/HttpExtensionMethod.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpResponse.java" + }, + { + "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java" + }, + { + "path": "docs/index.md" + }, + { + "path": "docs/exponential-backoff.md" + }, + { + "path": "docs/_config.yml" + }, + { + "path": "docs/android.md" + }, + { + "path": "docs/component-modules.md" + }, + { + "path": "docs/google-app-engine.md" + }, + { + "path": "docs/support.md" + }, + { + "path": "docs/http-transport.md" + }, + { + "path": "docs/unit-testing.md" + }, + { + "path": "docs/json.md" + }, + { + "path": "docs/setup.md" + }, + { + "path": "docs/_layouts/default.html" + }, + { + "path": "docs/_data/navigation.yml" + }, + { + "path": "google-http-client-android-test/AndroidManifest.xml" + }, + { + "path": "google-http-client-android-test/pom.xml" + }, + { + "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java" + }, + { + "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java" + }, + { + "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java" + }, + { + "path": "google-http-client-bom/pom.xml" + }, + { + "path": "google-http-client-bom/README.md" + } ] } \ No newline at end of file From 686b000568b5580349b3567575bcbc19fd915343 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Jan 2020 16:32:34 +0100 Subject: [PATCH 227/983] chore(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3 (#939) --- .../google-http-client-findbugs-test/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index ecfef5908..820f9840c 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -19,7 +19,7 @@ maven-jar-plugin - 2.3.1 + 3.2.0 From 019b419ddc2d9feab24f22ba62b02c89624e8405 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 10 Jan 2020 11:46:44 -0500 Subject: [PATCH 228/983] chore(deps): 28.2-android (#938) @codyoss --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7cb05adc7..41c7d880c 100644 --- a/pom.xml +++ b/pom.xml @@ -556,7 +556,7 @@ 2.8.6 2.10.2 3.11.1 - 28.1-android + 28.2-android 1.1.4c 1.2 4.5.10 From fd904d26d67b06fac807d38f8fe4141891ef0330 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 00:23:02 +0100 Subject: [PATCH 229/983] deps: update dependency org.apache.httpcomponents:httpcore to v4.4.13 (#941) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 41c7d880c..8437014b0 100644 --- a/pom.xml +++ b/pom.xml @@ -560,7 +560,7 @@ 1.1.4c 1.2 4.5.10 - 4.4.12 + 4.4.13 0.24.0 .. false From e76368ef9479a3bf06f7c7cb878d4e8e241bb58c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 01:43:25 +0100 Subject: [PATCH 230/983] deps: update dependency mysql:mysql-connector-java to v8.0.19 (#940) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8437014b0..27f3f9bab 100644 --- a/pom.xml +++ b/pom.xml @@ -234,7 +234,7 @@ mysql mysql-connector-java - 8.0.18 + 8.0.19 com.google.j2objc From dc78b713f330f8b7ff8865c2c525566ebf8b68ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 01:43:52 +0100 Subject: [PATCH 231/983] chore(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3 (#937) --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index 820f9840c..1685b19e6 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -11,7 +11,7 @@ maven-compiler-plugin - 2.3.2 + 3.8.1 1.7 1.7 diff --git a/pom.xml b/pom.xml index 27f3f9bab..c67be42df 100644 --- a/pom.xml +++ b/pom.xml @@ -285,7 +285,7 @@ maven-compiler-plugin - 2.3.2 + 3.8.1 1.7 1.7 From 00ca9a6404bad510e99f5dab41a005254965abfc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 01:44:14 +0100 Subject: [PATCH 232/983] chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.0.0-m4 (#935) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c67be42df..f50a273df 100644 --- a/pom.xml +++ b/pom.xml @@ -335,7 +335,7 @@ maven-surefire-plugin - 3.0.0-M3 + 3.0.0-M4 -Xmx1024m sponge_log From 691ad32b199756b2c80e1ea2022b8d47de52386c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 01:44:26 +0100 Subject: [PATCH 233/983] chore(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.2.0 (#932) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f50a273df..04b5a6c45 100644 --- a/pom.xml +++ b/pom.xml @@ -281,7 +281,7 @@ maven-assembly-plugin - 3.1.0 + 3.2.0 maven-compiler-plugin From 14736cab3dc060ea5b60522ea587cfaf66f29699 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 14 Jan 2020 11:16:20 -0500 Subject: [PATCH 234/983] deps: remove unnecessary MySQL dependency (#943) --- pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pom.xml b/pom.xml index 04b5a6c45..14814e60a 100644 --- a/pom.xml +++ b/pom.xml @@ -231,11 +231,6 @@ mockito-all 1.10.19 - - mysql - mysql-connector-java - 8.0.19 - com.google.j2objc j2objc-annotations From f9942bfcbb9f4e9773404bdf16865518393fc9db Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jan 2020 17:16:33 +0100 Subject: [PATCH 235/983] chore(deps): update dependency com.google.truth:truth to v1.0.1 (#944) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 14814e60a..bb49fe682 100644 --- a/pom.xml +++ b/pom.xml @@ -123,7 +123,7 @@ com.google.truth truth - 1.0 + 1.0.1 test From 0c9251cfc79e0c8a1a54a324847f7040da2a3b8c Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 21 Jan 2020 07:46:36 -0500 Subject: [PATCH 236/983] Update setup.md (#946) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index a9b039293..3b29fdec2 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 3.3.0 + 3.4.0 pom import From f11b3af3077f7fc3e98b063f1d046ff01d4d8b4b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 21 Jan 2020 10:49:56 -0500 Subject: [PATCH 237/983] Update apache httpclient (#948) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb49fe682..7b15b574d 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ 28.2-android 1.1.4c 1.2 - 4.5.10 + 4.5.11 4.4.13 0.24.0 .. From 9384459015b37e1671aebadc4b8c25dc9e1e033f Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 22 Jan 2020 15:25:27 -0500 Subject: [PATCH 238/983] fix: include '+' in SAFEPATHCHARS_URLENCODER (#955) --- .../com/google/api/client/util/escape/PercentEscaper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index a4437095c..757d819a5 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -65,10 +65,10 @@ public class PercentEscaper extends UnicodeEscaper { public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=+"; /** - * Contains the save characters plus all reserved characters. This happens to be the safe path - * characters plus those characters which are reserved for URI segments, namely '+', '/', and '?'. + * Contains the safe characters plus all reserved characters. This happens to be the safe path + * characters plus those characters which are reserved for URI segments, namely '/' and '?'. */ - public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "+/?"; + public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "/?"; /** * A string of characters that do not need to be encoded when used in URI user info part, as From 8e31198270a938eaa128828a760b7b555592842f Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 24 Jan 2020 13:27:37 -0500 Subject: [PATCH 239/983] test: add PercentEscaperTest (#957) --- .../api/client/util/escape/CharEscapers.java | 1 - .../util/escape/PercentEscaperTest.java | 29 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index b6172cc98..062e082d8 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -16,7 +16,6 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; /** diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java new file mode 100644 index 000000000..0d08411a6 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2020 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.util.escape; + +import org.junit.Assert; +import org.junit.Test; + +public class PercentEscaperTest { + + @Test + public void testEscapeSpace() { + PercentEscaper escaper = + new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER, false); + String actual = escaper.escape("Hello there"); + Assert.assertEquals("Hello%20there", actual); + } +} From 20ac5f6736f975b646cf3006f63112b195d0f32f Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 26 Jan 2020 13:40:36 -0500 Subject: [PATCH 240/983] Prefer more spec compliant escaping (#959) --- .../client/util/escape/PercentEscaper.java | 55 +++++++++++++------ .../util/escape/PercentEscaperTest.java | 8 +++ 2 files changed, 46 insertions(+), 17 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index 757d819a5..84f635cdc 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -16,7 +16,7 @@ /** * A {@code UnicodeEscaper} that escapes some set of Java characters using the URI percent encoding - * scheme. The set of safe characters (those which remain unescaped) can be specified on + * scheme. The set of safe characters (those which remain unescaped) is specified on * construction. * *

                  For details on escaping URIs for use in web pages, see The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the * same. *

                • Any additionally specified safe characters remain the same. - *
                • If {@code plusForSpace} was specified, the space character " " is converted into a plus + *
                • If {@code plusForSpace} is true, the space character " " is converted into a plus * sign "+". - *
                • All other characters are converted into one or more bytes using UTF-8 encoding and each + *
                • All other characters are converted into one or more bytes using UTF-8 encoding. Each * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, * uppercase, hexadecimal representation of the byte value. *
                * - *

                RFC 2396 specifies the set of unreserved characters as "-", "_", ".", "!", "~", "*", "'", "(" - * and ")". It goes on to state: + *

                RFC 3986 defines the set of unreserved characters as "-", "_", "~", and "." + * It goes on to state: * - *

                Unreserved characters can be escaped without changing the semantics of the URI, but this - * should not be done unless the URI is being used in a context that does not allow the unescaped - * character to appear. - * - *

                For performance reasons the only currently supported character encoding of this class is - * UTF-8. + *

                URIs that differ in the replacement of an unreserved character with + its corresponding percent-encoded US-ASCII octet are equivalent: they + identify the same resource. However, URI comparison implementations + do not always perform normalization prior to comparison (see Section + 6). For consistency, percent-encoded octets in the ranges of ALPHA + (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), + underscore (%5F), or tilde (%7E) should not be created by URI + producers and, when found in a URI, should be decoded to their + corresponding unreserved characters by URI normalizers. * *

                Note: This escaper produces uppercase hexadecimal sequences. From RFC 3986:
                + * href="https://tools.ietf.org/html/rfc3986">RFC 3986:
                * "URI producers and normalizers should use uppercase hexadecimal digits for all * percent-encodings." * @@ -100,21 +103,39 @@ public class PercentEscaper extends UnicodeEscaper { * escaped. */ private final boolean[] safeOctets; - + /** - * Constructs a URI escaper with the specified safe characters and optional handling of the space - * character. + * Constructs a URI escaper with the specified safe characters. The space + * character is escaped to %20 in accordance with the URI specification. * * @param safeChars a non null string specifying additional safe characters for this escaper (the * ranges 0..9, a..z and A..Z are always safe and should not be specified here) + * @throws IllegalArgumentException if any of the parameters are invalid + */ + public PercentEscaper(String safeChars) { + this(safeChars, false); + } + + /** + * Constructs a URI escaper that converts all but the specified safe characters + * into hexadecimal percent escapes. Optionally space characters can be converted into + * a plus sign {@code +} instead of {@code %20}. and optional handling of the space + * + * @param safeChars a non null string specifying additional safe characters for this escaper. The + * ranges 0..9, a..z and A..Z are always safe and should not be specified here. * @param plusForSpace true if ASCII space should be escaped to {@code +} rather than {@code %20} - * @throws IllegalArgumentException if any of the parameters were invalid + * @throws IllegalArgumentException if safeChars includes characters that are always safe or + * characters that must always be escaped + * @deprecated use {@code PercentEscaper(String safeChars)} instead which is the same as invoking + * this method with plusForSpace set to false. Escaping spaces as plus signs does not + * conform to the URI specification. */ + @Deprecated public PercentEscaper(String safeChars, boolean plusForSpace) { // Avoid any misunderstandings about the behavior of this escaper if (safeChars.matches(".*[0-9A-Za-z].*")) { throw new IllegalArgumentException( - "Alphanumeric characters are always 'safe' and should not be " + "explicitly specified"); + "Alphanumeric ASCII characters are always 'safe' and should not be " + "escaped."); } // Avoid ambiguous parameters. Safe characters are never modified so if // space is a safe character then setting plusForSpace is meaningless. diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java index 0d08411a6..6b3e75085 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java @@ -26,4 +26,12 @@ public void testEscapeSpace() { String actual = escaper.escape("Hello there"); Assert.assertEquals("Hello%20there", actual); } + + @Test + public void testEscapeSpaceDefault() { + PercentEscaper escaper = + new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER); + String actual = escaper.escape("Hello there"); + Assert.assertEquals("Hello%20there", actual); + } } From 879d81aad37554d7a2497ad3f7950543acea8dc8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2020 12:41:21 -0800 Subject: [PATCH 241/983] chore: release 1.34.1 (#958) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated pom.xml [ci skip] --- CHANGELOG.md | 21 ++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 74 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8f96d27..876eacf23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +### [1.34.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.0...v1.34.1) (2020-01-26) + + +### Bug Fixes + +* include '+' in SAFEPATHCHARS_URLENCODER ([#955](https://www.github.com/googleapis/google-http-java-client/issues/955)) ([9384459](https://www.github.com/googleapis/google-http-java-client/commit/9384459015b37e1671aebadc4b8c25dc9e1e033f)) +* use random UUID for multipart boundary delimiter ([#916](https://www.github.com/googleapis/google-http-java-client/issues/916)) ([91c20a3](https://www.github.com/googleapis/google-http-java-client/commit/91c20a3dfb654e85104b1c09a0b2befbae356c19)) + + +### Dependencies + +* remove unnecessary MySQL dependency ([#943](https://www.github.com/googleapis/google-http-java-client/issues/943)) ([14736ca](https://www.github.com/googleapis/google-http-java-client/commit/14736cab3dc060ea5b60522ea587cfaf66f29699)) +* update dependency mysql:mysql-connector-java to v8.0.19 ([#940](https://www.github.com/googleapis/google-http-java-client/issues/940)) ([e76368e](https://www.github.com/googleapis/google-http-java-client/commit/e76368ef9479a3bf06f7c7cb878d4e8e241bb58c)) +* update dependency org.apache.httpcomponents:httpcore to v4.4.13 ([#941](https://www.github.com/googleapis/google-http-java-client/issues/941)) ([fd904d2](https://www.github.com/googleapis/google-http-java-client/commit/fd904d26d67b06fac807d38f8fe4141891ef0330)) + + +### Documentation + +* fix various paragraph issues in javadoc ([#867](https://www.github.com/googleapis/google-http-java-client/issues/867)) ([029bbbf](https://www.github.com/googleapis/google-http-java-client/commit/029bbbfb5ddfefe64e64ecca4b1413ae1c93ddd8)) +* libraries-bom 3.3.0 ([#921](https://www.github.com/googleapis/google-http-java-client/issues/921)) ([7e0b952](https://www.github.com/googleapis/google-http-java-client/commit/7e0b952a0d9c84ac43dff43914567c98f3e81f66)) + ## [1.34.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.33.0...v1.34.0) (2019-12-17) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 37bdde14e..54dbbb7cb 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.1-SNAPSHOT + 1.34.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.1-SNAPSHOT + 1.34.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.1-SNAPSHOT + 1.34.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 3fddf9b74..6590ccedc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-android - 1.34.1-SNAPSHOT + 1.34.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index eab639963..3a039269a 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-apache-v2 - 1.34.1-SNAPSHOT + 1.34.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 516262727..73dcb3be4 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-appengine - 1.34.1-SNAPSHOT + 1.34.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 8dd0401ec..760b8489f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.34.1-SNAPSHOT + 1.34.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 712a4eb64..3189b3fd0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.1-SNAPSHOT + 1.34.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-android - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-apache-v2 - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-appengine - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-findbugs - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-gson - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-jackson2 - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-protobuf - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-test - 1.34.1-SNAPSHOT + 1.34.1 com.google.http-client google-http-client-xml - 1.34.1-SNAPSHOT + 1.34.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e6e433ad6..8a47d151e 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-findbugs - 1.34.1-SNAPSHOT + 1.34.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 9bc78ddf3..03adfd898 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-gson - 1.34.1-SNAPSHOT + 1.34.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index cfe69649b..29b26efc3 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-jackson2 - 1.34.1-SNAPSHOT + 1.34.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 465d4c27c..a5079f435 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-protobuf - 1.34.1-SNAPSHOT + 1.34.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d11c2ae29..4a756e0c7 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-test - 1.34.1-SNAPSHOT + 1.34.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 0c46baef9..462f8a61b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client-xml - 1.34.1-SNAPSHOT + 1.34.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 3d43747a8..c79a16661 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../pom.xml google-http-client - 1.34.1-SNAPSHOT + 1.34.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 7b15b574d..aae5f7d58 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -544,7 +544,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.1-SNAPSHOT + 1.34.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index a30dfc329..f5c1c9e81 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.1-SNAPSHOT + 1.34.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 250b4fa9f..4d2439e82 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.0:1.34.1-SNAPSHOT -google-http-client-bom:1.34.0:1.34.1-SNAPSHOT -google-http-client-parent:1.34.0:1.34.1-SNAPSHOT -google-http-client-android:1.34.0:1.34.1-SNAPSHOT -google-http-client-android-test:1.34.0:1.34.1-SNAPSHOT -google-http-client-apache-v2:1.34.0:1.34.1-SNAPSHOT -google-http-client-appengine:1.34.0:1.34.1-SNAPSHOT -google-http-client-assembly:1.34.0:1.34.1-SNAPSHOT -google-http-client-findbugs:1.34.0:1.34.1-SNAPSHOT -google-http-client-gson:1.34.0:1.34.1-SNAPSHOT -google-http-client-jackson2:1.34.0:1.34.1-SNAPSHOT -google-http-client-protobuf:1.34.0:1.34.1-SNAPSHOT -google-http-client-test:1.34.0:1.34.1-SNAPSHOT -google-http-client-xml:1.34.0:1.34.1-SNAPSHOT +google-http-client:1.34.1:1.34.1 +google-http-client-bom:1.34.1:1.34.1 +google-http-client-parent:1.34.1:1.34.1 +google-http-client-android:1.34.1:1.34.1 +google-http-client-android-test:1.34.1:1.34.1 +google-http-client-apache-v2:1.34.1:1.34.1 +google-http-client-appengine:1.34.1:1.34.1 +google-http-client-assembly:1.34.1:1.34.1 +google-http-client-findbugs:1.34.1:1.34.1 +google-http-client-gson:1.34.1:1.34.1 +google-http-client-jackson2:1.34.1:1.34.1 +google-http-client-protobuf:1.34.1:1.34.1 +google-http-client-test:1.34.1:1.34.1 +google-http-client-xml:1.34.1:1.34.1 From 67d5eb143d705bd8aefde47acc0efb4c81db8bba Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 28 Jan 2020 12:24:08 -0500 Subject: [PATCH 242/983] More work toward removing plusForSpace (#961) * more standard exception test * replace deprecated methods * update Javadoc * update Javadoc * rename variable for clarity * replace deprecated methods * remove obsolete javadoc * restore some comments * replace deprecated method * unused import * class is final --- .../client/json/jackson2/JacksonFactory.java | 2 +- .../com/google/api/client/xml/atom/Atom.java | 2 +- .../google/api/client/http/GenericUrl.java | 15 ++++------ .../api/client/http/UrlEncodedParser.java | 5 ++-- .../api/client/util/escape/CharEscapers.java | 30 +++++++++---------- .../client/http/ConsumingInputStreamTest.java | 1 - .../client/util/escape/CharEscapersTest.java | 7 ++--- 7 files changed, 29 insertions(+), 33 deletions(-) diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java index 62bc14ec7..8028d63c6 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java @@ -29,7 +29,7 @@ /** * Low-level JSON library implementation based on Jackson 2. * - *

                Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

                Implementation is thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the JSON factory. * * @since 1.11 diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java index 85b39b0a9..c948bd36d 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java @@ -49,7 +49,7 @@ public final class Atom { /** Escaper for the {@code Slug} header. */ private static final PercentEscaper SLUG_ESCAPER = - new PercentEscaper(" !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~", false); + new PercentEscaper(" !\"#$&'()*+,-./:;<=>?@[\\]^_`{|}~"); static final class StopAtAtomEntry extends Xml.CustomizeParser { diff --git a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java index 45e9d5ab5..3204f695e 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java @@ -52,8 +52,7 @@ */ public class GenericUrl extends GenericData { - private static final Escaper URI_FRAGMENT_ESCAPER = - new PercentEscaper("=&-_.!~*'()@:$,;/?:", false); + private static final Escaper URI_FRAGMENT_ESCAPER = new PercentEscaper("=&-_.!~*'()@:$,;/?:"); /** Scheme (lowercase), for example {@code "https"}. */ private String scheme; @@ -90,7 +89,7 @@ public class GenericUrl extends GenericData { public GenericUrl() {} /** - * Constructs from an encoded URL. + * Constructs a GenericUrl from a URL encoded string. * *

                Any known query parameters with pre-defined fields as data keys will be parsed based on * their data type. Any unrecognized query parameter will always be parsed as a string. @@ -103,17 +102,17 @@ public GenericUrl() {} * compliant with, at least, RFC 3986. * * @param encodedUrl encoded URL, including any existing query parameters that should be parsed - * @throws IllegalArgumentException if URL has a syntax error + * @throws IllegalArgumentException if the URL has a syntax error */ public GenericUrl(String encodedUrl) { this(encodedUrl, false); } /** - * Constructs from an encoded URL. + * Constructs a GenericUrl from a string. * - *

                Any known query parameters with pre-defined fields as data keys are parsed based on their - * data type. Any unrecognized query parameter are always parsed as a string. + *

                Any known query parameters with pre-defined fields as data keys will be parsed based on + * their data type. Any unrecognized query parameter will always be parsed as a string. * *

                Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. * @@ -216,7 +215,6 @@ private GenericUrl( @Override public int hashCode() { - // TODO(yanivi): optimize? return build().hashCode(); } @@ -229,7 +227,6 @@ public boolean equals(Object obj) { return false; } GenericUrl other = (GenericUrl) obj; - // TODO(yanivi): optimize? return build().equals(other.build()); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java index fb5ec5375..14c3238f7 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java @@ -83,7 +83,7 @@ public class UrlEncodedParser implements ObjectParser { public static void parse(String content, Object data) { parse(content, data, true); } - + /** * Parses the given URL-encoded content into the given data object of data key name/value pairs * using {@link #parse(Reader, Object)}. @@ -92,7 +92,7 @@ public static void parse(String content, Object data) { * @param data data key name/value pairs * @param decodeEnabled flag that specifies whether decoding should be enabled. */ - public static void parse(String content, Object data, boolean decodeEnabled) { + public static void parse(String content, Object data, boolean decodeEnabled) { if (content == null) { return; } @@ -103,6 +103,7 @@ public static void parse(String content, Object data, boolean decodeEnabled) { throw Throwables.propagate(exception); } } + /** * Parses the given URL-encoded content into the given data object of data key name/value pairs, * including support for repeating data key names. diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index 062e082d8..d75bea05c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2010 Google Inc. + * * 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 @@ -19,27 +20,26 @@ import java.nio.charset.StandardCharsets; /** - * Utility functions for dealing with {@code CharEscaper}s, and some commonly used {@code - * CharEscaper} instances. + * Utility functions for encoding and decoding URIs. * * @since 1.0 */ public final class CharEscapers { - private static final Escaper URI_ESCAPER = + private static final Escaper APPLICATION_X_WWW_FORM_URLENCODED = new PercentEscaper(PercentEscaper.SAFECHARS_URLENCODER, true); private static final Escaper URI_PATH_ESCAPER = - new PercentEscaper(PercentEscaper.SAFEPATHCHARS_URLENCODER, false); + new PercentEscaper(PercentEscaper.SAFEPATHCHARS_URLENCODER); private static final Escaper URI_RESERVED_ESCAPER = - new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER, false); + new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER); private static final Escaper URI_USERINFO_ESCAPER = - new PercentEscaper(PercentEscaper.SAFEUSERINFOCHARS_URLENCODER, false); + new PercentEscaper(PercentEscaper.SAFEUSERINFOCHARS_URLENCODER); private static final Escaper URI_QUERY_STRING_ESCAPER = - new PercentEscaper(PercentEscaper.SAFEQUERYSTRINGCHARS_URLENCODER, false); + new PercentEscaper(PercentEscaper.SAFEQUERYSTRINGCHARS_URLENCODER); /** * Escapes the string value so it can be safely included in URIs. For details on escaping URIs, @@ -69,18 +69,18 @@ public final class CharEscapers { *

              */ public static String escapeUri(String value) { - return URI_ESCAPER.escape(value); + return APPLICATION_X_WWW_FORM_URLENCODED.escape(value); } /** - * Percent-decodes a US-ASCII string into a Unicode string. UTF-8 encoding is used to determine + * Decodes application/x-www-form-urlencoded strings. The UTF-8 character set determines * what characters are represented by any consecutive sequences of the form "%XX". * - *

              This replaces each occurrence of '+' with a space, ' '. So this method should not be used - * for non application/x-www-form-urlencoded strings such as host and path. + *

              This replaces each occurrence of '+' with a space, ' '. This method should not be used + * for non-application/x-www-form-urlencoded strings such as host and path. * * @param uri a percent-encoded US-ASCII string - * @return a Unicode string + * @return a string without any percent escapes or plus signs */ public static String decodeUri(String uri) { try { @@ -92,11 +92,11 @@ public static String decodeUri(String uri) { } /** - * Decodes the path component of a URI. This must be done via a method that does not try to - * convert + into spaces(the behavior of {@link java.net.URLDecoder#decode(String, String)}). This + * Decodes the path component of a URI. This does not + * convert + into spaces (the behavior of {@link java.net.URLDecoder#decode(String, String)}). This * method transforms URI encoded values into their decoded symbols. * - *

              i.e: {@code decodePath("%3Co%3E")} would return {@code ""} + *

              e.g. {@code decodePath("%3Co%3E")} returns {@code ""} * * @param path the value to be decoded * @return decoded version of {@code path} diff --git a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java index d55b5a0d4..33a48dce1 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.InputStream; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import org.junit.Test; diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java index 0ad3d1e58..0a4e08809 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java @@ -38,12 +38,11 @@ public void testDecodeUri_IllegalArgumentException() { } private void subtestDecodeUri_IllegalArgumentException(String input) { - boolean thrown = false; try { CharEscapers.decodeUriPath(input); - } catch (IllegalArgumentException e) { - thrown = true; + fail(); + } catch (IllegalArgumentException expected) { + assertNotNull(expected.getMessage()); } - assertTrue(thrown); } } From 8941ed519ef08138dfbcd7031141708e170f3814 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 10:47:13 -0800 Subject: [PATCH 243/983] chore: release 1.34.2-SNAPSHOT (#962) * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 54dbbb7cb..d01a09e6e 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.1 + 1.34.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.1 + 1.34.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.1 + 1.34.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 6590ccedc..801bda481 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-android - 1.34.1 + 1.34.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 3a039269a..70931df93 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.34.1 + 1.34.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 73dcb3be4..ef1d7f869 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.34.1 + 1.34.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 760b8489f..da2c62c0e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.34.1 + 1.34.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3189b3fd0..96a13577c 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.1 + 1.34.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-android - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-test - 1.34.1 + 1.34.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.34.1 + 1.34.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 8a47d151e..148150f18 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.34.1 + 1.34.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 03adfd898..844a6770f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.34.1 + 1.34.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 29b26efc3..5c17cf4e7 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.34.1 + 1.34.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index a5079f435..e7d7a5311 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.34.1 + 1.34.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 4a756e0c7..eb72072e1 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-test - 1.34.1 + 1.34.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 462f8a61b..b8f6d4571 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.34.1 + 1.34.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index c79a16661..013df9249 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../pom.xml google-http-client - 1.34.1 + 1.34.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index aae5f7d58..88498ee1a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -544,7 +544,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.1 + 1.34.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f5c1c9e81..040ea7181 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.1 + 1.34.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 4d2439e82..2769477ce 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.1:1.34.1 -google-http-client-bom:1.34.1:1.34.1 -google-http-client-parent:1.34.1:1.34.1 -google-http-client-android:1.34.1:1.34.1 -google-http-client-android-test:1.34.1:1.34.1 -google-http-client-apache-v2:1.34.1:1.34.1 -google-http-client-appengine:1.34.1:1.34.1 -google-http-client-assembly:1.34.1:1.34.1 -google-http-client-findbugs:1.34.1:1.34.1 -google-http-client-gson:1.34.1:1.34.1 -google-http-client-jackson2:1.34.1:1.34.1 -google-http-client-protobuf:1.34.1:1.34.1 -google-http-client-test:1.34.1:1.34.1 -google-http-client-xml:1.34.1:1.34.1 +google-http-client:1.34.1:1.34.2-SNAPSHOT +google-http-client-bom:1.34.1:1.34.2-SNAPSHOT +google-http-client-parent:1.34.1:1.34.2-SNAPSHOT +google-http-client-android:1.34.1:1.34.2-SNAPSHOT +google-http-client-android-test:1.34.1:1.34.2-SNAPSHOT +google-http-client-apache-v2:1.34.1:1.34.2-SNAPSHOT +google-http-client-appengine:1.34.1:1.34.2-SNAPSHOT +google-http-client-assembly:1.34.1:1.34.2-SNAPSHOT +google-http-client-findbugs:1.34.1:1.34.2-SNAPSHOT +google-http-client-gson:1.34.1:1.34.2-SNAPSHOT +google-http-client-jackson2:1.34.1:1.34.2-SNAPSHOT +google-http-client-protobuf:1.34.1:1.34.2-SNAPSHOT +google-http-client-test:1.34.1:1.34.2-SNAPSHOT +google-http-client-xml:1.34.1:1.34.2-SNAPSHOT From e42e99136a351e697cd33086e5a3e2102908e6cd Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 31 Jan 2020 13:10:26 -0500 Subject: [PATCH 244/983] chore(docs): missing space (#964) --- docs/component-modules.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/component-modules.md b/docs/component-modules.md index 1f9273d76..29a064466 100644 --- a/docs/component-modules.md +++ b/docs/component-modules.md @@ -41,7 +41,7 @@ contains an implementation of `JsonFactory` based on the Jackson2 API. This modu ## google-http-client-protobuf -[Protocol buffer][protobuf] extensions to theGoogle HTTP Client Library for Java +[Protocol buffer][protobuf] extensions to the Google HTTP Client Library for Java (`google-http-client-protobuf`) support protobuf data format. This module depends on `google-http-client`. ## google-http-client-xml @@ -49,4 +49,4 @@ contains an implementation of `JsonFactory` based on the Jackson2 API. This modu XML extensions to the Google HTTP Client Library for Java (`google-http-client-xml`) support the XML data format. This module depends on `google-http-client`. -[protobuf]: https://developers.google.com/protocol-buffers/docs/overview \ No newline at end of file +[protobuf]: https://developers.google.com/protocol-buffers/docs/overview From 27c2110ff0c86d3c3b4c0bbc98c3e36f4ead72d1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 3 Feb 2020 04:19:57 +0100 Subject: [PATCH 245/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.11.3 (#968) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 88498ee1a..377d19613 100644 --- a/pom.xml +++ b/pom.xml @@ -550,7 +550,7 @@ 3.0.2 2.8.6 2.10.2 - 3.11.1 + 3.11.3 28.2-android 1.1.4c 1.2 From 7f4c06237287928b9ca78075525b91ed97b8fb80 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 3 Feb 2020 11:27:28 -0500 Subject: [PATCH 246/983] Latest BOM version (#969) @BenWhitehead --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 3b29fdec2..16c3c0ee8 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 3.4.0 + 3.5.0 pom import From 198453b8b9e0765439ac430deaf10ef9df084665 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 6 Feb 2020 12:15:22 -0500 Subject: [PATCH 247/983] docs: bom 4.0.0 (#970) @kolea2 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 16c3c0ee8..b77577572 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 3.5.0 + 4.0.0 pom import From 60ba4ea771d8ad0a98eddca10a77c5241187d28c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 11 Feb 2020 17:41:19 -0500 Subject: [PATCH 248/983] use %20 to escpae spaces in URI templates (#973) --- .../google/api/client/http/UriTemplate.java | 51 +++++++++---------- .../api/client/util/escape/CharEscapers.java | 41 +++++++++++++-- .../api/client/http/UriTemplateTest.java | 8 ++- 3 files changed, 68 insertions(+), 32 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java index fcf25fa49..61071db68 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java @@ -55,7 +55,7 @@ */ public class UriTemplate { - static final Map COMPOSITE_PREFIXES = + private static final Map COMPOSITE_PREFIXES = new HashMap(); static { @@ -98,14 +98,14 @@ private enum CompositeOutput { private final boolean reservedExpansion; /** - * @param propertyPrefix The prefix of a parameter or {@code null} for none. In {+var} the + * @param propertyPrefix the prefix of a parameter or {@code null} for none. In {+var} the * prefix is '+' - * @param outputPrefix The string that should be prefixed to the expanded template. - * @param explodeJoiner The delimiter used to join composite values. - * @param requiresVarAssignment Denotes whether or not the expanded template should contain an - * assignment with the variable. - * @param reservedExpansion Reserved expansion allows pct-encoded triplets and characters in the - * reserved set. + * @param outputPrefix the string that should be prefixed to the expanded template. + * @param explodeJoiner the delimiter used to join composite values. + * @param requiresVarAssignment denotes whether or not the expanded template should contain an + * assignment with the variable + * @param reservedExpansion reserved expansion allows percent-encoded triplets and characters in the + * reserved set */ CompositeOutput( Character propertyPrefix, @@ -149,26 +149,22 @@ int getVarNameStartIndex() { } /** - * Encodes the specified value. If reserved expansion is turned on then pct-encoded triplets and + * Encodes the specified value. If reserved expansion is turned on, then percent-encoded triplets and * characters are allowed in the reserved set. * - * @param value The string to be encoded. - * @return The encoded string. + * @param value the string to be encoded + * @return the encoded string */ - String getEncodedValue(String value) { + private String getEncodedValue(String value) { String encodedValue; if (reservedExpansion) { - // Reserved expansion allows pct-encoded triplets and characters in the reserved set. + // Reserved expansion allows percent-encoded triplets and characters in the reserved set. encodedValue = CharEscapers.escapeUriPathWithoutReserved(value); } else { - encodedValue = CharEscapers.escapeUri(value); + encodedValue = CharEscapers.escapeUriConformant(value); } return encodedValue; } - - boolean getReservedExpansion() { - return reservedExpansion; - } } static CompositeOutput getCompositeOutput(String propertyName) { @@ -334,12 +330,12 @@ private static String getSimpleValue(String name, String value, CompositeOutput * Expand the template of a composite list property. Eg: If d := ["red", "green", "blue"] then * {/d*} is expanded to "/red/green/blue" * - * @param varName The name of the variable the value corresponds to. Eg: "d" - * @param iterator The iterator over list values. Eg: ["red", "green", "blue"] - * @param containsExplodeModifier Set to true if the template contains the explode modifier "*" - * @param compositeOutput An instance of CompositeOutput. Contains information on how the + * @param varName the name of the variable the value corresponds to. E.g. "d" + * @param iterator the iterator over list values. E.g. ["red", "green", "blue"] + * @param containsExplodeModifiersSet to true if the template contains the explode modifier "*" + * @param compositeOutput an instance of CompositeOutput. Contains information on how the * expansion should be done - * @return The expanded list template + * @return the expanded list template * @throws IllegalArgumentException if the required list path parameter is empty */ private static String getListPropertyValue( @@ -378,12 +374,11 @@ private static String getListPropertyValue( * Expand the template of a composite map property. Eg: If d := [("semi", ";"),("dot", * "."),("comma", ",")] then {/d*} is expanded to "/semi=%3B/dot=./comma=%2C" * - * @param varName The name of the variable the value corresponds to. Eg: "d" - * @param map The map property value. Eg: [("semi", ";"),("dot", "."),("comma", ",")] + * @param varName the name of the variable the value corresponds to. Eg: "d" + * @param map the map property value. Eg: [("semi", ";"),("dot", "."),("comma", ",")] * @param containsExplodeModifier Set to true if the template contains the explode modifier "*" - * @param compositeOutput An instance of CompositeOutput. Contains information on how the - * expansion should be done - * @return The expanded map template + * @param compositeOutput contains information on how the expansion should be done + * @return the expanded map template * @throws IllegalArgumentException if the required list path parameter is map */ private static String getMapPropertyValue( diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index d75bea05c..9d61f8af0 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -29,6 +29,9 @@ public final class CharEscapers { private static final Escaper APPLICATION_X_WWW_FORM_URLENCODED = new PercentEscaper(PercentEscaper.SAFECHARS_URLENCODER, true); + private static final Escaper URI_ESCAPER = + new PercentEscaper(PercentEscaper.SAFECHARS_URLENCODER, false); + private static final Escaper URI_PATH_ESCAPER = new PercentEscaper(PercentEscaper.SAFEPATHCHARS_URLENCODER); @@ -42,8 +45,13 @@ public final class CharEscapers { new PercentEscaper(PercentEscaper.SAFEQUERYSTRINGCHARS_URLENCODER); /** - * Escapes the string value so it can be safely included in URIs. For details on escaping URIs, - * see RFC 3986 - section 2.4. + * Escapes the string value so it can be safely included in application/x-www-form-urlencoded + * data. This is not appropriate for generic URI escaping. In particular it encodes + * the space character as a plus sign instead of percent escaping it, in + * contravention of the URI specification. + * For details on application/x-www-form-urlencoded encoding see the + * see HTML 4 + * specification, section 17.13.4.1. * *

              When encoding a String, the following rules apply: * @@ -68,9 +76,36 @@ public final class CharEscapers { *

            • {@link java.net.URLEncoder#encode(String, String)} with the encoding name "UTF-8" *
            */ + @Deprecated public static String escapeUri(String value) { return APPLICATION_X_WWW_FORM_URLENCODED.escape(value); } + + /** + * Escapes the string value so it can be safely included in any part of a URI. + * For details on escaping URIs, + * see RFC 3986 - section 2.4. + * + *

            When encoding a String, the following rules apply: + * + *

              + *
            • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain + * the same. + *
            • The special characters ".", "-", "*", and "_" remain the same. + *
            • The space character " " is converted into "%20". + *
            • All other characters are converted into one or more bytes using UTF-8 encoding and each + * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + * uppercase, hexadecimal representation of the byte value. + *
            + * + *

            Note: Unlike other escapers, URI escapers produce uppercase hexadecimal sequences. + * From RFC 3986:
            + * "URI producers and normalizers should use uppercase hexadecimal digits for all + * percent-encodings." + */ + public static String escapeUriConformant(String value) { + return URI_ESCAPER.escape(value); + } /** * Decodes application/x-www-form-urlencoded strings. The UTF-8 character set determines @@ -144,7 +179,7 @@ public static String escapeUriPath(String value) { /** * Escapes a URI path but retains all reserved characters, including all general delimiters. That - * is the same as {@link #escapeUriPath(String)} except that it keeps '?', '+', and '/' unescaped. + * is the same as {@link #escapeUriPath(String)} except that it does not escape '?', '+', and '/'. */ public static String escapeUriPathWithoutReserved(String value) { return URI_RESERVED_ESCAPER.escape(value); diff --git a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java index 53376c389..1a38eeafa 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java @@ -58,13 +58,19 @@ public void testExpandTemplates_basic() { assertTrue(requestMap.containsKey("unused")); } - public void testExpanTemplates_basicEncodeValue() { + public void testExpandTemplates_basicEncodeValue() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz;def"); assertEquals(";abc=xyz%3Bdef", UriTemplate.expand("{;abc}", requestMap, false)); assertEquals("xyz;def", UriTemplate.expand("{+abc}", requestMap, false)); } + public void testExpandTemplates_encodeSpace() { + SortedMap requestMap = Maps.newTreeMap(); + requestMap.put("abc", "xyz def"); + assertEquals(";abc=xyz%20def", UriTemplate.expand("{;abc}", requestMap, false)); + } + public void testExpandTemplates_noExpansionsWithQueryParams() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); From 74962da6e06e016cc1782e7320916a9c606a7143 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2020 13:13:53 -0800 Subject: [PATCH 249/983] chore: release 1.34.2 (#974) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] * updated pom.xml [ci skip] --- CHANGELOG.md | 12 ++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 65 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 876eacf23..90bfb1e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [1.34.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.1...v1.34.2) (2020-02-12) + + +### Bug Fixes + +* use %20 to escpae spaces in URI templates ([#973](https://www.github.com/googleapis/google-http-java-client/issues/973)) ([60ba4ea](https://www.github.com/googleapis/google-http-java-client/commit/60ba4ea771d8ad0a98eddca10a77c5241187d28c)) + + +### Documentation + +* bom 4.0.0 ([#970](https://www.github.com/googleapis/google-http-java-client/issues/970)) ([198453b](https://www.github.com/googleapis/google-http-java-client/commit/198453b8b9e0765439ac430deaf10ef9df084665)) + ### [1.34.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.0...v1.34.1) (2020-01-26) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d01a09e6e..9e3dc9569 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.2-SNAPSHOT + 1.34.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.2-SNAPSHOT + 1.34.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.2-SNAPSHOT + 1.34.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 801bda481..6a474c559 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-android - 1.34.2-SNAPSHOT + 1.34.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 70931df93..2db004ef0 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-apache-v2 - 1.34.2-SNAPSHOT + 1.34.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index ef1d7f869..d791810ad 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-appengine - 1.34.2-SNAPSHOT + 1.34.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index da2c62c0e..3ab6bff00 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.34.2-SNAPSHOT + 1.34.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 96a13577c..a8796f688 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.2-SNAPSHOT + 1.34.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-android - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-apache-v2 - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-appengine - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-findbugs - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-gson - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-jackson2 - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-protobuf - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-test - 1.34.2-SNAPSHOT + 1.34.2 com.google.http-client google-http-client-xml - 1.34.2-SNAPSHOT + 1.34.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 148150f18..e9e33e565 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-findbugs - 1.34.2-SNAPSHOT + 1.34.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 844a6770f..463c9feda 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-gson - 1.34.2-SNAPSHOT + 1.34.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 5c17cf4e7..e3c9ba349 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-jackson2 - 1.34.2-SNAPSHOT + 1.34.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index e7d7a5311..11cfa76fc 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-protobuf - 1.34.2-SNAPSHOT + 1.34.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index eb72072e1..d2c9dc1c8 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-test - 1.34.2-SNAPSHOT + 1.34.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index b8f6d4571..ac1cb4a7b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client-xml - 1.34.2-SNAPSHOT + 1.34.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 013df9249..1b033d480 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../pom.xml google-http-client - 1.34.2-SNAPSHOT + 1.34.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 377d19613..eeb364004 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -544,7 +544,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.2-SNAPSHOT + 1.34.2 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 040ea7181..a735456a7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.2-SNAPSHOT + 1.34.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2769477ce..fef459c2e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.1:1.34.2-SNAPSHOT -google-http-client-bom:1.34.1:1.34.2-SNAPSHOT -google-http-client-parent:1.34.1:1.34.2-SNAPSHOT -google-http-client-android:1.34.1:1.34.2-SNAPSHOT -google-http-client-android-test:1.34.1:1.34.2-SNAPSHOT -google-http-client-apache-v2:1.34.1:1.34.2-SNAPSHOT -google-http-client-appengine:1.34.1:1.34.2-SNAPSHOT -google-http-client-assembly:1.34.1:1.34.2-SNAPSHOT -google-http-client-findbugs:1.34.1:1.34.2-SNAPSHOT -google-http-client-gson:1.34.1:1.34.2-SNAPSHOT -google-http-client-jackson2:1.34.1:1.34.2-SNAPSHOT -google-http-client-protobuf:1.34.1:1.34.2-SNAPSHOT -google-http-client-test:1.34.1:1.34.2-SNAPSHOT -google-http-client-xml:1.34.1:1.34.2-SNAPSHOT +google-http-client:1.34.2:1.34.2 +google-http-client-bom:1.34.2:1.34.2 +google-http-client-parent:1.34.2:1.34.2 +google-http-client-android:1.34.2:1.34.2 +google-http-client-android-test:1.34.2:1.34.2 +google-http-client-apache-v2:1.34.2:1.34.2 +google-http-client-appengine:1.34.2:1.34.2 +google-http-client-assembly:1.34.2:1.34.2 +google-http-client-findbugs:1.34.2:1.34.2 +google-http-client-gson:1.34.2:1.34.2 +google-http-client-jackson2:1.34.2:1.34.2 +google-http-client-protobuf:1.34.2:1.34.2 +google-http-client-test:1.34.2:1.34.2 +google-http-client-xml:1.34.2:1.34.2 From fc21dc412566ef60d23f1f82db5caf3cfd5d447b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 13 Feb 2020 16:37:59 -0500 Subject: [PATCH 250/983] docs: libraries-bom 4.0.1 (#976) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index b77577572..e6e6f0742 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.0.0 + 4.0.1 pom import From 322da91d6f4b91eb4a586c3d9f69a221f1fc8473 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 14 Feb 2020 15:59:28 -0500 Subject: [PATCH 251/983] chore(docs): update libraries-bom to v4.1.0 (#978) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index e6e6f0742..403044e0f 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.0.1 + 4.1.0 pom import From 18fa8b7237ba320fa26f1e9241a4da51722ccd85 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 Feb 2020 23:44:18 +0100 Subject: [PATCH 252/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.11.4 (#979) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eeb364004..c2912853c 100644 --- a/pom.xml +++ b/pom.xml @@ -550,7 +550,7 @@ 3.0.2 2.8.6 2.10.2 - 3.11.3 + 3.11.4 28.2-android 1.1.4c 1.2 From bec568dd11456dc4a8c3d7396b7b313de6c5682a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 17 Feb 2020 19:59:27 -0500 Subject: [PATCH 253/983] Move more up to date dependencies first (#981) @kolea2 This has the effect of upgrading commons-logging to 1.2 from 1.1.1 --- google-http-client-android/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 6a474c559..cbb25eb2d 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -48,15 +48,15 @@ + + com.google.http-client + google-http-client + com.google.android android 4.1.1.4 provided - - com.google.http-client - google-http-client - From 1f662224d7bee6e27e8d66975fda39feae0c9359 Mon Sep 17 00:00:00 2001 From: cryptearth <57261571+cryptearth@users.noreply.github.com> Date: Mon, 24 Feb 2020 16:32:31 +0100 Subject: [PATCH 254/983] fix: reuse reference instead of calling getter twice (#983) fix for #982 changed switch parameter in parseValue from calling getCurrentToken() again to just declared and assigned local member "token" two lines above --- .../src/main/java/com/google/api/client/json/JsonParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java index 7ac07ff56..477640650 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonParser.java @@ -717,7 +717,7 @@ private final Object parseValue( // value type is now null, class, parameterized type, or generic array type JsonToken token = getCurrentToken(); try { - switch (getCurrentToken()) { + switch (token) { case START_ARRAY: case END_ARRAY: boolean isArray = Types.isArray(valueType); From 635c81352ae383b3abfe6d7c141d987a6944b3e9 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 24 Feb 2020 14:16:09 -0500 Subject: [PATCH 255/983] docs: libraries-bom 4.1.1 (#984) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 403044e0f..7f9c9bc87 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.1.0 + 4.1.1 pom import From d2b99e6e66a2c98636edaa22b02dcaccc90c8fbb Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 2 Mar 2020 15:43:35 -0500 Subject: [PATCH 256/983] chore(docs): libraries-bom 4.2.0 (#985) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 7f9c9bc87..9736859eb 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.1.1 + 4.2.0 pom import From 144510b7334c2f6fb9981efe5abd458eb369d437 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2020 12:44:01 -0800 Subject: [PATCH 257/983] chore: release 1.34.3-SNAPSHOT (#977) * updated versions.txt [ci skip] * updated google-http-client-findbugs/google-http-client-findbugs-test/pom.xml [ci skip] * updated google-http-client-android-test/pom.xml [ci skip] * updated google-http-client-android/pom.xml [ci skip] * updated google-http-client-apache-v2/pom.xml [ci skip] * updated google-http-client-appengine/pom.xml [ci skip] * updated google-http-client-assembly/pom.xml [ci skip] * updated google-http-client-bom/pom.xml [ci skip] * updated google-http-client-findbugs/pom.xml [ci skip] * updated google-http-client-gson/pom.xml [ci skip] * updated google-http-client-jackson2/pom.xml [ci skip] * updated google-http-client-protobuf/pom.xml [ci skip] * updated google-http-client-test/pom.xml [ci skip] * updated google-http-client-xml/pom.xml [ci skip] * updated google-http-client/pom.xml [ci skip] * updated pom.xml [ci skip] * updated samples/dailymotion-simple-cmdline-sample/pom.xml [ci skip] --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 9e3dc9569..1a7c83553 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.2 + 1.34.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.2 + 1.34.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.2 + 1.34.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index cbb25eb2d..a36d4f0c2 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-android - 1.34.2 + 1.34.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 2db004ef0..0cef2f330 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.34.2 + 1.34.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index d791810ad..048cf4bdc 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.34.2 + 1.34.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 3ab6bff00..bcf1716c4 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.34.2 + 1.34.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index a8796f688..3214960dc 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.2 + 1.34.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-android - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-test - 1.34.2 + 1.34.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.34.2 + 1.34.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e9e33e565..9a38fc319 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.34.2 + 1.34.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 463c9feda..96faf7cc4 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.34.2 + 1.34.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index e3c9ba349..c2d0bc41d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.34.2 + 1.34.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 11cfa76fc..84e737bc6 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.34.2 + 1.34.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d2c9dc1c8..21c068793 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-test - 1.34.2 + 1.34.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index ac1cb4a7b..97c6729ee 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.34.2 + 1.34.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1b033d480..51bf05688 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../pom.xml google-http-client - 1.34.2 + 1.34.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c2912853c..4d1f7774f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -544,7 +544,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.2 + 1.34.3-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index a735456a7..8835f485c 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.2 + 1.34.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index fef459c2e..ab3e1feae 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.2:1.34.2 -google-http-client-bom:1.34.2:1.34.2 -google-http-client-parent:1.34.2:1.34.2 -google-http-client-android:1.34.2:1.34.2 -google-http-client-android-test:1.34.2:1.34.2 -google-http-client-apache-v2:1.34.2:1.34.2 -google-http-client-appengine:1.34.2:1.34.2 -google-http-client-assembly:1.34.2:1.34.2 -google-http-client-findbugs:1.34.2:1.34.2 -google-http-client-gson:1.34.2:1.34.2 -google-http-client-jackson2:1.34.2:1.34.2 -google-http-client-protobuf:1.34.2:1.34.2 -google-http-client-test:1.34.2:1.34.2 -google-http-client-xml:1.34.2:1.34.2 +google-http-client:1.34.2:1.34.3-SNAPSHOT +google-http-client-bom:1.34.2:1.34.3-SNAPSHOT +google-http-client-parent:1.34.2:1.34.3-SNAPSHOT +google-http-client-android:1.34.2:1.34.3-SNAPSHOT +google-http-client-android-test:1.34.2:1.34.3-SNAPSHOT +google-http-client-apache-v2:1.34.2:1.34.3-SNAPSHOT +google-http-client-appengine:1.34.2:1.34.3-SNAPSHOT +google-http-client-assembly:1.34.2:1.34.3-SNAPSHOT +google-http-client-findbugs:1.34.2:1.34.3-SNAPSHOT +google-http-client-gson:1.34.2:1.34.3-SNAPSHOT +google-http-client-jackson2:1.34.2:1.34.3-SNAPSHOT +google-http-client-protobuf:1.34.2:1.34.3-SNAPSHOT +google-http-client-test:1.34.2:1.34.3-SNAPSHOT +google-http-client-xml:1.34.2:1.34.3-SNAPSHOT From 61fdcd4488b5833cd6ed528b6a59ea1092824e3a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Mar 2020 12:44:38 -0800 Subject: [PATCH 258/983] chore: update common templates (#967) --- .kokoro/linkage-monitor.sh | 7 +- synth.metadata | 1393 +----------------------------------- 2 files changed, 7 insertions(+), 1393 deletions(-) diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index 5b1b65516..f88d75532 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -23,7 +23,12 @@ cd github/google-http-java-client/ java -version echo ${JOB_TYPE} -mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V +mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar diff --git a/synth.metadata b/synth.metadata index 7b71dfbb3..2f70e1092 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-01-07T08:32:34.360210Z", + "updateTime": "2020-02-01T08:32:15.578940Z", "sources": [ { "template": { @@ -8,1396 +8,5 @@ "version": "2019.10.17" } } - ], - "newFiles": [ - { - "path": ".repo-metadata.json" - }, - { - "path": "checkstyle.xml" - }, - { - "path": "renovate.json" - }, - { - "path": "findbugs-exclude.xml" - }, - { - "path": "synth.py" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "codecov.yaml" - }, - { - "path": "LICENSE" - }, - { - "path": "instructions.html" - }, - { - "path": "checkstyle-suppressions.xml" - }, - { - "path": ".gitignore" - }, - { - "path": "pom.xml" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": ".travis.yml" - }, - { - "path": "synth.metadata" - }, - { - "path": "README.md" - }, - { - "path": "versions.txt" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "clirr-ignored-differences.xml" - }, - { - "path": "google-http-client-assembly/readme.html" - }, - { - "path": "google-http-client-assembly/LICENSE.txt" - }, - { - "path": "google-http-client-assembly/pom.xml" - }, - { - "path": "google-http-client-assembly/proguard-google-http-client.txt" - }, - { - "path": "google-http-client-assembly/classpath-include" - }, - { - "path": "google-http-client-assembly/assembly.xml" - }, - { - "path": "google-http-client-assembly/licenses/CDDL-LICENSE.txt" - }, - { - "path": "google-http-client-assembly/licenses/xpp3_LICENSE.txt" - }, - { - "path": "google-http-client-assembly/licenses/APACHE-LICENSE.txt" - }, - { - "path": "google-http-client-assembly/licenses/BSD-LICENSE.txt" - }, - { - "path": "google-http-client-assembly/properties/google-http-client.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-android.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-gson.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-jackson2.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/protobuf-java.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/jackson-core.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-xml.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/gson.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-apache-v2.jar.properties" - }, - { - "path": "google-http-client-assembly/properties/google-http-client-protobuf.jar.properties" - }, - { - "path": "google-http-client-protobuf/pom.xml" - }, - { - "path": "google-http-client-protobuf/src/test/proto/simple_proto.proto" - }, - { - "path": "google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java" - }, - { - "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtocolBuffers.java" - }, - { - "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/package-info.java" - }, - { - "path": "google-http-client-protobuf/src/main/java/com/google/api/client/protobuf/ProtoObjectParser.java" - }, - { - "path": "google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/ProtoHttpContent.java" - }, - { - "path": "google-http-client-protobuf/src/main/java/com/google/api/client/http/protobuf/package-info.java" - }, - { - "path": "google-http-client-xml/pom.xml" - }, - { - "path": "google-http-client-xml/src/test/resources/sample-atom.xml" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java" - }, - { - "path": "google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/XmlNamespaceDictionary.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/GenericXml.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/package-info.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/XmlObjectParser.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/Atom.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/AbstractAtomFeedParser.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/xml/atom/package-info.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/AbstractXmlHttpContent.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/XmlHttpContent.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/package-info.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomFeedParser.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/package-info.java" - }, - { - "path": "google-http-client-xml/src/main/java/com/google/api/client/http/xml/atom/AtomContent.java" - }, - { - "path": "google-http-client-gson/pom.xml" - }, - { - "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java" - }, - { - "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java" - }, - { - "path": "google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonGeneratorTest.java" - }, - { - "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java" - }, - { - "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonGenerator.java" - }, - { - "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/package-info.java" - }, - { - "path": "google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java" - }, - { - "path": "google-http-client-jackson2/pom.xml" - }, - { - "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java" - }, - { - "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonGeneratorTest.java" - }, - { - "path": "google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java" - }, - { - "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java" - }, - { - "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java" - }, - { - "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java" - }, - { - "path": "google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java" - }, - { - "path": "google-http-client-appengine/pom.xml" - }, - { - "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactoryTest.java" - }, - { - "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/datastore/AppEngineNoMemcacheDataStoreFactoryTest.java" - }, - { - "path": "google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/package-info.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/datastore/AppEngineDataStoreFactory.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchTransport.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchResponse.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/package-info.java" - }, - { - "path": "google-http-client-appengine/src/main/java/com/google/api/client/extensions/appengine/http/UrlFetchRequest.java" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/logging.properties" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/instructions.html" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/pom.xml" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs" - }, - { - "path": "samples/dailymotion-simple-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/simple/DailyMotionSample.java" - }, - { - "path": "google-http-client-android/AndroidManifest.xml" - }, - { - "path": "google-http-client-android/project.properties" - }, - { - "path": "google-http-client-android/pom.xml" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/package-info.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/AndroidUtils.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonParser.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonGenerator.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactory.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/json/package-info.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/AndroidHttp.java" - }, - { - "path": "google-http-client-android/src/main/java/com/google/api/client/extensions/android/http/package-info.java" - }, - { - "path": "google-http-client-test/pom.xml" - }, - { - "path": "google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java" - }, - { - "path": "google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/package-info.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java" - }, - { - "path": "google-http-client-test/src/main/java/com/google/api/client/test/util/store/package-info.java" - }, - { - "path": ".kokoro/build.bat" - }, - { - "path": ".kokoro/build.sh" - }, - { - "path": ".kokoro/dependencies.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/coerce_logs.sh" - }, - { - "path": ".kokoro/linkage-monitor.sh" - }, - { - "path": ".kokoro/continuous/dependencies.cfg" - }, - { - "path": ".kokoro/continuous/samples.cfg" - }, - { - "path": ".kokoro/continuous/java7.cfg" - }, - { - "path": ".kokoro/continuous/java8-osx.cfg" - }, - { - "path": ".kokoro/continuous/java10.cfg" - }, - { - "path": ".kokoro/continuous/java8-win.cfg" - }, - { - "path": ".kokoro/continuous/propose_release.sh" - }, - { - "path": ".kokoro/continuous/lint.cfg" - }, - { - "path": ".kokoro/continuous/java11.cfg" - }, - { - "path": ".kokoro/continuous/common.cfg" - }, - { - "path": ".kokoro/continuous/propose_release.cfg" - }, - { - "path": ".kokoro/continuous/java8.cfg" - }, - { - "path": ".kokoro/continuous/integration.cfg" - }, - { - "path": ".kokoro/release/drop.sh" - }, - { - "path": ".kokoro/release/stage.cfg" - }, - { - "path": ".kokoro/release/promote.cfg" - }, - { - "path": ".kokoro/release/publish_javadoc.cfg" - }, - { - "path": ".kokoro/release/bump_snapshot.cfg" - }, - { - "path": ".kokoro/release/promote.sh" - }, - { - "path": ".kokoro/release/stage.sh" - }, - { - "path": ".kokoro/release/snapshot.sh" - }, - { - "path": ".kokoro/release/snapshot.cfg" - }, - { - "path": ".kokoro/release/common.cfg" - }, - { - "path": ".kokoro/release/bump_snapshot.sh" - }, - { - "path": ".kokoro/release/common.sh" - }, - { - "path": ".kokoro/release/drop.cfg" - }, - { - "path": ".kokoro/release/publish_javadoc.sh" - }, - { - "path": ".kokoro/presubmit/dependencies.cfg" - }, - { - "path": ".kokoro/presubmit/samples.cfg" - }, - { - "path": ".kokoro/presubmit/java7.cfg" - }, - { - "path": ".kokoro/presubmit/java8-osx.cfg" - }, - { - "path": ".kokoro/presubmit/linkage-monitor.cfg" - }, - { - "path": ".kokoro/presubmit/java10.cfg" - }, - { - "path": ".kokoro/presubmit/java8-win.cfg" - }, - { - "path": ".kokoro/presubmit/lint.cfg" - }, - { - "path": ".kokoro/presubmit/java11.cfg" - }, - { - "path": ".kokoro/presubmit/common.cfg" - }, - { - "path": ".kokoro/presubmit/clirr.cfg" - }, - { - "path": ".kokoro/presubmit/java8.cfg" - }, - { - "path": ".kokoro/presubmit/integration.cfg" - }, - { - "path": ".kokoro/nightly/dependencies.cfg" - }, - { - "path": ".kokoro/nightly/samples.cfg" - }, - { - "path": ".kokoro/nightly/java7.cfg" - }, - { - "path": ".kokoro/nightly/java8-osx.cfg" - }, - { - "path": ".kokoro/nightly/java8-win.cfg" - }, - { - "path": ".kokoro/nightly/lint.cfg" - }, - { - "path": ".kokoro/nightly/java11.cfg" - }, - { - "path": ".kokoro/nightly/common.cfg" - }, - { - "path": ".kokoro/nightly/java8.cfg" - }, - { - "path": ".kokoro/nightly/integration.cfg" - }, - { - "path": "google-http-client/pom.xml" - }, - { - "path": "google-http-client/src/test/resources/file.txt" - }, - { - "path": "google-http-client/src/test/resources/com/google/api/client/util/secret.pem" - }, - { - "path": "google-http-client/src/test/resources/com/google/api/client/util/secret.p12" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpStatusCodesTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/DataTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/TypesTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/Base64Test.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/ClockTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java" - }, - { - "path": "google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java" - }, - { - "path": "google-http-client/src/main/resources/google-http-client.properties" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonGenerator.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonToken.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/Json.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonObjectParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/GenericJson.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonPolymorphicTypeMap.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/JsonString.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/CustomizeJsonParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/rpc2/JsonRpcRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/json/rpc2/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonGenerator.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/TestCertificates.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/json/webtoken/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpTransport.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpResponse.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/FixedClock.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/HttpTesting.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockHttpUnsuccessfulResponseHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/javanet/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/apache/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/http/apache/MockHttpClient.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/MockBackOff.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/SecurityTestUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/MockSleeper.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayOutputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/testing/util/LogRecordingHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/BasicAuthentication.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpUnsuccessfulResponseHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpEncoding.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpEncodingStreamingContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpExecuteInterceptor.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/ByteArrayContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/EmptyContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/FileContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpStatusCodes.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/OpenCensusUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpMethods.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/AbstractInputStreamContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/InputStreamContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpHeaders.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/LowLevelHttpResponse.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpResponseInterceptor.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/ConsumingInputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/HttpRequestInitializer.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/json/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/json/JsonHttpContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/ConnectionFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/javanet/DefaultConnectionFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/HttpExtensionMethod.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ContentEntity.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpRequest.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpResponse.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/http/apache/SSLSocketFactoryExtension.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingByteArrayOutputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Maps.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/NullValue.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/SslUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Lists.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/GenericData.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Types.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Collections2.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Key.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/BackOff.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Joiner.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ArrayMap.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Clock.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/DateTime.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/StringUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ObjectParser.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Beta.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingOutputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingInputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/LoggingStreamingContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ByteCountingOutputStream.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ClassInfo.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Data.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/DataMap.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Sleeper.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Value.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/NanoClock.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Throwables.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/IOUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Charsets.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Objects.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Base64.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/BackOffUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Preconditions.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Strings.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/PemReader.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/Sets.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStore.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStoreFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStoreUtils.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/DataStore.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/MemoryDataStoreFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/Escaper.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/Platform.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/package-info.java" - }, - { - "path": "google-http-client/src/main/java/com/google/api/client/util/escape/UnicodeEscaper.java" - }, - { - "path": ".github/CODEOWNERS" - }, - { - "path": ".github/.release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - }, - { - "path": "google-http-client-findbugs/pom.xml" - }, - { - "path": "google-http-client-findbugs/src/main/resources/messages.xml" - }, - { - "path": "google-http-client-findbugs/src/main/resources/bugrank.txt" - }, - { - "path": "google-http-client-findbugs/src/main/resources/findbugs.xml" - }, - { - "path": "google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/BetaDetector.java" - }, - { - "path": "google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/.project" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/.classpath" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/pom.xml" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/.settings/org.eclipse.jdt.core.prefs" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/.settings/org.eclipse.jdt.ui.prefs" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass2.java" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/Test.java" - }, - { - "path": "google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java" - }, - { - "path": ".git/index" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/config" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/objects/pack/pack-05aa278ffdf8a410aeb04cb592a33d2cb1daf479.idx" - }, - { - "path": ".git/objects/pack/pack-05aa278ffdf8a410aeb04cb592a33d2cb1daf479.pack" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": "google-http-client-apache-v2/pom.xml" - }, - { - "path": "google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java" - }, - { - "path": "google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpRequestTest.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/HttpExtensionMethod.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpRequest.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpResponse.java" - }, - { - "path": "google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java" - }, - { - "path": "docs/index.md" - }, - { - "path": "docs/exponential-backoff.md" - }, - { - "path": "docs/_config.yml" - }, - { - "path": "docs/android.md" - }, - { - "path": "docs/component-modules.md" - }, - { - "path": "docs/google-app-engine.md" - }, - { - "path": "docs/support.md" - }, - { - "path": "docs/http-transport.md" - }, - { - "path": "docs/unit-testing.md" - }, - { - "path": "docs/json.md" - }, - { - "path": "docs/setup.md" - }, - { - "path": "docs/_layouts/default.html" - }, - { - "path": "docs/_data/navigation.yml" - }, - { - "path": "google-http-client-android-test/AndroidManifest.xml" - }, - { - "path": "google-http-client-android-test/pom.xml" - }, - { - "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java" - }, - { - "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java" - }, - { - "path": "google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java" - }, - { - "path": "google-http-client-bom/pom.xml" - }, - { - "path": "google-http-client-bom/README.md" - } ] } \ No newline at end of file From 0369b1c47b507e5e9c251f341e74b48ddaa88d21 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Mar 2020 14:43:19 -0800 Subject: [PATCH 259/983] chore: update common templates (#989) --- .kokoro/build.sh | 51 ++++++++++++++++++++++++++------- .kokoro/continuous/java8.cfg | 5 ++++ .kokoro/nightly/integration.cfg | 14 +++++++++ .kokoro/nightly/java8.cfg | 5 ++++ .kokoro/nightly/samples.cfg | 21 ++++++++------ .kokoro/presubmit/java8.cfg | 5 ++++ synth.metadata | 4 +-- 7 files changed, 84 insertions(+), 21 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f1ae58408..998792dd0 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,19 +37,23 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) fi +RETURN_CODE=0 +set +e + case ${JOB_TYPE} in test) mvn test -B -Dclirr.skip=true -Denforcer.skip=true - bash ${KOKORO_GFILE_DIR}/codecov.sh - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; lint) mvn \ -Penable-samples \ com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? ;; javadoc) mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ @@ -59,21 +63,46 @@ integration) -Denforcer.skip=true \ -fae \ verify - bash .kokoro/coerce_logs.sh + RETURN_CODE=$? ;; samples) - mvn -B \ - -Penable-samples \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - bash .kokoro/coerce_logs.sh + if [[ -f samples/pom.xml ]] + then + pushd samples + mvn -B \ + -Penable-samples \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi ;; clirr) mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? ;; *) ;; esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/google-http-java-client +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/continuous/java8.cfg +++ b/.kokoro/continuous/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 3b017fc80..8bf59c02e 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -5,3 +5,17 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/nightly/java8.cfg +++ b/.kokoro/nightly/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 9a9102490..b4b051cd0 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -2,23 +2,28 @@ # Configure the docker image for kokoro-trampoline. env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" } env_vars: { - key: "JOB_TYPE" - value: "samples" + key: "JOB_TYPE" + value: "samples" } env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "gcloud-devel" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" } before_action { diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg index 3b017fc80..495cc7bac 100644 --- a/.kokoro/presubmit/java8.cfg +++ b/.kokoro/presubmit/java8.cfg @@ -5,3 +5,8 @@ env_vars: { key: "TRAMPOLINE_IMAGE" value: "gcr.io/cloud-devrel-kokoro-resources/java8" } + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/synth.metadata b/synth.metadata index 2f70e1092..508084b0e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,11 +1,11 @@ { - "updateTime": "2020-02-01T08:32:15.578940Z", + "updateTime": "2020-03-02T22:34:09.877226Z", "sources": [ { "template": { "name": "java_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ] From 79bc1c76ebd48d396a080ef715b9f07cd056b7ef Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 9 Mar 2020 08:45:42 -0400 Subject: [PATCH 260/983] deps: httpclient 4.5.12 (#991) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4d1f7774f..41cb338ef 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,7 @@ 28.2-android 1.1.4c 1.2 - 4.5.11 + 4.5.12 4.4.13 0.24.0 .. From 771479a19963ed61ff67722f1df4ee7c112a12ae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 10 Mar 2020 16:24:11 +0100 Subject: [PATCH 261/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.10.3 (#992) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 41cb338ef..9de106f55 100644 --- a/pom.xml +++ b/pom.xml @@ -549,7 +549,7 @@ UTF-8 3.0.2 2.8.6 - 2.10.2 + 2.10.3 3.11.4 28.2-android 1.1.4c From 65fd7d8f07ad2e5dd7219e279f04cd7c6e69afef Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 10 Mar 2020 16:25:08 +0100 Subject: [PATCH 262/983] chore(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.1.0 (#994) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0cef2f330..53be79ecd 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 96faf7cc4..3ec6f17ab 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c2d0bc41d..a5ef44287 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 21c068793..1c745a942 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 97c6729ee..94edbad8d 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.1.0 add-test-source From d3c42d35709ab3c2d3b9bf133db5e01607cebdc1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 10 Mar 2020 21:44:40 +0100 Subject: [PATCH 263/983] chore(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.9.0 (#996) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3214960dc..5be5b86fb 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.8.2 + 3.9.0 true diff --git a/pom.xml b/pom.xml index 9de106f55..237ef20df 100644 --- a/pom.xml +++ b/pom.xml @@ -364,7 +364,7 @@ org.apache.maven.plugins maven-site-plugin - 3.8.2 + 3.9.0 org.apache.maven.plugins From 1ba219743e65c89bc3fdb196acc5d2042e01f542 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Wed, 11 Mar 2020 07:24:42 -0700 Subject: [PATCH 264/983] fix: Correctly handling chunked response streams with gzip (#990) Previous implementation doesn't properly cleanup the last chunk of a chunked response when the response is also gzipped. This in turns prevents proper connection reuse. Fixes #367 --- .../java/com/google/api/client/http/HttpResponse.java | 7 ++++++- .../java/com/google/api/client/http/HttpResponseTest.java | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 3341720a6..276ce0e74 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -353,8 +353,13 @@ public InputStream getContent() throws IOException { if (!returnRawInputStream && this.contentEncoding != null) { String oontentencoding = this.contentEncoding.trim().toLowerCase(Locale.ENGLISH); if (CONTENT_ENCODING_GZIP.equals(oontentencoding) || CONTENT_ENCODING_XGZIP.equals(oontentencoding)) { + // Wrap the original stream in a ConsumingInputStream before passing it to + // GZIPInputStream. The GZIPInputStream leaves content unconsumed in the original + // stream (it almost always leaves the last chunk unconsumed in chunked responses). + // ConsumingInputStream ensures that any unconsumed bytes are read at close. + // GZIPInputStream.close() --> ConsumingInputStream.close() --> exhaust(ConsumingInputStream) lowLevelResponseContent = - new ConsumingInputStream(new GZIPInputStream(lowLevelResponseContent)); + new GZIPInputStream(new ConsumingInputStream(lowLevelResponseContent)); } } // logging (wrap content with LoggingInputStream) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index f7638d675..57b400e40 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -567,6 +567,12 @@ private void do_testGetContent_gzipEncoding_finishReading(String contentEncoding ) { zipStream.write(dataToCompress); zipStream.close(); + + // GZIPInputStream uses a default buffer of 512B. Add enough content to exceed this + // limit, so that some content will be left in the connection. + for (int i = 0; i < 1024; i++) { + byteStream.write('7'); + } mockBytes = byteStream.toByteArray(); } final MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse(); @@ -594,6 +600,8 @@ public LowLevelHttpResponse execute() throws IOException { assertFalse(output.isClosed()); assertEquals("abcd", response.parseAsString()); assertTrue(output.isClosed()); + // The underlying stream should be fully consumed, even if gzip only returns some of it. + assertEquals(-1, output.read()); } } From 837a4e731abcc6e038bec862f8b20347510bca5d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 11 Mar 2020 23:23:03 +0100 Subject: [PATCH 265/983] chore(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.1.2 (#998) --- google-http-client/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 51bf05688..dc15cc548 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -21,7 +21,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + 3.1.2 io.opencensus:opencensus-impl diff --git a/pom.xml b/pom.xml index 237ef20df..2eb09433d 100644 --- a/pom.xml +++ b/pom.xml @@ -369,7 +369,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + 3.1.2 org.apache.maven.plugins From 027c227e558164f77be204152fb47023850b543f Mon Sep 17 00:00:00 2001 From: Suraj Dhamecha <48670070+suraj-qlogic@users.noreply.github.com> Date: Fri, 13 Mar 2020 19:22:57 +0530 Subject: [PATCH 266/983] fix: add linkage monitor plugin (#1000) --- pom.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pom.xml b/pom.xml index 2eb09433d..400da2d58 100644 --- a/pom.xml +++ b/pom.xml @@ -376,6 +376,11 @@ maven-resources-plugin 3.1.0 + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + @@ -393,6 +398,10 @@ [3.5.2,4.0.0) + + [1.7,) + + From 15111a1001d6f72cb92cd2d76aaed6f1229bc14a Mon Sep 17 00:00:00 2001 From: Igor Dvorzhak Date: Mon, 16 Mar 2020 03:07:48 -0700 Subject: [PATCH 267/983] fix: include request method and URL into HttpResponseException message (#1002) * fix: include request URL into HttpResponseException message * Add request method to the exception message + review fixes --- .../client/http/HttpResponseException.java | 11 ++ .../http/HttpResponseExceptionTest.java | 160 +++++++++++------- 2 files changed, 107 insertions(+), 64 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java index 6e5349e18..a9d80a4f5 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java @@ -284,6 +284,17 @@ public static StringBuilder computeMessageBuffer(HttpResponse response) { } builder.append(statusMessage); } + HttpRequest request = response.getRequest(); + if (request != null) { + if (builder.length() > 0) { + builder.append('\n'); + } + String requestMethod = request.getRequestMethod(); + if (requestMethod != null) { + builder.append(requestMethod).append(' '); + } + builder.append(request.getUrl()); + } return builder; } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java index 4d651aecb..9066e9d70 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java @@ -14,12 +14,15 @@ package com.google.api.client.http; +import static com.google.api.client.testing.http.HttpTesting.SIMPLE_GENERIC_URL; +import static com.google.api.client.util.StringUtils.LINE_SEPARATOR; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + import com.google.api.client.http.HttpResponseException.Builder; -import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; -import com.google.api.client.util.StringUtils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -27,6 +30,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.framework.TestCase; +import org.junit.function.ThrowingRunnable; /** * Tests {@link HttpResponseException}. @@ -37,16 +41,15 @@ public class HttpResponseExceptionTest extends TestCase { public void testConstructor() throws Exception { HttpTransport transport = new MockHttpTransport(); - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); HttpHeaders headers = response.getHeaders(); - HttpResponseException e = new HttpResponseException(response); - assertEquals("200", e.getMessage()); - assertNull(e.getContent()); - assertEquals(200, e.getStatusCode()); - assertNull(e.getStatusMessage()); - assertTrue(headers == e.getHeaders()); + HttpResponseException responseException = new HttpResponseException(response); + assertThat(responseException).hasMessageThat().isEqualTo("200\nGET " + SIMPLE_GENERIC_URL); + assertNull(responseException.getContent()); + assertEquals(200, responseException.getStatusCode()); + assertNull(responseException.getStatusMessage()); + assertTrue(headers == responseException.getHeaders()); } public void testBuilder() throws Exception { @@ -83,11 +86,10 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); - HttpResponseException e = new HttpResponseException(response); - assertEquals("OK", e.getStatusMessage()); + HttpResponseException responseException = new HttpResponseException(response); + assertEquals("OK", responseException.getStatusMessage()); } public void testConstructor_noStatusCode() throws Exception { @@ -105,14 +107,18 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); - try { - request.execute(); - fail(); - } catch (HttpResponseException e) { - assertEquals("", e.getMessage()); - } + final HttpRequest request = + transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + assertThat(responseException).hasMessageThat().isEqualTo("GET " + SIMPLE_GENERIC_URL); } public void testConstructor_messageButNoStatusCode() throws Exception { @@ -131,14 +137,18 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); - try { - request.execute(); - fail(); - } catch (HttpResponseException e) { - assertEquals("Foo", e.getMessage()); - } + final HttpRequest request = + transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + assertThat(responseException).hasMessageThat().isEqualTo("Foo\nGET " + SIMPLE_GENERIC_URL); } public void testComputeMessage() throws Exception { @@ -156,10 +166,10 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); - assertEquals("200 Foo", HttpResponseException.computeMessageBuffer(response).toString()); + assertThat(HttpResponseException.computeMessageBuffer(response).toString()) + .isEqualTo("200 Foo\nGET " + SIMPLE_GENERIC_URL); } public void testThrown() throws Exception { @@ -179,15 +189,25 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); - try { - request.execute(); - fail(); - } catch (HttpResponseException e) { - assertEquals( - "404 Not Found" + StringUtils.LINE_SEPARATOR + "Unable to find resource", e.getMessage()); - } + final HttpRequest request = + transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + + assertThat(responseException) + .hasMessageThat() + .isEqualTo( + "404 Not Found\nGET " + + SIMPLE_GENERIC_URL + + LINE_SEPARATOR + + "Unable to find resource"); } public void testInvalidCharset() throws Exception { @@ -208,14 +228,21 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); - try { - request.execute(); - fail(); - } catch (HttpResponseException e) { - assertEquals("404 Not Found", e.getMessage()); - } + final HttpRequest request = + transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + + assertThat(responseException) + .hasMessageThat() + .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } public void testUnsupportedCharset() throws Exception { @@ -236,30 +263,35 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); - try { - request.execute(); - fail(); - } catch (HttpResponseException e) { - assertEquals("404 Not Found", e.getMessage()); - } + final HttpRequest request = + transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + assertThat(responseException) + .hasMessageThat() + .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } public void testSerialization() throws Exception { HttpTransport transport = new MockHttpTransport(); - HttpRequest request = - transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); - HttpResponseException e = new HttpResponseException(response); + HttpResponseException responseException = new HttpResponseException(response); ByteArrayOutputStream out = new ByteArrayOutputStream(); ObjectOutput s = new ObjectOutputStream(out); - s.writeObject(e); + s.writeObject(responseException); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); ObjectInputStream objectInput = new ObjectInputStream(in); HttpResponseException e2 = (HttpResponseException) objectInput.readObject(); - assertEquals(e.getMessage(), e2.getMessage()); - assertEquals(e.getStatusCode(), e2.getStatusCode()); + assertEquals(responseException.getMessage(), e2.getMessage()); + assertEquals(responseException.getStatusCode(), e2.getStatusCode()); assertNull(e2.getHeaders()); } } From 8760ff0e64ab47abba0f911d29d1afcb19dcfa34 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 Mar 2020 11:08:27 +0100 Subject: [PATCH 268/983] chore(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.2.0 (#1003) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5be5b86fb..0401a3532 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 true diff --git a/pom.xml b/pom.xml index 400da2d58..8fac9b174 100644 --- a/pom.xml +++ b/pom.xml @@ -306,7 +306,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 attach-javadocs From f9d2bb030398fe09e3c47b84ea468603355e08e9 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 20 Mar 2020 12:05:10 -0400 Subject: [PATCH 269/983] docs: require Android 4.4 (#1007) @chingor13 @BenWhitehead We now require API 19 or higher which means Android 4.4 or later. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b5d4f1c2..de94456a2 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ content. The JSON and XML libraries are also fully pluggable, and they include s The library supports the following Java environments: -- Java 7 (or higher) -- Android 4.0 (Ice Cream Sandwich) (or higher) +- Java 7 or higher +- Android 4.4 (Kit Kat) - GoogleAppEngine Google App Engine The following related projects are built on the Google HTTP Client Library for Java: From bcc41dd615af41ae6fb58287931cbf9c2144a075 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 20 Mar 2020 13:20:20 -0400 Subject: [PATCH 270/983] docs: android 4.4 or later is required (#1008) @codyoss --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5eb9ff04b..e6162bd8d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,8 +18,8 @@ content. The JSON and XML libraries are also fully pluggable, and they include s The library supports the following Java environments: -- Java 7 (or higher) -- Android 4.0 (Ice Cream Sandwich) (or higher) +- Java 7 or higher +- Android 4.4 (Kit Kat) or higher - Google App Engine The following related projects are built on the Google HTTP Client Library for Java: From 3bd738788edc90efbcb96d044ebe2e8d0e7879c5 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 24 Mar 2020 18:35:38 -0400 Subject: [PATCH 271/983] chore(doc): libraries-bom 4.3.0 (#1010) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 9736859eb..5ad1f01bf 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.2.0 + 4.3.0 pom import From 8b4eabe985794fc64ad6a4a53f8f96201cf73fb8 Mon Sep 17 00:00:00 2001 From: Take Weiland Date: Wed, 25 Mar 2020 13:52:07 +0100 Subject: [PATCH 272/983] fix: incorrect check for Windows OS in FileDataStoreFactory (#927) * fix: incorrect check for Windows OS in FileDataStoreFactory * fix: properly get file owner on windows in FileDataStoreFactory * refactor: use toLowerCase instead of regionMatches in FileDataStoreFactory --- .../api/client/util/store/FileDataStoreFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 230af26e2..6114c2ae1 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -32,9 +32,11 @@ import java.nio.file.attribute.AclEntryPermission; import java.nio.file.attribute.AclEntryType; import java.nio.file.attribute.AclFileAttributeView; +import java.nio.file.attribute.FileOwnerAttributeView; import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.UserPrincipal; import java.util.HashSet; +import java.util.Locale; import java.util.Set; import java.util.logging.Logger; @@ -53,7 +55,7 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory { private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName()); private static final boolean IS_WINDOWS = StandardSystemProperty.OS_NAME.value() - .startsWith("WINDOWS"); + .toLowerCase(Locale.ENGLISH).startsWith("windows"); /** Directory to store data. */ private final File dataDirectory; @@ -155,8 +157,8 @@ static void setPermissionsToOwnerOnly(File file) throws IOException { static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { Path path = Paths.get(file.getAbsolutePath()); - UserPrincipal owner = path.getFileSystem().getUserPrincipalLookupService() - .lookupPrincipalByName("OWNER@"); + FileOwnerAttributeView fileAttributeView = Files.getFileAttributeView(path, FileOwnerAttributeView.class); + UserPrincipal owner = fileAttributeView.getOwner(); // get view AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); From fd33073da3674997897d7a9057d1d0e9d42d7cd4 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 1 Apr 2020 12:14:37 -0400 Subject: [PATCH 273/983] fix: FileDataStoreFactory will throw IOException for any permissions errors (#1012) Previously, some errors, such as failing to modify permissions on the storage file, were silently ignored which can be a security issue. --- .../util/store/FileDataStoreFactory.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 6114c2ae1..838dcb5dd 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -43,9 +43,8 @@ /** * Thread-safe file implementation of a credential store. * - *

            For security purposes, the file's permissions are set to be accessible only by the file's - * owner. Note that Java 1.5 does not support manipulating file permissions, and must be done - * manually or using the JNI. + *

            For security purposes, the file's permissions are set such that the + * file is only accessible by the file's owner. * * @since 1.16 * @author Yaniv Inbar @@ -136,26 +135,21 @@ public FileDataStoreFactory getDataStoreFactory() { * executed by the file's owner. * * @param file the file's permissions to modify - * @throws IOException + * @throws IOException if the permissions can't be set */ - static void setPermissionsToOwnerOnly(File file) throws IOException { + private static void setPermissionsToOwnerOnly(File file) throws IOException { Set permissions = new HashSet(); permissions.add(PosixFilePermission.OWNER_READ); permissions.add(PosixFilePermission.OWNER_WRITE); permissions.add(PosixFilePermission.OWNER_EXECUTE); try { Files.setPosixFilePermissions(Paths.get(file.getAbsolutePath()), permissions); - } catch (UnsupportedOperationException exception) { - LOGGER.warning("Unable to set permissions for " + file - + ", because you are running on a non-POSIX file system."); - } catch (SecurityException exception) { - // ignored - } catch (IllegalArgumentException exception) { - // ignored + } catch (RuntimeException exception) { + throw new IOException("Unable to set permissions for " + file, exception); } } - static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { + private static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { Path path = Paths.get(file.getAbsolutePath()); FileOwnerAttributeView fileAttributeView = Files.getFileAttributeView(path, FileOwnerAttributeView.class); UserPrincipal owner = fileAttributeView.getOwner(); @@ -188,6 +182,11 @@ static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { .build(); // Overwrite the ACL with only this permission - view.setAcl(ImmutableList.of(entry)); + try { + view.setAcl(ImmutableList.of(entry)); + } catch (SecurityException ex) { + throw new IOException("Unable to set permissions for " + file, ex); + } + } } From b9a80232c9c8b16a3c3277458835f72e346f6b2c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 1 Apr 2020 12:35:32 -0400 Subject: [PATCH 274/983] fix(android): set minimum API level to 19 a.k.a. 4.4 Kit Kat (#1016) fixes #1015 --- google-http-client-android/AndroidManifest.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-android/AndroidManifest.xml b/google-http-client-android/AndroidManifest.xml index 9dc775d49..32d176f23 100644 --- a/google-http-client-android/AndroidManifest.xml +++ b/google-http-client-android/AndroidManifest.xml @@ -5,7 +5,7 @@ android:versionName="1.0" > + android:minSdkVersion="19" + android:targetSdkVersion="19" /> - \ No newline at end of file + From a45b585fbec36835ef626f9719c8655f483935aa Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 1 Apr 2020 09:36:21 -0700 Subject: [PATCH 275/983] chore: update common templates (#1001) --- .github/PULL_REQUEST_TEMPLATE.md | 8 +++++++- .github/trusted-contribution.yml | 2 ++ synth.metadata | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .github/trusted-contribution.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0bd0ee062..f36e6e579 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1 +1,7 @@ -Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-http-java-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 000000000..f247d5c78 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 508084b0e..a8671a649 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2020-03-02T22:34:09.877226Z", + "updateTime": "2020-03-13T21:34:17.479284Z", "sources": [ { "template": { From 1f6328755fe32cacc7cfcf253493b652bb007186 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 1 Apr 2020 14:41:06 -0700 Subject: [PATCH 276/983] chore: update common templates (#1018) --- .kokoro/build.sh | 19 ++++--- .kokoro/common.sh | 44 +++++++++++++++ .kokoro/dependencies.sh | 15 ++++-- .kokoro/linkage-monitor.sh | 22 +++++--- samples/install-without-bom/pom.xml | 84 +++++++++++++++++++++++++++++ samples/pom.xml | 56 +++++++++++++++++++ samples/snapshot/pom.xml | 83 ++++++++++++++++++++++++++++ samples/snippets/pom.xml | 60 +++++++++++++++++++++ synth.metadata | 10 ++-- 9 files changed, 370 insertions(+), 23 deletions(-) create mode 100644 .kokoro/common.sh create mode 100644 samples/install-without-bom/pom.xml create mode 100644 samples/pom.xml create mode 100644 samples/snapshot/pom.xml create mode 100644 samples/snippets/pom.xml diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 998792dd0..164a94c1a 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -20,17 +20,22 @@ scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) ## cd to the parent directory, i.e. the root of the git repo cd ${scriptDir}/.. +# include common functions +source ${scriptDir}/common.sh + # Print out Java version java -version 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 +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 000000000..a3bbc5f67 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2020 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. + +# set -eo pipefail + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + echo "${command}" + ${command} + exit_code=$? + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index ccd3fe690..0aade871c 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -15,7 +15,13 @@ set -eo pipefail -cd github/google-http-java-client/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java java -version @@ -24,8 +30,9 @@ echo $JOB_TYPE export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh index f88d75532..759ab4e2c 100755 --- a/.kokoro/linkage-monitor.sh +++ b/.kokoro/linkage-monitor.sh @@ -17,18 +17,26 @@ set -eo pipefail # Display commands being run. set -x -cd github/google-http-java-client/ +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh # Print out Java version java -version echo ${JOB_TYPE} -mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true # Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR JAR=linkage-monitor-latest-all-deps.jar diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 000000000..6d5f2e904 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + google-http-client-install-without-bom + jar + Google Google HTTP Java Client Install Without Bom + https://github.com/googleapis/google-http-java-client + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.http-client + google-http-client + + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 000000000..cabcc7b58 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-google-http-client-samples + 0.0.1-SNAPSHOT + pom + Google Google HTTP Java Client Samples Parent + https://github.com/googleapis/google-http-java-client + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 000000000..4d9f60c98 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + google-http-client-snapshot + jar + Google Google HTTP Java Client Snapshot Samples + https://github.com/googleapis/google-http-java-client + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.http-client + google-http-client + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 000000000..33a9fe006 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.google.cloud + google-http-client-snippets + jar + Google Google HTTP Java Client Snippets + https://github.com/googleapis/google-http-java-client + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + + com.google.cloud + libraries-bom + + pom + import + + + + + + + com.google.http-client + google-http-client + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/synth.metadata b/synth.metadata index a8671a649..e5e3d28c3 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,11 +1,11 @@ { - "updateTime": "2020-03-13T21:34:17.479284Z", + "updateTime": "2020-04-01T21:33:55.846897Z", "sources": [ { - "template": { - "name": "java_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" } } ] From ca9520f2da4babc5bbd28c828da1deb7dbdc87e5 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 14 Apr 2020 13:11:29 -0400 Subject: [PATCH 277/983] deps: update to Guava 29 (#1024) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8fac9b174..776e30c43 100644 --- a/pom.xml +++ b/pom.xml @@ -560,7 +560,7 @@ 2.8.6 2.10.3 3.11.4 - 28.2-android + 29.0-android 1.1.4c 1.2 4.5.12 From a6fc5f41628f536fff7de315113236fac65c0707 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Apr 2020 10:12:04 -0700 Subject: [PATCH 278/983] chore: update common templates (#1022) * chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466) Source-Repo: googleapis/synthtool Source-Sha: 928b2998ac5023e7c7e254ab935f9ef022455aad Source-Link: https://github.com/googleapis/synthtool/commit/928b2998ac5023e7c7e254ab935f9ef022455aad Author: WhiteSource Renovate Date: Tue Apr 7 19:56:16 2020 +0200 Original-Commit-Message: chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466) Co-authored-by: Jeffrey Rennie * build(java): fix retry_with_backoff when -e option set (#475) Source-Repo: googleapis/synthtool Source-Sha: bd69a2aa7b70875f3c988e269706b22fefbef40e Source-Link: https://github.com/googleapis/synthtool/commit/bd69a2aa7b70875f3c988e269706b22fefbef40e Author: Jeff Ching Date: Wed Apr 8 14:01:08 2020 -0700 Original-Commit-Message: build(java): fix retry_with_backoff when -e option set (#475) * build(java): fix nightly integration test config to run integrations (#465) Source-Repo: googleapis/synthtool Source-Sha: c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25 Source-Link: https://github.com/googleapis/synthtool/commit/c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25 Author: Jeff Ching Date: Wed Apr 8 14:06:04 2020 -0700 Original-Commit-Message: build(java): fix nightly integration test config to run integrations (#465) This was only running the units. Co-authored-by: Jeffrey Rennie --- .kokoro/common.sh | 14 ++++++++++++-- .kokoro/nightly/integration.cfg | 15 +++++++++++++++ samples/pom.xml | 2 +- synth.metadata | 11 +++++++++-- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/.kokoro/common.sh b/.kokoro/common.sh index a3bbc5f67..8f09de5d3 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -13,18 +13,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -# set -eo pipefail - function retry_with_backoff { attempts_left=$1 sleep_seconds=$2 shift 2 command=$@ + + # store current flag state + flags=$- + + # allow a failures to continue + set +e echo "${command}" ${command} exit_code=$? + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + if [[ $exit_code == 0 ]] then return 0 diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 8bf59c02e..ca0274800 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -6,11 +6,26 @@ env_vars: { value: "gcr.io/cloud-devrel-kokoro-resources/java8" } +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + env_vars: { key: "ENABLE_BUILD_COP" value: "true" } +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + before_action { fetch_keystore { keystore_resource { diff --git a/samples/pom.xml b/samples/pom.xml index cabcc7b58..a46c32cad 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.15 diff --git a/synth.metadata b/synth.metadata index e5e3d28c3..972287a13 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,11 +1,18 @@ { - "updateTime": "2020-04-01T21:33:55.846897Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/google-http-java-client.git", + "sha": "1f6328755fe32cacc7cfcf253493b652bb007186" + } + }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25", + "log": "c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" } } ] From 3b270ead88d23541a74ff06c5a58bb728a159ecd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Apr 2020 19:12:34 +0200 Subject: [PATCH 279/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#1019) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 6d5f2e904..d3b38cdf1 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.15 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4d9f60c98..fd2adfc15 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.15 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 33a9fe006..2b56334dd 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.15 From 6d71833a4750ca7fa68ccbb42b2178cca4052f5b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 16 Apr 2020 13:10:20 +0200 Subject: [PATCH 280/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.16 (#1029) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d3b38cdf1..3936adf32 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/samples/pom.xml b/samples/pom.xml index a46c32cad..903f8ff38 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index fd2adfc15..38ec88c83 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 2b56334dd..da30657aa 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.16 From 2c26a03fe0080f3913726d6375a18ddb99f28d84 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Apr 2020 00:01:55 +0200 Subject: [PATCH 281/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.17 (#1030) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 3936adf32..89688c724 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/samples/pom.xml b/samples/pom.xml index 903f8ff38..22ebf1618 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 38ec88c83..fa6b36800 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index da30657aa..cb7949972 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.16 + 1.0.17 From ca34202bfa077adb70313b6c4562c7a5d904e064 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 24 Apr 2020 07:36:59 -0400 Subject: [PATCH 282/983] docs: libraries-bom 5.2.0 (#1032) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 5ad1f01bf..2f3dc9258 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 4.3.0 + 5.2.0 pom import From bb4227f9daec44fc2976fa9947e2ff5ee07ed21a Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 24 Apr 2020 14:43:29 -0700 Subject: [PATCH 283/983] feat: add logic for verifying ES256 JsonWebSignatures (#1033) * feat: add logic for verifying ES256 JsonWebSignatures * chore: use google-http-client's Preconditions wrapper * refactor: make DerEncoder an outer class --- .../api/client/json/webtoken/DerEncoder.java | 60 +++++++++++++++++++ .../json/webtoken/JsonWebSignature.java | 22 +++---- .../google/api/client/util/SecurityUtils.java | 7 ++- .../json/webtoken/JsonWebSignatureTest.java | 47 +++++++++++++++ 4 files changed, 124 insertions(+), 12 deletions(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java new file mode 100644 index 000000000..ce7c42f12 --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 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 + * + * https://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.json.webtoken; + +import com.google.api.client.util.Preconditions; + +import java.math.BigInteger; +import java.util.Arrays; + +/** + * Utilities for re-encoding a signature byte array with DER encoding. + * + *

            Note: that this is not a general purpose encoder and currently only + * handles 512 bit signatures. ES256 verification algorithms expect the + * signature bytes in DER encoding. + */ +public class DerEncoder { + private static byte DER_TAG_SIGNATURE_OBJECT = 0x30; + private static byte DER_TAG_ASN1_INTEGER = 0x02; + + static byte[] encode(byte[] signature) { + // expect the signature to be 64 bytes long + Preconditions.checkState(signature.length == 64); + + byte[] int1 = new BigInteger(1, Arrays.copyOfRange(signature, 0, 32)).toByteArray(); + byte[] int2 = new BigInteger(1, Arrays.copyOfRange(signature, 32, 64)).toByteArray(); + byte[] der = new byte[6 + int1.length + int2.length]; + + // Mark that this is a signature object + der[0] = DER_TAG_SIGNATURE_OBJECT; + der[1] = (byte) (der.length - 2); + + // Start ASN1 integer and write the first 32 bits + der[2] = DER_TAG_ASN1_INTEGER; + der[3] = (byte) int1.length; + System.arraycopy(int1, 0, der, 4, int1.length); + + // Start ASN1 integer and write the second 32 bits + int offset = int1.length + 4; + der[offset] = DER_TAG_ASN1_INTEGER; + der[offset + 1] = (byte) int2.length; + System.arraycopy(int2, 0, der, offset + 2, int2.length); + + return der; + } +} diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 7e3990d40..aa21dbe2e 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -23,6 +23,7 @@ import com.google.api.client.util.StringUtils; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.math.BigInteger; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.KeyStoreException; @@ -349,30 +350,30 @@ public Header getHeader() { /** * Verifies the signature of the content. * - *

            Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. - * For any other algorithm it returns {@code false}. + *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may be added in the + * future. For any other algorithm it returns {@code false}. * * @param publicKey public key * @return whether the algorithm is recognized and it is verified * @throws GeneralSecurityException */ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurityException { - Signature signatureAlg = null; String algorithm = getHeader().getAlgorithm(); if ("RS256".equals(algorithm)) { - signatureAlg = SecurityUtils.getSha256WithRsaSignatureAlgorithm(); + return SecurityUtils.verify(SecurityUtils.getSha256WithRsaSignatureAlgorithm(), publicKey, signatureBytes, signedContentBytes); + } else if ("ES256".equals(algorithm)) { + return SecurityUtils.verify(SecurityUtils.getEs256SignatureAlgorithm(), publicKey, DerEncoder.encode(signatureBytes), signedContentBytes); } else { return false; } - return SecurityUtils.verify(signatureAlg, publicKey, signatureBytes, signedContentBytes); } /** * {@link Beta}
            * Verifies the signature of the content using the certificate chain embedded in the signature. * - *

            Currently only {@code "RS256"} algorithm is verified, but others may be added in the future. - * For any other algorithm it returns {@code null}. + *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may be added in the + * future. For any other algorithm it returns {@code null}. * *

            The leaf certificate of the certificate chain must be an SSL server certificate. * @@ -390,14 +391,13 @@ public final X509Certificate verifySignature(X509TrustManager trustManager) return null; } String algorithm = getHeader().getAlgorithm(); - Signature signatureAlg = null; if ("RS256".equals(algorithm)) { - signatureAlg = SecurityUtils.getSha256WithRsaSignatureAlgorithm(); + return SecurityUtils.verify(SecurityUtils.getSha256WithRsaSignatureAlgorithm(), trustManager, x509Certificates, signatureBytes, signedContentBytes); + } else if ("ES256".equals(algorithm)) { + return SecurityUtils.verify(SecurityUtils.getEs256SignatureAlgorithm(), trustManager, x509Certificates, DerEncoder.encode(signatureBytes), signedContentBytes); } else { return null; } - return SecurityUtils.verify( - signatureAlg, trustManager, x509Certificates, signatureBytes, signedContentBytes); } /** diff --git a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java index 59d3af24e..cf08e03ad 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java @@ -127,6 +127,11 @@ public static Signature getSha256WithRsaSignatureAlgorithm() throws NoSuchAlgori return Signature.getInstance("SHA256withRSA"); } + /** Returns the SHA-256 with ECDSA signature algorithm */ + public static Signature getEs256SignatureAlgorithm() throws NoSuchAlgorithmException { + return Signature.getInstance("SHA256withECDSA"); + } + /** * Signs content using a private key. * @@ -157,7 +162,7 @@ public static boolean verify( throws InvalidKeyException, SignatureException { signatureAlgorithm.initVerify(publicKey); signatureAlgorithm.update(contentBytes); - // SignatureException may be thrown if we are tring the wrong key. + // SignatureException may be thrown if we are trying the wrong key. try { return signatureAlgorithm.verify(signatureBytes); } catch (SignatureException e) { diff --git a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java index 8bff77f93..9a02c0750 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java @@ -19,14 +19,27 @@ import com.google.api.client.testing.util.SecurityTestUtils; import java.io.IOException; +import java.math.BigInteger; +import java.security.AlgorithmParameters; import java.security.GeneralSecurityException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.PublicKey; import java.security.cert.X509Certificate; import java.security.interfaces.RSAPrivateKey; +import java.security.spec.ECGenParameterSpec; +import java.security.spec.ECParameterSpec; +import java.security.spec.ECPoint; +import java.security.spec.ECPublicKeySpec; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.InvalidParameterSpecException; import java.util.ArrayList; import java.util.List; import javax.net.ssl.X509TrustManager; +import com.google.api.client.util.Base64; +import com.google.api.client.util.StringUtils; import org.junit.Assert; import org.junit.Test; @@ -114,4 +127,38 @@ public void testVerifyX509() throws Exception { public void testVerifyX509WrongCa() throws Exception { Assert.assertNull(verifyX509WithCaCert(TestCertificates.BOGUS_CA_CERT)); } + + private static final String ES256_CONTENT = "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im1wZjBEQSJ9.eyJhdWQiOiIvcHJvamVjdHMvNjUyNTYyNzc2Nzk4L2FwcHMvY2xvdWQtc2FtcGxlcy10ZXN0cy1waHAtaWFwIiwiZW1haWwiOiJjaGluZ29yQGdvb2dsZS5jb20iLCJleHAiOjE1ODQwNDc2MTcsImdvb2dsZSI6eyJhY2Nlc3NfbGV2ZWxzIjpbImFjY2Vzc1BvbGljaWVzLzUxODU1MTI4MDkyNC9hY2Nlc3NMZXZlbHMvcmVjZW50U2VjdXJlQ29ubmVjdERhdGEiLCJhY2Nlc3NQb2xpY2llcy81MTg1NTEyODA5MjQvYWNjZXNzTGV2ZWxzL3Rlc3ROb09wIiwiYWNjZXNzUG9saWNpZXMvNTE4NTUxMjgwOTI0L2FjY2Vzc0xldmVscy9ldmFwb3JhdGlvblFhRGF0YUZ1bGx5VHJ1c3RlZCJdfSwiaGQiOiJnb29nbGUuY29tIiwiaWF0IjoxNTg0MDQ3MDE3LCJpc3MiOiJodHRwczovL2Nsb3VkLmdvb2dsZS5jb20vaWFwIiwic3ViIjoiYWNjb3VudHMuZ29vZ2xlLmNvbToxMTIxODE3MTI3NzEyMDE5NzI4OTEifQ"; + private static final String ES256_SIGNATURE = "yKNtdFY5EKkRboYNexBdfugzLhC3VuGyFcuFYA8kgpxMqfyxa41zkML68hYKrWu2kOBTUW95UnbGpsIi_u1fiA"; + + // x, y values for keyId "mpf0DA" from https://www.gstatic.com/iap/verify/public_key-jwk + private static final String GOOGLE_ES256_X = "fHEdeT3a6KaC1kbwov73ZwB_SiUHEyKQwUUtMCEn0aI"; + private static final String GOOGLE_ES256_Y = "QWOjwPhInNuPlqjxLQyhveXpWqOFcQPhZ3t-koMNbZI"; + + private PublicKey buildEs256PublicKey(String x, String y) + throws NoSuchAlgorithmException, InvalidParameterSpecException, InvalidKeySpecException { + AlgorithmParameters parameters = AlgorithmParameters.getInstance("EC"); + parameters.init(new ECGenParameterSpec("secp256r1")); + ECPublicKeySpec ecPublicKeySpec = new ECPublicKeySpec( + new ECPoint( + new BigInteger(1, Base64.decodeBase64(x)), + new BigInteger(1, Base64.decodeBase64(y)) + ), + parameters.getParameterSpec(ECParameterSpec.class) + ); + KeyFactory keyFactory = KeyFactory.getInstance("EC"); + return keyFactory.generatePublic(ecPublicKeySpec); + } + + @Test + public void testVerifyES256() throws Exception { + PublicKey publicKey = buildEs256PublicKey(GOOGLE_ES256_X, GOOGLE_ES256_Y); + JsonWebSignature.Header header = new JsonWebSignature.Header(); + header.setAlgorithm("ES256"); + JsonWebSignature.Payload payload = new JsonWebToken.Payload(); + byte[] signatureBytes = Base64.decodeBase64(ES256_SIGNATURE); + byte[] signedContentBytes = StringUtils.getBytesUtf8(ES256_CONTENT); + JsonWebSignature jsonWebSignature = new JsonWebSignature(header, payload, signatureBytes, signedContentBytes); + Assert.assertTrue(jsonWebSignature.verifySignature(publicKey)); + } } From c42a666ffbee92afa715acdffb30c51c41c6d71d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 27 Apr 2020 16:52:05 +0200 Subject: [PATCH 284/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.11.0 (#1036) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 776e30c43..bc8c4fda8 100644 --- a/pom.xml +++ b/pom.xml @@ -558,7 +558,7 @@ UTF-8 3.0.2 2.8.6 - 2.10.3 + 2.11.0 3.11.4 29.0-android 1.1.4c From 075ca59323f610ba18a13d4c04c87671ec1bd22a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2020 16:32:04 +0000 Subject: [PATCH 285/983] chore: release 1.35.0 (#1038) :robot: I have created a release \*beep\* \*boop\* --- ## [1.35.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.2...v1.35.0) (2020-04-27) ### Features * add logic for verifying ES256 JsonWebSignatures ([#1033](https://www.github.com/googleapis/google-http-java-client/issues/1033)) ([bb4227f](https://www.github.com/googleapis/google-http-java-client/commit/bb4227f9daec44fc2976fa9947e2ff5ee07ed21a)) ### Bug Fixes * add linkage monitor plugin ([#1000](https://www.github.com/googleapis/google-http-java-client/issues/1000)) ([027c227](https://www.github.com/googleapis/google-http-java-client/commit/027c227e558164f77be204152fb47023850b543f)) * Correctly handling chunked response streams with gzip ([#990](https://www.github.com/googleapis/google-http-java-client/issues/990)) ([1ba2197](https://www.github.com/googleapis/google-http-java-client/commit/1ba219743e65c89bc3fdb196acc5d2042e01f542)), closes [#367](https://www.github.com/googleapis/google-http-java-client/issues/367) * FileDataStoreFactory will throw IOException for any permissions errors ([#1012](https://www.github.com/googleapis/google-http-java-client/issues/1012)) ([fd33073](https://www.github.com/googleapis/google-http-java-client/commit/fd33073da3674997897d7a9057d1d0e9d42d7cd4)) * include request method and URL into HttpResponseException message ([#1002](https://www.github.com/googleapis/google-http-java-client/issues/1002)) ([15111a1](https://www.github.com/googleapis/google-http-java-client/commit/15111a1001d6f72cb92cd2d76aaed6f1229bc14a)) * incorrect check for Windows OS in FileDataStoreFactory ([#927](https://www.github.com/googleapis/google-http-java-client/issues/927)) ([8b4eabe](https://www.github.com/googleapis/google-http-java-client/commit/8b4eabe985794fc64ad6a4a53f8f96201cf73fb8)) * reuse reference instead of calling getter twice ([#983](https://www.github.com/googleapis/google-http-java-client/issues/983)) ([1f66222](https://www.github.com/googleapis/google-http-java-client/commit/1f662224d7bee6e27e8d66975fda39feae0c9359)), closes [#982](https://www.github.com/googleapis/google-http-java-client/issues/982) * **android:** set minimum API level to 19 a.k.a. 4.4 Kit Kat ([#1016](https://www.github.com/googleapis/google-http-java-client/issues/1016)) ([b9a8023](https://www.github.com/googleapis/google-http-java-client/commit/b9a80232c9c8b16a3c3277458835f72e346f6b2c)), closes [#1015](https://www.github.com/googleapis/google-http-java-client/issues/1015) ### Documentation * android 4.4 or later is required ([#1008](https://www.github.com/googleapis/google-http-java-client/issues/1008)) ([bcc41dd](https://www.github.com/googleapis/google-http-java-client/commit/bcc41dd615af41ae6fb58287931cbf9c2144a075)) * libraries-bom 4.0.1 ([#976](https://www.github.com/googleapis/google-http-java-client/issues/976)) ([fc21dc4](https://www.github.com/googleapis/google-http-java-client/commit/fc21dc412566ef60d23f1f82db5caf3cfd5d447b)) * libraries-bom 4.1.1 ([#984](https://www.github.com/googleapis/google-http-java-client/issues/984)) ([635c813](https://www.github.com/googleapis/google-http-java-client/commit/635c81352ae383b3abfe6d7c141d987a6944b3e9)) * libraries-bom 5.2.0 ([#1032](https://www.github.com/googleapis/google-http-java-client/issues/1032)) ([ca34202](https://www.github.com/googleapis/google-http-java-client/commit/ca34202bfa077adb70313b6c4562c7a5d904e064)) * require Android 4.4 ([#1007](https://www.github.com/googleapis/google-http-java-client/issues/1007)) ([f9d2bb0](https://www.github.com/googleapis/google-http-java-client/commit/f9d2bb030398fe09e3c47b84ea468603355e08e9)) ### Dependencies * httpclient 4.5.12 ([#991](https://www.github.com/googleapis/google-http-java-client/issues/991)) ([79bc1c7](https://www.github.com/googleapis/google-http-java-client/commit/79bc1c76ebd48d396a080ef715b9f07cd056b7ef)) * update to Guava 29 ([#1024](https://www.github.com/googleapis/google-http-java-client/issues/1024)) ([ca9520f](https://www.github.com/googleapis/google-http-java-client/commit/ca9520f2da4babc5bbd28c828da1deb7dbdc87e5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 33 +++++++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 ++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 ++++++++-------- 17 files changed, 86 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90bfb1e0b..f7ea60f05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # Changelog +## [1.35.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.2...v1.35.0) (2020-04-27) + + +### Features + +* add logic for verifying ES256 JsonWebSignatures ([#1033](https://www.github.com/googleapis/google-http-java-client/issues/1033)) ([bb4227f](https://www.github.com/googleapis/google-http-java-client/commit/bb4227f9daec44fc2976fa9947e2ff5ee07ed21a)) + + +### Bug Fixes + +* add linkage monitor plugin ([#1000](https://www.github.com/googleapis/google-http-java-client/issues/1000)) ([027c227](https://www.github.com/googleapis/google-http-java-client/commit/027c227e558164f77be204152fb47023850b543f)) +* Correctly handling chunked response streams with gzip ([#990](https://www.github.com/googleapis/google-http-java-client/issues/990)) ([1ba2197](https://www.github.com/googleapis/google-http-java-client/commit/1ba219743e65c89bc3fdb196acc5d2042e01f542)), closes [#367](https://www.github.com/googleapis/google-http-java-client/issues/367) +* FileDataStoreFactory will throw IOException for any permissions errors ([#1012](https://www.github.com/googleapis/google-http-java-client/issues/1012)) ([fd33073](https://www.github.com/googleapis/google-http-java-client/commit/fd33073da3674997897d7a9057d1d0e9d42d7cd4)) +* include request method and URL into HttpResponseException message ([#1002](https://www.github.com/googleapis/google-http-java-client/issues/1002)) ([15111a1](https://www.github.com/googleapis/google-http-java-client/commit/15111a1001d6f72cb92cd2d76aaed6f1229bc14a)) +* incorrect check for Windows OS in FileDataStoreFactory ([#927](https://www.github.com/googleapis/google-http-java-client/issues/927)) ([8b4eabe](https://www.github.com/googleapis/google-http-java-client/commit/8b4eabe985794fc64ad6a4a53f8f96201cf73fb8)) +* reuse reference instead of calling getter twice ([#983](https://www.github.com/googleapis/google-http-java-client/issues/983)) ([1f66222](https://www.github.com/googleapis/google-http-java-client/commit/1f662224d7bee6e27e8d66975fda39feae0c9359)), closes [#982](https://www.github.com/googleapis/google-http-java-client/issues/982) +* **android:** set minimum API level to 19 a.k.a. 4.4 Kit Kat ([#1016](https://www.github.com/googleapis/google-http-java-client/issues/1016)) ([b9a8023](https://www.github.com/googleapis/google-http-java-client/commit/b9a80232c9c8b16a3c3277458835f72e346f6b2c)), closes [#1015](https://www.github.com/googleapis/google-http-java-client/issues/1015) + + +### Documentation + +* android 4.4 or later is required ([#1008](https://www.github.com/googleapis/google-http-java-client/issues/1008)) ([bcc41dd](https://www.github.com/googleapis/google-http-java-client/commit/bcc41dd615af41ae6fb58287931cbf9c2144a075)) +* libraries-bom 4.0.1 ([#976](https://www.github.com/googleapis/google-http-java-client/issues/976)) ([fc21dc4](https://www.github.com/googleapis/google-http-java-client/commit/fc21dc412566ef60d23f1f82db5caf3cfd5d447b)) +* libraries-bom 4.1.1 ([#984](https://www.github.com/googleapis/google-http-java-client/issues/984)) ([635c813](https://www.github.com/googleapis/google-http-java-client/commit/635c81352ae383b3abfe6d7c141d987a6944b3e9)) +* libraries-bom 5.2.0 ([#1032](https://www.github.com/googleapis/google-http-java-client/issues/1032)) ([ca34202](https://www.github.com/googleapis/google-http-java-client/commit/ca34202bfa077adb70313b6c4562c7a5d904e064)) +* require Android 4.4 ([#1007](https://www.github.com/googleapis/google-http-java-client/issues/1007)) ([f9d2bb0](https://www.github.com/googleapis/google-http-java-client/commit/f9d2bb030398fe09e3c47b84ea468603355e08e9)) + + +### Dependencies + +* httpclient 4.5.12 ([#991](https://www.github.com/googleapis/google-http-java-client/issues/991)) ([79bc1c7](https://www.github.com/googleapis/google-http-java-client/commit/79bc1c76ebd48d396a080ef715b9f07cd056b7ef)) +* update to Guava 29 ([#1024](https://www.github.com/googleapis/google-http-java-client/issues/1024)) ([ca9520f](https://www.github.com/googleapis/google-http-java-client/commit/ca9520f2da4babc5bbd28c828da1deb7dbdc87e5)) + ### [1.34.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.1...v1.34.2) (2020-02-12) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 1a7c83553..1946c910f 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.34.3-SNAPSHOT + 1.35.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.34.3-SNAPSHOT + 1.35.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.34.3-SNAPSHOT + 1.35.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index a36d4f0c2..391cf0a22 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-android - 1.34.3-SNAPSHOT + 1.35.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 53be79ecd..59c6930be 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-apache-v2 - 1.34.3-SNAPSHOT + 1.35.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 048cf4bdc..7b3e610a6 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-appengine - 1.34.3-SNAPSHOT + 1.35.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index bcf1716c4..0cbdbff0c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.34.3-SNAPSHOT + 1.35.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0401a3532..503118432 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.34.3-SNAPSHOT + 1.35.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-android - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-apache-v2 - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-appengine - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-findbugs - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-gson - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-jackson2 - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-protobuf - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-test - 1.34.3-SNAPSHOT + 1.35.0 com.google.http-client google-http-client-xml - 1.34.3-SNAPSHOT + 1.35.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9a38fc319..5a7bdf120 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-findbugs - 1.34.3-SNAPSHOT + 1.35.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 3ec6f17ab..07abaf4f0 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-gson - 1.34.3-SNAPSHOT + 1.35.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a5ef44287..c33bc2edb 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-jackson2 - 1.34.3-SNAPSHOT + 1.35.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 84e737bc6..96d74fda3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-protobuf - 1.34.3-SNAPSHOT + 1.35.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 1c745a942..739364a99 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-test - 1.34.3-SNAPSHOT + 1.35.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 94edbad8d..aa8ce7c08 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client-xml - 1.34.3-SNAPSHOT + 1.35.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index dc15cc548..dda3669b7 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../pom.xml google-http-client - 1.34.3-SNAPSHOT + 1.35.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index bc8c4fda8..cea300fb9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -553,7 +553,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.34.3-SNAPSHOT + 1.35.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8835f485c..78e316f4a 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.34.3-SNAPSHOT + 1.35.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ab3e1feae..b58945bd6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.34.2:1.34.3-SNAPSHOT -google-http-client-bom:1.34.2:1.34.3-SNAPSHOT -google-http-client-parent:1.34.2:1.34.3-SNAPSHOT -google-http-client-android:1.34.2:1.34.3-SNAPSHOT -google-http-client-android-test:1.34.2:1.34.3-SNAPSHOT -google-http-client-apache-v2:1.34.2:1.34.3-SNAPSHOT -google-http-client-appengine:1.34.2:1.34.3-SNAPSHOT -google-http-client-assembly:1.34.2:1.34.3-SNAPSHOT -google-http-client-findbugs:1.34.2:1.34.3-SNAPSHOT -google-http-client-gson:1.34.2:1.34.3-SNAPSHOT -google-http-client-jackson2:1.34.2:1.34.3-SNAPSHOT -google-http-client-protobuf:1.34.2:1.34.3-SNAPSHOT -google-http-client-test:1.34.2:1.34.3-SNAPSHOT -google-http-client-xml:1.34.2:1.34.3-SNAPSHOT +google-http-client:1.35.0:1.35.0 +google-http-client-bom:1.35.0:1.35.0 +google-http-client-parent:1.35.0:1.35.0 +google-http-client-android:1.35.0:1.35.0 +google-http-client-android-test:1.35.0:1.35.0 +google-http-client-apache-v2:1.35.0:1.35.0 +google-http-client-appengine:1.35.0:1.35.0 +google-http-client-assembly:1.35.0:1.35.0 +google-http-client-findbugs:1.35.0:1.35.0 +google-http-client-gson:1.35.0:1.35.0 +google-http-client-jackson2:1.35.0:1.35.0 +google-http-client-protobuf:1.35.0:1.35.0 +google-http-client-test:1.35.0:1.35.0 +google-http-client-xml:1.35.0:1.35.0 From 1624d55f9864ff1253321e9bfe715e2f370cc27e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 27 Apr 2020 12:24:57 -0700 Subject: [PATCH 286/983] chore: update common templates (#1035) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * ci: add dependency list completeness check (#490) Source-Author: Stephanie Wang Source-Date: Mon Apr 13 18:30:27 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 3df869dd6eb546ef13beeb7a9efa6ee0226afafd Source-Link: https://github.com/googleapis/synthtool/commit/3df869dd6eb546ef13beeb7a9efa6ee0226afafd * build(java): set GOOGLE_CLOUD_PROJECT env for samples/integration tests (#484) * build(java): set GOOGLE_CLOUD_PROJECT env variable for samples/integration tests * ci: use java-docs-samples-testing for sample tests Source-Author: Jeff Ching Source-Date: Mon Apr 13 16:24:21 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 52638600f387deb98efb5f9c85fec39e82aa9052 Source-Link: https://github.com/googleapis/synthtool/commit/52638600f387deb98efb5f9c85fec39e82aa9052 --- .kokoro/common.sh | 5 +++ .kokoro/dependencies.sh | 48 +++++++++++++++++++++++++++++ .kokoro/nightly/integration.cfg | 11 +++++-- .kokoro/nightly/samples.cfg | 8 ++++- .kokoro/presubmit/integration.cfg | 14 ++++++--- .kokoro/presubmit/samples.cfg | 14 ++++++--- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- synth.metadata | 5 ++- 11 files changed, 94 insertions(+), 19 deletions(-) diff --git a/.kokoro/common.sh b/.kokoro/common.sh index 8f09de5d3..a8d0ea04d 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -52,3 +52,8 @@ function retry_with_backoff { return $exit_code } + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 0aade871c..cf3bb4347 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -36,3 +36,51 @@ retry_with_backoff 3 10 \ -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt + + # Output dep list generated using the flattened pom (test scope deps are ommitted) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in $(find -name ".flattened-pom.xml") +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index ca0274800..40c4abb7b 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -10,20 +10,25 @@ env_vars: { key: "JOB_TYPE" value: "integration" } - +# TODO: remove this after we've migrated all tests and scripts env_vars: { key: "GCLOUD_PROJECT" value: "gcloud-devel" } +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + env_vars: { key: "ENABLE_BUILD_COP" value: "true" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" } before_action { diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index b4b051cd0..20aabd55d 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -11,9 +11,15 @@ env_vars: { value: "samples" } +# TODO: remove this after we've migrated all tests and scripts env_vars: { key: "GCLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" } env_vars: { diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index 141f90c13..522e5b101 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -11,14 +11,20 @@ env_vars: { value: "integration" } +# TODO: remove this after we've migrated all tests and scripts env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "gcloud-devel" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" } before_action { diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg index fa7b493d0..1171aead0 100644 --- a/.kokoro/presubmit/samples.cfg +++ b/.kokoro/presubmit/samples.cfg @@ -11,14 +11,20 @@ env_vars: { value: "samples" } +# TODO: remove this after we've migrated all tests and scripts env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" } env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" } before_action { diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 89688c724..6d5f2e904 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.12 diff --git a/samples/pom.xml b/samples/pom.xml index 22ebf1618..a46c32cad 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.15 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index fa6b36800..4d9f60c98 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.12 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index cb7949972..33a9fe006 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.17 + 1.0.12 diff --git a/synth.metadata b/synth.metadata index 972287a13..45fdd9b8f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "1f6328755fe32cacc7cfcf253493b652bb007186" + "sha": "bb4227f9daec44fc2976fa9947e2ff5ee07ed21a" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25", - "log": "c7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" + "sha": "52638600f387deb98efb5f9c85fec39e82aa9052" } } ] From eee50804539b72b1c7f9d2cccde7a9a97b6a06a6 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 29 May 2020 13:50:06 -0400 Subject: [PATCH 287/983] chore: update libraries-bom to 5.5.0 (#1048) @chingor13 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 2f3dc9258..6d08e9bd6 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 5.2.0 + 5.5.0 pom import From 78a63b98cb9646e1904d85a9fd3a9ab0d033089e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 29 May 2020 17:56:12 +0000 Subject: [PATCH 288/983] chore: release 1.35.1-SNAPSHOT (#1039) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 1946c910f..0bbaadcff 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.35.0 + 1.35.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.35.0 + 1.35.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.35.0 + 1.35.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 391cf0a22..4edeeb3ac 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-android - 1.35.0 + 1.35.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 59c6930be..85f0d6ee3 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.35.0 + 1.35.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 7b3e610a6..3df3f234a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.35.0 + 1.35.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 0cbdbff0c..129acfefd 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.35.0 + 1.35.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 503118432..521050982 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.35.0 + 1.35.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-android - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-test - 1.35.0 + 1.35.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.35.0 + 1.35.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5a7bdf120..188512163 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.35.0 + 1.35.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 07abaf4f0..7631b01b7 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.35.0 + 1.35.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c33bc2edb..7b7e7b372 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.35.0 + 1.35.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 96d74fda3..fd3370f8e 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.35.0 + 1.35.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 739364a99..5bc5d32f7 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-test - 1.35.0 + 1.35.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index aa8ce7c08..480a18680 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.35.0 + 1.35.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index dda3669b7..eee0716d9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../pom.xml google-http-client - 1.35.0 + 1.35.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index cea300fb9..164cc236a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -553,7 +553,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.35.0 + 1.35.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 78e316f4a..b8458eb5c 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.35.0 + 1.35.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b58945bd6..d23765fd0 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.35.0:1.35.0 -google-http-client-bom:1.35.0:1.35.0 -google-http-client-parent:1.35.0:1.35.0 -google-http-client-android:1.35.0:1.35.0 -google-http-client-android-test:1.35.0:1.35.0 -google-http-client-apache-v2:1.35.0:1.35.0 -google-http-client-appengine:1.35.0:1.35.0 -google-http-client-assembly:1.35.0:1.35.0 -google-http-client-findbugs:1.35.0:1.35.0 -google-http-client-gson:1.35.0:1.35.0 -google-http-client-jackson2:1.35.0:1.35.0 -google-http-client-protobuf:1.35.0:1.35.0 -google-http-client-test:1.35.0:1.35.0 -google-http-client-xml:1.35.0:1.35.0 +google-http-client:1.35.0:1.35.1-SNAPSHOT +google-http-client-bom:1.35.0:1.35.1-SNAPSHOT +google-http-client-parent:1.35.0:1.35.1-SNAPSHOT +google-http-client-android:1.35.0:1.35.1-SNAPSHOT +google-http-client-android-test:1.35.0:1.35.1-SNAPSHOT +google-http-client-apache-v2:1.35.0:1.35.1-SNAPSHOT +google-http-client-appengine:1.35.0:1.35.1-SNAPSHOT +google-http-client-assembly:1.35.0:1.35.1-SNAPSHOT +google-http-client-findbugs:1.35.0:1.35.1-SNAPSHOT +google-http-client-gson:1.35.0:1.35.1-SNAPSHOT +google-http-client-jackson2:1.35.0:1.35.1-SNAPSHOT +google-http-client-protobuf:1.35.0:1.35.1-SNAPSHOT +google-http-client-test:1.35.0:1.35.1-SNAPSHOT +google-http-client-xml:1.35.0:1.35.1-SNAPSHOT From 2fd2f2b424486fba4384b996de0c0fc6948455da Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 May 2020 21:58:48 +0200 Subject: [PATCH 289/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.12.2 (#1045) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 164cc236a..443ccb9bb 100644 --- a/pom.xml +++ b/pom.xml @@ -559,7 +559,7 @@ 3.0.2 2.8.6 2.11.0 - 3.11.4 + 3.12.2 29.0-android 1.1.4c 1.2 From 0a73a4628b6ec4420db6b9cdbcc68899f3807c5b Mon Sep 17 00:00:00 2001 From: Mike DaCosta Date: Fri, 19 Jun 2020 10:29:31 -0700 Subject: [PATCH 290/983] fix: restore the thread's interrupted status after catching InterruptedException (#1005) (#1006) * fix: reset the thread's interrupt bit after catching InterruptedException (#1005) * - Updated code comment to: Mark thread as interrupted since we cannot throw InterruptedException here. - Also setting thread interrupted in HttpBackOffUnsuccessfulResponseHandler. - Added tests for both HttpBackOffIOExceptionHandler and HttpBackOffUnsuccessfulResponseHandler. * Fix bad merge * formatted files with "mvn clean com.coveo:fmt-maven-plugin:format" Co-authored-by: Mike DaCosta --- .../http/apache/v2/ApacheHttpTransport.java | 94 +++++++++---------- .../client/http/apache/v2/ContentEntity.java | 4 +- .../client/http/apache/v2/package-info.java | 2 - .../apache/v2/ApacheHttpTransportTest.java | 56 ++++++----- .../api/client/findbugs/package-info.java | 34 ++++--- .../api/client/json/gson/GsonParserTest.java | 15 ++- .../client/json/jackson2/JacksonFactory.java | 4 +- .../json/jackson2/JacksonParserTest.java | 15 ++- .../test/json/AbstractJsonParserTest.java | 15 ++- .../java/com/google/api/client/xml/Xml.java | 8 +- .../http/HttpBackOffIOExceptionHandler.java | 2 + ...ttpBackOffUnsuccessfulResponseHandler.java | 3 +- .../client/http/HttpIOExceptionHandler.java | 1 + .../google/api/client/http/HttpRequest.java | 3 +- .../google/api/client/http/HttpResponse.java | 10 +- .../api/client/http/MultipartContent.java | 6 +- .../google/api/client/http/UriTemplate.java | 8 +- .../api/client/http/UrlEncodedParser.java | 23 +++-- .../http/apache/ApacheHttpTransport.java | 4 +- .../google/api/client/json/JsonString.java | 4 +- .../api/client/json/webtoken/DerEncoder.java | 6 +- .../json/webtoken/JsonWebSignature.java | 47 ++++++---- .../client/json/webtoken/JsonWebToken.java | 8 +- .../com/google/api/client/util/PemReader.java | 4 +- .../api/client/util/escape/CharEscapers.java | 59 ++++++------ .../client/util/escape/PercentEscaper.java | 46 +++++---- .../util/store/FileDataStoreFactory.java | 54 +++++------ .../client/http/ConsumingInputStreamTest.java | 3 +- .../HttpBackOffIOExpcetionHandlerTest.java | 33 +++++++ ...ackOffUnsuccessfulResponseHandlerTest.java | 34 +++++++ .../api/client/http/HttpRequestTest.java | 3 +- .../client/http/HttpRequestTracingTest.java | 80 +++++++++------- .../api/client/http/HttpResponseTest.java | 22 +++-- .../api/client/http/MultipartContentTest.java | 80 +++++++++------- .../api/client/http/OpenCensusUtilsTest.java | 1 - .../json/webtoken/JsonWebSignatureTest.java | 39 ++++---- .../google/api/client/util/DateTimeTest.java | 8 +- .../api/client/util/GenericDataTest.java | 5 +- .../google/api/client/util/IOUtilsTest.java | 1 - .../util/escape/PercentEscaperTest.java | 5 +- 40 files changed, 465 insertions(+), 384 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 864dd072f..02fb98a35 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -38,19 +38,15 @@ /** * Thread-safe HTTP transport based on the Apache HTTP Client library. * - *

            - * Implementation is thread-safe, as long as any parameter modification to the - * {@link #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum - * efficiency, applications should use a single globally-shared instance of the HTTP transport. - *

            + *

            Implementation is thread-safe, as long as any parameter modification to the {@link + * #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum efficiency, + * applications should use a single globally-shared instance of the HTTP transport. * - *

            - * Default settings are specified in {@link #newDefaultHttpClient()}. Use the - * {@link #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. - * Please read the Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link + * #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. Please + * read the Apache HTTP * Client connection management tutorial for more complex configuration options. - *

            * * @since 1.30 * @author Yaniv Inbar @@ -72,20 +68,18 @@ public ApacheHttpTransport() { /** * Constructor that allows an alternative Apache HTTP client to be used. * - *

            - * Note that in the previous version, we overrode several settings. However, we are no longer able - * to do so. - *

            + *

            Note that in the previous version, we overrode several settings. However, we are no longer + * able to do so. + * + *

            If you choose to provide your own Apache HttpClient implementation, be sure that * - *

            If you choose to provide your own Apache HttpClient implementation, be sure that

            *
              - *
            • HTTP version is set to 1.1.
            • - *
            • Redirects are disabled (google-http-client handles redirects).
            • - *
            • Retries are disabled (google-http-client handles retries).
            • + *
            • HTTP version is set to 1.1. + *
            • Redirects are disabled (google-http-client handles redirects). + *
            • Retries are disabled (google-http-client handles retries). *
            * * @param httpClient Apache HTTP client to use - * * @since 1.30 */ public ApacheHttpTransport(HttpClient httpClient) { @@ -93,20 +87,19 @@ public ApacheHttpTransport(HttpClient httpClient) { } /** - * Creates a new instance of the Apache HTTP client that is used by the - * {@link #ApacheHttpTransport()} constructor. + * Creates a new instance of the Apache HTTP client that is used by the {@link + * #ApacheHttpTransport()} constructor. + * + *

            Settings: * - *

            - * Settings: - *

            *
              - *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
            • - *
            • - *
            • The route planner uses {@link SystemDefaultRoutePlanner} with - * {@link ProxySelector#getDefault()}, which uses the proxy settings from system - * properties.
            • + *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}. + *
            • The route planner uses {@link SystemDefaultRoutePlanner} with {@link + * ProxySelector#getDefault()}, which uses the proxy settings from system + * properties. *
            * * @return new instance of the Apache HTTP client @@ -117,20 +110,19 @@ public static HttpClient newDefaultHttpClient() { } /** - * Creates a new Apache HTTP client builder that is used by the - * {@link #ApacheHttpTransport()} constructor. + * Creates a new Apache HTTP client builder that is used by the {@link #ApacheHttpTransport()} + * constructor. + * + *

            Settings: * - *

            - * Settings: - *

            *
              - *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}.
            • - *
            • - *
            • The route planner uses {@link SystemDefaultRoutePlanner} with - * {@link ProxySelector#getDefault()}, which uses the proxy settings from system - * properties.
            • + *
            • The client connection manager is set to {@link PoolingHttpClientConnectionManager}. + *
            • The route planner uses {@link SystemDefaultRoutePlanner} with {@link + * ProxySelector#getDefault()}, which uses the proxy settings from system + * properties. *
            * * @return new instance of the Apache HTTP client @@ -139,14 +131,14 @@ public static HttpClient newDefaultHttpClient() { public static HttpClientBuilder newDefaultHttpClientBuilder() { return HttpClientBuilder.create() - .useSystemProperties() - .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) - .setMaxConnTotal(200) - .setMaxConnPerRoute(20) - .setConnectionTimeToLive(-1, TimeUnit.MILLISECONDS) - .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) - .disableRedirectHandling() - .disableAutomaticRetries(); + .useSystemProperties() + .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) + .setMaxConnTotal(200) + .setMaxConnPerRoute(20) + .setConnectionTimeToLive(-1, TimeUnit.MILLISECONDS) + .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) + .disableRedirectHandling() + .disableAutomaticRetries(); } @Override diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java index 8fc11e6d8..451b67f2c 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ContentEntity.java @@ -21,9 +21,7 @@ import java.io.OutputStream; import org.apache.http.entity.AbstractHttpEntity; -/** - * @author Yaniv Inbar - */ +/** @author Yaniv Inbar */ final class ContentEntity extends AbstractHttpEntity { /** Content length or less than zero if not known. */ diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java index 1909a2f75..7ca1708ad 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/package-info.java @@ -18,6 +18,4 @@ * @since 1.30 * @author Yaniv Inbar */ - package com.google.api.client.http.apache.v2; - diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index e9b93e9be..880e7fdb6 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -125,7 +125,8 @@ private void subtestUnsupportedRequestsWithContent(ApacheHttpRequest request, St fail("expected " + IllegalStateException.class); } catch (IllegalStateException e) { // expected - assertEquals(e.getMessage(), + assertEquals( + e.getMessage(), "Apache HTTP client does not support " + method + " requests with content."); } } @@ -141,16 +142,18 @@ private void execute(ApacheHttpRequest request) throws IOException { @Test public void testRequestShouldNotFollowRedirects() throws IOException { final AtomicInteger requestsAttempted = new AtomicInteger(0); - HttpRequestExecutor requestExecutor = new HttpRequestExecutor() { - @Override - public HttpResponse execute(HttpRequest request, HttpClientConnection connection, - HttpContext context) throws IOException, HttpException { - HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 302, null); - response.addHeader("location", "https://google.com/path"); - requestsAttempted.incrementAndGet(); - return response; - } - }; + HttpRequestExecutor requestExecutor = + new HttpRequestExecutor() { + @Override + public HttpResponse execute( + HttpRequest request, HttpClientConnection connection, HttpContext context) + throws IOException, HttpException { + HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 302, null); + response.addHeader("location", "https://google.com/path"); + requestsAttempted.incrementAndGet(); + return response; + } + }; HttpClient client = HttpClients.custom().setRequestExecutor(requestExecutor).build(); ApacheHttpTransport transport = new ApacheHttpTransport(client); ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); @@ -162,17 +165,21 @@ public HttpResponse execute(HttpRequest request, HttpClientConnection connection @Test public void testRequestCanSetHeaders() { final AtomicBoolean interceptorCalled = new AtomicBoolean(false); - HttpClient client = HttpClients.custom().addInterceptorFirst(new HttpRequestInterceptor() { - @Override - public void process(HttpRequest request, HttpContext context) - throws HttpException, IOException { - Header header = request.getFirstHeader("foo"); - assertNotNull("Should have found header", header); - assertEquals("bar", header.getValue()); - interceptorCalled.set(true); - throw new IOException("cancelling request"); - } - }).build(); + HttpClient client = + HttpClients.custom() + .addInterceptorFirst( + new HttpRequestInterceptor() { + @Override + public void process(HttpRequest request, HttpContext context) + throws HttpException, IOException { + Header header = request.getFirstHeader("foo"); + assertNotNull("Should have found header", header); + assertEquals("bar", header.getValue()); + interceptorCalled.set(true); + throw new IOException("cancelling request"); + } + }) + .build(); ApacheHttpTransport transport = new ApacheHttpTransport(client); ApacheHttpRequest request = transport.buildRequest("GET", "https://google.com"); @@ -224,10 +231,7 @@ public void handle(HttpExchange httpExchange) throws IOException { GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); testUrl.setPort(server.getAddress().getPort()); com.google.api.client.http.HttpResponse response = - transport - .createRequestFactory() - .buildGetRequest(testUrl) - .execute(); + transport.createRequestFactory().buildGetRequest(testUrl).execute(); assertEquals(200, response.getStatusCode()); assertEquals("/foo//bar", response.parseAsString()); } diff --git a/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java b/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java index c22541fb6..83168807c 100644 --- a/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java +++ b/google-http-client-findbugs/src/main/java/com/google/api/client/findbugs/package-info.java @@ -15,28 +15,26 @@ /** * Findbugs package which supports custom Google APIs Client library findbugs Plugins. * - * Usage on pom.xml: + *

            Usage on pom.xml: * *

            -  <plugin>
            -    <groupId>org.codehaus.mojo</groupId>
            -    <artifactId>findbugs-maven-plugin</artifactId>
            -    ...
            -    <configuration>
            -      <plugins>
            -        <plugin>
            -          <groupId>com.google.http-client</groupId>
            -          <artifactId>google-http-client-findbugs</artifactId>
            -          <version>${project.http.version}</version>
            -        </plugin>
            -       </plugins>
            -    </configuration>
            -    ...
            -  </plugin>
            + * <plugin>
            + * <groupId>org.codehaus.mojo</groupId>
            + * <artifactId>findbugs-maven-plugin</artifactId>
            + * ...
            + * <configuration>
            + * <plugins>
            + * <plugin>
            + * <groupId>com.google.http-client</groupId>
            + * <artifactId>google-http-client-findbugs</artifactId>
            + * <version>${project.http.version}</version>
            + * </plugin>
            + * </plugins>
            + * </configuration>
            + * ...
            + * </plugin>
              * 
            * * @author Eyal Peled */ - package com.google.api.client.findbugs; - diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java index f79d4a5d6..aa5ed5aea 100644 --- a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonParserTest.java @@ -1,19 +1,16 @@ /** * 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 + *

            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 * - * https://www.apache.org/licenses/LICENSE-2.0 + *

            https://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 + *

            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.json.gson; import com.google.api.client.json.JsonFactory; diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java index 8028d63c6..dba08c363 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java @@ -29,8 +29,8 @@ /** * Low-level JSON library implementation based on Jackson 2. * - *

            Implementation is thread-safe. For maximum efficiency, - * applications should use a single globally-shared instance of the JSON factory. + *

            Implementation is thread-safe. For maximum efficiency, applications should use a single + * globally-shared instance of the JSON factory. * * @since 1.11 * @author Yaniv Inbar diff --git a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java index 92da03605..ed185c7ab 100644 --- a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java +++ b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonParserTest.java @@ -1,19 +1,16 @@ /** * 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 + *

            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 * - * https://www.apache.org/licenses/LICENSE-2.0 + *

            https://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 + *

            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.json.jackson2; import com.google.api.client.json.JsonFactory; diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java index ef641e868..2a68c639c 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java @@ -1,19 +1,16 @@ /** * 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 + *

            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 * - * https://www.apache.org/licenses/LICENSE-2.0 + *

            https://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 + *

            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.test.json; import com.google.api.client.json.GenericJson; diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java index 4f9156d3c..1aa5a343b 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java @@ -195,10 +195,10 @@ public boolean stopAfterEndTag(String namespace, String localName) { /** * Parses an XML element using the given XML pull parser into the given destination object. * - *

            Requires the current event be {@link XmlPullParser#START_TAG} (skipping any initial - * {@link XmlPullParser#START_DOCUMENT}) of the element being parsed. At normal parsing - * completion, the current event will either be {@link XmlPullParser#END_TAG} of the element being - * parsed, or the {@link XmlPullParser#START_TAG} of the requested {@code atom:entry}. + *

            Requires the current event be {@link XmlPullParser#START_TAG} (skipping any initial {@link + * XmlPullParser#START_DOCUMENT}) of the element being parsed. At normal parsing completion, the + * current event will either be {@link XmlPullParser#END_TAG} of the element being parsed, or the + * {@link XmlPullParser#START_TAG} of the requested {@code atom:entry}. * * @param parser XML pull parser * @param destination optional destination object to parser into or {@code null} to ignore XML diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java index 253cc613e..a0874841f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffIOExceptionHandler.java @@ -97,6 +97,8 @@ public boolean handleIOException(HttpRequest request, boolean supportsRetry) thr try { return BackOffUtils.next(sleeper, backOff); } catch (InterruptedException exception) { + // Mark thread as interrupted since we cannot throw InterruptedException here. + Thread.currentThread().interrupt(); return false; } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java index 5e1ae2cc6..cc44c6136 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandler.java @@ -128,7 +128,8 @@ public boolean handleResponse(HttpRequest request, HttpResponse response, boolea try { return BackOffUtils.next(sleeper, backOff); } catch (InterruptedException exception) { - // ignore + // Mark thread as interrupted since we cannot throw InterruptedException here. + Thread.currentThread().interrupt(); } } return false; diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java b/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java index f37cfef5e..0b0b877d0 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpIOExceptionHandler.java @@ -35,6 +35,7 @@ * try { * return BackOffUtils.next(sleeper, backOff); * } catch (InterruptedException exception) { + * Thread.currentThread().interrupt(); * return false; * } * } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 9124e4906..a521c5397 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1223,7 +1223,8 @@ private static String getVersion() { // attempt to read the library's version from a properties file generated during the build // this value should be read and cached for later use String version = "unknown-version"; - try (InputStream inputStream = HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { + try (InputStream inputStream = + HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { if (inputStream != null) { final Properties properties = new Properties(); properties.load(inputStream); diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 276ce0e74..2df92d4c4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -159,8 +159,8 @@ public final class HttpResponse { } /** - * Returns an {@link HttpMediaType} object parsed from {@link #contentType}, or {@code null} if - * if {@link #contentType} cannot be parsed or {@link #contentType} is {@code null}. + * Returns an {@link HttpMediaType} object parsed from {@link #contentType}, or {@code null} if if + * {@link #contentType} cannot be parsed or {@link #contentType} is {@code null}. */ private static HttpMediaType parseMediaType(String contentType) { if (contentType == null) { @@ -352,12 +352,14 @@ public InputStream getContent() throws IOException { // gzip encoding (wrap content with GZipInputStream) if (!returnRawInputStream && this.contentEncoding != null) { String oontentencoding = this.contentEncoding.trim().toLowerCase(Locale.ENGLISH); - if (CONTENT_ENCODING_GZIP.equals(oontentencoding) || CONTENT_ENCODING_XGZIP.equals(oontentencoding)) { + if (CONTENT_ENCODING_GZIP.equals(oontentencoding) + || CONTENT_ENCODING_XGZIP.equals(oontentencoding)) { // Wrap the original stream in a ConsumingInputStream before passing it to // GZIPInputStream. The GZIPInputStream leaves content unconsumed in the original // stream (it almost always leaves the last chunk unconsumed in chunked responses). // ConsumingInputStream ensures that any unconsumed bytes are read at close. - // GZIPInputStream.close() --> ConsumingInputStream.close() --> exhaust(ConsumingInputStream) + // GZIPInputStream.close() --> ConsumingInputStream.close() --> + // exhaust(ConsumingInputStream) lowLevelResponseContent = new GZIPInputStream(new ConsumingInputStream(lowLevelResponseContent)); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java index 43a58b446..35a59cf6f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/MultipartContent.java @@ -32,9 +32,9 @@ * and RFC 2046: Multipurpose Internet * Mail Extensions: The Multipart/mixed (primary) subtype. * - *

            By default the media type is {@code "multipart/related; boundary=__END_OF_PART____"}, but this - * may be customized by calling {@link #setMediaType(HttpMediaType)}, {@link #getMediaType()}, or - * {@link #setBoundary(String)}. + *

            By default the media type is {@code "multipart/related; boundary=__END_OF_PART____"}, but this may be customized by calling {@link #setMediaType(HttpMediaType)}, {@link + * #getMediaType()}, or {@link #setBoundary(String)}. * *

            Implementation is not thread-safe. * diff --git a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java index 61071db68..6a1e2e23c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java @@ -104,8 +104,8 @@ private enum CompositeOutput { * @param explodeJoiner the delimiter used to join composite values. * @param requiresVarAssignment denotes whether or not the expanded template should contain an * assignment with the variable - * @param reservedExpansion reserved expansion allows percent-encoded triplets and characters in the - * reserved set + * @param reservedExpansion reserved expansion allows percent-encoded triplets and characters in + * the reserved set */ CompositeOutput( Character propertyPrefix, @@ -149,8 +149,8 @@ int getVarNameStartIndex() { } /** - * Encodes the specified value. If reserved expansion is turned on, then percent-encoded triplets and - * characters are allowed in the reserved set. + * Encodes the specified value. If reserved expansion is turned on, then percent-encoded + * triplets and characters are allowed in the reserved set. * * @param value the string to be encoded * @return the encoded string diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java index 14c3238f7..6c432e672 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java @@ -124,10 +124,10 @@ public static void parse(String content, Object data, boolean decodeEnabled) { * @param data data key name/value pairs * @since 1.14 */ - public static void parse(Reader reader, Object data) throws IOException { - parse(reader, data, true); - } - + public static void parse(Reader reader, Object data) throws IOException { + parse(reader, data, true); + } + /** * Parses the given URL-encoded content into the given data object of data key name/value pairs, * including support for repeating data key names. @@ -139,10 +139,9 @@ public static void parse(Reader reader, Object data) throws IOException { * They are parsed the same as "primitive" fields, except that the generic type parameter of the * collection is used as the {@link Class} parameter. * - *

            If there is no declared field for an input parameter name, it is ignored unless the - * input {@code data} parameter is a {@link Map}. If it is a map, the parameter value is - * stored either as a string, or as a {@link ArrayList}<String> in the case of repeated - * parameters. + *

            If there is no declared field for an input parameter name, it is ignored unless the input + * {@code data} parameter is a {@link Map}. If it is a map, the parameter value is stored either + * as a string, or as a {@link ArrayList}<String> in the case of repeated parameters. * * @param reader URL-encoded reader * @param data data key name/value pairs @@ -168,9 +167,13 @@ public static void parse(Reader reader, Object data, boolean decodeEnabled) thro // falls through case '&': // parse name/value pair - String name = decodeEnabled ? CharEscapers.decodeUri(nameWriter.toString()) : nameWriter.toString(); + String name = + decodeEnabled ? CharEscapers.decodeUri(nameWriter.toString()) : nameWriter.toString(); if (name.length() != 0) { - String stringValue = decodeEnabled ? CharEscapers.decodeUri(valueWriter.toString()) : valueWriter.toString(); + String stringValue = + decodeEnabled + ? CharEscapers.decodeUri(valueWriter.toString()) + : valueWriter.toString(); // get the field from the type information FieldInfo fieldInfo = classInfo.getFieldInfo(name); if (fieldInfo != null) { diff --git a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java index ce5e59d51..890bdf2f2 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/apache/ApacheHttpTransport.java @@ -74,8 +74,8 @@ * * @since 1.0 * @author Yaniv Inbar - * @deprecated Please use com.google.api.client.http.apache.v2.ApacheHttpTransport provided by - * the com.google.http-client:google-http-client-apache-v2 artifact. + * @deprecated Please use com.google.api.client.http.apache.v2.ApacheHttpTransport provided by the + * com.google.http-client:google-http-client-apache-v2 artifact. */ @Deprecated public final class ApacheHttpTransport extends HttpTransport { diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java index 68b3b2f9c..2d0a2ba70 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonString.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonString.java @@ -40,8 +40,8 @@ * * * - *

            However, if instead the JSON content uses a JSON String to store the value, one needs to use the - * {@link JsonString} annotation. For example: + *

            However, if instead the JSON content uses a JSON String to store the value, one needs to use + * the {@link JsonString} annotation. For example: * *

              * 
            diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java
            index ce7c42f12..7d3b465b4 100644
            --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java
            +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/DerEncoder.java
            @@ -17,16 +17,14 @@
             package com.google.api.client.json.webtoken;
             
             import com.google.api.client.util.Preconditions;
            -
             import java.math.BigInteger;
             import java.util.Arrays;
             
             /**
              * Utilities for re-encoding a signature byte array with DER encoding.
              *
            - * 

            Note: that this is not a general purpose encoder and currently only - * handles 512 bit signatures. ES256 verification algorithms expect the - * signature bytes in DER encoding. + *

            Note: that this is not a general purpose encoder and currently only handles 512 bit + * signatures. ES256 verification algorithms expect the signature bytes in DER encoding. */ public class DerEncoder { private static byte DER_TAG_SIGNATURE_OBJECT = 0x30; diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index aa21dbe2e..4886b7927 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -23,14 +23,12 @@ import com.google.api.client.util.StringUtils; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.math.BigInteger; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; import java.security.PublicKey; -import java.security.Signature; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays; @@ -78,8 +76,7 @@ public JsonWebSignature( } /** - * Header as specified in - * Reserved + * Header as specified in Reserved * Header Parameter Names. */ public static class Header extends JsonWebToken.Header { @@ -305,8 +302,8 @@ public Header setX509Certificates(List x509Certificates) { } /** - * Returns an array listing the header parameter names that define extensions used in - * the JWS header that MUST be understood and processed or {@code null} for none. + * Returns an array listing the header parameter names that define extensions used in the JWS + * header that MUST be understood and processed or {@code null} for none. * * @since 1.16 */ @@ -318,8 +315,8 @@ public final List getCritical() { } /** - * Sets the header parameter names that define extensions used in the - * JWS header that MUST be understood and processed or {@code null} for none. + * Sets the header parameter names that define extensions used in the JWS header that MUST be + * understood and processed or {@code null} for none. * *

            Overriding is only supported for the purpose of calling the super implementation and * changing the return type, but nothing else. @@ -350,8 +347,8 @@ public Header getHeader() { /** * Verifies the signature of the content. * - *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may be added in the - * future. For any other algorithm it returns {@code false}. + *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may + * be added in the future. For any other algorithm it returns {@code false}. * * @param publicKey public key * @return whether the algorithm is recognized and it is verified @@ -360,9 +357,17 @@ public Header getHeader() { public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurityException { String algorithm = getHeader().getAlgorithm(); if ("RS256".equals(algorithm)) { - return SecurityUtils.verify(SecurityUtils.getSha256WithRsaSignatureAlgorithm(), publicKey, signatureBytes, signedContentBytes); + return SecurityUtils.verify( + SecurityUtils.getSha256WithRsaSignatureAlgorithm(), + publicKey, + signatureBytes, + signedContentBytes); } else if ("ES256".equals(algorithm)) { - return SecurityUtils.verify(SecurityUtils.getEs256SignatureAlgorithm(), publicKey, DerEncoder.encode(signatureBytes), signedContentBytes); + return SecurityUtils.verify( + SecurityUtils.getEs256SignatureAlgorithm(), + publicKey, + DerEncoder.encode(signatureBytes), + signedContentBytes); } else { return false; } @@ -372,8 +377,8 @@ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurity * {@link Beta}
            * Verifies the signature of the content using the certificate chain embedded in the signature. * - *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may be added in the - * future. For any other algorithm it returns {@code null}. + *

            Currently only {@code "RS256"} and {@code "ES256"} algorithms are verified, but others may + * be added in the future. For any other algorithm it returns {@code null}. * *

            The leaf certificate of the certificate chain must be an SSL server certificate. * @@ -392,9 +397,19 @@ public final X509Certificate verifySignature(X509TrustManager trustManager) } String algorithm = getHeader().getAlgorithm(); if ("RS256".equals(algorithm)) { - return SecurityUtils.verify(SecurityUtils.getSha256WithRsaSignatureAlgorithm(), trustManager, x509Certificates, signatureBytes, signedContentBytes); + return SecurityUtils.verify( + SecurityUtils.getSha256WithRsaSignatureAlgorithm(), + trustManager, + x509Certificates, + signatureBytes, + signedContentBytes); } else if ("ES256".equals(algorithm)) { - return SecurityUtils.verify(SecurityUtils.getEs256SignatureAlgorithm(), trustManager, x509Certificates, DerEncoder.encode(signatureBytes), signedContentBytes); + return SecurityUtils.verify( + SecurityUtils.getEs256SignatureAlgorithm(), + trustManager, + x509Certificates, + DerEncoder.encode(signatureBytes), + signedContentBytes); } else { return null; } diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java index f68450190..bfcf63fe9 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java @@ -47,8 +47,7 @@ public JsonWebToken(Header header, Payload payload) { } /** - * Header as specified in - * JWT Header. + * Header as specified in JWT Header. */ public static class Header extends GenericJson { @@ -115,9 +114,8 @@ public Header clone() { } /** - * Payload as specified in - * Reserved Claim - * Names. + * Payload as specified in Reserved + * Claim Names. */ public static class Payload extends GenericJson { diff --git a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java index 607d80de0..a1f06a3bc 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/PemReader.java +++ b/google-http-client/src/main/java/com/google/api/client/util/PemReader.java @@ -36,7 +36,9 @@ * *

            Limitations: * - *

              + *

              + * + *

                *
              • Assumes the PEM file section content is not encrypted and cannot handle the case of any * headers inside the BEGIN and END tag. *
              • It also ignores any attributes associated with any PEM file section. diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index 9d61f8af0..4350f2711 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -1,17 +1,17 @@ /* - * Copyright (c) 2010 Google Inc. +* Copyright (c) 2010 Google Inc. - * - * 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. - */ +* +* 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.util.escape; @@ -46,12 +46,11 @@ public final class CharEscapers { /** * Escapes the string value so it can be safely included in application/x-www-form-urlencoded - * data. This is not appropriate for generic URI escaping. In particular it encodes - * the space character as a plus sign instead of percent escaping it, in - * contravention of the URI specification. - * For details on application/x-www-form-urlencoded encoding see the - * see HTML 4 - * specification, section 17.13.4.1. + * data. This is not appropriate for generic URI escaping. In particular it encodes the space + * character as a plus sign instead of percent escaping it, in contravention of the URI + * specification. For details on application/x-www-form-urlencoded encoding see the see HTML 4 specification, + * section 17.13.4.1. * *

                When encoding a String, the following rules apply: * @@ -80,11 +79,11 @@ public final class CharEscapers { public static String escapeUri(String value) { return APPLICATION_X_WWW_FORM_URLENCODED.escape(value); } - - /** - * Escapes the string value so it can be safely included in any part of a URI. - * For details on escaping URIs, - * see RFC 3986 - section 2.4. + + /** + * Escapes the string value so it can be safely included in any part of a URI. For details on + * escaping URIs, see RFC 3986 - section + * 2.4. * *

                When encoding a String, the following rules apply: * @@ -108,11 +107,11 @@ public static String escapeUriConformant(String value) { } /** - * Decodes application/x-www-form-urlencoded strings. The UTF-8 character set determines - * what characters are represented by any consecutive sequences of the form "%XX". + * Decodes application/x-www-form-urlencoded strings. The UTF-8 character set determines what + * characters are represented by any consecutive sequences of the form "%XX". * - *

                This replaces each occurrence of '+' with a space, ' '. This method should not be used - * for non-application/x-www-form-urlencoded strings such as host and path. + *

                This replaces each occurrence of '+' with a space, ' '. This method should not be used for + * non-application/x-www-form-urlencoded strings such as host and path. * * @param uri a percent-encoded US-ASCII string * @return a string without any percent escapes or plus signs @@ -127,9 +126,9 @@ public static String decodeUri(String uri) { } /** - * Decodes the path component of a URI. This does not - * convert + into spaces (the behavior of {@link java.net.URLDecoder#decode(String, String)}). This - * method transforms URI encoded values into their decoded symbols. + * Decodes the path component of a URI. This does not convert + into spaces (the behavior of + * {@link java.net.URLDecoder#decode(String, String)}). This method transforms URI encoded values + * into their decoded symbols. * *

                e.g. {@code decodePath("%3Co%3E")} returns {@code ""} * diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index 84f635cdc..3866265a3 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -16,8 +16,7 @@ /** * A {@code UnicodeEscaper} that escapes some set of Java characters using the URI percent encoding - * scheme. The set of safe characters (those which remain unescaped) is specified on - * construction. + * scheme. The set of safe characters (those which remain unescaped) is specified on construction. * *

                For details on escaping URIs for use in web pages, see RFC 3986 - section 2.4 and The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the * same. *

              • Any additionally specified safe characters remain the same. - *
              • If {@code plusForSpace} is true, the space character " " is converted into a plus - * sign "+". - *
              • All other characters are converted into one or more bytes using UTF-8 encoding. Each - * byte is then represented by the 3-character string "%XY", where "XY" is the two-digit, + *
              • If {@code plusForSpace} is true, the space character " " is converted into a plus sign "+". + *
              • All other characters are converted into one or more bytes using UTF-8 encoding. Each byte + * is then represented by the 3-character string "%XY", where "XY" is the two-digit, * uppercase, hexadecimal representation of the byte value. *
              * - *

              RFC 3986 defines the set of unreserved characters as "-", "_", "~", and "." - * It goes on to state: + *

              RFC 3986 defines the set of unreserved characters as "-", "_", "~", and "." It goes on to + * state: * - *

              URIs that differ in the replacement of an unreserved character with - its corresponding percent-encoded US-ASCII octet are equivalent: they - identify the same resource. However, URI comparison implementations - do not always perform normalization prior to comparison (see Section - 6). For consistency, percent-encoded octets in the ranges of ALPHA - (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), - underscore (%5F), or tilde (%7E) should not be created by URI - producers and, when found in a URI, should be decoded to their - corresponding unreserved characters by URI normalizers. + *

              URIs that differ in the replacement of an unreserved character with its corresponding + * percent-encoded US-ASCII octet are equivalent: they identify the same resource. However, URI + * comparison implementations do not always perform normalization prior to comparison (see Section + * 6). For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT + * (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by + * URI producers and, when found in a URI, should be decoded to their corresponding unreserved + * characters by URI normalizers. * *

              Note: This escaper produces uppercase hexadecimal sequences. From RFC 3986:
              @@ -103,10 +99,10 @@ public class PercentEscaper extends UnicodeEscaper { * escaped. */ private final boolean[] safeOctets; - + /** - * Constructs a URI escaper with the specified safe characters. The space - * character is escaped to %20 in accordance with the URI specification. + * Constructs a URI escaper with the specified safe characters. The space character is escaped to + * %20 in accordance with the URI specification. * * @param safeChars a non null string specifying additional safe characters for this escaper (the * ranges 0..9, a..z and A..Z are always safe and should not be specified here) @@ -117,9 +113,9 @@ public PercentEscaper(String safeChars) { } /** - * Constructs a URI escaper that converts all but the specified safe characters - * into hexadecimal percent escapes. Optionally space characters can be converted into - * a plus sign {@code +} instead of {@code %20}. and optional handling of the space + * Constructs a URI escaper that converts all but the specified safe characters into hexadecimal + * percent escapes. Optionally space characters can be converted into a plus sign {@code +} + * instead of {@code %20}. and optional handling of the space * * @param safeChars a non null string specifying additional safe characters for this escaper. The * ranges 0..9, a..z and A..Z are always safe and should not be specified here. @@ -127,8 +123,8 @@ public PercentEscaper(String safeChars) { * @throws IllegalArgumentException if safeChars includes characters that are always safe or * characters that must always be escaped * @deprecated use {@code PercentEscaper(String safeChars)} instead which is the same as invoking - * this method with plusForSpace set to false. Escaping spaces as plus signs does not - * conform to the URI specification. + * this method with plusForSpace set to false. Escaping spaces as plus signs does not conform + * to the URI specification. */ @Deprecated public PercentEscaper(String safeChars, boolean plusForSpace) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 838dcb5dd..a39356ff5 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -16,7 +16,6 @@ import com.google.api.client.util.IOUtils; import com.google.api.client.util.Maps; - import com.google.common.base.StandardSystemProperty; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; @@ -43,8 +42,8 @@ /** * Thread-safe file implementation of a credential store. * - *

              For security purposes, the file's permissions are set such that the - * file is only accessible by the file's owner. + *

              For security purposes, the file's permissions are set such that the file is only accessible by + * the file's owner. * * @since 1.16 * @author Yaniv Inbar @@ -53,8 +52,8 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory { private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName()); - private static final boolean IS_WINDOWS = StandardSystemProperty.OS_NAME.value() - .toLowerCase(Locale.ENGLISH).startsWith("windows"); + private static final boolean IS_WINDOWS = + StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows"); /** Directory to store data. */ private final File dataDirectory; @@ -151,35 +150,37 @@ private static void setPermissionsToOwnerOnly(File file) throws IOException { private static void setPermissionsToOwnerOnlyWindows(File file) throws IOException { Path path = Paths.get(file.getAbsolutePath()); - FileOwnerAttributeView fileAttributeView = Files.getFileAttributeView(path, FileOwnerAttributeView.class); + FileOwnerAttributeView fileAttributeView = + Files.getFileAttributeView(path, FileOwnerAttributeView.class); UserPrincipal owner = fileAttributeView.getOwner(); // get view AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); // All available entries - Set permissions = ImmutableSet.of( - AclEntryPermission.APPEND_DATA, - AclEntryPermission.DELETE, - AclEntryPermission.DELETE_CHILD, - AclEntryPermission.READ_ACL, - AclEntryPermission.READ_ATTRIBUTES, - AclEntryPermission.READ_DATA, - AclEntryPermission.READ_NAMED_ATTRS, - AclEntryPermission.SYNCHRONIZE, - AclEntryPermission.WRITE_ACL, - AclEntryPermission.WRITE_ATTRIBUTES, - AclEntryPermission.WRITE_DATA, - AclEntryPermission.WRITE_NAMED_ATTRS, - AclEntryPermission.WRITE_OWNER - ); + Set permissions = + ImmutableSet.of( + AclEntryPermission.APPEND_DATA, + AclEntryPermission.DELETE, + AclEntryPermission.DELETE_CHILD, + AclEntryPermission.READ_ACL, + AclEntryPermission.READ_ATTRIBUTES, + AclEntryPermission.READ_DATA, + AclEntryPermission.READ_NAMED_ATTRS, + AclEntryPermission.SYNCHRONIZE, + AclEntryPermission.WRITE_ACL, + AclEntryPermission.WRITE_ATTRIBUTES, + AclEntryPermission.WRITE_DATA, + AclEntryPermission.WRITE_NAMED_ATTRS, + AclEntryPermission.WRITE_OWNER); // create ACL to give owner everything - AclEntry entry = AclEntry.newBuilder() - .setType(AclEntryType.ALLOW) - .setPrincipal(owner) - .setPermissions(permissions) - .build(); + AclEntry entry = + AclEntry.newBuilder() + .setType(AclEntryType.ALLOW) + .setPrincipal(owner) + .setPermissions(permissions) + .build(); // Overwrite the ACL with only this permission try { @@ -187,6 +188,5 @@ private static void setPermissionsToOwnerOnlyWindows(File file) throws IOExcepti } catch (SecurityException ex) { throw new IOException("Unable to set permissions for " + file, ex); } - } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java index 33a48dce1..afcdf2bf5 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java @@ -27,7 +27,8 @@ public class ConsumingInputStreamTest { @Test public void testClose_drainsBytesOnClose() throws IOException { - MockInputStream mockInputStream = new MockInputStream("abc123".getBytes(StandardCharsets.UTF_8)); + MockInputStream mockInputStream = + new MockInputStream("abc123".getBytes(StandardCharsets.UTF_8)); InputStream consumingInputStream = new ConsumingInputStream(mockInputStream); assertEquals(6, mockInputStream.getBytesToRead()); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java index db4fcdc54..ae0ae125f 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java @@ -17,7 +17,9 @@ import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; import com.google.api.client.util.BackOff; +import com.google.api.client.util.Sleeper; import java.io.IOException; +import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; /** @@ -46,4 +48,35 @@ public void subsetHandle(long count, long millis, boolean retrySupported, BackOf } assertEquals(count, sleeper.getCount()); } + + public void testHandleIOException_returnsFalseAndThreadRemainsInterrupted_whenSleepIsInterrupted() + throws Exception { + final AtomicBoolean stillInterrupted = new AtomicBoolean(false); + Thread runningThread = + new Thread() { + @Override + public void run() { + HttpBackOffIOExceptionHandler testTarget = + new HttpBackOffIOExceptionHandler( + new MockBackOff() + .setBackOffMillis(Long.MAX_VALUE) // Sleep until we interrupt it. + .setMaxTries(1)) + .setSleeper( + Sleeper.DEFAULT); // Needs to be a real sleeper so we can interrupt it. + + try { + testTarget.handleIOException(null, /* retrySupported= */ true); + } catch (Exception ignored) { + } + stillInterrupted.set(Thread.currentThread().isInterrupted()); + } + }; + runningThread.start(); + // Give runningThread some time to start. + Thread.sleep(500L); + runningThread.interrupt(); + runningThread.join(); + + assertTrue(stillInterrupted.get()); + } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java index 7393ae318..afe9ff65d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java @@ -18,7 +18,9 @@ import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; import com.google.api.client.util.BackOff; +import com.google.api.client.util.Sleeper; import java.io.IOException; +import java.util.concurrent.atomic.AtomicBoolean; import junit.framework.TestCase; /** @@ -67,4 +69,36 @@ private void subsetHandleResponse( } assertEquals(count, sleeper.getCount()); } + + public void testHandleResponse_returnsFalseAndThreadRemainsInterrupted_whenSleepIsInterrupted() + throws Exception { + final AtomicBoolean stillInterrupted = new AtomicBoolean(false); + Thread runningThread = + new Thread() { + @Override + public void run() { + HttpBackOffUnsuccessfulResponseHandler testTarget = + new HttpBackOffUnsuccessfulResponseHandler( + new MockBackOff() + .setBackOffMillis(Long.MAX_VALUE) // Sleep until we interrupt it. + .setMaxTries(1)) + .setSleeper( + Sleeper.DEFAULT) // Needs to be a real sleeper so we can interrupt it. + .setBackOffRequired(BackOffRequired.ALWAYS); + + try { + testTarget.handleResponse(null, null, /* retrySupported= */ true); + } catch (Exception ignored) { + } + stillInterrupted.set(Thread.currentThread().isInterrupted()); + } + }; + runningThread.start(); + // Give runningThread some time to start. + Thread.sleep(500L); + runningThread.interrupt(); + runningThread.join(); + + assertTrue(stillInterrupted.get()); + } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index bb47e98d7..d78cd8c89 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -1275,7 +1275,6 @@ public void testVersion_matchesAcceptablePatterns() throws Exception { String version = HttpRequest.VERSION; assertTrue( String.format("the loaded version '%s' did not match the acceptable pattern", version), - version.matches(acceptableVersionPattern) - ); + version.matches(acceptableVersionPattern)); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 5d89f0350..d2d2df5d1 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -13,6 +13,12 @@ */ package com.google.api.client.http; +import static com.google.api.client.http.OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; @@ -25,19 +31,12 @@ import io.opencensus.trace.config.TraceParams; import io.opencensus.trace.export.SpanData; import io.opencensus.trace.samplers.Samplers; +import java.io.IOException; +import java.util.List; import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.io.IOException; -import java.util.List; - -import static com.google.api.client.http.OpenCensusUtils.SPAN_NAME_HTTP_REQUEST_EXECUTE; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - public class HttpRequestTracingTest { private static final TestHandler testHandler = new TestHandler(); @@ -60,13 +59,12 @@ public void teardownTestTracer() { @Test(timeout = 20_000L) public void executeCreatesSpan() throws IOException { - MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse() - .setStatusCode(200); - HttpTransport transport = new MockHttpTransport.Builder() - .setLowLevelHttpResponse(mockResponse) - .build(); - HttpRequest request = new HttpRequestFactory(transport, null) - .buildGetRequest(new GenericUrl("https://google.com/")); + MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse().setStatusCode(200); + HttpTransport transport = + new MockHttpTransport.Builder().setLowLevelHttpResponse(mockResponse).build(); + HttpRequest request = + new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); request.execute(); // This call blocks - we set a timeout on this test to ensure we don't wait forever @@ -88,8 +86,11 @@ public void executeCreatesSpan() throws IOException { // Ensure we have 2 message events, SENT and RECEIVED assertEquals(2, span.getMessageEvents().getEvents().size()); - assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); - assertEquals(MessageEvent.Type.RECEIVED, span.getMessageEvents().getEvents().get(1).getEvent().getType()); + assertEquals( + MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + assertEquals( + MessageEvent.Type.RECEIVED, + span.getMessageEvents().getEvents().get(1).getEvent().getType()); // Ensure we record the span status as OK assertEquals(Status.OK, span.getStatus()); @@ -97,16 +98,19 @@ public void executeCreatesSpan() throws IOException { @Test(timeout = 20_000L) public void executeExceptionCreatesSpan() throws IOException { - HttpTransport transport = new MockHttpTransport.Builder() - .setLowLevelHttpRequest(new MockLowLevelHttpRequest() { - @Override - public LowLevelHttpResponse execute() throws IOException { - throw new IOException("some IOException"); - } - }) - .build(); - HttpRequest request = new HttpRequestFactory(transport, null) - .buildGetRequest(new GenericUrl("https://google.com/")); + HttpTransport transport = + new MockHttpTransport.Builder() + .setLowLevelHttpRequest( + new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + throw new IOException("some IOException"); + } + }) + .build(); + HttpRequest request = + new HttpRequestFactory(transport, null) + .buildGetRequest(new GenericUrl("https://google.com/")); try { request.execute(); @@ -133,21 +137,25 @@ public LowLevelHttpResponse execute() throws IOException { // Ensure we have 2 message events, SENT and RECEIVED assertEquals(1, span.getMessageEvents().getEvents().size()); - assertEquals(MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); + assertEquals( + MessageEvent.Type.SENT, span.getMessageEvents().getEvents().get(0).getEvent().getType()); // Ensure we record the span status as UNKNOWN - assertEquals(Status.UNKNOWN, span.getStatus()); } + assertEquals(Status.UNKNOWN, span.getStatus()); + } void assertAttributeEquals(SpanData span, String attributeName, String expectedValue) { Object attributeValue = span.getAttributes().getAttributeMap().get(attributeName); assertNotNull("expected span to contain attribute: " + attributeName, attributeValue); assertTrue(attributeValue instanceof AttributeValue); - String value = ((AttributeValue) attributeValue).match( - Functions.returnToString(), - Functions.returnToString(), - Functions.returnToString(), - Functions.returnToString(), - Functions.returnNull()); + String value = + ((AttributeValue) attributeValue) + .match( + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnToString(), + Functions.returnNull()); assertEquals(expectedValue, value); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index 57b400e40..267d13caa 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -544,11 +544,14 @@ public void testGetContent_gzipEncoding_finishReading() throws IOException { do_testGetContent_gzipEncoding_finishReading("gzip"); } - public void testGetContent_gzipEncoding_finishReadingWithUppercaseContentEncoding() throws IOException { + public void testGetContent_gzipEncoding_finishReadingWithUppercaseContentEncoding() + throws IOException { do_testGetContent_gzipEncoding_finishReading("GZIP"); } - public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() throws IOException { + public void + testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() + throws IOException { Locale originalDefaultLocale = Locale.getDefault(); try { Locale.setDefault(Locale.forLanguageTag("tr-TR")); @@ -558,13 +561,12 @@ public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleA } } - private void do_testGetContent_gzipEncoding_finishReading(String contentEncoding) throws IOException { + private void do_testGetContent_gzipEncoding_finishReading(String contentEncoding) + throws IOException { byte[] dataToCompress = "abcd".getBytes(StandardCharsets.UTF_8); byte[] mockBytes; - try ( - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(dataToCompress.length); - GZIPOutputStream zipStream = new GZIPOutputStream((byteStream)) - ) { + try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(dataToCompress.length); + GZIPOutputStream zipStream = new GZIPOutputStream((byteStream))) { zipStream.write(dataToCompress); zipStream.close(); @@ -596,7 +598,8 @@ public LowLevelHttpResponse execute() throws IOException { HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); - try (TestableByteArrayInputStream output = (TestableByteArrayInputStream) mockResponse.getContent()) { + try (TestableByteArrayInputStream output = + (TestableByteArrayInputStream) mockResponse.getContent()) { assertFalse(output.isClosed()); assertEquals("abcd", response.parseAsString()); assertTrue(output.isClosed()); @@ -624,7 +627,8 @@ public LowLevelHttpResponse execute() throws IOException { }; } }; - HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); + HttpRequest request = + transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); // If gzip was used on this response, an exception would be thrown HttpResponse response = request.execute(); assertEquals("abcd", response.parseAsString()); diff --git a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java index 14e0e5990..ed3ec5e53 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java @@ -33,9 +33,14 @@ public class MultipartContentTest extends TestCase { private static final String HEADERS = headers("application/json; charset=UTF-8", "foo"); private static String headers(String contentType, String value) { - return "Content-Length: " + value.length() + CRLF - + "Content-Type: " + contentType + CRLF - + "content-transfer-encoding: binary" + CRLF; + return "Content-Length: " + + value.length() + + CRLF + + "Content-Type: " + + contentType + + CRLF + + "content-transfer-encoding: binary" + + CRLF; } public void testRandomContent() throws Exception { @@ -46,19 +51,26 @@ public void testRandomContent() throws Exception { assertTrue(boundaryString.endsWith("__")); assertEquals("multipart/related; boundary=" + boundaryString, content.getType()); - final String[][] VALUES = new String[][] { - {"Hello world", "text/plain"}, - {"Hi", "application/xml"}, - {"{x:1,y:2}", "application/json"} - }; + final String[][] VALUES = + new String[][] { + {"Hello world", "text/plain"}, + {"Hi", "application/xml"}, + {"{x:1,y:2}", "application/json"} + }; StringBuilder expectedStringBuilder = new StringBuilder(); - for (String[] valueTypePair: VALUES) { + for (String[] valueTypePair : VALUES) { String contentValue = valueTypePair[0]; String contentType = valueTypePair[1]; - content.addPart(new MultipartContent.Part(ByteArrayContent.fromString(contentType, contentValue))); - expectedStringBuilder.append("--").append(boundaryString).append(CRLF) - .append(headers(contentType, contentValue)).append(CRLF) - .append(contentValue).append(CRLF); + content.addPart( + new MultipartContent.Part(ByteArrayContent.fromString(contentType, contentValue))); + expectedStringBuilder + .append("--") + .append(boundaryString) + .append(CRLF) + .append(headers(contentType, contentValue)) + .append(CRLF) + .append(contentValue) + .append(CRLF); } expectedStringBuilder.append("--").append(boundaryString).append("--").append(CRLF); // write to string @@ -72,31 +84,30 @@ public void testRandomContent() throws Exception { public void testContent() throws Exception { subtestContent("--" + BOUNDARY + "--" + CRLF, null); subtestContent( - "--" + BOUNDARY + CRLF - + HEADERS + CRLF - + "foo" + CRLF - + "--" + BOUNDARY + "--" + CRLF, - null, + "--" + BOUNDARY + CRLF + HEADERS + CRLF + "foo" + CRLF + "--" + BOUNDARY + "--" + CRLF, + null, "foo"); subtestContent( - "--" + BOUNDARY + CRLF - + HEADERS + CRLF - + "foo" + CRLF - + "--" + BOUNDARY + CRLF - + HEADERS + CRLF - + "bar" + CRLF - + "--" + BOUNDARY + "--" + CRLF, - null, + "--" + BOUNDARY + CRLF + HEADERS + CRLF + "foo" + CRLF + "--" + BOUNDARY + CRLF + HEADERS + + CRLF + "bar" + CRLF + "--" + BOUNDARY + "--" + CRLF, + null, "foo", "bar"); subtestContent( - "--myboundary" + CRLF - + HEADERS + CRLF - + "foo" + CRLF - + "--myboundary" + CRLF - + HEADERS + CRLF - + "bar" + CRLF - + "--myboundary--" + CRLF, + "--myboundary" + + CRLF + + HEADERS + + CRLF + + "foo" + + CRLF + + "--myboundary" + + CRLF + + HEADERS + + CRLF + + "bar" + + CRLF + + "--myboundary--" + + CRLF, "myboundary", "foo", "bar"); @@ -105,7 +116,8 @@ public void testContent() throws Exception { private void subtestContent(String expectedContent, String boundaryString, String... contents) throws Exception { // multipart content - MultipartContent content = new MultipartContent(boundaryString == null ? BOUNDARY : boundaryString); + MultipartContent content = + new MultipartContent(boundaryString == null ? BOUNDARY : boundaryString); for (String contentValue : contents) { content.addPart( new MultipartContent.Part(ByteArrayContent.fromString(CONTENT_TYPE, contentValue))); diff --git a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java index 8fa8624eb..480d10150 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java @@ -14,7 +14,6 @@ package com.google.api.client.http; - import io.opencensus.trace.Annotation; import io.opencensus.trace.AttributeValue; import io.opencensus.trace.BlankSpan; diff --git a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java index 9a02c0750..78fb06def 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java @@ -17,7 +17,8 @@ import com.google.api.client.testing.json.MockJsonFactory; import com.google.api.client.testing.json.webtoken.TestCertificates; import com.google.api.client.testing.util.SecurityTestUtils; - +import com.google.api.client.util.Base64; +import com.google.api.client.util.StringUtils; import java.io.IOException; import java.math.BigInteger; import java.security.AlgorithmParameters; @@ -35,11 +36,7 @@ import java.security.spec.InvalidParameterSpecException; import java.util.ArrayList; import java.util.List; - import javax.net.ssl.X509TrustManager; - -import com.google.api.client.util.Base64; -import com.google.api.client.util.StringUtils; import org.junit.Assert; import org.junit.Test; @@ -69,12 +66,12 @@ public void testSign() throws Exception { } private X509Certificate verifyX509WithCaCert(TestCertificates.CertData caCert) - throws IOException, GeneralSecurityException { + throws IOException, GeneralSecurityException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); X509TrustManager trustManager = caCert.getTrustManager(); return signature.verifySignature(trustManager); } - + @Test public void testImmutableSignatureBytes() throws IOException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); @@ -83,7 +80,7 @@ public void testImmutableSignatureBytes() throws IOException { byte[] bytes2 = signature.getSignatureBytes(); Assert.assertNotEquals(bytes2[0], bytes[0]); } - + @Test public void testImmutableSignedContentBytes() throws IOException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); @@ -92,7 +89,7 @@ public void testImmutableSignedContentBytes() throws IOException { byte[] bytes2 = signature.getSignedContentBytes(); Assert.assertNotEquals(bytes2[0], bytes[0]); } - + @Test public void testImmutableCertificates() throws IOException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); @@ -100,7 +97,7 @@ public void testImmutableCertificates() throws IOException { certificates.set(0, "foo"); Assert.assertNotEquals("foo", signature.getHeader().getX509Certificates().get(0)); } - + @Test public void testImmutableCritical() throws IOException { JsonWebSignature signature = TestCertificates.getJsonWebSignature(); @@ -128,8 +125,10 @@ public void testVerifyX509WrongCa() throws Exception { Assert.assertNull(verifyX509WithCaCert(TestCertificates.BOGUS_CA_CERT)); } - private static final String ES256_CONTENT = "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im1wZjBEQSJ9.eyJhdWQiOiIvcHJvamVjdHMvNjUyNTYyNzc2Nzk4L2FwcHMvY2xvdWQtc2FtcGxlcy10ZXN0cy1waHAtaWFwIiwiZW1haWwiOiJjaGluZ29yQGdvb2dsZS5jb20iLCJleHAiOjE1ODQwNDc2MTcsImdvb2dsZSI6eyJhY2Nlc3NfbGV2ZWxzIjpbImFjY2Vzc1BvbGljaWVzLzUxODU1MTI4MDkyNC9hY2Nlc3NMZXZlbHMvcmVjZW50U2VjdXJlQ29ubmVjdERhdGEiLCJhY2Nlc3NQb2xpY2llcy81MTg1NTEyODA5MjQvYWNjZXNzTGV2ZWxzL3Rlc3ROb09wIiwiYWNjZXNzUG9saWNpZXMvNTE4NTUxMjgwOTI0L2FjY2Vzc0xldmVscy9ldmFwb3JhdGlvblFhRGF0YUZ1bGx5VHJ1c3RlZCJdfSwiaGQiOiJnb29nbGUuY29tIiwiaWF0IjoxNTg0MDQ3MDE3LCJpc3MiOiJodHRwczovL2Nsb3VkLmdvb2dsZS5jb20vaWFwIiwic3ViIjoiYWNjb3VudHMuZ29vZ2xlLmNvbToxMTIxODE3MTI3NzEyMDE5NzI4OTEifQ"; - private static final String ES256_SIGNATURE = "yKNtdFY5EKkRboYNexBdfugzLhC3VuGyFcuFYA8kgpxMqfyxa41zkML68hYKrWu2kOBTUW95UnbGpsIi_u1fiA"; + private static final String ES256_CONTENT = + "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im1wZjBEQSJ9.eyJhdWQiOiIvcHJvamVjdHMvNjUyNTYyNzc2Nzk4L2FwcHMvY2xvdWQtc2FtcGxlcy10ZXN0cy1waHAtaWFwIiwiZW1haWwiOiJjaGluZ29yQGdvb2dsZS5jb20iLCJleHAiOjE1ODQwNDc2MTcsImdvb2dsZSI6eyJhY2Nlc3NfbGV2ZWxzIjpbImFjY2Vzc1BvbGljaWVzLzUxODU1MTI4MDkyNC9hY2Nlc3NMZXZlbHMvcmVjZW50U2VjdXJlQ29ubmVjdERhdGEiLCJhY2Nlc3NQb2xpY2llcy81MTg1NTEyODA5MjQvYWNjZXNzTGV2ZWxzL3Rlc3ROb09wIiwiYWNjZXNzUG9saWNpZXMvNTE4NTUxMjgwOTI0L2FjY2Vzc0xldmVscy9ldmFwb3JhdGlvblFhRGF0YUZ1bGx5VHJ1c3RlZCJdfSwiaGQiOiJnb29nbGUuY29tIiwiaWF0IjoxNTg0MDQ3MDE3LCJpc3MiOiJodHRwczovL2Nsb3VkLmdvb2dsZS5jb20vaWFwIiwic3ViIjoiYWNjb3VudHMuZ29vZ2xlLmNvbToxMTIxODE3MTI3NzEyMDE5NzI4OTEifQ"; + private static final String ES256_SIGNATURE = + "yKNtdFY5EKkRboYNexBdfugzLhC3VuGyFcuFYA8kgpxMqfyxa41zkML68hYKrWu2kOBTUW95UnbGpsIi_u1fiA"; // x, y values for keyId "mpf0DA" from https://www.gstatic.com/iap/verify/public_key-jwk private static final String GOOGLE_ES256_X = "fHEdeT3a6KaC1kbwov73ZwB_SiUHEyKQwUUtMCEn0aI"; @@ -139,13 +138,12 @@ private PublicKey buildEs256PublicKey(String x, String y) throws NoSuchAlgorithmException, InvalidParameterSpecException, InvalidKeySpecException { AlgorithmParameters parameters = AlgorithmParameters.getInstance("EC"); parameters.init(new ECGenParameterSpec("secp256r1")); - ECPublicKeySpec ecPublicKeySpec = new ECPublicKeySpec( - new ECPoint( - new BigInteger(1, Base64.decodeBase64(x)), - new BigInteger(1, Base64.decodeBase64(y)) - ), - parameters.getParameterSpec(ECParameterSpec.class) - ); + ECPublicKeySpec ecPublicKeySpec = + new ECPublicKeySpec( + new ECPoint( + new BigInteger(1, Base64.decodeBase64(x)), + new BigInteger(1, Base64.decodeBase64(y))), + parameters.getParameterSpec(ECParameterSpec.class)); KeyFactory keyFactory = KeyFactory.getInstance("EC"); return keyFactory.generatePublic(ecPublicKeySpec); } @@ -158,7 +156,8 @@ public void testVerifyES256() throws Exception { JsonWebSignature.Payload payload = new JsonWebToken.Payload(); byte[] signatureBytes = Base64.decodeBase64(ES256_SIGNATURE); byte[] signedContentBytes = StringUtils.getBytesUtf8(ES256_CONTENT); - JsonWebSignature jsonWebSignature = new JsonWebSignature(header, payload, signatureBytes, signedContentBytes); + JsonWebSignature jsonWebSignature = + new JsonWebSignature(header, payload, signatureBytes, signedContentBytes); Assert.assertTrue(jsonWebSignature.verifySignature(publicKey)); } } diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index 785ab40d5..ce7d2b027 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -224,15 +224,13 @@ public void testParseRfc3339ToSecondsAndNanos() { assertParsedRfc3339( "2018-03-01T10:11:12.1000Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000000)); } - + public void testEpoch() { - assertParsedRfc3339( - "1970-01-01T00:00:00.000Z", SecondsAndNanos.ofSecondsAndNanos(0, 0)); + assertParsedRfc3339("1970-01-01T00:00:00.000Z", SecondsAndNanos.ofSecondsAndNanos(0, 0)); } public void testOneSecondBeforeEpoch() { - assertParsedRfc3339( - "1969-12-31T23:59:59.000Z", SecondsAndNanos.ofSecondsAndNanos(-1, 0)); + assertParsedRfc3339("1969-12-31T23:59:59.000Z", SecondsAndNanos.ofSecondsAndNanos(-1, 0)); } private static void assertParsedRfc3339(String input, SecondsAndNanos expected) { diff --git a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java index c1d3872c0..52b2b9a0a 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java @@ -15,13 +15,10 @@ package com.google.api.client.util; import com.google.api.client.util.GenericData.Flags; - -import junit.framework.TestCase; - import java.util.ArrayList; import java.util.EnumSet; import java.util.List; - +import junit.framework.TestCase; import org.junit.Assert; /** diff --git a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java index 4d3503544..42166ae5d 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java @@ -53,4 +53,3 @@ public void testIsSymbolicLink_true() throws IOException { assertTrue(IOUtils.isSymbolicLink(file2)); } } - diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java index 6b3e75085..fa8aeba9d 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java @@ -26,11 +26,10 @@ public void testEscapeSpace() { String actual = escaper.escape("Hello there"); Assert.assertEquals("Hello%20there", actual); } - + @Test public void testEscapeSpaceDefault() { - PercentEscaper escaper = - new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER); + PercentEscaper escaper = new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER); String actual = escaper.escape("Hello there"); Assert.assertEquals("Hello%20there", actual); } From 3c7e6fe1ee1da5031af76a5304c97f211f9820c5 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 19 Jun 2020 10:42:04 -0700 Subject: [PATCH 291/983] ci: lock google-java-formatter version (#1058) --- google-http-client-bom/pom.xml | 16 ++++++++++++++++ pom.xml | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 521050982..826a87305 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -141,6 +141,22 @@ true + + com.coveo + fmt-maven-plugin + 2.9 + + + true + + + + com.google.googlejavaformat + google-java-format + 1.7 + + + diff --git a/pom.xml b/pom.xml index 443ccb9bb..dbb7ff6c5 100644 --- a/pom.xml +++ b/pom.xml @@ -539,6 +539,13 @@ true + + + com.google.googlejavaformat + google-java-format + 1.7 + + From f7cbc6d21cb77b535360cc1c8e430310801335d5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 19 Jun 2020 10:54:04 -0700 Subject: [PATCH 292/983] chore: update common templates (#1043) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/fee82300-ec4e-4e01-a646-fd6b4aa43c77/targets Source-Link: https://github.com/googleapis/synthtool/commit/98c50772ec23295c64cf0d2ddf199ea52961fd4c Source-Link: https://github.com/googleapis/synthtool/commit/55cdc844877d97139f25004229842624a6a86a02 --- .github/workflows/ci.yaml | 76 +++++++++++++++++++++++++++++++++++++++ .kokoro/build.bat | 2 +- synth.metadata | 4 +-- 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..445b4bf82 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,76 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{matrix.java}} + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/linkage-monitor.sh + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr \ No newline at end of file diff --git a/.kokoro/build.bat b/.kokoro/build.bat index b8ca8a893..05826ad93 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +1,3 @@ :: See documentation in type-shell-output.bat -"C:\Program Files\Git\bin\bash.exe" github/google-http-java-client/.kokoro/build.sh +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/synth.metadata b/synth.metadata index 45fdd9b8f..630a31ec7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "bb4227f9daec44fc2976fa9947e2ff5ee07ed21a" + "sha": "1624d55f9864ff1253321e9bfe715e2f370cc27e" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "52638600f387deb98efb5f9c85fec39e82aa9052" + "sha": "98c50772ec23295c64cf0d2ddf199ea52961fd4c" } } ] From b4bbb2fa44565e72565c47fbbce33cfed9311dd4 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 19 Jun 2020 13:54:47 -0400 Subject: [PATCH 293/983] chore(docs): libraries-bom 7.0.0 (#1056) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 6d08e9bd6..324662703 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 5.5.0 + 7.0.0 pom import From caa2cbf4f0622e9ba59196cf39359b32376c966a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Jun 2020 20:16:58 +0200 Subject: [PATCH 294/983] chore(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.3.0 (#1041) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dbb7ff6c5..6887fca22 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ maven-assembly-plugin - 3.2.0 + 3.3.0 maven-compiler-plugin From 0f71c40a44f7c166b73cb641ce1132a16c0786b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Jun 2020 21:38:04 +0200 Subject: [PATCH 295/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.18 (#1054) This PR contains the following updates: | Package | Update | Change | |---|---|---| | com.google.cloud.samples:shared-configuration | patch | `1.0.15` -> `1.0.18` | | com.google.cloud.samples:shared-configuration | patch | `1.0.12` -> `1.0.18` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/google-http-java-client). --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 6d5f2e904..86d1a4330 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.18 diff --git a/samples/pom.xml b/samples/pom.xml index a46c32cad..b59d3cdf3 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.15 + 1.0.18 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4d9f60c98..bc295f220 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.18 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 33a9fe006..5e300f9a2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.12 + 1.0.18 From d82666f2897d268b4243be14a7c0fe96a7a9a8d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Jun 2020 21:38:10 +0200 Subject: [PATCH 296/983] chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.0.0-m5 (#1057) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-surefire-plugin | patch | `3.0.0-M4` -> `3.0.0-M5` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6887fca22..6d7d7b6be 100644 --- a/pom.xml +++ b/pom.xml @@ -330,7 +330,7 @@ maven-surefire-plugin - 3.0.0-M4 + 3.0.0-M5 -Xmx1024m sponge_log From a82b9808f112c240c213726356e610e3a9fb4e61 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Jun 2020 21:40:04 +0200 Subject: [PATCH 297/983] chore(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.1.0 (#1050) This PR contains the following updates: | Package | Update | Change | |---|---|---| | org.apache.maven.plugins:maven-project-info-reports-plugin | minor | `3.0.0` -> `3.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/google-http-java-client). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6d7d7b6be..173281b76 100644 --- a/pom.xml +++ b/pom.xml @@ -359,7 +359,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.0 org.apache.maven.plugins @@ -517,7 +517,7 @@ maven-project-info-reports-plugin - 3.0.0 + 3.1.0 From 832502025175626394b8b725e60366a3d66ad194 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Jun 2020 16:13:23 +0200 Subject: [PATCH 298/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.11.1 (#1065) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 173281b76..b9330dd32 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.8.6 - 2.11.0 + 2.11.1 3.12.2 29.0-android 1.1.4c From 4e294b4e301fbb1f83670ed8f82ea7e503ac3e1f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Jun 2020 16:14:18 +0200 Subject: [PATCH 299/983] chore(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.9.1 (#1064) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 826a87305..6cecf3f28 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.0 + 3.9.1 true diff --git a/pom.xml b/pom.xml index b9330dd32..3d6505d19 100644 --- a/pom.xml +++ b/pom.xml @@ -364,7 +364,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.0 + 3.9.1 org.apache.maven.plugins From a966dec3bea3b113f2a1d4357ebd7a76894cd4c4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Jun 2020 16:15:27 +0200 Subject: [PATCH 300/983] chore(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.2.0 (#1063) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 85f0d6ee3..cf8f37e91 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 7631b01b7..a29eba42c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 7b7e7b372..07a0b54f6 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 5bc5d32f7..df6031228 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 480a18680..295ffd458 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-test-source diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 86d1a4330..73371f10f 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-snippets-source diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index bc295f220..4f4ee0a69 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.1.0 + 3.2.0 add-snippets-source From b1353f8cc7aaf22a30b31bd2ac72248d3a3a0a5d Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 25 Jun 2020 13:04:23 -0400 Subject: [PATCH 301/983] chore(docs): libraries-bom 8.0.0 (#1066) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 324662703..768236f87 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 7.0.0 + 8.0.0 pom import From 193fecd5b26c2f101dad629bdba9a2b8a8f1358f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 26 Jun 2020 10:19:13 -0700 Subject: [PATCH 302/983] chore: regenerate common templates (#1067) * chore: regenerate common templates * chore: keep codeowner_team --- .github/CODEOWNERS | 12 ++++++++- .github/workflows/ci.yaml | 5 +++- .kokoro/build.sh | 6 ++--- .kokoro/dependencies.sh | 4 ++- .kokoro/nightly/integration.cfg | 12 +++------ .kokoro/nightly/samples.cfg | 16 +++++------- .kokoro/populate-secrets.sh | 43 +++++++++++++++++++++++++++++++ .kokoro/presubmit/integration.cfg | 12 +++------ .kokoro/presubmit/samples.cfg | 14 ++++------ .kokoro/trampoline.sh | 2 ++ .repo-metadata.json | 1 + CONTRIBUTING.md | 11 +++++++- synth.metadata | 6 ++--- synth.py | 10 +++---- 14 files changed, 101 insertions(+), 53 deletions(-) create mode 100755 .kokoro/populate-secrets.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 54221045c..12670923c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,11 @@ -* @googleapis/yoshi-java +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +# The @googleapis/yoshi-java is the default owner for changes in this repo +**/*.java @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 445b4bf82..683022075 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,11 +36,14 @@ jobs: JOB_TYPE: test dependencies: runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: 8 + java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh linkage-monitor: diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 164a94c1a..7eefde4ab 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -39,7 +39,7 @@ retry_with_backoff 3 10 \ # if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then - export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) fi RETURN_CODE=0 @@ -51,9 +51,7 @@ test) RETURN_CODE=$? ;; lint) - mvn \ - -Penable-samples \ - com.coveo:fmt-maven-plugin:check + mvn com.coveo:fmt-maven-plugin:check RETURN_CODE=$? ;; javadoc) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index cf3bb4347..cee4f11e7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -41,8 +41,10 @@ echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" ## Run dependency list completeness check function completenessCheck() { # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt + mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt # Output dep list generated using the flattened pom (test scope deps are ommitted) msg "Generating dependency list using flattened pom..." diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 40c4abb7b..0048c8ece 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -28,14 +28,10 @@ env_vars: { env_vars: { key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + value: "secret_manager/java-it-service-account" } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "java_it_service_account" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" } diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 20aabd55d..f25429314 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -24,19 +24,15 @@ env_vars: { env_vars: { key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + value: "secret_manager/java-docs-samples-service-account" } env_vars: { - key: "ENABLE_BUILD_COP" - value: "true" + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "java_it_service_account" - } - } +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" } diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 000000000..f52514257 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 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. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index 522e5b101..dded67a9d 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -24,14 +24,10 @@ env_vars: { env_vars: { key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + value: "secret_manager/java-it-service-account" } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "java_it_service_account" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" } diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg index 1171aead0..01e096004 100644 --- a/.kokoro/presubmit/samples.cfg +++ b/.kokoro/presubmit/samples.cfg @@ -24,14 +24,10 @@ env_vars: { env_vars: { key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" + value: "secret_manager/java-docs-samples-service-account" } -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "java_it_service_account" - } - } -} +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index ba17ce014..9da0f8398 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -21,4 +21,6 @@ function cleanup() { echo "cleanup"; } trap cleanup EXIT + +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json index db2d13700..0cd58366d 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -6,5 +6,6 @@ "language": "java", "repo": "googleapis/google-http-java-client", "repo_short": "google-http-java-client", + "codeowner_team": "@googleapis/yoshi-java", "distribution_name": "com.google.http-client:google-http-client" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 085021dde..f2dbdee06 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -99,7 +99,16 @@ mvn -Penable-samples clean verify ``` 2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` ### Profile Activation diff --git a/synth.metadata b/synth.metadata index 630a31ec7..f10802993 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,15 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "1624d55f9864ff1253321e9bfe715e2f370cc27e" + "remote": "git@github.com:chingor13/google-http-java-client.git", + "sha": "b1353f8cc7aaf22a30b31bd2ac72248d3a3a0a5d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "98c50772ec23295c64cf0d2ddf199ea52961fd4c" + "sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4" } } ] diff --git a/synth.py b/synth.py index 9ed5d7487..a22e87e05 100644 --- a/synth.py +++ b/synth.py @@ -12,14 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. """This script is used to synthesize generated parts of this library.""" -import synthtool as s -import synthtool.gcp as gcp -import logging -logging.basicConfig(level=logging.DEBUG) -common_templates = gcp.CommonTemplates() -templates = common_templates.java_library() -s.copy(templates, excludes=[ +import synthtool.languages.java as java + +java.common_templates(excludes=[ "README.md", "java.header", "checkstyle.xml", From d32d8522a980dd69cc2a525216f6fcb7f912c549 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Jun 2020 19:26:43 +0200 Subject: [PATCH 303/983] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3 (#1051) --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b8458eb5c..f5930f8eb 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 1.6.0 + 3.0.0 From 05160aa10839e9ca5502f8f061089fe5c1bc40ea Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 26 Jun 2020 14:27:15 -0700 Subject: [PATCH 304/983] samples: replace Google+ json example with YouTube example (#1069) * samples: add json sample parsing example from YouTube search API * samples: add support for Map type * samples(docs): update json parsing example * samples: change some example data * samples: fix missing brace * samples: fix missing 'public static' --- docs/json.md | 334 ++++++++++++++---- samples/snippets/pom.xml | 20 +- .../java/com/example/json/YouTubeSample.java | 174 +++++++++ .../src/main/resources/youtube-search.json | 182 ++++++++++ .../com/example/json/YouTubeSampleTest.java | 94 +++++ 5 files changed, 729 insertions(+), 75 deletions(-) create mode 100644 samples/snippets/src/main/java/com/example/json/YouTubeSample.java create mode 100644 samples/snippets/src/main/resources/youtube-search.json create mode 100644 samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java diff --git a/docs/json.md b/docs/json.md index 491d73449..1d6dbc7de 100644 --- a/docs/json.md +++ b/docs/json.md @@ -27,114 +27,304 @@ Android Honeycomb (SDK 3.0) and higher, and that is identical to the Google GSON User-defined JSON data models allow you to define Plain Old Java Objects (POJOs) and define how the library parses and serializes them to and from JSON. The code snippets below are part of a more -complete example, [googleplus-simple-cmdline-sample][google-plus-sample], which demonstrates these +complete example, [YouTube sample][youtube-sample], which demonstrates these concepts. ### Example -The following JSON snippet shows the relevant fields of a typical Google+ activity feed: +The following JSON snippet shows the relevant fields of a typical [YouTube video search][youtube-search]: ```json { + "kind": "youtube#searchListResponse", + "pageInfo": { + "totalResults": 1000000, + "resultsPerPage": 5 + }, "items": [ { - "id": "z13lwnljpxjgt5wn222hcvzimtebslkul", - "url": "https://plus.google.com/116899029375914044550/posts/HYNhBAMeA7U", - "object": { - "content": "\u003cb\u003eWho will take the title of 2011 Angry Birds College Champ?\u003c/b\u003e\u003cbr /\u003e\u003cbr /\u003e\u003cbr /\u003eIt's the 2nd anniversary of Angry Birds this Sunday, December 11, and to celebrate this break-out game we're having an intercollegiate angry birds challenge for students to compete for the title of 2011 Angry Birds College Champion. Add \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/105912662528057048457\" class=\"proflink\" oid=\"105912662528057048457\"\u003eAngry Birds College Challenge\u003c/a\u003e\u003c/span\u003e to learn more. Good luck, and have fun!", - "plusoners": { - "totalItems": 27 + "kind": "youtube#searchResult", + "id": { + "kind": "youtube#video", + "videoId": "e6Tudp5lqt8" + }, + "snippet": { + "publishedAt": "2020-06-25T23:18:43Z", + "channelId": "UCKwGZZMrhNYKzucCtTPY2Nw", + "title": "Video 1 Title", + "description": "Video 1 Description", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/hqdefault.jpg", + "width": 480, + "height": 360 + } } } }, { - "id": "z13rtboyqt2sit45o04cdp3jxuf5cz2a3e4", - "url": "https://plus.google.com/116899029375914044550/posts/X8W8m9Hk5rE", - "object": { - "content": "CNN Heroes shines a spotlight on everyday people changing the world. Hear the top ten heroes' inspiring stories by tuning in to the CNN broadcast of "CNN Heroes: An All-Star Tribute" on Sunday, December 11, at 8pm ET/5 pm PT with host \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/106168900754103197479\" class=\"proflink\" oid=\"106168900754103197479\"\u003eAnderson Cooper 360\u003c/a\u003e\u003c/span\u003e, and donate to their causes online in a few simple steps with Google Wallet (formerly known as Google Checkout): \u003ca href=\"http://www.google.com/landing/cnnheroes/2011/\" \u003ehttp://www.google.com/landing/cnnheroes/2011/\u003c/a\u003e.", - "plusoners": { - "totalItems": 21 + "kind": "youtube#searchResult", + "id": { + "kind": "youtube#video", + "videoId": "o-NtLpiMpw0" + }, + "snippet": { + "publishedAt": "2020-06-25T17:28:52Z", + "channelId": "UClljAz6ZKy0XeViKsohdjqA", + "title": "Video Title 2", + "description": "Video 2 Description", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/hqdefault.jpg", + "width": 480, + "height": 360 + } } } }, { - "id": "z13wtpwpqvihhzeys04cdp3jxuf5cz2a3e4", - "url": "https://plus.google.com/116899029375914044550/posts/dBnaybdLgzU", - "object": { - "content": "Today we hosted one of our Big Tent events in The Hague. \u003cspan class=\"proflinkWrapper\"\u003e\u003cspan class=\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca href=\"https://plus.google.com/104233435224873922474\" class=\"proflink\" oid=\"104233435224873922474\"\u003eEric Schmidt\u003c/a\u003e\u003c/span\u003e, Dutch Foreign Minister Uri Rosenthal, U.S. Secretary of State Hillary Clinton and many others came together to discuss free expression and the Internet. The Hague is our third Big Tent, a place where we bring together various viewpoints to discuss essential topics to the future of the Internet. Read more on the Official Google Blog here: \u003ca href=\"http://goo.gl/d9cSe\" \u003ehttp://goo.gl/d9cSe\u003c/a\u003e, and watch the video below for highlights from the day.", - "plusoners": { - "totalItems": 76 + "kind": "youtube#searchResult", + "id": { + "kind": "youtube#video", + "videoId": "TPAahzXZFZo" + }, + "snippet": { + "publishedAt": "2020-06-26T15:45:00Z", + "channelId": "UCR4Yfr8HAZJd9X24dwuAt1Q", + "title": "Video 3 Title", + "description": "Video 3 Description", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/hqdefault.jpg", + "width": 480, + "height": 360 + } + } + } + }, + { + "kind": "youtube#searchResult", + "id": { + "kind": "youtube#video", + "videoId": "gBL-AelsdFk" + }, + "snippet": { + "publishedAt": "2020-06-24T15:24:06Z", + "channelId": "UCFHZHhZaH7Rc_FOMIzUziJA", + "title": "Video 4 Title", + "description": "Video 4 Description", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/hqdefault.jpg", + "width": 480, + "height": 360 + } + } + } + }, + { + "kind": "youtube#searchResult", + "id": { + "kind": "youtube#video", + "videoId": "9ofe8axKjH0" + }, + "snippet": { + "publishedAt": "2020-06-26T11:59:32Z", + "channelId": "UCtNpbO2MtsVY4qW23WfnxGg", + "title": "Video 5 Title", + "description": "Video 5 Description", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/hqdefault.jpg", + "width": 480, + "height": 360 + } } } } ] } + ``` Here's one possible way to design the Java data classes to represent this: ```java -/** Feed of Google+ activities. */ -public static class ActivityFeed { - - /** List of Google+ activities. */ +public static class ListResponse { @Key("items") - private List activities; + private List searchResults; + + @Key + private PageInfo pageInfo; - public List getActivities() { - return activities; + public List getSearchResults() { + return searchResults; + } + + public PageInfo getPageInfo() { + return pageInfo; } } -/** Google+ activity. */ -public static class Activity extends GenericJson { +public static class PageInfo { + @Key + private long totalResults; - /** Activity URL. */ @Key - private String url; + private long resultsPerPage; - public String getUrl() { - return url; + public long getTotalResults() { + return totalResults; + } + + public long getResultsPerPage() { + return resultsPerPage; + } +} + +public static class SearchResult { + @Key + private String kind; + + @Key("id") + private VideoId videoId; + + @Key + private Snippet snippet; + + public String getKind() { + return kind; } - /** Activity object. */ - @Key("object") - private ActivityObject activityObject; + public VideoId getId() { + return videoId; + } - public ActivityObject getActivityObject() { - return activityObject; + public Snippet getSnippet() { + return snippet; } } -/** Google+ activity object. */ -public static class ActivityObject { +public static class VideoId { + @Key + private String kind; - /** HTML-formatted content. */ @Key - private String content; + private String videoId; + + public String getKind() { + return kind; + } - public String getContent() { - return content; + public String getVideoId() { + return videoId; } +} + +public static class Snippet { + @Key + private String publishedAt; + + @Key + private String channelId; - /** People who +1'd this activity. */ @Key - private PlusOners plusoners; + private String title; - public PlusOners getPlusOners() { - return plusoners; + @Key + private String description; + + public String getPublishedAt() { + return publishedAt; + } + + public String getChannelId() { + return channelId; + } + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public Map getThumbnails() { + return thumbnails; } } -/** People who +1'd an activity. */ -public static class PlusOners { +public static class Thumbnail { + @Key + private String url; + + @Key + private long width; - /** Total number of people who +1'd this activity. */ @Key - private long totalItems; + private long height; - public long getTotalItems() { - return totalItems; + public String getUrl() { + return url; + } + + public long getWidth() { + return width; + } + + public long getHeight() { + return height; } } ``` @@ -143,20 +333,21 @@ A fully supported [HTTP JSON parser][json-parser] makes it easy to parse HTTP re of these user defined classes: ```java -private static void parseResponse(HttpResponse response) throws IOException { - ActivityFeed feed = response.parseAs(ActivityFeed.class); - if (feed.getActivities().isEmpty()) { - System.out.println("No activities found."); +public static ListResponse parseJson(HttpResponse httpResponse) throws IOException { + ListResponse listResponse = httpResponse.parseAs(ListResponse.class); + if (listResponse.getSearchResults().isEmpty()) { + System.out.println("No results found."); } else { - for (Activity activity : feed.getActivities()) { + for (SearchResult searchResult : listResponse.getSearchResults()) { System.out.println(); System.out.println("-----------------------------------------------"); - System.out.println("HTML Content: " + activity.getActivityObject().getContent()); - System.out.println("+1's: " + activity.getActivityObject().getPlusOners().getTotalItems()); - System.out.println("URL: " + activity.getUrl()); - System.out.println("ID: " + activity.get("id")); + System.out.println("Kind: " + searchResult.getKind()); + System.out.println("Video ID: " + searchResult.getId().getVideoId()); + System.out.println("Title: " + searchResult.getSnippet().getTitle()); + System.out.println("Description: " + searchResult.getSnippet().getDescription()); } } + return listResponse; } ``` @@ -172,16 +363,16 @@ serialized to JSON. ### Visibility Visibility of the fields does not matter, nor does the existence of the getter or setter methods. So -for example, the following alternative representation for `PlusOners` would work in the example +for example, the following alternative representation for `VideoId` would work in the example given above: ```java -/** People who +1'd an activity. */ -public static class AlternativePlusOnersWithPublicField { +public static class VideoId { + @Key + public String kind; - /** Total number of people who +1'd this activity. */ @Key - public long totalItems; + public String videoId; } ``` @@ -193,8 +384,8 @@ parser skips that other content when parsing the response from Google+. To retain the other content, declare your class to extend [`GenericJson`][generic-json]. Notice that `GenericJson` implements [`Map`][map], so we can use the `get` and `put` methods to set JSON -content. See [`googleplus-simple-cmdline-sample`][google-plus-sample] for an example of how it was -used in the `Activity` class above. +content. See [`Youtube sample`][youtube-sample] for an example of how it was +used in the `Snippet` class above. ### Map @@ -268,7 +459,8 @@ private static void show(List items) { [gson-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/gson/GsonFactory.html [gson]: https://github.com/google/gson [android-json-factory]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/extensions/android/json/AndroidJsonFactory.html -[google-plus-sample]: https://github.com/googleapis/google-http-java-client/tree/master/samples/googleplus-simple-cmdline-sample +[youtube-sample]: https://github.com/googleapis/google-http-java-client/tree/master/samples/snippets/src/main/java/com/example/json/YouTubeSample.java +[youtube-search]: https://developers.google.com/youtube/v3/docs/search/list [json-parser]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/JsonParser.html [key-annotation]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/util/Key.html [generic-json]: https://googleapis.dev/java/google-http-client/latest/index.html?com/google/api/client/json/GenericJson.html diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 5e300f9a2..77c213f33 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -24,13 +24,13 @@ - + com.google.cloud libraries-bom - + 8.0.0 pom import @@ -42,8 +42,12 @@ com.google.http-client google-http-client - - + + + com.google.http-client + google-http-client-gson + test + junit junit @@ -56,5 +60,13 @@ 1.0.1 test + + com.google.http-client + google-http-client-gson + 1.35.0 + test + + + diff --git a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java new file mode 100644 index 000000000..6aff27898 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java @@ -0,0 +1,174 @@ +/* + * Copyright 2020 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 + * + * https://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.example.json; + +import com.google.api.client.http.HttpResponse; +import com.google.api.client.util.Key; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +public class YouTubeSample { + public static class ListResponse { + @Key("items") + private List searchResults; + + @Key + private PageInfo pageInfo; + + public List getSearchResults() { + return searchResults; + } + + public PageInfo getPageInfo() { + return pageInfo; + } + } + + public static class PageInfo { + @Key + private long totalResults; + + @Key + private long resultsPerPage; + + public long getTotalResults() { + return totalResults; + } + + public long getResultsPerPage() { + return resultsPerPage; + } + } + + public static class SearchResult { + @Key + private String kind; + + @Key("id") + private VideoId videoId; + + @Key + private Snippet snippet; + + public String getKind() { + return kind; + } + + public VideoId getId() { + return videoId; + } + + public Snippet getSnippet() { + return snippet; + } + } + + public static class VideoId { + @Key + private String kind; + + @Key + private String videoId; + + public String getKind() { + return kind; + } + + public String getVideoId() { + return videoId; + } + } + + public static class Snippet { + @Key + private String publishedAt; + + @Key + private String channelId; + + @Key + private String title; + + @Key + private String description; + + @Key + private Map thumbnails; + + public String getPublishedAt() { + return publishedAt; + } + + public String getChannelId() { + return channelId; + } + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public Map getThumbnails() { + return thumbnails; + } + } + + public static class Thumbnail { + @Key + private String url; + + @Key + private long width; + + @Key + private long height; + + public String getUrl() { + return url; + } + + public long getWidth() { + return width; + } + + public long getHeight() { + return height; + } + } + + public static ListResponse parseJson(HttpResponse httpResponse) throws IOException { + ListResponse listResponse = httpResponse.parseAs(ListResponse.class); + if (listResponse.getSearchResults().isEmpty()) { + System.out.println("No results found."); + } else { + for (SearchResult searchResult : listResponse.getSearchResults()) { + System.out.println(); + System.out.println("-----------------------------------------------"); + System.out.println("Kind: " + searchResult.getKind()); + System.out.println("Video ID: " + searchResult.getId().getVideoId()); + System.out.println("Title: " + searchResult.getSnippet().getTitle()); + System.out.println("Description: " + searchResult.getSnippet().getDescription()); + } + } + return listResponse; + } + +} \ No newline at end of file diff --git a/samples/snippets/src/main/resources/youtube-search.json b/samples/snippets/src/main/resources/youtube-search.json new file mode 100644 index 000000000..a0fc438e0 --- /dev/null +++ b/samples/snippets/src/main/resources/youtube-search.json @@ -0,0 +1,182 @@ +{ + "kind": "youtube#searchListResponse", + "etag": "XvAmSt9muXVVpoDkmSHjDBBqm48", + "nextPageToken": "CAUQAA", + "regionCode": "US", + "pageInfo": { + "totalResults": 1000000, + "resultsPerPage": 5 + }, + "items": [ + { + "kind": "youtube#searchResult", + "etag": "GVJEEWhNeZhHT8jtdV-r370b0AE", + "id": { + "kind": "youtube#video", + "videoId": "e6Tudp5lqt8" + }, + "snippet": { + "publishedAt": "2020-06-25T23:18:43Z", + "channelId": "UCKwGZZMrhNYKzucCtTPY2Nw", + "title": "Title 1", + "description": "Description 1", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/e6Tudp5lqt8/hqdefault.jpg", + "width": 480, + "height": 360 + } + }, + "channelTitle": "Some Channel Title", + "liveBroadcastContent": "none", + "publishTime": "2020-06-25T23:18:43Z" + } + }, + { + "kind": "youtube#searchResult", + "etag": "abDpn5ZXHCPTAHJUXYDZoDdVGKk", + "id": { + "kind": "youtube#video", + "videoId": "o-NtLpiMpw0" + }, + "snippet": { + "publishedAt": "2020-06-25T17:28:52Z", + "channelId": "UClljAz6ZKy0XeViKsohdjqA", + "title": "Title 2", + "description": "Description 2", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/o-NtLpiMpw0/hqdefault.jpg", + "width": 480, + "height": 360 + } + }, + "channelTitle": "Some Channel Title", + "liveBroadcastContent": "none", + "publishTime": "2020-06-25T17:28:52Z" + } + }, + { + "kind": "youtube#searchResult", + "etag": "u9pCK3-1ucRi_fZM9VAI22-xekY", + "id": { + "kind": "youtube#video", + "videoId": "TPAahzXZFZo" + }, + "snippet": { + "publishedAt": "2020-06-26T15:45:00Z", + "channelId": "UCR4Yfr8HAZJd9X24dwuAt1Q", + "title": "Title 3", + "description": "Description 3", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/TPAahzXZFZo/hqdefault.jpg", + "width": 480, + "height": 360 + } + }, + "channelTitle": "Some Channel Title", + "liveBroadcastContent": "none", + "publishTime": "2020-06-26T15:45:00Z" + } + }, + { + "kind": "youtube#searchResult", + "etag": "9SRI9WYkKwiaA8dLxuQ7Bs5d4TI", + "id": { + "kind": "youtube#video", + "videoId": "gBL-AelsdFk" + }, + "snippet": { + "publishedAt": "2020-06-24T15:24:06Z", + "channelId": "UCFHZHhZaH7Rc_FOMIzUziJA", + "title": "Title 4", + "description": "Description 4", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/gBL-AelsdFk/hqdefault.jpg", + "width": 480, + "height": 360 + } + }, + "channelTitle": "Some Channel Title", + "liveBroadcastContent": "none", + "publishTime": "2020-06-24T15:24:06Z" + } + }, + { + "kind": "youtube#searchResult", + "etag": "XQCpyLsFVEHMSpJPLK5hxhFnMks", + "id": { + "kind": "youtube#video", + "videoId": "9ofe8axKjH0" + }, + "snippet": { + "publishedAt": "2020-06-26T11:59:32Z", + "channelId": "UCtNpbO2MtsVY4qW23WfnxGg", + "title": "Title 5", + "description": "Description 5", + "thumbnails": { + "default": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/default.jpg", + "width": 120, + "height": 90 + }, + "medium": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/mqdefault.jpg", + "width": 320, + "height": 180 + }, + "high": { + "url": "https://i.ytimg.com/vi/9ofe8axKjH0/hqdefault.jpg", + "width": 480, + "height": 360 + } + }, + "channelTitle": "Some Channel Title", + "liveBroadcastContent": "none", + "publishTime": "2020-06-26T11:59:32Z" + } + } + ] +} diff --git a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java new file mode 100644 index 000000000..b4bbf6c8f --- /dev/null +++ b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 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 + * + * https://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.example.json; + +import com.google.api.client.http.HttpRequest; +import com.google.api.client.http.HttpResponse; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.json.Json; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.json.gson.GsonFactory; +import com.google.api.client.testing.http.HttpTesting; +import com.google.api.client.testing.http.MockHttpTransport; +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 { + + @Test + public void testParsing() throws IOException { + final InputStream contents = getClass().getClassLoader().getResourceAsStream("youtube-search.json"); + Preconditions.checkNotNull(contents); + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContentType(Json.MEDIA_TYPE); + result.setContent(contents); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + request.setParser(new JsonObjectParser(new GsonFactory())); + HttpResponse response = request.execute(); + + YouTubeSample.ListResponse listResponse = YouTubeSample.parseJson(response); + assertEquals(5, listResponse.getPageInfo().getResultsPerPage()); + assertEquals(1000000, listResponse.getPageInfo().getTotalResults()); + assertEquals(5, listResponse.getSearchResults().size()); + for (YouTubeSample.SearchResult searchResult : listResponse.getSearchResults()) { + assertEquals("youtube#searchResult", searchResult.getKind()); + assertNotNull(searchResult.getId()); + assertEquals("youtube#video", searchResult.getId().getKind()); + assertNotNull(searchResult.getId().getVideoId()); + YouTubeSample.Snippet snippet = searchResult.getSnippet(); + assertNotNull(snippet); + assertNotNull(snippet.getChannelId()); + assertNotNull(snippet.getDescription()); + assertNotNull(snippet.getTitle()); + assertNotNull(snippet.getPublishedAt()); + Map thumbnails = snippet.getThumbnails(); + assertNotNull(thumbnails); + + for (Map.Entry entry : thumbnails.entrySet()) { + assertNotNull(entry.getKey()); + YouTubeSample.Thumbnail thumbnail = entry.getValue(); + assertNotNull(thumbnail); + assertNotNull(thumbnail.getUrl()); + assertNotNull(thumbnail.getWidth()); + assertNotNull(thumbnail.getHeight()); + } + } + } +} \ No newline at end of file From 1150acd38aa3139eea4f2f718545c20d2493877e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 30 Jun 2020 08:29:26 -0700 Subject: [PATCH 305/983] feat: add Android 19 compatible FileDataStoreFactory implementation (#1070) * ci: add a animal sniffer check configuration for Android API level 19 * build(deps): update animal-sniffer-maven-plugin version * feat: add Android comptible FileDataStoreFactory implementation This is branched from the original implementation prior to switching to NIO for Windows compatibility. * ci: allow java.nio.file in google-http-client * chore: fix lint * build: put animal-sniffer-maven-plugin back to 1.17 * fix: remove reflection from file permission settings File setReadable(), setWritable(), setExecutable() was added in API level 9, so we should not need to protect android users from missing methods as we support Android API 19+. * chore: run formatter * chore: remove docs mentioning Java 1.5 * fix: move member assignment after input validation --- .../util/store/FileDataStoreFactory.java | 141 ++++++++++++++++++ google-http-client/pom.xml | 17 +++ .../util/store/FileDataStoreFactory.java | 7 +- pom.xml | 28 +++- 4 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 google-http-client-android/src/main/java/com/google/api/client/extensions/android/util/store/FileDataStoreFactory.java diff --git a/google-http-client-android/src/main/java/com/google/api/client/extensions/android/util/store/FileDataStoreFactory.java b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/util/store/FileDataStoreFactory.java new file mode 100644 index 000000000..b9c808b5a --- /dev/null +++ b/google-http-client-android/src/main/java/com/google/api/client/extensions/android/util/store/FileDataStoreFactory.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 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 + * + * https://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.extensions.android.util.store; + +import com.google.api.client.util.IOUtils; +import com.google.api.client.util.Maps; +import com.google.api.client.util.store.AbstractDataStoreFactory; +import com.google.api.client.util.store.AbstractMemoryDataStore; +import com.google.api.client.util.store.DataStore; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.util.logging.Logger; + +/** + * Thread-safe file implementation of a credential store. + * + *

              For security purposes, the file's permissions are set to be accessible only by the file's + * owner. + * + *

              Note: This class was branched from the primary implementation in google-http-client to allow + * the mainline implementation to support Windows file permissions. + * + * @since 1.36 + * @author Yaniv Inbar + */ +public class FileDataStoreFactory extends AbstractDataStoreFactory { + + private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName()); + + /** Directory to store data. */ + private final File dataDirectory; + + /** @param dataDirectory data directory */ + public FileDataStoreFactory(File dataDirectory) throws IOException { + dataDirectory = dataDirectory.getCanonicalFile(); + // error if it is a symbolic link + if (IOUtils.isSymbolicLink(dataDirectory)) { + throw new IOException("unable to use a symbolic link: " + dataDirectory); + } + // create parent directory (if necessary) + if (!dataDirectory.exists() && !dataDirectory.mkdirs()) { + throw new IOException("unable to create directory: " + dataDirectory); + } + this.dataDirectory = dataDirectory; + setPermissionsToOwnerOnly(dataDirectory); + } + + /** Returns the data directory. */ + public final File getDataDirectory() { + return dataDirectory; + } + + @Override + protected DataStore createDataStore(String id) throws IOException { + return new FileDataStore(this, dataDirectory, id); + } + + /** + * File data store that inherits from the abstract memory data store because the key-value pairs + * are stored in a memory cache, and saved in the file (see {@link #save()} when changing values. + * + * @param serializable type of the mapped value + */ + static class FileDataStore extends AbstractMemoryDataStore { + + /** File to store data. */ + private final File dataFile; + + FileDataStore(FileDataStoreFactory dataStore, File dataDirectory, String id) + throws IOException { + super(dataStore, id); + this.dataFile = new File(dataDirectory, id); + // error if it is a symbolic link + if (IOUtils.isSymbolicLink(dataFile)) { + throw new IOException("unable to use a symbolic link: " + dataFile); + } + // create new file (if necessary) + if (dataFile.createNewFile()) { + keyValueMap = Maps.newHashMap(); + // save the credentials to create a new file + save(); + } else { + // load credentials from existing file + keyValueMap = IOUtils.deserialize(new FileInputStream(dataFile)); + } + } + + @Override + public void save() throws IOException { + IOUtils.serialize(keyValueMap, new FileOutputStream(dataFile)); + } + + @Override + public FileDataStoreFactory getDataStoreFactory() { + return (FileDataStoreFactory) super.getDataStoreFactory(); + } + } + + /** + * Attempts to set the given file's permissions such that it can only be read, written, and + * executed by the file's owner. + * + * @param file the file's permissions to modify + */ + static void setPermissionsToOwnerOnly(File file) { + // Disable access by other users if O/S allows it and set file permissions to readable and + // writable by user. + try { + if (!file.setReadable(false, false) + || !file.setWritable(false, false) + || !file.setExecutable(false, false)) { + LOGGER.warning("unable to change permissions for everybody: " + file); + } + if (!file.setReadable(true, true) + || !file.setWritable(true, true) + || !file.setExecutable(true, true)) { + LOGGER.warning("unable to change permissions for owner: " + file); + } + } catch (SecurityException exception) { + // ignored + } catch (IllegalArgumentException exception) { + // ignored + } + } +} diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index eee0716d9..659c51563 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -26,6 +26,23 @@ io.opencensus:opencensus-impl + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + android + + check + + + + java.nio.file.* + + + + + diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index a39356ff5..5bcab8679 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -45,6 +45,11 @@ *

              For security purposes, the file's permissions are set such that the file is only accessible by * the file's owner. * + *

              Note: this class is not compatible with Android lower than API level 26 (Oreo). For an + * implementation compatible with Android < 26, please use + * com.google.api.client.extensions.android.util.store.FileDataStoreFactory which is provided by + * com.google.http-client:google-http-client-android. + * * @since 1.16 * @author Yaniv Inbar */ @@ -61,7 +66,6 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory { /** @param dataDirectory data directory */ public FileDataStoreFactory(File dataDirectory) throws IOException { dataDirectory = dataDirectory.getCanonicalFile(); - this.dataDirectory = dataDirectory; // error if it is a symbolic link if (IOUtils.isSymbolicLink(dataDirectory)) { throw new IOException("unable to use a symbolic link: " + dataDirectory); @@ -70,6 +74,7 @@ public FileDataStoreFactory(File dataDirectory) throws IOException { if (!dataDirectory.exists() && !dataDirectory.mkdirs()) { throw new IOException("unable to create directory: " + dataDirectory); } + this.dataDirectory = dataDirectory; if (IS_WINDOWS) { setPermissionsToOwnerOnlyWindows(dataDirectory); diff --git a/pom.xml b/pom.xml index 3d6505d19..4cff5a308 100644 --- a/pom.xml +++ b/pom.xml @@ -499,18 +499,32 @@ org.codehaus.mojo animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java17 - 1.0 - - + java7 check + + + org.codehaus.mojo.signature + java17 + 1.0 + + + + + android + + check + + + + net.sf.androidscents.signature + android-api-level-19 + 4.4.2_r4 + + From 8ea334851cbd5ef6752de03b48c53c35e46532ea Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2020 00:06:03 +0000 Subject: [PATCH 306/983] chore: release 1.36.0 (#1073) :robot: I have created a release \*beep\* \*boop\* --- ## [1.36.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.35.0...v1.36.0) (2020-06-30) ### Features * add Android 19 compatible FileDataStoreFactory implementation ([#1070](https://www.github.com/googleapis/google-http-java-client/issues/1070)) ([1150acd](https://www.github.com/googleapis/google-http-java-client/commit/1150acd38aa3139eea4f2f718545c20d2493877e)) ### Bug Fixes * restore the thread's interrupted status after catching InterruptedException ([#1005](https://www.github.com/googleapis/google-http-java-client/issues/1005)) ([#1006](https://www.github.com/googleapis/google-http-java-client/issues/1006)) ([0a73a46](https://www.github.com/googleapis/google-http-java-client/commit/0a73a4628b6ec4420db6b9cdbcc68899f3807c5b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 12 ++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 65 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7ea60f05..3ea0f07a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.36.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.35.0...v1.36.0) (2020-06-30) + + +### Features + +* add Android 19 compatible FileDataStoreFactory implementation ([#1070](https://www.github.com/googleapis/google-http-java-client/issues/1070)) ([1150acd](https://www.github.com/googleapis/google-http-java-client/commit/1150acd38aa3139eea4f2f718545c20d2493877e)) + + +### Bug Fixes + +* restore the thread's interrupted status after catching InterruptedException ([#1005](https://www.github.com/googleapis/google-http-java-client/issues/1005)) ([#1006](https://www.github.com/googleapis/google-http-java-client/issues/1006)) ([0a73a46](https://www.github.com/googleapis/google-http-java-client/commit/0a73a4628b6ec4420db6b9cdbcc68899f3807c5b)) + ## [1.35.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.34.2...v1.35.0) (2020-04-27) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 0bbaadcff..65f1ae753 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.35.1-SNAPSHOT + 1.36.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.35.1-SNAPSHOT + 1.36.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.35.1-SNAPSHOT + 1.36.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 4edeeb3ac..f5e3044e2 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-android - 1.35.1-SNAPSHOT + 1.36.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index cf8f37e91..5d3f69c26 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-apache-v2 - 1.35.1-SNAPSHOT + 1.36.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3df3f234a..c16736ace 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-appengine - 1.35.1-SNAPSHOT + 1.36.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 129acfefd..0fc1ef53a 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.35.1-SNAPSHOT + 1.36.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6cecf3f28..e9d3cabe0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.35.1-SNAPSHOT + 1.36.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-android - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-apache-v2 - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-appengine - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-findbugs - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-gson - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-jackson2 - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-protobuf - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-test - 1.35.1-SNAPSHOT + 1.36.0 com.google.http-client google-http-client-xml - 1.35.1-SNAPSHOT + 1.36.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 188512163..b794551f1 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-findbugs - 1.35.1-SNAPSHOT + 1.36.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a29eba42c..540ec9c3a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-gson - 1.35.1-SNAPSHOT + 1.36.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 07a0b54f6..7f175f1a1 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-jackson2 - 1.35.1-SNAPSHOT + 1.36.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fd3370f8e..85f496ca6 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-protobuf - 1.35.1-SNAPSHOT + 1.36.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index df6031228..74153df1a 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-test - 1.35.1-SNAPSHOT + 1.36.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 295ffd458..641b74637 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client-xml - 1.35.1-SNAPSHOT + 1.36.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 659c51563..a710e427b 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../pom.xml google-http-client - 1.35.1-SNAPSHOT + 1.36.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 4cff5a308..5c56df5b4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -574,7 +574,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.35.1-SNAPSHOT + 1.36.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f5930f8eb..c81182186 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.35.1-SNAPSHOT + 1.36.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d23765fd0..ed4b40009 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.35.0:1.35.1-SNAPSHOT -google-http-client-bom:1.35.0:1.35.1-SNAPSHOT -google-http-client-parent:1.35.0:1.35.1-SNAPSHOT -google-http-client-android:1.35.0:1.35.1-SNAPSHOT -google-http-client-android-test:1.35.0:1.35.1-SNAPSHOT -google-http-client-apache-v2:1.35.0:1.35.1-SNAPSHOT -google-http-client-appengine:1.35.0:1.35.1-SNAPSHOT -google-http-client-assembly:1.35.0:1.35.1-SNAPSHOT -google-http-client-findbugs:1.35.0:1.35.1-SNAPSHOT -google-http-client-gson:1.35.0:1.35.1-SNAPSHOT -google-http-client-jackson2:1.35.0:1.35.1-SNAPSHOT -google-http-client-protobuf:1.35.0:1.35.1-SNAPSHOT -google-http-client-test:1.35.0:1.35.1-SNAPSHOT -google-http-client-xml:1.35.0:1.35.1-SNAPSHOT +google-http-client:1.36.0:1.36.0 +google-http-client-bom:1.36.0:1.36.0 +google-http-client-parent:1.36.0:1.36.0 +google-http-client-android:1.36.0:1.36.0 +google-http-client-android-test:1.36.0:1.36.0 +google-http-client-apache-v2:1.36.0:1.36.0 +google-http-client-appengine:1.36.0:1.36.0 +google-http-client-assembly:1.36.0:1.36.0 +google-http-client-findbugs:1.36.0:1.36.0 +google-http-client-gson:1.36.0:1.36.0 +google-http-client-jackson2:1.36.0:1.36.0 +google-http-client-protobuf:1.36.0:1.36.0 +google-http-client-test:1.36.0:1.36.0 +google-http-client-xml:1.36.0:1.36.0 From 31151587f2694057b16ee4a5df1aacb774a6cd6d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Jul 2020 23:05:43 +0200 Subject: [PATCH 307/983] chore(deps): update dependency com.google.http-client:google-http-client-gson to v1.36.0 (#1074) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 77c213f33..89cf51f2d 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client-gson - 1.35.0 + 1.36.0 test From d618569f97d9d6a31548d5c3f72c88d64fc2036e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 7 Jul 2020 14:11:35 -0700 Subject: [PATCH 308/983] chore: remove clirr baseline version (#1071) By default, this will now compare against the latest version available on Maven Central. --- clirr-ignored-differences.xml | 28 ---------------------------- pom.xml | 3 +-- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 clirr-ignored-differences.xml diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml deleted file mode 100644 index 0f0a72edf..000000000 --- a/clirr-ignored-differences.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - 7002 - com/google/api/client/json/webtoken/* - java.lang.String getX509Certificate() - - - 7002 - com/google/api/client/json/webtoken/* - com.google.api.client.json.webtoken.JsonWebSignature$Header setX509Certificate(java.lang.String) - - - 7002 - com/google/api/client/testing/http/MockHttpTransport - com.google.api.client.testing.http.MockHttpTransport$Builder builder() - - - - 8001 - com/google/api/client/repackaged/** - - - 8001 - com/google/api/client/http/apache/** - - diff --git a/pom.xml b/pom.xml index 5c56df5b4..23504d249 100644 --- a/pom.xml +++ b/pom.xml @@ -484,8 +484,7 @@ org.codehaus.mojo clirr-maven-plugin - 1.19.0 - ${basedir}/../clirr-ignored-differences.xml + clirr-ignored-differences.xml true From 9447cafcbd83f17eb543b271c0b6cc1fce9bd8dc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2020 21:20:02 +0000 Subject: [PATCH 309/983] chore: release 1.36.1-SNAPSHOT (#1077) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 65f1ae753..4eeddb4bd 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.36.0 + 1.36.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.36.0 + 1.36.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.36.0 + 1.36.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index f5e3044e2..8a91def7c 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-android - 1.36.0 + 1.36.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 5d3f69c26..6a2171bf7 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.36.0 + 1.36.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c16736ace..52232b21d 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.36.0 + 1.36.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 0fc1ef53a..5bc1d3a54 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.36.0 + 1.36.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e9d3cabe0..69f94e6a4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.36.0 + 1.36.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-android - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-test - 1.36.0 + 1.36.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.36.0 + 1.36.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index b794551f1..e416707f2 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.36.0 + 1.36.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 540ec9c3a..a0ce6b787 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.36.0 + 1.36.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 7f175f1a1..7e8a1e92f 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.36.0 + 1.36.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 85f496ca6..148605ac4 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.36.0 + 1.36.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 74153df1a..3d1a522ef 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-test - 1.36.0 + 1.36.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 641b74637..f13679967 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.36.0 + 1.36.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index a710e427b..bcd847b74 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../pom.xml google-http-client - 1.36.0 + 1.36.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 23504d249..cf32119f7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.36.0 + 1.36.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index c81182186..48af1b955 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.36.0 + 1.36.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ed4b40009..dad7dca83 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.36.0:1.36.0 -google-http-client-bom:1.36.0:1.36.0 -google-http-client-parent:1.36.0:1.36.0 -google-http-client-android:1.36.0:1.36.0 -google-http-client-android-test:1.36.0:1.36.0 -google-http-client-apache-v2:1.36.0:1.36.0 -google-http-client-appengine:1.36.0:1.36.0 -google-http-client-assembly:1.36.0:1.36.0 -google-http-client-findbugs:1.36.0:1.36.0 -google-http-client-gson:1.36.0:1.36.0 -google-http-client-jackson2:1.36.0:1.36.0 -google-http-client-protobuf:1.36.0:1.36.0 -google-http-client-test:1.36.0:1.36.0 -google-http-client-xml:1.36.0:1.36.0 +google-http-client:1.36.0:1.36.1-SNAPSHOT +google-http-client-bom:1.36.0:1.36.1-SNAPSHOT +google-http-client-parent:1.36.0:1.36.1-SNAPSHOT +google-http-client-android:1.36.0:1.36.1-SNAPSHOT +google-http-client-android-test:1.36.0:1.36.1-SNAPSHOT +google-http-client-apache-v2:1.36.0:1.36.1-SNAPSHOT +google-http-client-appengine:1.36.0:1.36.1-SNAPSHOT +google-http-client-assembly:1.36.0:1.36.1-SNAPSHOT +google-http-client-findbugs:1.36.0:1.36.1-SNAPSHOT +google-http-client-gson:1.36.0:1.36.1-SNAPSHOT +google-http-client-jackson2:1.36.0:1.36.1-SNAPSHOT +google-http-client-protobuf:1.36.0:1.36.1-SNAPSHOT +google-http-client-test:1.36.0:1.36.1-SNAPSHOT +google-http-client-xml:1.36.0:1.36.1-SNAPSHOT From 799c282592b44e439c31fb2c852ba9da74edb986 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 23 Jul 2020 15:53:55 +0000 Subject: [PATCH 310/983] chore: update docs for libraries-bom 8.1.0 (#1079) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 768236f87..99522b190 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 8.0.0 + 8.1.0 pom import From 90952a717f771801b6b4264050e93258d326740a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Aug 2020 10:44:08 -0700 Subject: [PATCH 311/983] chore(docs): add cloud-RAD for Java (#1080) Co-authored-by: Jeff Ching Source-Author: Les Vogel Source-Date: Thu Jul 30 13:09:50 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: dd230c816f88d0141fcd0be83498986287220d1b Source-Link: https://github.com/googleapis/synthtool/commit/dd230c816f88d0141fcd0be83498986287220d1b --- .kokoro/release/publish_javadoc.cfg | 10 ++++ .kokoro/release/publish_javadoc.sh | 25 ++++++++- synth.metadata | 79 +++++++++++++++++++++++++++-- 3 files changed, 109 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index c5d16b787..2359ee9d6 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -1,14 +1,24 @@ # Format: //devtools/kokoro/config/proto/build.proto + +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" + env_vars: { key: "STAGING_BUCKET" value: "docs-staging" } +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2-staging" + # Production will be at: docs-staging-v2 +} + env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" } + before_action { fetch_keystore { keystore_resource { diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index b65eb9f90..e078748a8 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -24,6 +24,11 @@ if [[ -z "${STAGING_BUCKET}" ]]; then exit 1 fi +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + # work from the git root directory pushd $(dirname "$0")/../../ @@ -31,13 +36,13 @@ pushd $(dirname "$0")/../../ python3 -m pip install gcp-docuploader # compile all packages -mvn clean install -B -DskipTests=true +mvn clean install -B -q -DskipTests=true NAME=google-http-client VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs -mvn site -B +mvn site -B -q pushd target/site/apidocs @@ -53,3 +58,19 @@ python3 -m docuploader upload . \ --staging-bucket ${STAGING_BUCKET} popd + +# V2 +mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" + +pushd target/devsite + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} diff --git a/synth.metadata b/synth.metadata index f10802993..ecdc4f7f9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,16 +3,89 @@ { "git": { "name": ".", - "remote": "git@github.com:chingor13/google-http-java-client.git", - "sha": "b1353f8cc7aaf22a30b31bd2ac72248d3a3a0a5d" + "remote": "https://github.com/googleapis/google-http-java-client.git", + "sha": "799c282592b44e439c31fb2c852ba9da74edb986" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4" + "sha": "dd230c816f88d0141fcd0be83498986287220d1b" } } + ], + "generatedFiles": [ + ".github/CODEOWNERS", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/release-please.yml", + ".github/trusted-contribution.yml", + ".github/workflows/ci.yaml", + ".kokoro/build.bat", + ".kokoro/build.sh", + ".kokoro/coerce_logs.sh", + ".kokoro/common.cfg", + ".kokoro/common.sh", + ".kokoro/continuous/common.cfg", + ".kokoro/continuous/dependencies.cfg", + ".kokoro/continuous/integration.cfg", + ".kokoro/continuous/java11.cfg", + ".kokoro/continuous/java7.cfg", + ".kokoro/continuous/java8-osx.cfg", + ".kokoro/continuous/java8-win.cfg", + ".kokoro/continuous/java8.cfg", + ".kokoro/continuous/lint.cfg", + ".kokoro/continuous/propose_release.cfg", + ".kokoro/continuous/samples.cfg", + ".kokoro/dependencies.sh", + ".kokoro/linkage-monitor.sh", + ".kokoro/nightly/common.cfg", + ".kokoro/nightly/dependencies.cfg", + ".kokoro/nightly/integration.cfg", + ".kokoro/nightly/java11.cfg", + ".kokoro/nightly/java7.cfg", + ".kokoro/nightly/java8-osx.cfg", + ".kokoro/nightly/java8-win.cfg", + ".kokoro/nightly/java8.cfg", + ".kokoro/nightly/lint.cfg", + ".kokoro/nightly/samples.cfg", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/clirr.cfg", + ".kokoro/presubmit/common.cfg", + ".kokoro/presubmit/dependencies.cfg", + ".kokoro/presubmit/integration.cfg", + ".kokoro/presubmit/java11.cfg", + ".kokoro/presubmit/java7.cfg", + ".kokoro/presubmit/java8-osx.cfg", + ".kokoro/presubmit/java8-win.cfg", + ".kokoro/presubmit/java8.cfg", + ".kokoro/presubmit/linkage-monitor.cfg", + ".kokoro/presubmit/lint.cfg", + ".kokoro/presubmit/samples.cfg", + ".kokoro/release/bump_snapshot.cfg", + ".kokoro/release/common.cfg", + ".kokoro/release/common.sh", + ".kokoro/release/drop.cfg", + ".kokoro/release/drop.sh", + ".kokoro/release/promote.cfg", + ".kokoro/release/promote.sh", + ".kokoro/release/publish_javadoc.cfg", + ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/snapshot.cfg", + ".kokoro/release/snapshot.sh", + ".kokoro/release/stage.cfg", + ".kokoro/release/stage.sh", + ".kokoro/trampoline.sh", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "codecov.yaml", + "samples/install-without-bom/pom.xml", + "samples/pom.xml", + "samples/snapshot/pom.xml", + "samples/snippets/pom.xml" ] } \ No newline at end of file From 1b4ad2814d5f7f35032841cac81b38c525dc08bf Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 14 Aug 2020 11:02:42 -0400 Subject: [PATCH 312/983] chore: libraries-bom 9.0.0 (#1083) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 99522b190..c3bc8db47 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 8.1.0 + 9.0.0 pom import From c90a694b23b44f804d7b32e87f6fc9395d398055 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 20 Aug 2020 15:21:08 -0700 Subject: [PATCH 313/983] chore: update common templates (#1085) * cleanup: removes unused kokoro config files * cleanup: removes unused kokoro config files Removes unused kokoro files from the java library template. We have stopped running some of these due to Github quota issues. * fix:reverts back samples.cfg files The files presubmit/samples.cfg and nightly/samples.cfg should remain in the java template repository. Co-authored-by: Jeffrey Rennie Source-Author: Thiago Nunes Source-Date: Thu Aug 6 09:48:58 2020 +1000 Source-Repo: googleapis/synthtool Source-Sha: 4530cc6ff080ef8aca258c1ec92c4db10a1bbfb4 Source-Link: https://github.com/googleapis/synthtool/commit/4530cc6ff080ef8aca258c1ec92c4db10a1bbfb4 * build: update dependencies check to only check for runtime and compile scopes * change:Updated dependencies check to only use runtime & compile scope * Update dependencies.sh * feat: update dependencies check to only check for runtime and compile scopes Co-authored-by: Saleh Mostafa Co-authored-by: Jeffrey Rennie Source-Author: salehsquared Source-Date: Thu Aug 6 13:01:02 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: f8823dec98277a9516f2fb6fae9f58b3a59a23e1 Source-Link: https://github.com/googleapis/synthtool/commit/f8823dec98277a9516f2fb6fae9f58b3a59a23e1 * chore(java_templates): add lint/static analysis presubmit checks for samples * chore(java_templates): add lint/static analysis presubmit checks for samples * chore: fix trailing whitespace Source-Author: Jeff Ching Source-Date: Mon Aug 17 14:29:16 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: c3caf0704f25a0c365f1c315e804a30b87c62a75 Source-Link: https://github.com/googleapis/synthtool/commit/c3caf0704f25a0c365f1c315e804a30b87c62a75 * chore(java_templates): stop running pmd/spotbugs checks for samples This was creating too much noise. We will revisit with other options and/or tune these checks. Source-Author: Jeff Ching Source-Date: Wed Aug 19 12:26:49 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 9602086c6c5b05db77950c7f7495a2a3868f3537 Source-Link: https://github.com/googleapis/synthtool/commit/9602086c6c5b05db77950c7f7495a2a3868f3537 --- .github/workflows/samples.yaml | 14 +++++++ .kokoro/continuous/dependencies.cfg | 12 ------ .kokoro/continuous/integration.cfg | 7 ---- .kokoro/continuous/java11.cfg | 7 ---- .kokoro/continuous/java7.cfg | 7 ---- .kokoro/continuous/java8-osx.cfg | 3 -- .kokoro/continuous/java8-win.cfg | 3 -- .kokoro/continuous/lint.cfg | 13 ------- .kokoro/continuous/propose_release.cfg | 53 -------------------------- .kokoro/continuous/samples.cfg | 31 --------------- .kokoro/dependencies.sh | 9 +++-- .kokoro/nightly/dependencies.cfg | 12 ------ .kokoro/nightly/lint.cfg | 13 ------- synth.metadata | 16 ++------ 14 files changed, 22 insertions(+), 178 deletions(-) create mode 100644 .github/workflows/samples.yaml delete mode 100644 .kokoro/continuous/dependencies.cfg delete mode 100644 .kokoro/continuous/integration.cfg delete mode 100644 .kokoro/continuous/java11.cfg delete mode 100644 .kokoro/continuous/java7.cfg delete mode 100644 .kokoro/continuous/java8-osx.cfg delete mode 100644 .kokoro/continuous/java8-win.cfg delete mode 100644 .kokoro/continuous/lint.cfg delete mode 100644 .kokoro/continuous/propose_release.cfg delete mode 100644 .kokoro/continuous/samples.cfg delete mode 100644 .kokoro/nightly/dependencies.cfg delete mode 100644 .kokoro/nightly/lint.cfg diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 000000000..a1d500730 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg deleted file mode 100644 index b89a20740..000000000 --- a/.kokoro/continuous/dependencies.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/dependencies.sh" -} diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg deleted file mode 100644 index 3b017fc80..000000000 --- a/.kokoro/continuous/integration.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg deleted file mode 100644 index 709f2b4c7..000000000 --- a/.kokoro/continuous/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/continuous/java7.cfg b/.kokoro/continuous/java7.cfg deleted file mode 100644 index cb24f44ee..000000000 --- a/.kokoro/continuous/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/continuous/java8-osx.cfg b/.kokoro/continuous/java8-osx.cfg deleted file mode 100644 index b2354168e..000000000 --- a/.kokoro/continuous/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "google-http-java-client/.kokoro/build.sh" diff --git a/.kokoro/continuous/java8-win.cfg b/.kokoro/continuous/java8-win.cfg deleted file mode 100644 index b44537d03..000000000 --- a/.kokoro/continuous/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "google-http-java-client/.kokoro/build.bat" diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg deleted file mode 100644 index 6d323c8ae..000000000 --- a/.kokoro/continuous/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg deleted file mode 100644 index 715a53e14..000000000 --- a/.kokoro/continuous/propose_release.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "google-http-java-client/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/continuous/propose_release.sh" -} - -# tokens used by release-please to keep an up-to-date release PR. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-key-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-token-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-url-release-please" - } - } -} diff --git a/.kokoro/continuous/samples.cfg b/.kokoro/continuous/samples.cfg deleted file mode 100644 index fa7b493d0..000000000 --- a/.kokoro/continuous/samples.cfg +++ /dev/null @@ -1,31 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "keystore/73713_java_it_service_account" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "java_it_service_account" - } - } -} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index cee4f11e7..c91e5a569 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -43,12 +43,13 @@ function completenessCheck() { # Output dep list with compile scope generated using the original pom # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt - # Output dep list generated using the flattened pom (test scope deps are ommitted) + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt # Compare two dependency lists msg "Comparing dependency lists..." @@ -85,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi +fi \ No newline at end of file diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg deleted file mode 100644 index b89a20740..000000000 --- a/.kokoro/nightly/dependencies.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/dependencies.sh" -} diff --git a/.kokoro/nightly/lint.cfg b/.kokoro/nightly/lint.cfg deleted file mode 100644 index 6d323c8ae..000000000 --- a/.kokoro/nightly/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index ecdc4f7f9..5f2904b13 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "799c282592b44e439c31fb2c852ba9da74edb986" + "sha": "1b4ad2814d5f7f35032841cac81b38c525dc08bf" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dd230c816f88d0141fcd0be83498986287220d1b" + "sha": "9602086c6c5b05db77950c7f7495a2a3868f3537" } } ], @@ -24,33 +24,23 @@ ".github/release-please.yml", ".github/trusted-contribution.yml", ".github/workflows/ci.yaml", + ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", ".kokoro/common.cfg", ".kokoro/common.sh", ".kokoro/continuous/common.cfg", - ".kokoro/continuous/dependencies.cfg", - ".kokoro/continuous/integration.cfg", - ".kokoro/continuous/java11.cfg", - ".kokoro/continuous/java7.cfg", - ".kokoro/continuous/java8-osx.cfg", - ".kokoro/continuous/java8-win.cfg", ".kokoro/continuous/java8.cfg", - ".kokoro/continuous/lint.cfg", - ".kokoro/continuous/propose_release.cfg", - ".kokoro/continuous/samples.cfg", ".kokoro/dependencies.sh", ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", - ".kokoro/nightly/dependencies.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", ".kokoro/nightly/java7.cfg", ".kokoro/nightly/java8-osx.cfg", ".kokoro/nightly/java8-win.cfg", ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/lint.cfg", ".kokoro/nightly/samples.cfg", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/clirr.cfg", From bdcdccc696e433ea4e2275241fd15bd4bbe4addc Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 24 Aug 2020 15:14:56 +0000 Subject: [PATCH 314/983] chore: update libraries-bom (#1084) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index c3bc8db47..1bf14b3f0 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 9.0.0 + 9.1.0 pom import From a6316b6707defa8d583d3ed33ef90717579c36a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Aug 2020 19:01:59 +0200 Subject: [PATCH 315/983] chore(deps): update dependency com.google.cloud:libraries-bom to v9 (#1091) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 89cf51f2d..9e84544eb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 8.0.0 + 9.1.0 pom import From 5a92a1cc379c58bcd691df92100fd032aaad2db2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Aug 2020 19:02:25 +0200 Subject: [PATCH 316/983] chore(deps): update dependency org.apache.maven.plugins:maven-resources-plugin to v3.2.0 (#1089) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf32119f7..32f112f09 100644 --- a/pom.xml +++ b/pom.xml @@ -374,7 +374,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.1.0 + 3.2.0 org.apache.maven.plugins From 6f7ed4d2c1667e397cee60dc71f2a17bd647bcee Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Aug 2020 19:03:14 +0200 Subject: [PATCH 317/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.11.2 (#1086) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 32f112f09..19e814d63 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.6 - 2.11.1 + 2.11.2 3.12.2 29.0-android 1.1.4c From b7e96632234e944e0e476dedfc822333716756bb Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 24 Aug 2020 17:23:37 +0000 Subject: [PATCH 318/983] deps: update protobuf-java to 3.13.0 (#1093) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19e814d63..886ecd869 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.6 2.11.2 - 3.12.2 + 3.13.0 29.0-android 1.1.4c 1.2 From 099a24c5ba877ddb936901f633c9342b3492aa01 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 26 Aug 2020 09:31:41 -0700 Subject: [PATCH 319/983] build: temporarily disable reporting to unblock releases Source-Author: Stephanie Wang Source-Date: Tue Aug 25 13:05:26 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 968465a1cad496e1292ef4584a054a35f756ff94 Source-Link: https://github.com/googleapis/synthtool/commit/968465a1cad496e1292ef4584a054a35f756ff94 --- .kokoro/release/stage.sh | 5 +++-- synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c482cbc5..d19191fc8 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,8 +16,9 @@ set -eo pipefail # Start the releasetool reporter -python3 -m pip install gcp-releasetool -python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script +# Disable reporting due to issue observed with Kokoro blocking releases +# python3 -m pip install gcp-releasetool +# python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml diff --git a/synth.metadata b/synth.metadata index 5f2904b13..450236a6a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "1b4ad2814d5f7f35032841cac81b38c525dc08bf" + "sha": "b7e96632234e944e0e476dedfc822333716756bb" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9602086c6c5b05db77950c7f7495a2a3868f3537" + "sha": "968465a1cad496e1292ef4584a054a35f756ff94" } } ], From cea3bcb1ab672d15da52703fab03c60fcba69f5f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 09:26:52 -0700 Subject: [PATCH 320/983] build(java): switch to release-publish app for notifying GitHub of release status Source-Author: Jeff Ching Source-Date: Wed Aug 26 21:48:06 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 019c7168faa0e56619f792693a8acdb30d6de19b Source-Link: https://github.com/googleapis/synthtool/commit/019c7168faa0e56619f792693a8acdb30d6de19b --- .kokoro/release/stage.cfg | 31 +++---------------------------- .kokoro/release/stage.sh | 5 ++--- synth.metadata | 4 ++-- 3 files changed, 7 insertions(+), 33 deletions(-) diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg index 3463d3d7b..103381c4f 100644 --- a/.kokoro/release/stage.cfg +++ b/.kokoro/release/stage.cfg @@ -13,32 +13,7 @@ action { } } -# Fetch the token needed for reporting release status to GitHub -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - } - } -} - -# Fetch magictoken to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "releasetool-magictoken" - } - } -} - -# Fetch api key to use with Magic Github Proxy -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "magic-github-proxy-api-key" - } - } +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index d19191fc8..3c482cbc5 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,9 +16,8 @@ set -eo pipefail # Start the releasetool reporter -# Disable reporting due to issue observed with Kokoro blocking releases -# python3 -m pip install gcp-releasetool -# python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml diff --git a/synth.metadata b/synth.metadata index 450236a6a..09c224151 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "b7e96632234e944e0e476dedfc822333716756bb" + "sha": "099a24c5ba877ddb936901f633c9342b3492aa01" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "968465a1cad496e1292ef4584a054a35f756ff94" + "sha": "019c7168faa0e56619f792693a8acdb30d6de19b" } } ], From e957229fd77c08b7dd6233e2a243f6c675ba32bf Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 31 Aug 2020 17:12:50 -0400 Subject: [PATCH 321/983] chore: libraries-bom 10.0.0 (#1104) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 1bf14b3f0..8b1b9dffa 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 9.1.0 + 10.0.0 pom import From 202a0c98cecf8fde20d951a35cbe3db6af430ec3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Sep 2020 19:09:06 +0200 Subject: [PATCH 322/983] chore(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.1.1 (#1105) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 886ecd869..aa56799ce 100644 --- a/pom.xml +++ b/pom.xml @@ -359,7 +359,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.0 + 3.1.1 org.apache.maven.plugins @@ -530,7 +530,7 @@ maven-project-info-reports-plugin - 3.1.0 + 3.1.1 From ea8b075df768ee7221015a1e8dfadb0b41ffe779 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Sep 2020 19:09:33 +0200 Subject: [PATCH 323/983] chore(deps): update dependency com.google.cloud:libraries-bom to v10 (#1103) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9e84544eb..b0f8ca9b8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 9.1.0 + 10.0.0 pom import From da9b08a3210cd580e2747b04dc287716c650ea50 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 10 Sep 2020 11:17:49 -0400 Subject: [PATCH 324/983] BOM 10.1.0 (#1108) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 8b1b9dffa..c3808fab1 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 10.0.0 + 10.1.0 pom import From 35b7085a328e1d2149bb2c703c6e3873559cb286 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 21 Sep 2020 14:45:27 -0700 Subject: [PATCH 325/983] build(ci): enable auto-release for dependency-update-only releases Automatically perform a Java client library release when: 1. Only dependency updates are going out in the release since any releases containing bug fixes, build changes or new features should be supervised; 2. There are no outstanding/open dependency update pull requests in the repo. This is to avoid multiple/redundant releases; 3. It is a SNAPSHOT release which is automatically generated post regular release -- this requires no human supervision. Testing done in 5 java-bigquery* client library repos. Example: [chore: release 0.3.4 ](https://github.com/googleapis/java-bigqueryconnection/pull/130) [chore: release 0.3.5-SNAPSHOT](https://github.com/googleapis/java-bigqueryconnection/pull/131) Source-Author: Stephanie Wang Source-Date: Thu Sep 17 15:30:02 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 538a68019eb4a36a0cdfa4021f324dd01b784395 Source-Link: https://github.com/googleapis/synthtool/commit/538a68019eb4a36a0cdfa4021f324dd01b784395 --- .github/workflows/auto-release.yaml | 69 +++++++++++++++++++++++++++++ synth.metadata | 5 ++- 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/auto-release.yaml diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 000000000..d26427e46 --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,69 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 09c224151..894d4b965 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "099a24c5ba877ddb936901f633c9342b3492aa01" + "sha": "da9b08a3210cd580e2747b04dc287716c650ea50" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "019c7168faa0e56619f792693a8acdb30d6de19b" + "sha": "538a68019eb4a36a0cdfa4021f324dd01b784395" } } ], @@ -23,6 +23,7 @@ ".github/PULL_REQUEST_TEMPLATE.md", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", From 40457657574bac1e9e8cf75104c10b5c3e9a872d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 21 Sep 2020 14:58:02 -0700 Subject: [PATCH 326/983] chore(java): set yoshi-java as default CODEOWNER (#1112) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d09eafd6-12d3-438f-b5ed-5775d715bab7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/80003a3de2d8a75f5b47cb2e77e018f7f0f776cc --- .github/CODEOWNERS | 1 + synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 12670923c..8787bdfe7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,6 +5,7 @@ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax # The @googleapis/yoshi-java is the default owner for changes in this repo +* @googleapis/yoshi-java @googleapis/yoshi-java **/*.java @googleapis/yoshi-java # The java-samples-reviewers team is the default owner for samples changes diff --git a/synth.metadata b/synth.metadata index 894d4b965..fb799b065 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "da9b08a3210cd580e2747b04dc287716c650ea50" + "sha": "35b7085a328e1d2149bb2c703c6e3873559cb286" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "538a68019eb4a36a0cdfa4021f324dd01b784395" + "sha": "80003a3de2d8a75f5b47cb2e77e018f7f0f776cc" } } ], From c63fa91552a20b8f043a460e3056de5993b0a54b Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 21 Sep 2020 16:47:51 -0700 Subject: [PATCH 327/983] chore: add settings sync, cleanup CODEOWNERS (#1113) --- .github/CODEOWNERS | 4 +-- .github/sync-repo-settings.yaml | 45 +++++++++++++++++++++++++++++++++ .repo-metadata.json | 1 - 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .github/sync-repo-settings.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8787bdfe7..30fdb7b9c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,9 +4,7 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The @googleapis/yoshi-java is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/yoshi-java -**/*.java @googleapis/yoshi-java +* @googleapis/yoshi-java # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 000000000..af5dd3bd5 --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,45 @@ +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "Kokoro - Test: Binary Compatibility" + - "Kokoro - Test: Java 11" + - "Kokoro - Test: Java 7" + - "Kokoro - Test: Java 8" + - "Kokoro - Test: Linkage Monitor" + - "cla/google" + +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push diff --git a/.repo-metadata.json b/.repo-metadata.json index 0cd58366d..db2d13700 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -6,6 +6,5 @@ "language": "java", "repo": "googleapis/google-http-java-client", "repo_short": "google-http-java-client", - "codeowner_team": "@googleapis/yoshi-java", "distribution_name": "com.google.http-client:google-http-client" } From b60bdda51c22d11c08915673a9b7992ee5e902f3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 22 Sep 2020 14:26:56 +0200 Subject: [PATCH 328/983] chore(deps): update dependency com.google.cloud:libraries-bom to v10.1.0 (#1106) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b0f8ca9b8..adcc5bb90 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.0.0 + 10.1.0 pom import From 90d83706c3b288dc05c5b33e39f589aeec531a69 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 23 Sep 2020 15:46:27 -0700 Subject: [PATCH 329/983] build(java): use yoshi-approver token for auto-approve (#1124) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e2bf6665-3866-4539-9100-234150a196aa/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/916c10e8581804df2b48a0f0457d848f3faa582e --- .github/workflows/auto-release.yaml | 4 ++-- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index d26427e46..c84949105 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/github-script@v3.0.0 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true script: | // only approve PRs from release-please[bot] @@ -66,4 +66,4 @@ jobs: repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: ['kokoro:force-run', 'automerge'] - }); \ No newline at end of file + }); diff --git a/synth.metadata b/synth.metadata index fb799b065..e69a7b505 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "35b7085a328e1d2149bb2c703c6e3873559cb286" + "sha": "b60bdda51c22d11c08915673a9b7992ee5e902f3" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "80003a3de2d8a75f5b47cb2e77e018f7f0f776cc" + "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" } } ], From 4ec36cf76036736fb9f34ee61ba6214093cea79d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Sep 2020 19:46:03 +0200 Subject: [PATCH 330/983] chore(deps): update dependency com.google.cloud:libraries-bom to v11 (#1125) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | major | `10.1.0` -> `11.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index adcc5bb90..8d8e2f0d8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import From 9816851ca23f69039a80304c97f7fbed5c26108b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 29 Sep 2020 16:10:45 -0700 Subject: [PATCH 331/983] chore(ci): skip autorelease workflow on non-release PRs (#1128) Source-Author: Stephanie Wang Source-Date: Thu Sep 24 16:57:32 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2 Source-Link: https://github.com/googleapis/synthtool/commit/95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2 --- .github/workflows/auto-release.yaml | 1 + synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index c84949105..3ce51eeea 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,6 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-v') steps: - uses: actions/github-script@v3.0.0 with: diff --git a/synth.metadata b/synth.metadata index e69a7b505..ccdda8c89 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "b60bdda51c22d11c08915673a9b7992ee5e902f3" + "sha": "4ec36cf76036736fb9f34ee61ba6214093cea79d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" + "sha": "95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2" } } ], From 3a756393060021afe028d315fc023b74d2479943 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 30 Sep 2020 09:18:07 -0700 Subject: [PATCH 332/983] chore: regenerate templates (#1129) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1fd6bf34-9a27-4f24-9ce8-f80f5ae7133c/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/e6168630be3e31eede633ba2c6f1cd64248dec1c Source-Link: https://github.com/googleapis/synthtool/commit/da29da32b3a988457b49ae290112b74f14b713cc --- .github/readme/synth.py | 19 ++++++++++ .github/workflows/auto-release.yaml | 18 ++++++++++ .kokoro/continuous/readme.cfg | 55 +++++++++++++++++++++++++++++ .kokoro/readme.sh | 36 +++++++++++++++++++ synth.metadata | 7 ++-- 5 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 .github/readme/synth.py create mode 100644 .kokoro/continuous/readme.cfg create mode 100644 .kokoro/readme.sh diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 000000000..7b48cc28d --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 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. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 3ce51eeea..bc1554aec 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,6 +21,24 @@ jobs: return; } + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + // trigger auto-release when // 1) it is a SNAPSHOT release (auto-generated post regular release) // 2) there are dependency updates only diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 000000000..5056c884d --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100644 index 000000000..0bcf9b617 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2020 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. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/google-http-java-client + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool +python3.6 -m autosynth.synth \ + --repository=googleapis/google-http-java-client \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index ccdda8c89..3c97a7169 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "4ec36cf76036736fb9f34ee61ba6214093cea79d" + "sha": "9816851ca23f69039a80304c97f7fbed5c26108b" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2" + "sha": "e6168630be3e31eede633ba2c6f1cd64248dec1c" } } ], @@ -21,6 +21,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", @@ -33,6 +34,7 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", + ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", @@ -56,6 +58,7 @@ ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", ".kokoro/presubmit/samples.cfg", + ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", ".kokoro/release/common.sh", From fec0d87a2438bdbe36cf3f77425edf45935ea575 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 30 Sep 2020 16:54:03 -0700 Subject: [PATCH 333/983] build: rename samples lint workflow to checkstyle to disambiguate branch protection with unit lint (#1131) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/39b629e0-f6b8-4e4a-b55c-2be17f2ebf22/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/8a7a3021fe97aa0a3641db642fe2b767f1c8110f --- .github/workflows/samples.yaml | 2 +- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index a1d500730..c46230a78 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -2,7 +2,7 @@ on: pull_request: name: samples jobs: - lint: + checkstyle: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/synth.metadata b/synth.metadata index 3c97a7169..deb193f5b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "9816851ca23f69039a80304c97f7fbed5c26108b" + "sha": "3a756393060021afe028d315fc023b74d2479943" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e6168630be3e31eede633ba2c6f1cd64248dec1c" + "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" } } ], From 6be2da37c184ed28627c8efebef8b57471875f4b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Oct 2020 18:52:02 +0200 Subject: [PATCH 334/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.21 (#1126) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud.samples:shared-configuration](com/google/cloud/samples/shared-configuration) | patch | `1.0.18` -> `1.0.21` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 73371f10f..d61288cd1 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index b59d3cdf3..823a7090f 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4f4ee0a69..9f7b90227 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8d8e2f0d8..b6ebdc13f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 From 1ccb2afbf5199065c4ccde958f899d1201d3ef62 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 5 Oct 2020 15:50:56 +0200 Subject: [PATCH 335/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.11.3 (#1132) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aa56799ce..4a79bc515 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.6 - 2.11.2 + 2.11.3 3.13.0 29.0-android 1.1.4c From 0e1cb000516bb3168923d58f3193c776828c0b82 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 5 Oct 2020 15:51:40 +0200 Subject: [PATCH 336/983] chore(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.1.1 (#1114) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4a79bc515..92a47e11a 100644 --- a/pom.xml +++ b/pom.xml @@ -339,7 +339,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.0 + 3.1.1 org.codehaus.mojo From ae712c9b5e784986c8a1b58e62e77228761e9596 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 5 Oct 2020 11:17:50 -0400 Subject: [PATCH 337/983] chore: update libraries-bon to 11.0.0 (#1127) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index c3808fab1..21b6bf864 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import From e7aa94192bca619c29c649a645e8ab94b96b800f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 14:06:03 +0200 Subject: [PATCH 338/983] chore(deps): update dependency org.apache.httpcomponents:httpclient to v4.5.13 (#1134) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 92a47e11a..ed0b7428b 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 29.0-android 1.1.4c 1.2 - 4.5.12 + 4.5.13 4.4.13 0.24.0 .. From 1c54598e82c8443e12d42c262b3adeb106b4b24d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 14:06:36 +0200 Subject: [PATCH 339/983] chore(deps): update dependency com.google.cloud:libraries-bom to v11.1.0 (#1130) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b6ebdc13f..b4370994a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.0.0 + 11.1.0 pom import From 450fcb2293cf3fa7c788cf0cc8ae48e865ae8de8 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 6 Oct 2020 13:12:52 -0400 Subject: [PATCH 340/983] docs: libraries-bom 12.0.0 (#1136) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 21b6bf864..9b7517bd0 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 11.0.0 + 12.0.0 pom import From fe73acdd345ae3a2d7f214bec0058a6c0a122a7d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 22:21:03 +0200 Subject: [PATCH 341/983] chore(deps): update dependency com.google.cloud:libraries-bom to v12 (#1135) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b4370994a..709a2077a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.1.0 + 12.0.0 pom import From 2b638ec99bd9ceb36d30cb551a15a4c3a44f9d01 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Oct 2020 15:12:02 -0700 Subject: [PATCH 342/983] build(java): readme.sh should be executable (#1137) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9dc88871-dc85-403d-8c03-5ac9ba460e43/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0762e8ee2ec21cdfc4d82020b985a104feb0453b --- .kokoro/readme.sh | 0 synth.metadata | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 .kokoro/readme.sh diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh old mode 100644 new mode 100755 diff --git a/synth.metadata b/synth.metadata index deb193f5b..4929ab964 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "3a756393060021afe028d315fc023b74d2479943" + "sha": "fe73acdd345ae3a2d7f214bec0058a6c0a122a7d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" + "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" } } ], From 407e385fe807f5ae8a9cf3eaff06a96881623e1a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 14:30:37 +0200 Subject: [PATCH 343/983] chore(deps): update dependency junit:junit to v4.13.1 (#1138) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index ed0b7428b..cc2c25826 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ junit junit - 4.13 + 4.13.1 com.google.truth diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d61288cd1..4074dc1ce 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -36,7 +36,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 9f7b90227..4ce2f9b5e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -34,7 +34,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 709a2077a..db858e9e9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -51,7 +51,7 @@ junit junit - 4.13 + 4.13.1 test From 9ab7016032327f6fb0f91970dfbd511b029dd949 Mon Sep 17 00:00:00 2001 From: guillaume blaquiere Date: Tue, 13 Oct 2020 18:24:02 +0200 Subject: [PATCH 344/983] feat: add flag to allow UrlEncodedContent to use UriPath escaping (#1100) Fixes #1098 The legacy behavior is kept. Test has been updated --- .../api/client/http/UrlEncodedContent.java | 43 ++++++++++++++++--- .../client/http/UrlEncodedContentTest.java | 27 +++++++++--- 2 files changed, 56 insertions(+), 14 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java index eb6428b18..ea08b1e18 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java @@ -42,20 +42,43 @@ * *

              Implementation is not thread-safe. * - * @since 1.0 * @author Yaniv Inbar + * @since 1.0 */ public class UrlEncodedContent extends AbstractHttpContent { /** Key name/value data. */ private Object data; - /** @param data key name/value data */ + /** Use URI Path encoder flag. False by default (use legacy and deprecated escapeUri) */ + private boolean uriPathEncodingFlag; + + /** + * Initialize the UrlEncodedContent with the legacy and deprecated escapeUri encoder + * + * @param data key name/value data + */ public UrlEncodedContent(Object data) { super(UrlEncodedParser.MEDIA_TYPE); setData(data); + this.uriPathEncodingFlag = false; } + /** + * Initialize the UrlEncodedContent with or without the legacy and deprecated escapeUri encoder + * + * @param data key name/value data + * @param useUriPathEncoding escapes the string value so it can be safely included in URI path + * segments. For details on escaping URIs, see RFC 3986 - section 2.4 + */ + public UrlEncodedContent(Object data, boolean useUriPathEncoding) { + super(UrlEncodedParser.MEDIA_TYPE); + setData(data); + this.uriPathEncodingFlag = useUriPathEncoding; + } + + @Override public void writeTo(OutputStream out) throws IOException { Writer writer = new BufferedWriter(new OutputStreamWriter(out, getCharset())); boolean first = true; @@ -66,10 +89,10 @@ public void writeTo(OutputStream out) throws IOException { Class valueClass = value.getClass(); if (value instanceof Iterable || valueClass.isArray()) { for (Object repeatedValue : Types.iterableOf(value)) { - first = appendParam(first, writer, name, repeatedValue); + first = appendParam(first, writer, name, repeatedValue, this.uriPathEncodingFlag); } } else { - first = appendParam(first, writer, name, value); + first = appendParam(first, writer, name, value, this.uriPathEncodingFlag); } } } @@ -125,7 +148,8 @@ public static UrlEncodedContent getContent(HttpRequest request) { return result; } - private static boolean appendParam(boolean first, Writer writer, String name, Object value) + private static boolean appendParam( + boolean first, Writer writer, String name, Object value, boolean uriPathEncodingFlag) throws IOException { // ignore nulls if (value == null || Data.isNull(value)) { @@ -139,8 +163,13 @@ private static boolean appendParam(boolean first, Writer writer, String name, Ob } writer.write(name); String stringValue = - CharEscapers.escapeUri( - value instanceof Enum ? FieldInfo.of((Enum) value).getName() : value.toString()); + value instanceof Enum ? FieldInfo.of((Enum) value).getName() : value.toString(); + + if (uriPathEncodingFlag) { + stringValue = CharEscapers.escapeUriPath(stringValue); + } else { + stringValue = CharEscapers.escapeUri(stringValue); + } if (stringValue.length() != 0) { writer.write("="); writer.write(stringValue); diff --git a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java index f0e0768a9..059d9e2c9 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java @@ -33,19 +33,32 @@ public class UrlEncodedContentTest extends TestCase { public void testWriteTo() throws IOException { - subtestWriteTo("a=x", ArrayMap.of("a", "x")); - subtestWriteTo("noval", ArrayMap.of("noval", "")); - subtestWriteTo("multi=a&multi=b&multi=c", ArrayMap.of("multi", Arrays.asList("a", "b", "c"))); - subtestWriteTo("multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"})); + subtestWriteTo("a=x", ArrayMap.of("a", "x"), false); + subtestWriteTo("noval", ArrayMap.of("noval", ""), false); + subtestWriteTo( + "multi=a&multi=b&multi=c", ArrayMap.of("multi", Arrays.asList("a", "b", "c")), false); + subtestWriteTo( + "multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"}), false); // https://github.com/googleapis/google-http-java-client/issues/202 final Map params = new LinkedHashMap(); params.put("username", "un"); params.put("password", "password123;{}"); - subtestWriteTo("username=un&password=password123%3B%7B%7D", params); + subtestWriteTo("username=un&password=password123%3B%7B%7D", params, false); + subtestWriteTo("additionkey=add%2Btion", ArrayMap.of("additionkey", "add+tion"), false); + + subtestWriteTo("a=x", ArrayMap.of("a", "x"), true); + subtestWriteTo("noval", ArrayMap.of("noval", ""), true); + subtestWriteTo( + "multi=a&multi=b&multi=c", ArrayMap.of("multi", Arrays.asList("a", "b", "c")), true); + subtestWriteTo( + "multi=a&multi=b&multi=c", ArrayMap.of("multi", new String[] {"a", "b", "c"}), true); + subtestWriteTo("username=un&password=password123;%7B%7D", params, true); + subtestWriteTo("additionkey=add+tion", ArrayMap.of("additionkey", "add+tion"), true); } - private void subtestWriteTo(String expected, Object data) throws IOException { - UrlEncodedContent content = new UrlEncodedContent(data); + private void subtestWriteTo(String expected, Object data, boolean useEscapeUriPathEncoding) + throws IOException { + UrlEncodedContent content = new UrlEncodedContent(data, useEscapeUriPathEncoding); ByteArrayOutputStream out = new ByteArrayOutputStream(); content.writeTo(out); assertEquals(expected, out.toString()); From 860bb0541bcd7fc516cad14dd0d52481c7c7b414 Mon Sep 17 00:00:00 2001 From: Igor Dvorzhak Date: Tue, 13 Oct 2020 16:33:55 +0000 Subject: [PATCH 345/983] fix: make google-http-client.properties file shading friendly (#1046) --- .../src/main/java/com/google/api/client/http/HttpRequest.java | 3 ++- .../google/api/client/http}/google-http-client.properties | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename google-http-client/src/main/resources/{ => com/google/api/client/http}/google-http-client.properties (100%) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index a521c5397..0b9b2abbb 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1224,7 +1224,8 @@ private static String getVersion() { // this value should be read and cached for later use String version = "unknown-version"; try (InputStream inputStream = - HttpRequest.class.getResourceAsStream("/google-http-client.properties")) { + HttpRequest.class.getResourceAsStream( + "/com/google/api/client/http/google-http-client.properties")) { if (inputStream != null) { final Properties properties = new Properties(); properties.load(inputStream); diff --git a/google-http-client/src/main/resources/google-http-client.properties b/google-http-client/src/main/resources/com/google/api/client/http/google-http-client.properties similarity index 100% rename from google-http-client/src/main/resources/google-http-client.properties rename to google-http-client/src/main/resources/com/google/api/client/http/google-http-client.properties From 0c1d58b14a2b38cb2bce8d17c4b547261ab17739 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2020 16:46:03 +0000 Subject: [PATCH 346/983] chore: release 1.37.0 (#1141) :robot: I have created a release \*beep\* \*boop\* --- ## [1.37.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.36.0...v1.37.0) (2020-10-13) ### Features * add flag to allow UrlEncodedContent to use UriPath escaping ([#1100](https://www.github.com/googleapis/google-http-java-client/issues/1100)) ([9ab7016](https://www.github.com/googleapis/google-http-java-client/commit/9ab7016032327f6fb0f91970dfbd511b029dd949)), closes [#1098](https://www.github.com/googleapis/google-http-java-client/issues/1098) ### Bug Fixes * make google-http-client.properties file shading friendly ([#1046](https://www.github.com/googleapis/google-http-java-client/issues/1046)) ([860bb05](https://www.github.com/googleapis/google-http-java-client/commit/860bb0541bcd7fc516cad14dd0d52481c7c7b414)) ### Dependencies * update protobuf-java to 3.13.0 ([#1093](https://www.github.com/googleapis/google-http-java-client/issues/1093)) ([b7e9663](https://www.github.com/googleapis/google-http-java-client/commit/b7e96632234e944e0e476dedfc822333716756bb)) ### Documentation * libraries-bom 12.0.0 ([#1136](https://www.github.com/googleapis/google-http-java-client/issues/1136)) ([450fcb2](https://www.github.com/googleapis/google-http-java-client/commit/450fcb2293cf3fa7c788cf0cc8ae48e865ae8de8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 22 +++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 75 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ea0f07a5..48cc1de3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.37.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.36.0...v1.37.0) (2020-10-13) + + +### Features + +* add flag to allow UrlEncodedContent to use UriPath escaping ([#1100](https://www.github.com/googleapis/google-http-java-client/issues/1100)) ([9ab7016](https://www.github.com/googleapis/google-http-java-client/commit/9ab7016032327f6fb0f91970dfbd511b029dd949)), closes [#1098](https://www.github.com/googleapis/google-http-java-client/issues/1098) + + +### Bug Fixes + +* make google-http-client.properties file shading friendly ([#1046](https://www.github.com/googleapis/google-http-java-client/issues/1046)) ([860bb05](https://www.github.com/googleapis/google-http-java-client/commit/860bb0541bcd7fc516cad14dd0d52481c7c7b414)) + + +### Dependencies + +* update protobuf-java to 3.13.0 ([#1093](https://www.github.com/googleapis/google-http-java-client/issues/1093)) ([b7e9663](https://www.github.com/googleapis/google-http-java-client/commit/b7e96632234e944e0e476dedfc822333716756bb)) + + +### Documentation + +* libraries-bom 12.0.0 ([#1136](https://www.github.com/googleapis/google-http-java-client/issues/1136)) ([450fcb2](https://www.github.com/googleapis/google-http-java-client/commit/450fcb2293cf3fa7c788cf0cc8ae48e865ae8de8)) + ## [1.36.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.35.0...v1.36.0) (2020-06-30) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 4eeddb4bd..5dd1135f0 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.36.1-SNAPSHOT + 1.37.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.36.1-SNAPSHOT + 1.37.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.36.1-SNAPSHOT + 1.37.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 8a91def7c..67bd88d75 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-android - 1.36.1-SNAPSHOT + 1.37.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 6a2171bf7..7a2b17a73 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-apache-v2 - 1.36.1-SNAPSHOT + 1.37.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 52232b21d..d19cd74b0 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-appengine - 1.36.1-SNAPSHOT + 1.37.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 5bc1d3a54..568065d7c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.36.1-SNAPSHOT + 1.37.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 69f94e6a4..ffecf9545 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.36.1-SNAPSHOT + 1.37.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-android - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-apache-v2 - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-appengine - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-findbugs - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-gson - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-jackson2 - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-protobuf - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-test - 1.36.1-SNAPSHOT + 1.37.0 com.google.http-client google-http-client-xml - 1.36.1-SNAPSHOT + 1.37.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e416707f2..82e8fdd57 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-findbugs - 1.36.1-SNAPSHOT + 1.37.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a0ce6b787..9b8c64d26 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-gson - 1.36.1-SNAPSHOT + 1.37.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 7e8a1e92f..442b530b1 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-jackson2 - 1.36.1-SNAPSHOT + 1.37.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 148605ac4..c9b1c8cc4 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-protobuf - 1.36.1-SNAPSHOT + 1.37.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 3d1a522ef..13e6458fe 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-test - 1.36.1-SNAPSHOT + 1.37.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index f13679967..735f3d251 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client-xml - 1.36.1-SNAPSHOT + 1.37.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index bcd847b74..b6a12a096 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../pom.xml google-http-client - 1.36.1-SNAPSHOT + 1.37.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index cc2c25826..a9ee7b39d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.36.1-SNAPSHOT + 1.37.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 48af1b955..d9fefc948 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.36.1-SNAPSHOT + 1.37.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index dad7dca83..180b99457 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.36.0:1.36.1-SNAPSHOT -google-http-client-bom:1.36.0:1.36.1-SNAPSHOT -google-http-client-parent:1.36.0:1.36.1-SNAPSHOT -google-http-client-android:1.36.0:1.36.1-SNAPSHOT -google-http-client-android-test:1.36.0:1.36.1-SNAPSHOT -google-http-client-apache-v2:1.36.0:1.36.1-SNAPSHOT -google-http-client-appengine:1.36.0:1.36.1-SNAPSHOT -google-http-client-assembly:1.36.0:1.36.1-SNAPSHOT -google-http-client-findbugs:1.36.0:1.36.1-SNAPSHOT -google-http-client-gson:1.36.0:1.36.1-SNAPSHOT -google-http-client-jackson2:1.36.0:1.36.1-SNAPSHOT -google-http-client-protobuf:1.36.0:1.36.1-SNAPSHOT -google-http-client-test:1.36.0:1.36.1-SNAPSHOT -google-http-client-xml:1.36.0:1.36.1-SNAPSHOT +google-http-client:1.37.0:1.37.0 +google-http-client-bom:1.37.0:1.37.0 +google-http-client-parent:1.37.0:1.37.0 +google-http-client-android:1.37.0:1.37.0 +google-http-client-android-test:1.37.0:1.37.0 +google-http-client-apache-v2:1.37.0:1.37.0 +google-http-client-appengine:1.37.0:1.37.0 +google-http-client-assembly:1.37.0:1.37.0 +google-http-client-findbugs:1.37.0:1.37.0 +google-http-client-gson:1.37.0:1.37.0 +google-http-client-jackson2:1.37.0:1.37.0 +google-http-client-protobuf:1.37.0:1.37.0 +google-http-client-test:1.37.0:1.37.0 +google-http-client-xml:1.37.0:1.37.0 From f4f68a43c33b0336239b0af3ac4e6c0746189821 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 09:16:22 -0700 Subject: [PATCH 347/983] ci(java): suggest formatting fixes (#1143) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e9bef6be-6e2b-40d5-8087-bacda8836382/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/b65ef07d99946d23e900ef2cc490274a16edd336 --- .github/workflows/formatting.yaml | 25 +++++++++++++++++++++++++ synth.metadata | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 000000000..d4d367cfc --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,25 @@ +on: + pull_request_target: + types: [opened, synchronize] + branches: + - master +name: format +jobs: + format-code: + runs-on: ubuntu-latest + env: + ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/setup-java@v1 + with: + java-version: 11 + - run: "mvn com.coveo:fmt-maven-plugin:format" + - uses: googleapis/code-suggester@v1.8.0 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' diff --git a/synth.metadata b/synth.metadata index 4929ab964..b195c6258 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "fe73acdd345ae3a2d7f214bec0058a6c0a122a7d" + "sha": "0c1d58b14a2b38cb2bce8d17c4b547261ab17739" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" } } ], @@ -26,6 +26,7 @@ ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", From 2cd3e2b1c8d23d6bd5f93a586e500f40b2028743 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 15 Oct 2020 15:38:35 -0700 Subject: [PATCH 348/983] ci(java): restrict presubmit samples ITs to only snapshot (#1148) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/dc44c73a-e60a-4f22-9d87-3a3f6d9d4115/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/27e0e916cbfdb3d5ff6639b686cc04f78a0b0386 --- .kokoro/build.sh | 11 +++++++++-- synth.metadata | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 7eefde4ab..367ff2c3f 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,9 +69,16 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] then - pushd samples + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + pushd {SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/synth.metadata b/synth.metadata index b195c6258..8779af274 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "0c1d58b14a2b38cb2bce8d17c4b547261ab17739" + "sha": "f4f68a43c33b0336239b0af3ac4e6c0746189821" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" + "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" } } ], From a19e0c6c734d8467f9662973289641b1823684b0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 00:46:30 +0200 Subject: [PATCH 349/983] chore(deps): update dependency com.google.cloud:libraries-bom to v12.1.0 (#1145) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `12.0.0` -> `12.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index db858e9e9..d58b5abf3 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From d73467f794d2c8f46f49d0b618efb3d43738c8b5 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 19 Oct 2020 14:07:59 -0400 Subject: [PATCH 350/983] BOM 112.1.0 (#1146) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 9b7517bd0..3f34e1401 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From ae86082aa5b7b872fc7021e86ef1a0e5dc5d7c4e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 00:52:35 +0200 Subject: [PATCH 351/983] chore(deps): update dependency com.google.cloud:libraries-bom to v13 (#1152) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | major | `12.1.0` -> `13.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index d58b5abf3..f52957bcd 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.1.0 + 13.0.0 pom import From 969dbbf127708aff16309f82538aca6f0a651638 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 22 Oct 2020 14:23:15 -0400 Subject: [PATCH 352/983] deps: guava 30.0-android (#1151) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a9ee7b39d..7bc3aa169 100644 --- a/pom.xml +++ b/pom.xml @@ -580,7 +580,7 @@ 2.8.6 2.11.3 3.13.0 - 29.0-android + 30.0-android 1.1.4c 1.2 4.5.13 From 922eca05757b38e5e9b55a2c66e34720d7984b3a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Oct 2020 20:23:48 +0200 Subject: [PATCH 353/983] chore(deps): update dependency com.google.http-client:google-http-client-gson to v1.37.0 (#1142) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f52957bcd..984cbaf55 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client-gson - 1.36.0 + 1.37.0 test From 8f36480bc1bc7167ae697be3c52a80a0187dede0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:30:15 +0000 Subject: [PATCH 354/983] chore: release 1.37.1-SNAPSHOT (#1144) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 5dd1135f0..54197f3d6 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.37.0 + 1.37.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.37.0 + 1.37.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.37.0 + 1.37.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 67bd88d75..59903e46b 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-android - 1.37.0 + 1.37.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 7a2b17a73..579934408 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.37.0 + 1.37.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index d19cd74b0..5921940fb 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.37.0 + 1.37.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 568065d7c..9532833ff 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.37.0 + 1.37.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ffecf9545..4676215ee 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.37.0 + 1.37.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-android - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-test - 1.37.0 + 1.37.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.37.0 + 1.37.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 82e8fdd57..5a55e3353 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.37.0 + 1.37.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 9b8c64d26..be5e7ffc3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.37.0 + 1.37.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 442b530b1..216e79d8d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.37.0 + 1.37.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index c9b1c8cc4..a83780942 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.37.0 + 1.37.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 13e6458fe..79f88159e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-test - 1.37.0 + 1.37.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 735f3d251..591db8238 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.37.0 + 1.37.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index b6a12a096..86ffc4876 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../pom.xml google-http-client - 1.37.0 + 1.37.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 7bc3aa169..37d94bd05 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.37.0 + 1.37.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index d9fefc948..8740cad9a 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.37.0 + 1.37.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 180b99457..ffacc2900 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.37.0:1.37.0 -google-http-client-bom:1.37.0:1.37.0 -google-http-client-parent:1.37.0:1.37.0 -google-http-client-android:1.37.0:1.37.0 -google-http-client-android-test:1.37.0:1.37.0 -google-http-client-apache-v2:1.37.0:1.37.0 -google-http-client-appengine:1.37.0:1.37.0 -google-http-client-assembly:1.37.0:1.37.0 -google-http-client-findbugs:1.37.0:1.37.0 -google-http-client-gson:1.37.0:1.37.0 -google-http-client-jackson2:1.37.0:1.37.0 -google-http-client-protobuf:1.37.0:1.37.0 -google-http-client-test:1.37.0:1.37.0 -google-http-client-xml:1.37.0:1.37.0 +google-http-client:1.37.0:1.37.1-SNAPSHOT +google-http-client-bom:1.37.0:1.37.1-SNAPSHOT +google-http-client-parent:1.37.0:1.37.1-SNAPSHOT +google-http-client-android:1.37.0:1.37.1-SNAPSHOT +google-http-client-android-test:1.37.0:1.37.1-SNAPSHOT +google-http-client-apache-v2:1.37.0:1.37.1-SNAPSHOT +google-http-client-appengine:1.37.0:1.37.1-SNAPSHOT +google-http-client-assembly:1.37.0:1.37.1-SNAPSHOT +google-http-client-findbugs:1.37.0:1.37.1-SNAPSHOT +google-http-client-gson:1.37.0:1.37.1-SNAPSHOT +google-http-client-jackson2:1.37.0:1.37.1-SNAPSHOT +google-http-client-protobuf:1.37.0:1.37.1-SNAPSHOT +google-http-client-test:1.37.0:1.37.1-SNAPSHOT +google-http-client-xml:1.37.0:1.37.1-SNAPSHOT From 535cbb9531016dd830299a88a0cfb9741396097f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Oct 2020 21:40:37 +0200 Subject: [PATCH 355/983] chore(deps): update dependency com.google.cloud:libraries-bom to v13.1.0 (#1155) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.0.0` -> `13.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 984cbaf55..2c30f5f09 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.0.0 + 13.1.0 pom import From 9326127954b838be132c9dbaa7039d40674f8952 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Oct 2020 00:58:06 +0100 Subject: [PATCH 356/983] chore(deps): update dependency com.google.cloud:libraries-bom to v13.3.0 (#1159) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.1.0` -> `13.3.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 2c30f5f09..f2ae501fb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.1.0 + 13.3.0 pom import From 43b3648f44bde45975da2f28bbec201504b7655e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 27 Oct 2020 10:42:04 -0400 Subject: [PATCH 357/983] chore: libraries-bom 13.3.0 (#1161) * docs: libraries-bom 13.3.0 docs: libraries-bom 13.3.0 * 13.3.0 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 3f34e1401..f388e93f4 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 12.1.0 + 13.3.0 pom import From a4e70f3a78a402705e6879ea367ff9bad23ee58d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 14:29:38 -0700 Subject: [PATCH 358/983] build(java): auto-approve README regeneration (#1149) Source-Author: Jeff Ching Source-Date: Thu Oct 15 16:04:06 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1 Source-Link: https://github.com/googleapis/synthtool/commit/7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1 --- .github/workflows/approve-readme.yaml | 54 +++++++++++++++++++++++++++ synth.metadata | 5 ++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/approve-readme.yaml diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 000000000..e2d841d6c --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/synth.metadata b/synth.metadata index 8779af274..ae9e5c1e4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f4f68a43c33b0336239b0af3ac4e6c0746189821" + "sha": "a19e0c6c734d8467f9662973289641b1823684b0" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "27e0e916cbfdb3d5ff6639b686cc04f78a0b0386" + "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" } } ], @@ -24,6 +24,7 @@ ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", ".github/workflows/formatting.yaml", From 3151547ba0d0e975f625d84bd533931864df51bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 29 Oct 2020 10:16:35 -0700 Subject: [PATCH 359/983] chore: regenerate common templates (#1162) * build(java): enable snippet-bot Source-Author: Jeff Ching Source-Date: Mon Oct 19 16:13:57 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5a506ec8765cc04f7e29f888b8e9b257d9a7ae11 Source-Link: https://github.com/googleapis/synthtool/commit/5a506ec8765cc04f7e29f888b8e9b257d9a7ae11 * Update publish_javadoc.sh We don't want quite as much and need to be in `target/devsite/reference`. Source-Author: Les Vogel Source-Date: Thu Oct 22 14:10:05 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 9593c3b5b714cc9b17c445aee8834ac2b4b9348b Source-Link: https://github.com/googleapis/synthtool/commit/9593c3b5b714cc9b17c445aee8834ac2b4b9348b * chore(docs): update code of conduct of synthtool and templates Source-Author: Christopher Wilcox Source-Date: Thu Oct 22 14:22:01 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 5f6ef0ec5501d33c4667885b37a7685a30d41a76 Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 * chore(ci): fix typo in restrict presubmit samples ITs to only snapshot Fixes below error in Java repos when https://github.com/googleapis/synthtool/pull/804 was merged: ``` github/java-bigquerystorage/.kokoro/build.sh: line 81: pushd: {SAMPLES_DIR}: No such file or directory ``` Thanks @kolea2 for spotting this in Fusion build logs. cc @chingor13 Source-Author: Stephanie Wang Source-Date: Mon Oct 26 13:44:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: f68649c5f26bcff6817c6d21e90dac0fc71fef8e Source-Link: https://github.com/googleapis/synthtool/commit/f68649c5f26bcff6817c6d21e90dac0fc71fef8e --- .github/snippet-bot.yml | 0 .kokoro/build.sh | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- CODE_OF_CONDUCT.md | 7 ++++--- synth.metadata | 5 +++-- 5 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 .github/snippet-bot.yml diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 000000000..e69de29bb diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 367ff2c3f..4ef0f0e85 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -78,7 +78,7 @@ samples) if [[ -f ${SAMPLES_DIR}/pom.xml ]] then - pushd {SAMPLES_DIR} + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index e078748a8..06e7d1e97 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -62,7 +62,7 @@ popd # V2 mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" -pushd target/devsite +pushd target/devsite/reference # create metadata python3 -m docuploader create-metadata \ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6b2238bb7..2add2547a 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ + # Code of Conduct ## Our Pledge @@ -69,12 +70,12 @@ dispute. If you are unable to resolve the matter for any reason, or if the behavior is threatening or harassing, report it. We are dedicated to providing an environment where participants feel welcome and safe. -Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the -Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to receive and address reported violations of the code of conduct. They will then work with a committee consisting of representatives from the Open Source Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out the Project Steward, please email +are uncomfortable reaching out to the Project Steward, please email opensource@google.com. We will investigate every complaint, but you may not receive a direct response. diff --git a/synth.metadata b/synth.metadata index ae9e5c1e4..cd80e1da5 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "a19e0c6c734d8467f9662973289641b1823684b0" + "sha": "a4e70f3a78a402705e6879ea367ff9bad23ee58d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" + "sha": "f68649c5f26bcff6817c6d21e90dac0fc71fef8e" } } ], @@ -23,6 +23,7 @@ ".github/PULL_REQUEST_TEMPLATE.md", ".github/readme/synth.py", ".github/release-please.yml", + ".github/snippet-bot.yml", ".github/trusted-contribution.yml", ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", From b5754a486358a60b23f108bceb596e02fd10a822 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 30 Oct 2020 15:28:26 -0700 Subject: [PATCH 360/983] chore(java): enable generated-files-bot (#1164) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3c0a877a-3dcd-42d6-8283-17fa6c94e326/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/b19b401571e77192f8dd38eab5fb2300a0de9324 --- .github/generated-files-bot.yml | 7 +++++++ synth.metadata | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .github/generated-files-bot.yml diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 000000000..20f3acc28 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,7 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' diff --git a/synth.metadata b/synth.metadata index cd80e1da5..be777bab6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "a4e70f3a78a402705e6879ea367ff9bad23ee58d" + "sha": "3151547ba0d0e975f625d84bd533931864df51bc" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "f68649c5f26bcff6817c6d21e90dac0fc71fef8e" + "sha": "b19b401571e77192f8dd38eab5fb2300a0de9324" } } ], @@ -21,6 +21,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", ".github/snippet-bot.yml", From 51762f221ec8ab38da03149c8012e63aec0433dc Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Fri, 30 Oct 2020 15:43:34 -0700 Subject: [PATCH 361/983] feat: add mtls support for NetHttpTransport (#1147) * feat: support keystore in transport for mtls * fix format * update code * add tests * update test and doc * update names * create keystore from cert and key string * change certAndKey from string to inputstream * add mtls file * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * update the code * fix name Co-authored-by: Jeff Ching --- .../google/api/client/http/HttpTransport.java | 9 +++ .../client/http/javanet/NetHttpTransport.java | 57 +++++++++++++++++-- .../google/api/client/util/SecurityUtils.java | 56 ++++++++++++++++++ .../com/google/api/client/util/SslUtils.java | 30 ++++++++++ .../http/javanet/NetHttpTransportTest.java | 27 +++++++++ .../api/client/util/SecurityUtilsTest.java | 45 +++++++++++++++ .../com/google/api/client/util/cert.pem | 14 +++++ .../google/api/client/util/mtlsCertAndKey.pem | 30 ++++++++++ .../com/google/api/client/util/privateKey.pem | 16 ++++++ 9 files changed, 278 insertions(+), 6 deletions(-) create mode 100644 google-http-client/src/test/resources/com/google/api/client/util/cert.pem create mode 100644 google-http-client/src/test/resources/com/google/api/client/util/mtlsCertAndKey.pem create mode 100644 google-http-client/src/test/resources/com/google/api/client/util/privateKey.pem diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java index d8b858c8e..d4fad3f87 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java @@ -129,6 +129,15 @@ public boolean supportsMethod(String method) throws IOException { return Arrays.binarySearch(SUPPORTED_METHODS, method) >= 0; } + /** + * Returns whether the transport is mTLS. + * + * @return boolean indicating if the transport is mTLS. + */ + public boolean isMtls() { + return false; + } + /** * Builds a low level HTTP request for the given HTTP method. * diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java index 3e90cb2c2..b44b36a62 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java @@ -89,13 +89,16 @@ private static Proxy defaultProxy() { /** Host name verifier or {@code null} for the default. */ private final HostnameVerifier hostnameVerifier; + /** Whether the transport is mTLS. Default value is {@code false}. */ + private final boolean isMtls; + /** * Constructor with the default behavior. * *

              Instead use {@link Builder} to modify behavior. */ public NetHttpTransport() { - this((ConnectionFactory) null, null, null); + this((ConnectionFactory) null, null, null, false); } /** @@ -104,10 +107,14 @@ public NetHttpTransport() { * system properties * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default + * @param isMtls Whether the transport is mTLS. Default value is {@code false} */ NetHttpTransport( - Proxy proxy, SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) { - this(new DefaultConnectionFactory(proxy), sslSocketFactory, hostnameVerifier); + Proxy proxy, + SSLSocketFactory sslSocketFactory, + HostnameVerifier hostnameVerifier, + boolean isMtls) { + this(new DefaultConnectionFactory(proxy), sslSocketFactory, hostnameVerifier, isMtls); } /** @@ -115,15 +122,18 @@ public NetHttpTransport() { * {@link DefaultConnectionFactory} is used * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default + * @param isMtls Whether the transport is mTLS. Default value is {@code false} * @since 1.20 */ NetHttpTransport( ConnectionFactory connectionFactory, SSLSocketFactory sslSocketFactory, - HostnameVerifier hostnameVerifier) { + HostnameVerifier hostnameVerifier, + boolean isMtls) { this.connectionFactory = getConnectionFactory(connectionFactory); this.sslSocketFactory = sslSocketFactory; this.hostnameVerifier = hostnameVerifier; + this.isMtls = isMtls; } private ConnectionFactory getConnectionFactory(ConnectionFactory connectionFactory) { @@ -141,6 +151,11 @@ public boolean supportsMethod(String method) { return Arrays.binarySearch(SUPPORTED_METHODS, method) >= 0; } + @Override + public boolean isMtls() { + return this.isMtls; + } + @Override protected NetHttpRequest buildRequest(String method, String url) throws IOException { Preconditions.checkArgument(supportsMethod(method), "HTTP method %s not supported", method); @@ -189,6 +204,9 @@ public static final class Builder { */ private ConnectionFactory connectionFactory; + /** Whether the transport is mTLS. Default value is {@code false}. */ + private boolean isMtls; + /** * Sets the HTTP proxy or {@code null} to use the proxy settings from system @@ -275,6 +293,33 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce return setSslSocketFactory(sslContext.getSocketFactory()); } + /** + * Sets the SSL socket factory based on a root certificate trust store and a client certificate + * key store. The client certificate key store will be used to establish mutual TLS. + * + * @param trustStore certificate trust store (use for example {@link SecurityUtils#loadKeyStore} + * or {@link SecurityUtils#loadKeyStoreFromCertificates}) + * @param mtlsKeyStore key store for client certificate and key to establish mutual TLS. (use + * for example {@link SecurityUtils#createMtlsKeyStore(InputStream)}) + * @param mtlsKeyStorePassword password for mtlsKeyStore parameter + */ + public Builder trustCertificates( + KeyStore trustStore, KeyStore mtlsKeyStore, String mtlsKeyStorePassword) + throws GeneralSecurityException { + if (mtlsKeyStore != null && mtlsKeyStore.size() > 0) { + this.isMtls = true; + } + SSLContext sslContext = SslUtils.getTlsSslContext(); + SslUtils.initSslContext( + sslContext, + trustStore, + SslUtils.getPkixTrustManagerFactory(), + mtlsKeyStore, + mtlsKeyStorePassword, + SslUtils.getDefaultKeyManagerFactory()); + return setSslSocketFactory(sslContext.getSocketFactory()); + } + /** * {@link Beta}
              * Disables validating server SSL certificates by setting the SSL socket factory using {@link @@ -319,8 +364,8 @@ public NetHttpTransport build() { setProxy(defaultProxy()); } return this.proxy == null - ? new NetHttpTransport(connectionFactory, sslSocketFactory, hostnameVerifier) - : new NetHttpTransport(this.proxy, sslSocketFactory, hostnameVerifier); + ? new NetHttpTransport(connectionFactory, sslSocketFactory, hostnameVerifier, isMtls) + : new NetHttpTransport(this.proxy, sslSocketFactory, hostnameVerifier, isMtls); } } } diff --git a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java index cf08e03ad..8f59a8747 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java @@ -17,6 +17,7 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.security.GeneralSecurityException; import java.security.InvalidKeyException; import java.security.KeyFactory; @@ -31,6 +32,7 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; +import java.security.spec.PKCS8EncodedKeySpec; import java.util.List; import javax.net.ssl.X509TrustManager; @@ -258,5 +260,59 @@ public static void loadKeyStoreFromCertificates( } } + /** + * Create a keystore for mutual TLS with the certificate and private key provided. + * + * @param certAndKey Certificate and private key input stream. The stream should contain one + * certificate and one unencrypted private key. If there are multiple certificates, only the + * first certificate will be used. + * @return keystore for mutual TLS. + */ + public static KeyStore createMtlsKeyStore(InputStream certAndKey) + throws GeneralSecurityException, IOException { + KeyStore keystore = KeyStore.getInstance("JKS"); + keystore.load(null); + + PemReader.Section certSection = null; + PemReader.Section keySection = null; + PemReader reader = new PemReader(new InputStreamReader(certAndKey)); + + while (certSection == null || keySection == null) { + // Read the certificate and private key. + PemReader.Section section = reader.readNextSection(); + if (section == null) { + break; + } + + if (certSection == null && "CERTIFICATE".equals(section.getTitle())) { + certSection = section; + } else if ("PRIVATE KEY".equals(section.getTitle())) { + keySection = section; + } + } + + if (certSection == null) { + throw new IllegalArgumentException("certificate is missing from certAndKey string"); + } + if (keySection == null) { + throw new IllegalArgumentException("private key is missing from certAndKey string"); + } + + CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); + X509Certificate cert = + (X509Certificate) + certFactory.generateCertificate( + new ByteArrayInputStream(certSection.getBase64DecodedBytes())); + + PKCS8EncodedKeySpec keySpecPKCS8 = new PKCS8EncodedKeySpec(keySection.getBase64DecodedBytes()); + PrivateKey key = + KeyFactory.getInstance(cert.getPublicKey().getAlgorithm()).generatePrivate(keySpecPKCS8); + + // Fit the certificate and private key into the keystore. + keystore.setKeyEntry("alias", key, new char[] {}, new X509Certificate[] {cert}); + + return keystore; + } + private SecurityUtils() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java index d4ed4f7cf..fc4b7900b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java @@ -109,6 +109,36 @@ public static SSLContext initSslContext( return sslContext; } + /** + * Initializes the SSL context to the trust managers supplied by the trust manager factory for the + * given trust store, and to the key managers supplied by the key manager factory for the given + * key store. + * + * @param sslContext SSL context (for example {@link SSLContext#getInstance}) + * @param trustStore key store for certificates to trust (for example {@link + * SecurityUtils#getJavaKeyStore()}) + * @param trustManagerFactory trust manager factory (for example {@link + * #getPkixTrustManagerFactory()}) + * @param mtlsKeyStore key store for client certificate and key to establish mutual TLS + * @param mtlsKeyStorePassword password for mtlsKeyStore parameter + * @param keyManagerFactory key manager factory (for example {@link + * #getDefaultKeyManagerFactory()}) + */ + public static SSLContext initSslContext( + SSLContext sslContext, + KeyStore trustStore, + TrustManagerFactory trustManagerFactory, + KeyStore mtlsKeyStore, + String mtlsKeyStorePassword, + KeyManagerFactory keyManagerFactory) + throws GeneralSecurityException { + trustManagerFactory.init(trustStore); + keyManagerFactory.init(mtlsKeyStore, mtlsKeyStorePassword.toCharArray()); + sslContext.init( + keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); + return sslContext; + } + /** * {@link Beta}
              * Returns an SSL context in which all X.509 certificates are trusted. diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java index a1bc3b348..338236e9b 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java @@ -23,6 +23,7 @@ import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; +import java.security.KeyStore; import junit.framework.TestCase; /** @@ -36,6 +37,32 @@ public class NetHttpTransportTest extends TestCase { "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" }; + public void testNotMtlsWithoutClientCert() throws Exception { + KeyStore trustStore = KeyStore.getInstance("JKS"); + + NetHttpTransport transport = + new NetHttpTransport.Builder().trustCertificates(trustStore).build(); + assertFalse(transport.isMtls()); + } + + public void testIsMtlsWithClientCert() throws Exception { + KeyStore trustStore = KeyStore.getInstance("JKS"); + KeyStore keyStore = KeyStore.getInstance("PKCS12"); + + // Load client certificate and private key from secret.p12 file. + keyStore.load( + this.getClass() + .getClassLoader() + .getResourceAsStream("com/google/api/client/util/secret.p12"), + "notasecret".toCharArray()); + + NetHttpTransport transport = + new NetHttpTransport.Builder() + .trustCertificates(trustStore, keyStore, "notasecret") + .build(); + assertTrue(transport.isMtls()); + } + public void testExecute_mock() throws Exception { for (String method : METHODS) { boolean isPutOrPost = method.equals("PUT") || method.equals("POST"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java index b9f91fd1e..21bdd9dc3 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java @@ -17,6 +17,8 @@ import com.google.api.client.testing.json.webtoken.TestCertificates; import com.google.api.client.testing.util.SecurityTestUtils; import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.security.KeyStore; import java.security.PrivateKey; import java.security.Signature; import java.security.cert.X509Certificate; @@ -160,4 +162,47 @@ public void testVerifyX509() throws Exception { public void testVerifyX509WrongCa() throws Exception { assertNull(verifyX509(TestCertificates.BOGUS_CA_CERT)); } + + public void testCreateMtlsKeyStoreNoCert() throws Exception { + final InputStream certMissing = + getClass() + .getClassLoader() + .getResourceAsStream("com/google/api/client/util/privateKey.pem"); + + boolean thrown = false; + try { + SecurityUtils.createMtlsKeyStore(certMissing); + fail("should have thrown"); + } catch (IllegalArgumentException e) { + assertTrue(e.getMessage().contains("certificate is missing from certAndKey string")); + thrown = true; + } + assertTrue("should have caught an IllegalArgumentException", thrown); + } + + public void testCreateMtlsKeyStoreNoPrivateKey() throws Exception { + final InputStream privateKeyMissing = + getClass().getClassLoader().getResourceAsStream("com/google/api/client/util/cert.pem"); + + boolean thrown = false; + try { + SecurityUtils.createMtlsKeyStore(privateKeyMissing); + fail("should have thrown"); + } catch (IllegalArgumentException e) { + assertTrue(e.getMessage().contains("private key is missing from certAndKey string")); + thrown = true; + } + assertTrue("should have caught an IllegalArgumentException", thrown); + } + + public void testCreateMtlsKeyStoreSuccess() throws Exception { + InputStream certAndKey = + getClass() + .getClassLoader() + .getResourceAsStream("com/google/api/client/util/mtlsCertAndKey.pem"); + + KeyStore mtlsKeyStore = SecurityUtils.createMtlsKeyStore(certAndKey); + + assertEquals(1, mtlsKeyStore.size()); + } } diff --git a/google-http-client/src/test/resources/com/google/api/client/util/cert.pem b/google-http-client/src/test/resources/com/google/api/client/util/cert.pem new file mode 100644 index 000000000..56e1319bf --- /dev/null +++ b/google-http-client/src/test/resources/com/google/api/client/util/cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGzCCAYSgAwIBAgIIWrt6xtmHPs4wDQYJKoZIhvcNAQEFBQAwMzExMC8GA1UE +AxMoMTAwOTEyMDcyNjg3OC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbTAeFw0x +MjEyMDExNjEwNDRaFw0yMjExMjkxNjEwNDRaMDMxMTAvBgNVBAMTKDEwMDkxMjA3 +MjY4NzguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20wgZ8wDQYJKoZIhvcNAQEB +BQADgY0AMIGJAoGBAL1SdY8jTUVU7O4/XrZLYTw0ON1lV6MQRGajFDFCqD2Fd9tQ +GLW8Iftx9wfXe1zuaehJSgLcyCxazfyJoN3RiONBihBqWY6d3lQKqkgsRTNZkdFJ +Wdzl/6CxhK9sojh2p0r3tydtv9iwq5fuuWIvtODtT98EgphhncQAqkKoF3zVAgMB +AAGjODA2MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQM +MAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAD8XQEqzGePa9VrvtEGpf+R4 +fkxKbcYAzqYq202nKu0kfjhIYkYSBj6gi348YaxE64yu60TVl42l5HThmswUheW4 +uQIaq36JvwvsDP5Zoj5BgiNSnDAFQp+jJFBRUA5vooJKgKgMDf/r/DCOsbO6VJF1 +kWwa9n19NFiV0z3m6isj +-----END CERTIFICATE----- \ No newline at end of file diff --git a/google-http-client/src/test/resources/com/google/api/client/util/mtlsCertAndKey.pem b/google-http-client/src/test/resources/com/google/api/client/util/mtlsCertAndKey.pem new file mode 100644 index 000000000..d6c045125 --- /dev/null +++ b/google-http-client/src/test/resources/com/google/api/client/util/mtlsCertAndKey.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIICGzCCAYSgAwIBAgIIWrt6xtmHPs4wDQYJKoZIhvcNAQEFBQAwMzExMC8GA1UE +AxMoMTAwOTEyMDcyNjg3OC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbTAeFw0x +MjEyMDExNjEwNDRaFw0yMjExMjkxNjEwNDRaMDMxMTAvBgNVBAMTKDEwMDkxMjA3 +MjY4NzguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20wgZ8wDQYJKoZIhvcNAQEB +BQADgY0AMIGJAoGBAL1SdY8jTUVU7O4/XrZLYTw0ON1lV6MQRGajFDFCqD2Fd9tQ +GLW8Iftx9wfXe1zuaehJSgLcyCxazfyJoN3RiONBihBqWY6d3lQKqkgsRTNZkdFJ +Wdzl/6CxhK9sojh2p0r3tydtv9iwq5fuuWIvtODtT98EgphhncQAqkKoF3zVAgMB +AAGjODA2MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMBYGA1UdJQEB/wQM +MAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBBQUAA4GBAD8XQEqzGePa9VrvtEGpf+R4 +fkxKbcYAzqYq202nKu0kfjhIYkYSBj6gi348YaxE64yu60TVl42l5HThmswUheW4 +uQIaq36JvwvsDP5Zoj5BgiNSnDAFQp+jJFBRUA5vooJKgKgMDf/r/DCOsbO6VJF1 +kWwa9n19NFiV0z3m6isj +-----END CERTIFICATE----- +-----BEGIN PRIVATE KEY----- +MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAL1SdY8jTUVU7O4/ +XrZLYTw0ON1lV6MQRGajFDFCqD2Fd9tQGLW8Iftx9wfXe1zuaehJSgLcyCxazfyJ +oN3RiONBihBqWY6d3lQKqkgsRTNZkdFJWdzl/6CxhK9sojh2p0r3tydtv9iwq5fu +uWIvtODtT98EgphhncQAqkKoF3zVAgMBAAECgYB51B9cXe4yiGTzJ4pOKpHGySAy +sC1F/IjXt2eeD3PuKv4m/hL4l7kScpLx0+NJuQ4j8U2UK/kQOdrGANapB1ZbMZAK +/q0xmIUzdNIDiGSoTXGN2mEfdsEpQ/Xiv0lyhYBBPC/K4sYIpHccnhSRQUZlWLLY +lE5cFNKC9b7226mNvQJBAPt0hfCNIN0kUYOA9jdLtx7CE4ySGMPf5KPBuzPd8ty1 +fxaFm9PB7B76VZQYmHcWy8rT5XjoLJHrmGW1ZvP+iDsCQQDAvnKoarPOGb5iJfkq +RrA4flf1TOlf+1+uqIOJ94959jkkJeb0gv/TshDnm6/bWn+1kJylQaKygCizwPwB +Z84vAkA0Duur4YvsPJijoQ9YY1SGCagCcjyuUKwFOxaGpmyhRPIKt56LOJqpzyno +fy8ReKa4VyYq4eZYT249oFCwMwIBAkAROPNF2UL3x5UbcAkznd1hLujtIlI4IV4L +XUNjsJtBap7we/KHJq11XRPlniO4lf2TW7iji5neGVWJulTKS1xBAkAerktk4Hsw +ErUaUG1s/d+Sgc8e/KMeBElV+NxGhcWEeZtfHMn/6VOlbzY82JyvC9OKC80A5CAE +VUV6b25kqrcu +-----END PRIVATE KEY----- \ No newline at end of file diff --git a/google-http-client/src/test/resources/com/google/api/client/util/privateKey.pem b/google-http-client/src/test/resources/com/google/api/client/util/privateKey.pem new file mode 100644 index 000000000..dd13e1c09 --- /dev/null +++ b/google-http-client/src/test/resources/com/google/api/client/util/privateKey.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAL1SdY8jTUVU7O4/ +XrZLYTw0ON1lV6MQRGajFDFCqD2Fd9tQGLW8Iftx9wfXe1zuaehJSgLcyCxazfyJ +oN3RiONBihBqWY6d3lQKqkgsRTNZkdFJWdzl/6CxhK9sojh2p0r3tydtv9iwq5fu +uWIvtODtT98EgphhncQAqkKoF3zVAgMBAAECgYB51B9cXe4yiGTzJ4pOKpHGySAy +sC1F/IjXt2eeD3PuKv4m/hL4l7kScpLx0+NJuQ4j8U2UK/kQOdrGANapB1ZbMZAK +/q0xmIUzdNIDiGSoTXGN2mEfdsEpQ/Xiv0lyhYBBPC/K4sYIpHccnhSRQUZlWLLY +lE5cFNKC9b7226mNvQJBAPt0hfCNIN0kUYOA9jdLtx7CE4ySGMPf5KPBuzPd8ty1 +fxaFm9PB7B76VZQYmHcWy8rT5XjoLJHrmGW1ZvP+iDsCQQDAvnKoarPOGb5iJfkq +RrA4flf1TOlf+1+uqIOJ94959jkkJeb0gv/TshDnm6/bWn+1kJylQaKygCizwPwB +Z84vAkA0Duur4YvsPJijoQ9YY1SGCagCcjyuUKwFOxaGpmyhRPIKt56LOJqpzyno +fy8ReKa4VyYq4eZYT249oFCwMwIBAkAROPNF2UL3x5UbcAkznd1hLujtIlI4IV4L +XUNjsJtBap7we/KHJq11XRPlniO4lf2TW7iji5neGVWJulTKS1xBAkAerktk4Hsw +ErUaUG1s/d+Sgc8e/KMeBElV+NxGhcWEeZtfHMn/6VOlbzY82JyvC9OKC80A5CAE +VUV6b25kqrcu +-----END PRIVATE KEY----- \ No newline at end of file From 17bbfc1903f438e978352405efab04992e27440a Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Fri, 30 Oct 2020 16:27:56 -0700 Subject: [PATCH 362/983] chore: add Beta annotation for new mtls functions (#1167) * feat: support keystore in transport for mtls * fix format * update code * add tests * update test and doc * update names * create keystore from cert and key string * change certAndKey from string to inputstream * add mtls file * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * update the code * fix name * chore: add Beta annotation for new mtls functions * update Beta * add since tag Co-authored-by: Jeff Ching --- .../main/java/com/google/api/client/http/HttpTransport.java | 1 + .../google/api/client/http/javanet/NetHttpTransport.java | 6 +++++- .../main/java/com/google/api/client/util/SecurityUtils.java | 3 +++ .../src/main/java/com/google/api/client/util/SslUtils.java | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java index d4fad3f87..d70d7fb5f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java @@ -133,6 +133,7 @@ public boolean supportsMethod(String method) throws IOException { * Returns whether the transport is mTLS. * * @return boolean indicating if the transport is mTLS. + * @since 1.38 */ public boolean isMtls() { return false; diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java index b44b36a62..2a0ae6c1f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java @@ -108,6 +108,7 @@ public NetHttpTransport() { * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default * @param isMtls Whether the transport is mTLS. Default value is {@code false} + * @since 1.38 */ NetHttpTransport( Proxy proxy, @@ -123,7 +124,7 @@ public NetHttpTransport() { * @param sslSocketFactory SSL socket factory or {@code null} for the default * @param hostnameVerifier host name verifier or {@code null} for the default * @param isMtls Whether the transport is mTLS. Default value is {@code false} - * @since 1.20 + * @since 1.38 */ NetHttpTransport( ConnectionFactory connectionFactory, @@ -294,6 +295,7 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce } /** + * {@link Beta}
              * Sets the SSL socket factory based on a root certificate trust store and a client certificate * key store. The client certificate key store will be used to establish mutual TLS. * @@ -302,7 +304,9 @@ public Builder trustCertificates(KeyStore trustStore) throws GeneralSecurityExce * @param mtlsKeyStore key store for client certificate and key to establish mutual TLS. (use * for example {@link SecurityUtils#createMtlsKeyStore(InputStream)}) * @param mtlsKeyStorePassword password for mtlsKeyStore parameter + * @since 1.38 */ + @Beta public Builder trustCertificates( KeyStore trustStore, KeyStore mtlsKeyStore, String mtlsKeyStorePassword) throws GeneralSecurityException { diff --git a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java index 8f59a8747..25e40dbff 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SecurityUtils.java @@ -261,13 +261,16 @@ public static void loadKeyStoreFromCertificates( } /** + * {@link Beta}
              * Create a keystore for mutual TLS with the certificate and private key provided. * * @param certAndKey Certificate and private key input stream. The stream should contain one * certificate and one unencrypted private key. If there are multiple certificates, only the * first certificate will be used. * @return keystore for mutual TLS. + * @since 1.38 */ + @Beta public static KeyStore createMtlsKeyStore(InputStream certAndKey) throws GeneralSecurityException, IOException { KeyStore keystore = KeyStore.getInstance("JKS"); diff --git a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java index fc4b7900b..5cb8f373c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java @@ -110,6 +110,7 @@ public static SSLContext initSslContext( } /** + * {@link Beta}
              * Initializes the SSL context to the trust managers supplied by the trust manager factory for the * given trust store, and to the key managers supplied by the key manager factory for the given * key store. @@ -123,7 +124,9 @@ public static SSLContext initSslContext( * @param mtlsKeyStorePassword password for mtlsKeyStore parameter * @param keyManagerFactory key manager factory (for example {@link * #getDefaultKeyManagerFactory()}) + * @since 1.38 */ + @Beta public static SSLContext initSslContext( SSLContext sslContext, KeyStore trustStore, From d5f5d72fef6ca5ffa34b836ca52df798e6109161 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 31 Oct 2020 00:34:17 +0100 Subject: [PATCH 363/983] chore(deps): update dependency com.google.cloud:libraries-bom to v13.4.0 (#1166) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `13.3.0` -> `13.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f2ae501fb..77e374141 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.3.0 + 13.4.0 pom import From 6818a02a15e1bef8e9f5ea56a4ecc2b8d0646f9b Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 2 Nov 2020 11:08:56 -0500 Subject: [PATCH 364/983] docs: libraries-bom 13.4.0 (#1170) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index f388e93f4..2733e732e 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 13.3.0 + 13.4.0 pom import From c416e201c92a5c5fc1b1c59c5dd63e8ec1463f5f Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Mon, 2 Nov 2020 12:07:53 -0800 Subject: [PATCH 365/983] feat: add isMtls property to ApacheHttpTransport (#1168) * feat: support keystore in transport for mtls * fix format * update code * add tests * update test and doc * update names * create keystore from cert and key string * change certAndKey from string to inputstream * add mtls file * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpTransport.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * Update google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java Co-authored-by: Jeff Ching * Update google-http-client/src/main/java/com/google/api/client/util/SslUtils.java Co-authored-by: Jeff Ching * update the code * fix name * chore: add Beta annotation for new mtls functions * update Beta * add since tag * feat: add isMtls property to ApacheHttpTransport * update Beta annotation * format * fix tag Co-authored-by: Jeff Ching --- .../http/apache/v2/ApacheHttpTransport.java | 38 ++++++++++++++++++- .../apache/v2/ApacheHttpTransportTest.java | 5 ++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index 02fb98a35..fcbbecf2d 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -16,6 +16,7 @@ import com.google.api.client.http.HttpMethods; import com.google.api.client.http.HttpTransport; +import com.google.api.client.util.Beta; import java.io.IOException; import java.net.ProxySelector; import java.util.concurrent.TimeUnit; @@ -56,13 +57,16 @@ public final class ApacheHttpTransport extends HttpTransport { /** Apache HTTP client. */ private final HttpClient httpClient; + /** If the HTTP client uses mTLS channel. */ + private final boolean isMtls; + /** * Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. * * @since 1.30 */ public ApacheHttpTransport() { - this(newDefaultHttpClient()); + this(newDefaultHttpClient(), false); } /** @@ -84,6 +88,32 @@ public ApacheHttpTransport() { */ public ApacheHttpTransport(HttpClient httpClient) { this.httpClient = httpClient; + this.isMtls = false; + } + + /** + * {@link Beta}
              + * Constructor that allows an alternative Apache HTTP client to be used. + * + *

              Note that in the previous version, we overrode several settings. However, we are no longer + * able to do so. + * + *

              If you choose to provide your own Apache HttpClient implementation, be sure that + * + *

              + * + * @param httpClient Apache HTTP client to use + * @param isMtls If the HTTP client is mutual TLS + * @since 1.38 + */ + @Beta + public ApacheHttpTransport(HttpClient httpClient, boolean isMtls) { + this.httpClient = httpClient; + this.isMtls = isMtls; } /** @@ -192,4 +222,10 @@ public void shutdown() throws IOException { public HttpClient getHttpClient() { return httpClient; } + + /** Returns if the underlying HTTP client is mTLS. */ + @Override + public boolean isMtls() { + return isMtls; + } } diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index 880e7fdb6..4b9d9b8d7 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -15,6 +15,7 @@ package com.google.api.client.http.apache.v2; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -64,12 +65,14 @@ public class ApacheHttpTransportTest { public void testApacheHttpTransport() { ApacheHttpTransport transport = new ApacheHttpTransport(); checkHttpTransport(transport); + assertFalse(transport.isMtls()); } @Test public void testApacheHttpTransportWithParam() { - ApacheHttpTransport transport = new ApacheHttpTransport(HttpClients.custom().build()); + ApacheHttpTransport transport = new ApacheHttpTransport(HttpClients.custom().build(), true); checkHttpTransport(transport); + assertTrue(transport.isMtls()); } @Test From b8174c00daf4bdd8567ae37b544e9abe37d00b79 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 2 Nov 2020 12:53:27 -0800 Subject: [PATCH 366/983] chore: remove TravisCI config (#1163) This has not be used for years. --- .travis.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4ffc615a8..000000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false - -language: java - -notifications: - email: false - -jdk: - - oraclejdk8 - - openjdk7 From 8b31308e8b277c48cb9e9913fce2b6f693b38571 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 23:30:03 +0000 Subject: [PATCH 367/983] chore: release 1.38.0 (#1165) :robot: I have created a release \*beep\* \*boop\* --- ## [1.38.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.37.0...v1.38.0) (2020-11-02) ### Features * add isMtls property to ApacheHttpTransport ([#1168](https://www.github.com/googleapis/google-http-java-client/issues/1168)) ([c416e20](https://www.github.com/googleapis/google-http-java-client/commit/c416e201c92a5c5fc1b1c59c5dd63e8ec1463f5f)) * add mtls support for NetHttpTransport ([#1147](https://www.github.com/googleapis/google-http-java-client/issues/1147)) ([51762f2](https://www.github.com/googleapis/google-http-java-client/commit/51762f221ec8ab38da03149c8012e63aec0433dc)) ### Dependencies * guava 30.0-android ([#1151](https://www.github.com/googleapis/google-http-java-client/issues/1151)) ([969dbbf](https://www.github.com/googleapis/google-http-java-client/commit/969dbbf127708aff16309f82538aca6f0a651638)) ### Documentation * libraries-bom 13.4.0 ([#1170](https://www.github.com/googleapis/google-http-java-client/issues/1170)) ([6818a02](https://www.github.com/googleapis/google-http-java-client/commit/6818a02a15e1bef8e9f5ea56a4ecc2b8d0646f9b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 18 ++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 71 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48cc1de3e..b3402d817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## [1.38.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.37.0...v1.38.0) (2020-11-02) + + +### Features + +* add isMtls property to ApacheHttpTransport ([#1168](https://www.github.com/googleapis/google-http-java-client/issues/1168)) ([c416e20](https://www.github.com/googleapis/google-http-java-client/commit/c416e201c92a5c5fc1b1c59c5dd63e8ec1463f5f)) +* add mtls support for NetHttpTransport ([#1147](https://www.github.com/googleapis/google-http-java-client/issues/1147)) ([51762f2](https://www.github.com/googleapis/google-http-java-client/commit/51762f221ec8ab38da03149c8012e63aec0433dc)) + + +### Dependencies + +* guava 30.0-android ([#1151](https://www.github.com/googleapis/google-http-java-client/issues/1151)) ([969dbbf](https://www.github.com/googleapis/google-http-java-client/commit/969dbbf127708aff16309f82538aca6f0a651638)) + + +### Documentation + +* libraries-bom 13.4.0 ([#1170](https://www.github.com/googleapis/google-http-java-client/issues/1170)) ([6818a02](https://www.github.com/googleapis/google-http-java-client/commit/6818a02a15e1bef8e9f5ea56a4ecc2b8d0646f9b)) + ## [1.37.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.36.0...v1.37.0) (2020-10-13) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 54197f3d6..35eb4510c 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.37.1-SNAPSHOT + 1.38.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.37.1-SNAPSHOT + 1.38.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.37.1-SNAPSHOT + 1.38.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 59903e46b..8cd8773d3 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-android - 1.37.1-SNAPSHOT + 1.38.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 579934408..3d2639282 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-apache-v2 - 1.37.1-SNAPSHOT + 1.38.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 5921940fb..7929813ff 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-appengine - 1.37.1-SNAPSHOT + 1.38.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9532833ff..51df007cb 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.37.1-SNAPSHOT + 1.38.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 4676215ee..be3fbb8b4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.37.1-SNAPSHOT + 1.38.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-android - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-apache-v2 - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-appengine - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-findbugs - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-gson - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-jackson2 - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-protobuf - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-test - 1.37.1-SNAPSHOT + 1.38.0 com.google.http-client google-http-client-xml - 1.37.1-SNAPSHOT + 1.38.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5a55e3353..35a618fd0 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-findbugs - 1.37.1-SNAPSHOT + 1.38.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index be5e7ffc3..d98d6862f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-gson - 1.37.1-SNAPSHOT + 1.38.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 216e79d8d..73ef20a78 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-jackson2 - 1.37.1-SNAPSHOT + 1.38.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index a83780942..11602c374 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-protobuf - 1.37.1-SNAPSHOT + 1.38.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 79f88159e..ff83ff41e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-test - 1.37.1-SNAPSHOT + 1.38.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 591db8238..238f96746 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client-xml - 1.37.1-SNAPSHOT + 1.38.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 86ffc4876..9b0c69810 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../pom.xml google-http-client - 1.37.1-SNAPSHOT + 1.38.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 37d94bd05..41408f4ab 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.37.1-SNAPSHOT + 1.38.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8740cad9a..a4882f7ca 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.37.1-SNAPSHOT + 1.38.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ffacc2900..36e5b346b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.37.0:1.37.1-SNAPSHOT -google-http-client-bom:1.37.0:1.37.1-SNAPSHOT -google-http-client-parent:1.37.0:1.37.1-SNAPSHOT -google-http-client-android:1.37.0:1.37.1-SNAPSHOT -google-http-client-android-test:1.37.0:1.37.1-SNAPSHOT -google-http-client-apache-v2:1.37.0:1.37.1-SNAPSHOT -google-http-client-appengine:1.37.0:1.37.1-SNAPSHOT -google-http-client-assembly:1.37.0:1.37.1-SNAPSHOT -google-http-client-findbugs:1.37.0:1.37.1-SNAPSHOT -google-http-client-gson:1.37.0:1.37.1-SNAPSHOT -google-http-client-jackson2:1.37.0:1.37.1-SNAPSHOT -google-http-client-protobuf:1.37.0:1.37.1-SNAPSHOT -google-http-client-test:1.37.0:1.37.1-SNAPSHOT -google-http-client-xml:1.37.0:1.37.1-SNAPSHOT +google-http-client:1.38.0:1.38.0 +google-http-client-bom:1.38.0:1.38.0 +google-http-client-parent:1.38.0:1.38.0 +google-http-client-android:1.38.0:1.38.0 +google-http-client-android-test:1.38.0:1.38.0 +google-http-client-apache-v2:1.38.0:1.38.0 +google-http-client-appengine:1.38.0:1.38.0 +google-http-client-assembly:1.38.0:1.38.0 +google-http-client-findbugs:1.38.0:1.38.0 +google-http-client-gson:1.38.0:1.38.0 +google-http-client-jackson2:1.38.0:1.38.0 +google-http-client-protobuf:1.38.0:1.38.0 +google-http-client-test:1.38.0:1.38.0 +google-http-client-xml:1.38.0:1.38.0 From b26e2fc0e69e5765c5a3a573f68925f655cf6c0f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 Nov 2020 01:22:15 +0100 Subject: [PATCH 368/983] chore(deps): update dependency com.google.cloud:libraries-bom to v14 (#1172) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | major | `13.4.0` -> `14.4.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 77e374141..f0fa194eb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 13.4.0 + 14.4.1 pom import From 83ed97342c91c257cce995a06764c88b73697dcf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 4 Nov 2020 20:44:21 +0100 Subject: [PATCH 369/983] chore(deps): update dependency com.google.http-client:google-http-client-gson to v1.38.0 (#1171) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f0fa194eb..67ab8e829 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client-gson - 1.37.0 + 1.38.0 test From e41b5ed4469133779fcb808877770991f9d5fbd6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 4 Nov 2020 19:54:03 +0000 Subject: [PATCH 370/983] chore: release 1.38.1-SNAPSHOT (#1173) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 35eb4510c..daa9924e2 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.38.0 + 1.38.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.38.0 + 1.38.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.38.0 + 1.38.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 8cd8773d3..3a4da0f53 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-android - 1.38.0 + 1.38.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 3d2639282..d114c77c4 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.38.0 + 1.38.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 7929813ff..a8bb8213b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.38.0 + 1.38.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 51df007cb..64f1a43f4 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.38.0 + 1.38.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index be3fbb8b4..6d20aec27 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.38.0 + 1.38.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-android - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-test - 1.38.0 + 1.38.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.38.0 + 1.38.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 35a618fd0..d9a203883 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.38.0 + 1.38.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d98d6862f..0715b5e5d 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.38.0 + 1.38.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 73ef20a78..d9f55292b 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.38.0 + 1.38.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 11602c374..6b784c3ce 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.38.0 + 1.38.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ff83ff41e..6e0d68c1e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-test - 1.38.0 + 1.38.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 238f96746..fb5a1b96c 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.38.0 + 1.38.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9b0c69810..687c8c780 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../pom.xml google-http-client - 1.38.0 + 1.38.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 41408f4ab..e21df10da 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.38.0 + 1.38.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index a4882f7ca..4d73920a2 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.38.0 + 1.38.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 36e5b346b..adef30bbb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.38.0:1.38.0 -google-http-client-bom:1.38.0:1.38.0 -google-http-client-parent:1.38.0:1.38.0 -google-http-client-android:1.38.0:1.38.0 -google-http-client-android-test:1.38.0:1.38.0 -google-http-client-apache-v2:1.38.0:1.38.0 -google-http-client-appengine:1.38.0:1.38.0 -google-http-client-assembly:1.38.0:1.38.0 -google-http-client-findbugs:1.38.0:1.38.0 -google-http-client-gson:1.38.0:1.38.0 -google-http-client-jackson2:1.38.0:1.38.0 -google-http-client-protobuf:1.38.0:1.38.0 -google-http-client-test:1.38.0:1.38.0 -google-http-client-xml:1.38.0:1.38.0 +google-http-client:1.38.0:1.38.1-SNAPSHOT +google-http-client-bom:1.38.0:1.38.1-SNAPSHOT +google-http-client-parent:1.38.0:1.38.1-SNAPSHOT +google-http-client-android:1.38.0:1.38.1-SNAPSHOT +google-http-client-android-test:1.38.0:1.38.1-SNAPSHOT +google-http-client-apache-v2:1.38.0:1.38.1-SNAPSHOT +google-http-client-appengine:1.38.0:1.38.1-SNAPSHOT +google-http-client-assembly:1.38.0:1.38.1-SNAPSHOT +google-http-client-findbugs:1.38.0:1.38.1-SNAPSHOT +google-http-client-gson:1.38.0:1.38.1-SNAPSHOT +google-http-client-jackson2:1.38.0:1.38.1-SNAPSHOT +google-http-client-protobuf:1.38.0:1.38.1-SNAPSHOT +google-http-client-test:1.38.0:1.38.1-SNAPSHOT +google-http-client-xml:1.38.0:1.38.1-SNAPSHOT From 98956fbdd202f67e41ff039f18b51c0d7a01db2e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 5 Nov 2020 14:11:38 +0100 Subject: [PATCH 371/983] chore(deps): update dependency com.google.cloud:libraries-bom to v15 (#1176) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 67ab8e829..678c19ea2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 14.4.1 + 15.0.0 pom import From 8cd7447762586eeedd19664ebd8beb51b77bc275 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Nov 2020 14:56:20 -0800 Subject: [PATCH 372/983] chore(java): use production staging bucket (#1175) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/651c23e5-2375-4d88-92fd-d5b4eb61e37b/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/c7824ea48ff6d4d42dfae0849aec8a85acd90bd9 --- .kokoro/release/publish_javadoc.cfg | 2 +- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 2359ee9d6..25e6405f6 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -9,7 +9,7 @@ env_vars: { env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2-staging" + value: "docs-staging-v2" # Production will be at: docs-staging-v2 } diff --git a/synth.metadata b/synth.metadata index be777bab6..3d2a0e4a4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "3151547ba0d0e975f625d84bd533931864df51bc" + "sha": "e41b5ed4469133779fcb808877770991f9d5fbd6" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b19b401571e77192f8dd38eab5fb2300a0de9324" + "sha": "c7824ea48ff6d4d42dfae0849aec8a85acd90bd9" } } ], From 125a697c5cb5535894e46fd59e73663c50f3a6fa Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 9 Nov 2020 09:37:35 -0500 Subject: [PATCH 373/983] docs: BOM 15.0.0 (#1177) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 2733e732e..167780d7b 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 13.4.0 + 15.0.0 pom import From 05954124854c5da5014b42eb8765787536a30e14 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 10 Nov 2020 09:34:17 -0800 Subject: [PATCH 374/983] chore(java): ignore return code 28 in README autosynth job (#1179) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/a7267bc5-50ec-41cf-9154-e7a11afa0e5d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279 --- .kokoro/readme.sh | 11 ++++++++++- synth.metadata | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh index 0bcf9b617..97103b119 100755 --- a/.kokoro/readme.sh +++ b/.kokoro/readme.sh @@ -28,9 +28,18 @@ echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials git config --global credential.helper 'store --file ~/.git-credentials' python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool + +set +e python3.6 -m autosynth.synth \ --repository=googleapis/google-http-java-client \ --synth-file-name=.github/readme/synth.py \ --metadata-path=.github/readme/synth.metadata \ --pr-title="chore: regenerate README" \ - --branch-suffix="readme" \ No newline at end of file + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/synth.metadata b/synth.metadata index 3d2a0e4a4..d492ff640 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "e41b5ed4469133779fcb808877770991f9d5fbd6" + "sha": "125a697c5cb5535894e46fd59e73663c50f3a6fa" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c7824ea48ff6d4d42dfae0849aec8a85acd90bd9" + "sha": "7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279" } } ], From 1e7a484ab95affae970815f4b72d2965a8a9e0e8 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 12 Nov 2020 11:56:08 -0500 Subject: [PATCH 375/983] chore: libraries-bom 15.1.0 (#1181) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 167780d7b..0e1ea215d 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 15.0.0 + 15.1.0 pom import From ba3c2bcb01e087560d0afea5f7b671046c6016cd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 13 Nov 2020 13:10:22 -0800 Subject: [PATCH 376/983] build(java): use code-suggester v1 tag rather than full semver (#1183) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/f9b64fe4-9263-41bd-b94d-ceb0f5c026f7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7d652819519dfa24da9e14548232e4aaba71a11c --- .github/workflows/formatting.yaml | 2 +- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index d4d367cfc..6844407b4 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -18,7 +18,7 @@ jobs: with: java-version: 11 - run: "mvn com.coveo:fmt-maven-plugin:format" - - uses: googleapis/code-suggester@v1.8.0 + - uses: googleapis/code-suggester@v1 with: command: review pull_number: ${{ github.event.pull_request.number }} diff --git a/synth.metadata b/synth.metadata index d492ff640..6526a7a3e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "125a697c5cb5535894e46fd59e73663c50f3a6fa" + "sha": "1e7a484ab95affae970815f4b72d2965a8a9e0e8" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7db8a6c5ffb12a6e4c2f799c18f00f7f3d60e279" + "sha": "7d652819519dfa24da9e14548232e4aaba71a11c" } } ], From 2af9b24defea8a66a51886120d75a42918d3f2f9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 18 Nov 2020 19:35:44 +0100 Subject: [PATCH 377/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16 (#1187) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 678c19ea2..fccbd2fcc 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 15.0.0 + 16.0.0 pom import From 009000b1fe0e9db77d4ab8fc2a9276ddc393475a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 18 Nov 2020 19:36:17 +0100 Subject: [PATCH 378/983] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.14.0 (#1184) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e21df10da..f07e3124d 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.6 2.11.3 - 3.13.0 + 3.14.0 30.0-android 1.1.4c 1.2 From 15b69ad11dab4a7167e71e7aa3636198b2914ab0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Nov 2020 14:44:03 -0800 Subject: [PATCH 379/983] build(java): use actions/github-script v3 tag rather than full semver (#1186) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ae7b09a4-b636-4a61-997a-6394f4c00dbd/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58 --- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- synth.metadata | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index e2d841d6c..7513acaeb 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index bc1554aec..2b6cdbc97 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-v') steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/synth.metadata b/synth.metadata index 6526a7a3e..490ca080d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "1e7a484ab95affae970815f4b72d2965a8a9e0e8" + "sha": "ba3c2bcb01e087560d0afea5f7b671046c6016cd" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7d652819519dfa24da9e14548232e4aaba71a11c" + "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" } } ], From f889576261429dd99f30e8fc184c7a4a5f2ed375 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 17:58:14 +0100 Subject: [PATCH 380/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16.1.0 (#1188) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `16.0.0` -> `16.1.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index fccbd2fcc..627c83309 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.0.0 + 16.1.0 pom import From 74b15e238a286ca4565e7dd65d94025b77543cf9 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 19 Nov 2020 11:58:29 -0500 Subject: [PATCH 381/983] chore: libraries-bom 16.1.0 (#1189) @elharo @chingor13 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 0e1ea215d..ec19bd3c7 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 15.1.0 + 16.1.0 pom import From 484303d9b20edc974b7590d6fab7ef32ef14c1bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Nov 2020 08:08:07 -0800 Subject: [PATCH 382/983] chore(java): retry staging portion of the release with backoff (#1190) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5dd1c41b-c3e8-424e-9ebc-c89c7604838a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/68742c6016bf0d16948a572633d17955a8737414 --- .kokoro/common.sh | 1 - .kokoro/release/stage.sh | 17 ++++++++++------- synth.metadata | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.kokoro/common.sh b/.kokoro/common.sh index a8d0ea04d..ace89f45a 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -25,7 +25,6 @@ function retry_with_backoff { # allow a failures to continue set +e - echo "${command}" ${command} exit_code=$? diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c482cbc5..16126d2eb 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn clean install deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DskipTests=true \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} if [[ -n "${AUTORELEASE_PR}" ]] then diff --git a/synth.metadata b/synth.metadata index 490ca080d..fc728c167 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "ba3c2bcb01e087560d0afea5f7b671046c6016cd" + "sha": "74b15e238a286ca4565e7dd65d94025b77543cf9" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "68742c6016bf0d16948a572633d17955a8737414" } } ], From 7e038f637e2bd44b3de8831059a02c5a1b847551 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 24 Nov 2020 13:12:07 -0800 Subject: [PATCH 383/983] build(java): enable blunderbuss for samples (#1191) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1e5e82df-ed89-451b-8e30-d888c5a55bcb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/943bb78606d035001123030067dffcc34f4645f2 --- .github/blunderbuss.yml | 7 +++++++ synth.metadata | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .github/blunderbuss.yml diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 000000000..1a23ea42b --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index fc728c167..7d1cba73d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "74b15e238a286ca4565e7dd65d94025b77543cf9" + "sha": "484303d9b20edc974b7590d6fab7ef32ef14c1bc" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "68742c6016bf0d16948a572633d17955a8737414" + "sha": "943bb78606d035001123030067dffcc34f4645f2" } } ], @@ -21,6 +21,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/blunderbuss.yml", ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", From 059ab361f790c59ff31cd2acdf2e6a5b86159b92 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 7 Dec 2020 12:38:03 -0800 Subject: [PATCH 384/983] chore(docs): add gradle instructions to setup.md (#1195) Fixes #858 --- docs/setup.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/setup.md b/docs/setup.md index ec19bd3c7..6de9b7163 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -67,6 +67,14 @@ On Android, you may need to explicitly exclude unused dependencies: ``` +## Gradle + +If you are using Gradle, add this to your dependencies: + +``` +compile 'com.google.http-client:google-http-client:[VERSION]' +``` + ## Download the library with dependencies Download the latest assembly zip file from Maven Central and extract it on your computer. This zip From 8baa96f642ff990c4a18018a267b3af8b3579a61 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Dec 2020 18:24:26 +0100 Subject: [PATCH 385/983] chore(deps): update dependency org.apache.httpcomponents:httpcore to v4.4.14 (#1194) * chore(deps): update dependency org.apache.httpcomponents:httpcore to v4.4.14 * firce CI to rerun Co-authored-by: Elliotte Rusty Harold --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f07e3124d..ffa61c014 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ Google - http://www.google.com/ + https://www.google.com/ @@ -584,7 +584,7 @@ 1.1.4c 1.2 4.5.13 - 4.4.13 + 4.4.14 0.24.0 .. false From 4dad4aae8c324fa2e588dc3bb9c70229a90fd70a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Dec 2020 18:24:45 +0100 Subject: [PATCH 386/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.12.0 (#1192) * chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.12.0 * Update pom.xml force rerun of CI Co-authored-by: Elliotte Rusty Harold --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffa61c014..4066cb863 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.6 - 2.11.3 + 2.12.0 3.14.0 30.0-android 1.1.4c From 8fc7b09f17095f6bbe83034ebe0831d98a8b056a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 8 Dec 2020 11:24:29 -0800 Subject: [PATCH 387/983] chore: Update publish_javadoc.sh (#1196) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e3788801-adcc-4ada-8d0e-68f7311185bf/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5d11bd2888c38ce1fb6fa6bf25494a4219a73928 --- .kokoro/release/publish_javadoc.sh | 7 ++++--- synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 06e7d1e97..b17f6fa7e 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -q -DskipTests=true -NAME=google-http-client -VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) +export NAME=google-http-client +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs mvn site -B -q @@ -59,7 +59,8 @@ python3 -m docuploader upload . \ popd -# V2 +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" pushd target/devsite/reference diff --git a/synth.metadata b/synth.metadata index 7d1cba73d..5f5f3efb4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "484303d9b20edc974b7590d6fab7ef32ef14c1bc" + "sha": "059ab361f790c59ff31cd2acdf2e6a5b86159b92" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "943bb78606d035001123030067dffcc34f4645f2" + "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" } } ], From 51168fdbb5f739a8851b85356d04b3a042699ccf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 23:30:38 +0100 Subject: [PATCH 388/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.0 (#1201) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `16.1.0` -> `16.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 627c83309..f1b032536 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.1.0 + 16.2.0 pom import From b148c513e4b2e6447fe2321e210ef0dc6ca1128f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 16 Dec 2020 08:44:20 -0800 Subject: [PATCH 389/983] ci(java): ignore bot users for generate-files-bot (#1202) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5204afce-766b-4a81-9152-05f5c11b5df8/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3f67ceece7e797a5736a25488aae35405649b90b --- .github/generated-files-bot.yml | 4 ++++ synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 20f3acc28..47c2ba132 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -5,3 +5,7 @@ externalManifests: - type: json file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' diff --git a/synth.metadata b/synth.metadata index 5f5f3efb4..f0e1bb867 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "059ab361f790c59ff31cd2acdf2e6a5b86159b92" + "sha": "51168fdbb5f739a8851b85356d04b3a042699ccf" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" + "sha": "3f67ceece7e797a5736a25488aae35405649b90b" } } ], From 7922dc0517bd82669a18b81af38e5ba211bc2e0b Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 16 Dec 2020 23:48:54 +0000 Subject: [PATCH 390/983] deps: update guava to 30.1-android (#1199) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4066cb863..ecfdf38bf 100644 --- a/pom.xml +++ b/pom.xml @@ -580,7 +580,7 @@ 2.8.6 2.12.0 3.14.0 - 30.0-android + 30.1-android 1.1.4c 1.2 4.5.13 From d8821fc796b22ce14d042bc2c489375c9ff10db6 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 16 Dec 2020 23:49:52 +0000 Subject: [PATCH 391/983] chore(docs): update libraries-bom 16.2.0 (#1203) --- docs/setup.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/setup.md b/docs/setup.md index 6de9b7163..5c5658108 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -14,7 +14,7 @@ The Google HTTP Client Library for Java is in the central Maven repository. The all artifacts for this library is `com.google.http-client`. To ensure all dependency versions work together and to avoid having to manually choose and specify -versions for each dependency, we recommend first importing the `com.google.cloud:libraries-bom` in +versions for each dependency, first import the `com.google.cloud:libraries-bom` in the `dependencyManagement` section of your `pom.xml`: ```xml @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 16.1.0 + 16.2.0 pom import @@ -31,7 +31,7 @@ the `dependencyManagement` section of your `pom.xml`: ``` -Then you add the individual dependencies you need without version numbers to the `dependencies` +Then add the individual dependencies you need without version numbers to the `dependencies` section: ```xml From 4b629c5abb6a2f384d9cf653779d2675c8b9243e Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 16 Dec 2020 23:50:59 +0000 Subject: [PATCH 392/983] chore(deps): remove commons logging version property (#1200) --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index ecfdf38bf..c2c16d78b 100644 --- a/pom.xml +++ b/pom.xml @@ -582,7 +582,6 @@ 3.14.0 30.1-android 1.1.4c - 1.2 4.5.13 4.4.14 0.24.0 From c71e1fa6b6d31d7b5a5a0df6db86e66a5ebd8614 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 21 Dec 2020 21:48:49 +0000 Subject: [PATCH 393/983] chore: remove eclipse config (#1210) * remove commons logging * remove eclipse files --- .../.settings/org.eclipse.jdt.ui.prefs | 117 ------------------ .../DailyMotionSample.launch | 14 --- 2 files changed, 131 deletions(-) delete mode 100644 samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch diff --git a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index c8c84d429..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,117 +0,0 @@ -cleanup.add_default_serial_version_id=true -cleanup.add_generated_serial_version_id=false -cleanup.add_missing_annotations=true -cleanup.add_missing_deprecated_annotations=true -cleanup.add_missing_methods=false -cleanup.add_missing_nls_tags=false -cleanup.add_missing_override_annotations=true -cleanup.add_serial_version_id=true -cleanup.always_use_blocks=true -cleanup.always_use_parentheses_in_expressions=false -cleanup.always_use_this_for_non_static_field_access=false -cleanup.always_use_this_for_non_static_method_access=false -cleanup.convert_to_enhanced_for_loop=false -cleanup.correct_indentation=true -cleanup.format_source_code=true -cleanup.format_source_code_changes_only=false -cleanup.make_local_variable_final=true -cleanup.make_parameters_final=false -cleanup.make_private_fields_final=true -cleanup.make_type_abstract_if_missing_method=false -cleanup.make_variable_declarations_final=false -cleanup.never_use_blocks=false -cleanup.never_use_parentheses_in_expressions=true -cleanup.organize_imports=true -cleanup.qualify_static_field_accesses_with_declaring_class=false -cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -cleanup.qualify_static_member_accesses_with_declaring_class=true -cleanup.qualify_static_method_accesses_with_declaring_class=false -cleanup.remove_private_constructors=true -cleanup.remove_trailing_whitespaces=true -cleanup.remove_trailing_whitespaces_all=true -cleanup.remove_trailing_whitespaces_ignore_empty=false -cleanup.remove_unnecessary_casts=true -cleanup.remove_unnecessary_nls_tags=true -cleanup.remove_unused_imports=true -cleanup.remove_unused_local_variables=false -cleanup.remove_unused_private_fields=true -cleanup.remove_unused_private_members=false -cleanup.remove_unused_private_methods=true -cleanup.remove_unused_private_types=true -cleanup.sort_members=false -cleanup.sort_members_all=false -cleanup.use_blocks=true -cleanup.use_blocks_only_for_return_and_throw=false -cleanup.use_parentheses_in_expressions=true -cleanup.use_this_for_non_static_field_access=true -cleanup.use_this_for_non_static_field_access_only_if_necessary=true -cleanup.use_this_for_non_static_method_access=true -cleanup.use_this_for_non_static_method_access_only_if_necessary=true -cleanup_profile=_google-api-java-client -cleanup_settings_version=2 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_google-api-java-client 100 -formatter_settings_version=12 -org.eclipse.jdt.ui.exception.name=exception -org.eclipse.jdt.ui.gettersetter.use.is=false -org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=com;org;;java;javax; -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.keywordthis=false -org.eclipse.jdt.ui.ondemandthreshold=999 -org.eclipse.jdt.ui.overrideannotation=true -org.eclipse.jdt.ui.staticondemandthreshold=999 -org.eclipse.jdt.ui.text.custom_code_templates= -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=true -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=true -sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=false -sp_cleanup.make_parameters_final=false -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=true -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=false -sp_cleanup.organize_imports=true -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=false -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=false -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=true -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=false -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=false -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch b/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch deleted file mode 100644 index e273fce30..000000000 --- a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - From 4f86ce2f33590b712c32e58ff4d3cabcac5eedf2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 29 Dec 2020 11:53:48 -0800 Subject: [PATCH 394/983] chore(java): remove formatter action Source-Author: Jeff Ching Source-Date: Tue Dec 29 10:50:17 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 6133907dbb3ddab204a17a15d5c53ec0aae9b033 Source-Link: https://github.com/googleapis/synthtool/commit/6133907dbb3ddab204a17a15d5c53ec0aae9b033 --- .github/workflows/formatting.yaml | 25 ------------------------- synth.metadata | 5 ++--- 2 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml deleted file mode 100644 index 6844407b4..000000000 --- a/.github/workflows/formatting.yaml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request_target: - types: [opened, synchronize] - branches: - - master -name: format -jobs: - format-code: - runs-on: ubuntu-latest - env: - ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - uses: actions/setup-java@v1 - with: - java-version: 11 - - run: "mvn com.coveo:fmt-maven-plugin:format" - - uses: googleapis/code-suggester@v1 - with: - command: review - pull_number: ${{ github.event.pull_request.number }} - git_dir: '.' diff --git a/synth.metadata b/synth.metadata index f0e1bb867..0b022eb0c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "51168fdbb5f739a8851b85356d04b3a042699ccf" + "sha": "c71e1fa6b6d31d7b5a5a0df6db86e66a5ebd8614" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3f67ceece7e797a5736a25488aae35405649b90b" + "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" } } ], @@ -30,7 +30,6 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", From 68f7e7284f5d4df492b3ce1ad60178b5f59fdd1a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jan 2021 22:28:26 +0100 Subject: [PATCH 395/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.1 (#1217) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `16.2.0` -> `16.2.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f1b032536..9aa97cc57 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.0 + 16.2.1 pom import From 853d9768cbd901ecf0747648bc093b9e8a654ed6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jan 2021 12:56:24 +0100 Subject: [PATCH 396/983] chore(deps): update dependency com.fasterxml.jackson.core:jackson-core to v2.12.1 (#1219) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2c16d78b..36b8fdd34 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.6 - 2.12.0 + 2.12.1 3.14.0 30.1-android 1.1.4c From f605679e46705d22c73c91cf5705bdf293409060 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 12 Jan 2021 16:42:48 -0500 Subject: [PATCH 397/983] chore(deps): libraries BOM 16.2.1 (#1218) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 5c5658108..28a746f8c 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 16.2.0 + 16.2.1 pom import From adb2ea41c4eee61174ec6e588dec576fc53169f6 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 12 Jan 2021 22:56:48 +0000 Subject: [PATCH 398/983] fix: JSON spec mandates UTF-8 (#1220) --- .../java/com/google/api/client/json/gson/GsonFactory.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java index 391dbf3d4..f02ba0f30 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java @@ -18,7 +18,6 @@ import com.google.api.client.json.JsonGenerator; import com.google.api.client.json.JsonParser; import com.google.api.client.util.Beta; -import com.google.api.client.util.Charsets; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.InputStream; @@ -29,6 +28,7 @@ import java.io.StringReader; import java.io.Writer; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Low-level JSON library implementation based on GSON. @@ -60,9 +60,7 @@ static class InstanceHolder { @Override public JsonParser createJsonParser(InputStream in) { - // TODO(mlinder): Parser should try to detect the charset automatically when using GSON - // https://github.com/googleapis/google-http-java-client/issues/6 - return createJsonParser(new InputStreamReader(in, Charsets.UTF_8)); + return createJsonParser(new InputStreamReader(in, StandardCharsets.UTF_8)); } @Override From 6b9b6c57734c4917394d0e256e745d69b61b5517 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 12 Jan 2021 22:59:07 +0000 Subject: [PATCH 399/983] fix: deprecate JacksonFactory in favor of GsonFactory to align with security team advice (#1216) --- .../client/json/jackson2/JacksonFactory.java | 35 +-------------- .../json/jackson2/JacksonGenerator.java | 7 +-- .../client/json/jackson2/JacksonParser.java | 43 ++++++++++++++++--- 3 files changed, 44 insertions(+), 41 deletions(-) diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java index dba08c363..1079fb725 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonFactory.java @@ -17,7 +17,6 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonGenerator; import com.google.api.client.json.JsonParser; -import com.google.api.client.json.JsonToken; import com.google.api.client.util.Preconditions; import java.io.IOException; import java.io.InputStream; @@ -34,7 +33,9 @@ * * @since 1.11 * @author Yaniv Inbar + * @deprecated use com.google.api.client.json.GsonFactory instead */ +@Deprecated public final class JacksonFactory extends JsonFactory { /** JSON factory. */ @@ -96,36 +97,4 @@ public JsonParser createJsonParser(String value) throws IOException { Preconditions.checkNotNull(value); return new JacksonParser(this, factory.createJsonParser(value)); } - - static JsonToken convert(com.fasterxml.jackson.core.JsonToken token) { - if (token == null) { - return null; - } - switch (token) { - case END_ARRAY: - return JsonToken.END_ARRAY; - case START_ARRAY: - return JsonToken.START_ARRAY; - case END_OBJECT: - return JsonToken.END_OBJECT; - case START_OBJECT: - return JsonToken.START_OBJECT; - case VALUE_FALSE: - return JsonToken.VALUE_FALSE; - case VALUE_TRUE: - return JsonToken.VALUE_TRUE; - case VALUE_NULL: - return JsonToken.VALUE_NULL; - case VALUE_STRING: - return JsonToken.VALUE_STRING; - case VALUE_NUMBER_FLOAT: - return JsonToken.VALUE_NUMBER_FLOAT; - case VALUE_NUMBER_INT: - return JsonToken.VALUE_NUMBER_INT; - case FIELD_NAME: - return JsonToken.FIELD_NAME; - default: - return JsonToken.NOT_AVAILABLE; - } - } } diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java index fd02c54c3..64d54db6d 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonGenerator.java @@ -14,6 +14,7 @@ package com.google.api.client.json.jackson2; +import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonGenerator; import java.io.IOException; import java.math.BigDecimal; @@ -28,14 +29,14 @@ */ final class JacksonGenerator extends JsonGenerator { private final com.fasterxml.jackson.core.JsonGenerator generator; - private final JacksonFactory factory; + private final JsonFactory factory; @Override - public JacksonFactory getFactory() { + public JsonFactory getFactory() { return factory; } - JacksonGenerator(JacksonFactory factory, com.fasterxml.jackson.core.JsonGenerator generator) { + JacksonGenerator(JsonFactory factory, com.fasterxml.jackson.core.JsonGenerator generator) { this.factory = factory; this.generator = generator; } diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java index 5de53112f..2000392b0 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/JacksonParser.java @@ -14,6 +14,7 @@ package com.google.api.client.json.jackson2; +import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; import java.io.IOException; @@ -30,14 +31,14 @@ final class JacksonParser extends JsonParser { private final com.fasterxml.jackson.core.JsonParser parser; - private final JacksonFactory factory; + private final JsonFactory factory; @Override - public JacksonFactory getFactory() { + public JsonFactory getFactory() { return factory; } - JacksonParser(JacksonFactory factory, com.fasterxml.jackson.core.JsonParser parser) { + JacksonParser(JsonFactory factory, com.fasterxml.jackson.core.JsonParser parser) { this.factory = factory; this.parser = parser; } @@ -49,7 +50,7 @@ public void close() throws IOException { @Override public JsonToken nextToken() throws IOException { - return JacksonFactory.convert(parser.nextToken()); + return convert(parser.nextToken()); } @Override @@ -59,7 +60,7 @@ public String getCurrentName() throws IOException { @Override public JsonToken getCurrentToken() { - return JacksonFactory.convert(parser.getCurrentToken()); + return convert(parser.getCurrentToken()); } @Override @@ -112,4 +113,36 @@ public double getDoubleValue() throws IOException { public long getLongValue() throws IOException { return parser.getLongValue(); } + + private static JsonToken convert(com.fasterxml.jackson.core.JsonToken token) { + if (token == null) { + return null; + } + switch (token) { + case END_ARRAY: + return JsonToken.END_ARRAY; + case START_ARRAY: + return JsonToken.START_ARRAY; + case END_OBJECT: + return JsonToken.END_OBJECT; + case START_OBJECT: + return JsonToken.START_OBJECT; + case VALUE_FALSE: + return JsonToken.VALUE_FALSE; + case VALUE_TRUE: + return JsonToken.VALUE_TRUE; + case VALUE_NULL: + return JsonToken.VALUE_NULL; + case VALUE_STRING: + return JsonToken.VALUE_STRING; + case VALUE_NUMBER_FLOAT: + return JsonToken.VALUE_NUMBER_FLOAT; + case VALUE_NUMBER_INT: + return JsonToken.VALUE_NUMBER_INT; + case FIELD_NAME: + return JsonToken.FIELD_NAME; + default: + return JsonToken.NOT_AVAILABLE; + } + } } From 9f53a6788e20bbded1b5937a5e8fe19ace31beaa Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 12 Jan 2021 23:02:20 +0000 Subject: [PATCH 400/983] fix: address some deprecation warnings in Java 9+ (#1215) --- .../src/main/java/com/google/api/client/xml/Xml.java | 4 ++-- .../main/java/com/google/api/client/util/Data.java | 11 +++++++++++ .../java/com/google/api/client/util/ObjectsTest.java | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java index 1aa5a343b..a5132839c 100644 --- a/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java +++ b/google-http-client-xml/src/main/java/com/google/api/client/xml/Xml.java @@ -575,10 +575,10 @@ private static Object parseValue(Type valueType, List context, String valu valueType = Data.resolveWildcardTypeOrTypeVariable(context, valueType); if (valueType == Double.class || valueType == double.class) { if (value.equals("INF")) { - return new Double(Double.POSITIVE_INFINITY); + return Double.valueOf(Double.POSITIVE_INFINITY); } if (value.equals("-INF")) { - return new Double(Double.NEGATIVE_INFINITY); + return Double.valueOf(Double.NEGATIVE_INFINITY); } } if (valueType == Float.class || valueType == float.class) { diff --git a/google-http-client/src/main/java/com/google/api/client/util/Data.java b/google-http-client/src/main/java/com/google/api/client/util/Data.java index 5b2a91e4b..f50b45206 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Data.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Data.java @@ -45,36 +45,47 @@ public class Data { // NOTE: create new instances to avoid cache, e.g. new String() /** The single instance of the magic null object for a {@link Boolean}. */ + @SuppressWarnings("deprecation") public static final Boolean NULL_BOOLEAN = new Boolean(true); /** The single instance of the magic null object for a {@link String}. */ + @SuppressWarnings("deprecation") public static final String NULL_STRING = new String(); /** The single instance of the magic null object for a {@link Character}. */ + @SuppressWarnings("deprecation") public static final Character NULL_CHARACTER = new Character((char) 0); /** The single instance of the magic null object for a {@link Byte}. */ + @SuppressWarnings("deprecation") public static final Byte NULL_BYTE = new Byte((byte) 0); /** The single instance of the magic null object for a {@link Short}. */ + @SuppressWarnings("deprecation") public static final Short NULL_SHORT = new Short((short) 0); /** The single instance of the magic null object for a {@link Integer}. */ + @SuppressWarnings("deprecation") public static final Integer NULL_INTEGER = new Integer(0); /** The single instance of the magic null object for a {@link Float}. */ + @SuppressWarnings("deprecation") public static final Float NULL_FLOAT = new Float(0); /** The single instance of the magic null object for a {@link Long}. */ + @SuppressWarnings("deprecation") public static final Long NULL_LONG = new Long(0); /** The single instance of the magic null object for a {@link Double}. */ + @SuppressWarnings("deprecation") public static final Double NULL_DOUBLE = new Double(0); /** The single instance of the magic null object for a {@link BigInteger}. */ + @SuppressWarnings("deprecation") public static final BigInteger NULL_BIG_INTEGER = new BigInteger("0"); /** The single instance of the magic null object for a {@link BigDecimal}. */ + @SuppressWarnings("deprecation") public static final BigDecimal NULL_BIG_DECIMAL = new BigDecimal("0"); /** The single instance of the magic null object for a {@link DateTime}. */ diff --git a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java index 570ede362..5327e9267 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java @@ -34,7 +34,7 @@ public void testConstructor_innerClass() { public void testToString_oneIntegerField() { String toTest = - Objects.toStringHelper(new TestClass()).add("field1", new Integer(42)).toString(); + Objects.toStringHelper(new TestClass()).add("field1", Integer.valueOf(42)).toString(); assertEquals("TestClass{field1=42}", toTest); } From 54311e880e1d9df37eaa4fe3cd6a0ca5c4691d4f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 00:04:02 +0000 Subject: [PATCH 401/983] chore: release 1.38.1 (#1178) :robot: I have created a release \*beep\* \*boop\* --- ### [1.38.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.0...v1.38.1) (2021-01-12) ### Bug Fixes * address some deprecation warnings in Java 9+ ([#1215](https://www.github.com/googleapis/google-http-java-client/issues/1215)) ([9f53a67](https://www.github.com/googleapis/google-http-java-client/commit/9f53a6788e20bbded1b5937a5e8fe19ace31beaa)) * deprecate JacksonFactory in favor of GsonFactory to align with security team advice ([#1216](https://www.github.com/googleapis/google-http-java-client/issues/1216)) ([6b9b6c5](https://www.github.com/googleapis/google-http-java-client/commit/6b9b6c57734c4917394d0e256e745d69b61b5517)) * JSON spec mandates UTF-8 ([#1220](https://www.github.com/googleapis/google-http-java-client/issues/1220)) ([adb2ea4](https://www.github.com/googleapis/google-http-java-client/commit/adb2ea41c4eee61174ec6e588dec576fc53169f6)) ### Documentation * BOM 15.0.0 ([#1177](https://www.github.com/googleapis/google-http-java-client/issues/1177)) ([125a697](https://www.github.com/googleapis/google-http-java-client/commit/125a697c5cb5535894e46fd59e73663c50f3a6fa)) ### Dependencies * update guava to 30.1-android ([#1199](https://www.github.com/googleapis/google-http-java-client/issues/1199)) ([7922dc0](https://www.github.com/googleapis/google-http-java-client/commit/7922dc0517bd82669a18b81af38e5ba211bc2e0b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 19 +++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 72 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3402d817..62757901a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +### [1.38.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.0...v1.38.1) (2021-01-12) + + +### Bug Fixes + +* address some deprecation warnings in Java 9+ ([#1215](https://www.github.com/googleapis/google-http-java-client/issues/1215)) ([9f53a67](https://www.github.com/googleapis/google-http-java-client/commit/9f53a6788e20bbded1b5937a5e8fe19ace31beaa)) +* deprecate JacksonFactory in favor of GsonFactory to align with security team advice ([#1216](https://www.github.com/googleapis/google-http-java-client/issues/1216)) ([6b9b6c5](https://www.github.com/googleapis/google-http-java-client/commit/6b9b6c57734c4917394d0e256e745d69b61b5517)) +* JSON spec mandates UTF-8 ([#1220](https://www.github.com/googleapis/google-http-java-client/issues/1220)) ([adb2ea4](https://www.github.com/googleapis/google-http-java-client/commit/adb2ea41c4eee61174ec6e588dec576fc53169f6)) + + +### Documentation + +* BOM 15.0.0 ([#1177](https://www.github.com/googleapis/google-http-java-client/issues/1177)) ([125a697](https://www.github.com/googleapis/google-http-java-client/commit/125a697c5cb5535894e46fd59e73663c50f3a6fa)) + + +### Dependencies + +* update guava to 30.1-android ([#1199](https://www.github.com/googleapis/google-http-java-client/issues/1199)) ([7922dc0](https://www.github.com/googleapis/google-http-java-client/commit/7922dc0517bd82669a18b81af38e5ba211bc2e0b)) + ## [1.38.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.37.0...v1.38.0) (2020-11-02) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index daa9924e2..b3ac37cb2 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.38.1-SNAPSHOT + 1.38.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.38.1-SNAPSHOT + 1.38.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.38.1-SNAPSHOT + 1.38.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 3a4da0f53..24ffa7df3 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-android - 1.38.1-SNAPSHOT + 1.38.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index d114c77c4..9449ab9a1 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-apache-v2 - 1.38.1-SNAPSHOT + 1.38.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index a8bb8213b..8b765d995 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-appengine - 1.38.1-SNAPSHOT + 1.38.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 64f1a43f4..6f651b71f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.38.1-SNAPSHOT + 1.38.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6d20aec27..fb6806f35 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.38.1-SNAPSHOT + 1.38.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-android - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-apache-v2 - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-appengine - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-findbugs - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-gson - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-jackson2 - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-protobuf - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-test - 1.38.1-SNAPSHOT + 1.38.1 com.google.http-client google-http-client-xml - 1.38.1-SNAPSHOT + 1.38.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index d9a203883..e3781775f 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-findbugs - 1.38.1-SNAPSHOT + 1.38.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 0715b5e5d..4528ef2a8 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-gson - 1.38.1-SNAPSHOT + 1.38.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d9f55292b..95bfac0c7 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-jackson2 - 1.38.1-SNAPSHOT + 1.38.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 6b784c3ce..0b4943878 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-protobuf - 1.38.1-SNAPSHOT + 1.38.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 6e0d68c1e..814bda2a6 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-test - 1.38.1-SNAPSHOT + 1.38.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index fb5a1b96c..3b89d2b9a 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client-xml - 1.38.1-SNAPSHOT + 1.38.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 687c8c780..59b592c29 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../pom.xml google-http-client - 1.38.1-SNAPSHOT + 1.38.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 36b8fdd34..4c44d5c30 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.38.1-SNAPSHOT + 1.38.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 4d73920a2..03394282f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.38.1-SNAPSHOT + 1.38.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index adef30bbb..b27ffb944 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.38.0:1.38.1-SNAPSHOT -google-http-client-bom:1.38.0:1.38.1-SNAPSHOT -google-http-client-parent:1.38.0:1.38.1-SNAPSHOT -google-http-client-android:1.38.0:1.38.1-SNAPSHOT -google-http-client-android-test:1.38.0:1.38.1-SNAPSHOT -google-http-client-apache-v2:1.38.0:1.38.1-SNAPSHOT -google-http-client-appengine:1.38.0:1.38.1-SNAPSHOT -google-http-client-assembly:1.38.0:1.38.1-SNAPSHOT -google-http-client-findbugs:1.38.0:1.38.1-SNAPSHOT -google-http-client-gson:1.38.0:1.38.1-SNAPSHOT -google-http-client-jackson2:1.38.0:1.38.1-SNAPSHOT -google-http-client-protobuf:1.38.0:1.38.1-SNAPSHOT -google-http-client-test:1.38.0:1.38.1-SNAPSHOT -google-http-client-xml:1.38.0:1.38.1-SNAPSHOT +google-http-client:1.38.1:1.38.1 +google-http-client-bom:1.38.1:1.38.1 +google-http-client-parent:1.38.1:1.38.1 +google-http-client-android:1.38.1:1.38.1 +google-http-client-android-test:1.38.1:1.38.1 +google-http-client-apache-v2:1.38.1:1.38.1 +google-http-client-appengine:1.38.1:1.38.1 +google-http-client-assembly:1.38.1:1.38.1 +google-http-client-findbugs:1.38.1:1.38.1 +google-http-client-gson:1.38.1:1.38.1 +google-http-client-jackson2:1.38.1:1.38.1 +google-http-client-protobuf:1.38.1:1.38.1 +google-http-client-test:1.38.1:1.38.1 +google-http-client-xml:1.38.1:1.38.1 From 4b1fcb9937fb7c5830ad529ccb9640057fcc4083 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 15 Jan 2021 06:35:00 -0500 Subject: [PATCH 402/983] chore(deps): libraries-bom 16.3.0 (#1227) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 28a746f8c..80d295571 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 16.2.1 + 16.3.0 pom import From f0b732b8ff6fc84dce464d3fb8d0feb9b8d0ff96 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jan 2021 15:04:31 +0100 Subject: [PATCH 403/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16.3.0 (#1226) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9aa97cc57..021699672 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.1 + 16.3.0 pom import From 21b8bbab3aaddcb5a7d153fa423e8cd5a50c0f14 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jan 2021 15:05:55 +0100 Subject: [PATCH 404/983] chore(deps): update dependency com.google.http-client:google-http-client-gson to v1.38.1 (#1224) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 021699672..ac040ab32 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client-gson - 1.38.0 + 1.38.1 test From fb02042ac216379820950879cea45d06eec5278c Mon Sep 17 00:00:00 2001 From: Emmanuel Courreges Date: Tue, 19 Jan 2021 15:45:11 +0100 Subject: [PATCH 405/983] feat: add http.status_code attribute to all Spans that have at least a low level http response (#986) Signed-off-by: CI-Bot for Emmanuel Courreges --- .../src/main/java/com/google/api/client/http/HttpRequest.java | 1 + .../java/com/google/api/client/http/HttpRequestTracingTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 0b9b2abbb..7a28ec515 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1012,6 +1012,7 @@ public HttpResponse execute() throws IOException { LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest.execute(); if (lowLevelHttpResponse != null) { OpenCensusUtils.recordReceivedMessageEvent(span, lowLevelHttpResponse.getContentLength()); + span.putAttribute(HttpTraceAttributeConstants.HTTP_STATUS_CODE, AttributeValue.longAttributeValue(lowLevelHttpResponse.getStatusCode())); } // Flag used to indicate if an exception is thrown before the response is constructed. boolean responseConstructed = false; diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index d2d2df5d1..6fc9cb37d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -80,6 +80,7 @@ public void executeCreatesSpan() throws IOException { assertAttributeEquals(span, "http.host", "google.com"); assertAttributeEquals(span, "http.url", "https://google.com/"); assertAttributeEquals(span, "http.method", "GET"); + assertAttributeEquals(span, "http.status_code", "200"); // Ensure we have a single annotation for starting the first attempt assertEquals(1, span.getAnnotations().getEvents().size()); From 779d3832ffce741b7c4055a14855ce8755695fce Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 19 Jan 2021 16:37:02 +0000 Subject: [PATCH 406/983] fix: remove unused logger (#1228) --- .../com/google/api/client/util/store/FileDataStoreFactory.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 5bcab8679..98c5003ef 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -37,7 +37,6 @@ import java.util.HashSet; import java.util.Locale; import java.util.Set; -import java.util.logging.Logger; /** * Thread-safe file implementation of a credential store. @@ -55,8 +54,6 @@ */ public class FileDataStoreFactory extends AbstractDataStoreFactory { - private static final Logger LOGGER = Logger.getLogger(FileDataStoreFactory.class.getName()); - private static final boolean IS_WINDOWS = StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows"); From e1fb4bbdb2d1b7bec870e5dff98edde7801794af Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:04:03 +0000 Subject: [PATCH 407/983] chore: release 1.38.2-SNAPSHOT (#1225) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index b3ac37cb2..04998f413 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.38.1 + 1.38.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.38.1 + 1.38.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.38.1 + 1.38.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 24ffa7df3..2c9d26c4d 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-android - 1.38.1 + 1.38.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 9449ab9a1..a96d280d3 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.38.1 + 1.38.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 8b765d995..d1d6c9ac3 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.38.1 + 1.38.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6f651b71f..6a5ae13a0 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.38.1 + 1.38.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index fb6806f35..8b6fa1ead 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.38.1 + 1.38.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-android - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-test - 1.38.1 + 1.38.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.38.1 + 1.38.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e3781775f..30ad5682c 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.38.1 + 1.38.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 4528ef2a8..9665206f5 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.38.1 + 1.38.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 95bfac0c7..9adc78da0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.38.1 + 1.38.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 0b4943878..b94aba7ce 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.38.1 + 1.38.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 814bda2a6..a2c9a4f0b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-test - 1.38.1 + 1.38.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 3b89d2b9a..e84833395 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.38.1 + 1.38.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 59b592c29..2a6fbab7e 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../pom.xml google-http-client - 1.38.1 + 1.38.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 4c44d5c30..b707182e4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.38.1 + 1.38.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 03394282f..66c31377a 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.38.1 + 1.38.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b27ffb944..fb3908a6c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.38.1:1.38.1 -google-http-client-bom:1.38.1:1.38.1 -google-http-client-parent:1.38.1:1.38.1 -google-http-client-android:1.38.1:1.38.1 -google-http-client-android-test:1.38.1:1.38.1 -google-http-client-apache-v2:1.38.1:1.38.1 -google-http-client-appengine:1.38.1:1.38.1 -google-http-client-assembly:1.38.1:1.38.1 -google-http-client-findbugs:1.38.1:1.38.1 -google-http-client-gson:1.38.1:1.38.1 -google-http-client-jackson2:1.38.1:1.38.1 -google-http-client-protobuf:1.38.1:1.38.1 -google-http-client-test:1.38.1:1.38.1 -google-http-client-xml:1.38.1:1.38.1 +google-http-client:1.38.1:1.38.2-SNAPSHOT +google-http-client-bom:1.38.1:1.38.2-SNAPSHOT +google-http-client-parent:1.38.1:1.38.2-SNAPSHOT +google-http-client-android:1.38.1:1.38.2-SNAPSHOT +google-http-client-android-test:1.38.1:1.38.2-SNAPSHOT +google-http-client-apache-v2:1.38.1:1.38.2-SNAPSHOT +google-http-client-appengine:1.38.1:1.38.2-SNAPSHOT +google-http-client-assembly:1.38.1:1.38.2-SNAPSHOT +google-http-client-findbugs:1.38.1:1.38.2-SNAPSHOT +google-http-client-gson:1.38.1:1.38.2-SNAPSHOT +google-http-client-jackson2:1.38.1:1.38.2-SNAPSHOT +google-http-client-protobuf:1.38.1:1.38.2-SNAPSHOT +google-http-client-test:1.38.1:1.38.2-SNAPSHOT +google-http-client-xml:1.38.1:1.38.2-SNAPSHOT From 8f95371cf5681fbc67bd598d74089f38742a1177 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 22 Jan 2021 01:24:53 +0000 Subject: [PATCH 408/983] fix: deprecate obsolete utility methods (#1231) * unused logger * first batch if deprecations fior superseded utility methods * format --- .../main/java/com/google/api/client/http/HttpRequest.java | 4 +++- .../src/main/java/com/google/api/client/util/Base64.java | 2 ++ .../src/main/java/com/google/api/client/util/Beta.java | 2 ++ .../google/api/client/util/ByteArrayStreamingContent.java | 2 ++ .../main/java/com/google/api/client/util/ByteStreams.java | 5 ++--- .../src/main/java/com/google/api/client/util/Charsets.java | 7 +++++-- .../main/java/com/google/api/client/util/Collections2.java | 5 ++--- .../src/main/java/com/google/api/client/util/IOUtils.java | 5 +++++ .../java/com/google/api/client/util/StreamingContent.java | 2 ++ 9 files changed, 25 insertions(+), 9 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 7a28ec515..312702b9a 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1012,7 +1012,9 @@ public HttpResponse execute() throws IOException { LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest.execute(); if (lowLevelHttpResponse != null) { OpenCensusUtils.recordReceivedMessageEvent(span, lowLevelHttpResponse.getContentLength()); - span.putAttribute(HttpTraceAttributeConstants.HTTP_STATUS_CODE, AttributeValue.longAttributeValue(lowLevelHttpResponse.getStatusCode())); + span.putAttribute( + HttpTraceAttributeConstants.HTTP_STATUS_CODE, + AttributeValue.longAttributeValue(lowLevelHttpResponse.getStatusCode())); } // Flag used to indicate if an exception is thrown before the response is constructed. boolean responseConstructed = false; diff --git a/google-http-client/src/main/java/com/google/api/client/util/Base64.java b/google-http-client/src/main/java/com/google/api/client/util/Base64.java index 038156390..9225cd5dd 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Base64.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Base64.java @@ -22,7 +22,9 @@ * * @since 1.8 * @author Yaniv Inbar + * @deprecated use com.google.common.io.BaseEncoding#base64 */ +@Deprecated public class Base64 { /** diff --git a/google-http-client/src/main/java/com/google/api/client/util/Beta.java b/google-http-client/src/main/java/com/google/api/client/util/Beta.java index c5f6e3d1b..87e4f710f 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Beta.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Beta.java @@ -41,6 +41,7 @@ * * @since 1.15 * @author Eyal Peled + * @deprecated use com.google.common.annotations.Beta */ @Target( value = { @@ -52,4 +53,5 @@ ElementType.PACKAGE }) @Documented +@Deprecated public @interface Beta {} diff --git a/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java index 24939307d..bb4820c4d 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ByteArrayStreamingContent.java @@ -24,7 +24,9 @@ * * @since 1.14 * @author Yaniv Inbar + * @deprecated use com.google.common.io.ByteSource */ +@Deprecated public class ByteArrayStreamingContent implements StreamingContent { /** Byte array content. */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java b/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java index 00f7702cb..6443214cf 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ByteStreams.java @@ -22,12 +22,11 @@ /** * Provides utility methods for working with byte arrays and I/O streams. * - *

              NOTE: this is a copy of a subset of Guava's {@link com.google.common.io.ByteStreams}. The - * implementation must match as closely as possible to Guava's implementation. - * * @since 1.14 * @author Yaniv Inbar + * @deprecated use Guava's com.google.common.io.ByteStreams */ +@Deprecated public final class ByteStreams { private static final int BUF_SIZE = 0x1000; // 4K diff --git a/google-http-client/src/main/java/com/google/api/client/util/Charsets.java b/google-http-client/src/main/java/com/google/api/client/util/Charsets.java index ecc460dec..7546cceb8 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Charsets.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Charsets.java @@ -15,6 +15,7 @@ package com.google.api.client.util; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Contains constant definitions for some standard {@link Charset} instances that are guaranteed to @@ -25,14 +26,16 @@ * * @since 1.14 * @author Yaniv Inbar + * @deprecated use java.nio.charset.StandardCharsets */ +@Deprecated public final class Charsets { /** UTF-8 charset. */ - public static final Charset UTF_8 = Charset.forName("UTF-8"); + public static final Charset UTF_8 = StandardCharsets.UTF_8; /** ISO-8859-1 charset. */ - public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); + public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1; private Charsets() {} } diff --git a/google-http-client/src/main/java/com/google/api/client/util/Collections2.java b/google-http-client/src/main/java/com/google/api/client/util/Collections2.java index 5cd920446..7c609496b 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Collections2.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Collections2.java @@ -19,12 +19,11 @@ /** * Static utility methods pertaining to {@link Collection} instances. * - *

              NOTE: this is a copy of a subset of Guava's {@link com.google.common.collect.Collections2}. - * The implementation must match as closely as possible to Guava's implementation. - * * @since 1.14 * @author Yaniv Inbar + * @deprecated use Guava's {@link com.google.common.collect.Collections2} */ +@Deprecated public final class Collections2 { /** Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557. */ diff --git a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java index 9ccad9886..6d7ff929e 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java @@ -54,7 +54,9 @@ public class IOUtils { * * @param inputStream source input stream * @param outputStream destination output stream + * @deprecated use {@link com.google.common.io.ByteStreams#copy(InputStream, OutputStream)} */ + @Deprecated public static void copy(InputStream inputStream, OutputStream outputStream) throws IOException { copy(inputStream, outputStream, true); } @@ -79,7 +81,9 @@ public static void copy(InputStream inputStream, OutputStream outputStream) thro * @param inputStream source input stream * @param outputStream destination output stream * @param closeInputStream whether the input stream should be closed at the end of this method + * @deprecated use {@link com.google.common.io.ByteStreams#copy(InputStream, OutputStream)} */ + @Deprecated public static void copy( InputStream inputStream, OutputStream outputStream, boolean closeInputStream) throws IOException { @@ -173,6 +177,7 @@ public static S deserialize(InputStream inputStream) th * Returns whether the given file is a symbolic link. * * @since 1.16 + * @deprecated use java.nio.file.Path#isSymbolicLink */ public static boolean isSymbolicLink(File file) throws IOException { // first try using Java 7 diff --git a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java index 8ae55bbf6..27347bafb 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java +++ b/google-http-client/src/main/java/com/google/api/client/util/StreamingContent.java @@ -24,7 +24,9 @@ * * @since 1.14 * @author Yaniv Inbar + * @deprecated use com.google.common.io.ByteSink */ +@Deprecated public interface StreamingContent { /** From 0844595a9ed1779d64449e1b22791d4a8d3dd844 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 26 Jan 2021 11:16:29 -0800 Subject: [PATCH 409/983] chore: adding docfx doclet resource (#1233) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/999a92c1-7031-4f0c-b90a-33f34b1907cf/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3816b080296d4d52975079fd26c110dd26ba25af --- .kokoro/release/publish_javadoc.cfg | 3 +++ synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 25e6405f6..fe78db328 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -27,3 +27,6 @@ before_action { } } } + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 0b022eb0c..db3c71e04 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "c71e1fa6b6d31d7b5a5a0df6db86e66a5ebd8614" + "sha": "8f95371cf5681fbc67bd598d74089f38742a1177" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" + "sha": "3816b080296d4d52975079fd26c110dd26ba25af" } } ], From 28b56e0799c83bc185c55ed3452c88202e0220b7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 28 Jan 2021 22:14:20 -0800 Subject: [PATCH 410/983] build: migrate to flakybot (#1234) --- .kokoro/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 4ef0f0e85..7dd822666 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -110,8 +110,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/google-http-java-client + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-http-java-client fi echo "exiting with ${RETURN_CODE}" From 6f65810f2d338541184627d15dbdd3f41de65b4f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 1 Feb 2021 18:18:17 +0100 Subject: [PATCH 411/983] chore(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.1.2 (#1235) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b707182e4..539cdbacc 100644 --- a/pom.xml +++ b/pom.xml @@ -339,7 +339,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.1 + 3.1.2 org.codehaus.mojo From d3e1f0b892104ad9bd3ba63b5939ff25f49094ec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Feb 2021 17:06:02 +0100 Subject: [PATCH 412/983] chore(deps): update dependency com.google.cloud:libraries-bom to v16.4.0 (#1251) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `16.3.0` -> `16.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/compatibility-slim/16.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/16.4.0/confidence-slim/16.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ac040ab32..ed18abe58 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.3.0 + 16.4.0 pom import From b810d53c8f63380c1b4f398408cfb47c6ab134cc Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 10 Feb 2021 19:25:55 +0000 Subject: [PATCH 413/983] deps: update OpenCensus to 0.28.0 for consistency with gRPC (#1242) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 539cdbacc..728644cc1 100644 --- a/pom.xml +++ b/pom.xml @@ -584,7 +584,7 @@ 1.1.4c 4.5.13 4.4.14 - 0.24.0 + 0.28.0 .. false From e1f7eb50cc3b3e324de70d72ab0b5526d046e94c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 10 Feb 2021 19:26:50 +0000 Subject: [PATCH 414/983] chore(docs): libraries-bom 16.4.0 (#1250) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 80d295571..dd86167bf 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 16.3.0 + 16.4.0 pom import From d05b84d91680d372738ed9c898e2a4be4af15f61 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Feb 2021 23:22:10 +0100 Subject: [PATCH 415/983] chore(deps): update dependency com.google.truth:truth to v1.1.2 (#1232) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.truth:truth](com/google/truth/truth) | `1.0.1` -> `1.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/compatibility-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.truth:truth/1.1.2/confidence-slim/1.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 728644cc1..338b82dd5 100644 --- a/pom.xml +++ b/pom.xml @@ -123,7 +123,7 @@ com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4074dc1ce..ffcd5be98 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -42,7 +42,7 @@ com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4ce2f9b5e..b6609e402 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -40,7 +40,7 @@ com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ed18abe58..4665ba84c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -57,7 +57,7 @@ com.google.truth truth - 1.0.1 + 1.1.2 test From 387612b5cf133a6f310af8c4d0630dd9ea1811c2 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 18 Feb 2021 17:54:02 +0000 Subject: [PATCH 416/983] build: no one pays attention to this (#1266) @arithmetic1728 --- .github/workflows/samples.yaml | 14 -------------- synth.metadata | 1 - 2 files changed, 15 deletions(-) delete mode 100644 .github/workflows/samples.yaml diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index c46230a78..000000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,14 +0,0 @@ -on: - pull_request: -name: samples -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Run checkstyle - run: mvn -P lint --quiet --batch-mode checkstyle:check - working-directory: samples/snippets diff --git a/synth.metadata b/synth.metadata index db3c71e04..a50f86382 100644 --- a/synth.metadata +++ b/synth.metadata @@ -30,7 +30,6 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", From 9e8fcfffc6d92505528aff0a89c169bf3e812c41 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 18 Feb 2021 22:16:34 +0000 Subject: [PATCH 417/983] docs: Jackson is unable to maintain stable Javadocs (#1265) --- google-http-client-jackson2/pom.xml | 3 +-- pom.xml | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 9adc78da0..69a19cb25 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -17,8 +17,7 @@ maven-javadoc-plugin - http://download.oracle.com/javase/7/docs/api/ - http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ + https://download.oracle.com/javase/7/docs/api/ ${project.name} ${project.version} ${project.artifactId} ${project.version} diff --git a/pom.xml b/pom.xml index 338b82dd5..f84a262aa 100644 --- a/pom.xml +++ b/pom.xml @@ -422,9 +422,8 @@ site - http://download.oracle.com/javase/7/docs/api/ - http://cloud.google.com/appengine/docs/java/javadoc - http://fasterxml.github.com/jackson-core/javadoc/${project.jackson-core2.version}/ + https://download.oracle.com/javase/7/docs/api/ + https://cloud.google.com/appengine/docs/java/javadoc https://static.javadoc.io/doc/com.google.code.gson/gson/${project.gson.version} https://google.github.io/guava/releases/${project.guava.version}/api/docs/ From 6a95f6f2494a9dafd968d212b15c9b329416864f Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 23 Feb 2021 13:34:41 -0800 Subject: [PATCH 418/983] deps: version manage error_prone_annotations to 2.5.1 (#1268) --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index f84a262aa..edd5eb4d7 100644 --- a/pom.xml +++ b/pom.xml @@ -126,6 +126,11 @@ 1.1.2 test + + com.google.errorprone + error_prone_annotations + 2.5.1 + com.google.appengine appengine-api-1.0-sdk From 12f80e09e71a41b967db548ab93cab2e3f4e549c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 23 Feb 2021 21:44:04 +0000 Subject: [PATCH 419/983] fix: remove old broken link (#1275) Perhaps this is the one causing us trouble in the Java 11 CI check. In any case the link I remove here is 404. Fixes #1278 --- .../java/com/google/api/client/json/jackson2/package-info.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java index 3c1bc0c3f..e7fe19f76 100644 --- a/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java +++ b/google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2/package-info.java @@ -13,8 +13,7 @@ */ /** - * Low-level implementation of the JSON parser library based on the Jackson 2 JSON library. + * Low-level implementation of the JSON parser library based on the Jackson 2 JSON library. * * @since 1.11 * @author Yaniv Inbar From 213726a0b65f35fdc65713027833d22b553bbc20 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Feb 2021 23:28:12 +0100 Subject: [PATCH 420/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.1 (#1270) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index edd5eb4d7..079f83ec8 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.1 - 3.14.0 + 3.15.1 30.1-android 1.1.4c 4.5.13 From 20f2bd0eb8e20905307b81555c9fa4253ef5c77b Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 23 Feb 2021 17:59:15 -0500 Subject: [PATCH 421/983] ci: removing Kokoro settings that are covered by GitHub Actions (#1273) * ci: removing Kokoro settings in favor of GitHub Actions * ci: bringing back "Kokoro - Test: Binary Compatibility" * ci: adding dependencies to required checks * ci: binary compatibility is clirr --- .github/sync-repo-settings.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index af5dd3bd5..6afe2d1bc 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -28,11 +28,15 @@ branchProtectionRules: requiresStrictStatusChecks: false # List of required status check contexts that must pass for commits to be accepted to matching branches. requiredStatusCheckContexts: - - "Kokoro - Test: Binary Compatibility" - - "Kokoro - Test: Java 11" - - "Kokoro - Test: Java 7" - - "Kokoro - Test: Java 8" - - "Kokoro - Test: Linkage Monitor" + - "units (7)" + - "units (8)" + - "units (11)" + - "windows" + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" - "cla/google" # List of explicit permissions to add (additive only) From 21a4a5ade8184271ba28f320d03dfbf3cf32d47c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 23 Feb 2021 15:12:03 -0800 Subject: [PATCH 422/983] chore: regenerate common templates (#1263) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0d4d941a-5efc-4e3b-ae4a-c5a7ef2f7187/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/6946fd71ae9215b0e7ae188f5057df765ee6d7d2 Source-Link: https://github.com/googleapis/synthtool/commit/1aeca92e4a38f47134cb955f52ea76f84f09ff88 Source-Link: https://github.com/googleapis/synthtool/commit/b416a7befcdbc42de41cf387dcf428f894fb812b Source-Link: https://github.com/googleapis/synthtool/commit/f327d3b657a63ae4a8efd7f011a15eacae36b59c Source-Link: https://github.com/googleapis/synthtool/commit/2414b817065726eae0bc525346c7e874f969369d Source-Link: https://github.com/googleapis/synthtool/commit/692715c0f23a7bb3bfbbaa300f7620ddfa8c47e5 Source-Link: https://github.com/googleapis/synthtool/commit/27b2d4f4674840628d0b75c5941e89c12af4764f Source-Link: https://github.com/googleapis/synthtool/commit/140ba24a136c63e7f10a998a63e7898aed63ea7d Source-Link: https://github.com/googleapis/synthtool/commit/e935c9ecb47da0f2e054f5f1845f7cf7c95fa625 Source-Link: https://github.com/googleapis/synthtool/commit/5de29e9434b63ea6d7e46dc348521c62969af1a1 Source-Link: https://github.com/googleapis/synthtool/commit/d1bb9173100f62c0cfc8f3138b62241e7f47ca6a --- .github/workflows/auto-release.yaml | 6 +-- .github/workflows/ci.yaml | 6 ++- .github/workflows/samples.yaml | 14 +++++++ .kokoro/build.sh | 4 +- .kokoro/dependencies.sh | 4 +- .kokoro/linkage-monitor.sh | 46 ---------------------- .kokoro/release/publish_javadoc.cfg | 9 ++--- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.cfg | 30 +++++++++++++++ .kokoro/release/publish_javadoc11.sh | 55 +++++++++++++++++++++++++++ LICENSE | 1 - synth.metadata | 8 ++-- 12 files changed, 121 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/samples.yaml delete mode 100755 .kokoro/linkage-monitor.sh create mode 100644 .kokoro/release/publish_javadoc11.cfg create mode 100755 .kokoro/release/publish_javadoc11.sh diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc97..7c8816a7d 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 683022075..def8b3a2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -54,7 +54,11 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 000000000..c46230a78 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 7dd822666..67856029b 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -29,7 +29,7 @@ echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -60,6 +60,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -81,6 +82,7 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ + -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a569..0fb8c8436 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2c..000000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# 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. - -set -eo pipefail -# Display commands being run. -set -x - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index fe78db328..8bb77da13 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { @@ -26,7 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} - -# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" \ No newline at end of file +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index b17f6fa7e..afe768251 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 000000000..7ee197247 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 000000000..c43e56341 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# 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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-http-client +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/LICENSE b/LICENSE index d64569567..261eeb9e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/synth.metadata b/synth.metadata index a50f86382..3b2ac37d7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "8f95371cf5681fbc67bd598d74089f38742a1177" + "sha": "213726a0b65f35fdc65713027833d22b553bbc20" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3816b080296d4d52975079fd26c110dd26ba25af" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], @@ -30,6 +30,7 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", @@ -39,7 +40,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", @@ -71,6 +71,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", From fa3966ad6af222daa0e9a277d70d581229a239e9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 00:13:46 +0100 Subject: [PATCH 423/983] test(deps): update dependency junit:junit to v4.13.2 (#1259) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 079f83ec8..0cb83624e 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ junit junit - 4.13.1 + 4.13.2 com.google.truth diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ffcd5be98..bcabd581b 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -36,7 +36,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index b6609e402..aff3bc4c1 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -34,7 +34,7 @@ junit junit - 4.13.1 + 4.13.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4665ba84c..8d4908b63 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -51,7 +51,7 @@ junit junit - 4.13.1 + 4.13.2 test From 03ec798d7637ff454614415be7b324cd8dc7c77c Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 23 Feb 2021 23:36:03 +0000 Subject: [PATCH 424/983] fix: refactor to use StandardCharsets (#1243) --- .../com/google/api/client/http/AbstractHttpContent.java | 6 +++--- .../java/com/google/api/client/http/HttpResponse.java | 8 ++++---- .../java/com/google/api/client/http/UrlEncodedParser.java | 7 +++++-- .../main/java/com/google/api/client/json/JsonFactory.java | 4 ++-- .../api/client/testing/http/MockLowLevelHttpRequest.java | 4 ++-- .../com/google/api/client/http/MultipartContentTest.java | 6 +++--- 6 files changed, 19 insertions(+), 16 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java index fdd9a768e..9384c4470 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java +++ b/google-http-client/src/main/java/com/google/api/client/http/AbstractHttpContent.java @@ -14,11 +14,11 @@ package com.google.api.client.http; -import com.google.api.client.util.Charsets; import com.google.api.client.util.IOUtils; import com.google.api.client.util.StreamingContent; import java.io.IOException; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Abstract implementation of an HTTP content with typical options. @@ -87,13 +87,13 @@ public AbstractHttpContent setMediaType(HttpMediaType mediaType) { } /** - * Returns the charset specified in the media type or {@code Charsets#UTF_8} if not specified. + * Returns the charset specified in the media type or ISO_8859_1 if not specified. * * @since 1.10 */ protected final Charset getCharset() { return mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 + ? StandardCharsets.ISO_8859_1 : mediaType.getCharsetParameter(); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 2df92d4c4..efc3d1e58 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -14,7 +14,6 @@ package com.google.api.client.http; -import com.google.api.client.util.Charsets; import com.google.api.client.util.IOUtils; import com.google.api.client.util.LoggingInputStream; import com.google.api.client.util.Preconditions; @@ -26,6 +25,7 @@ import java.io.OutputStream; import java.lang.reflect.Type; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; @@ -506,14 +506,14 @@ public String parseAsString() throws IOException { } /** - * Returns the {@link Charset} specified in the Content-Type of this response or the {@code - * "ISO-8859-1"} charset as a default. + * Returns the {@link Charset} specified in the Content-Type of this response or the ISO-8859-1 + * charset as a default. * * @since 1.10 */ public Charset getContentCharset() { return mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 + ? StandardCharsets.ISO_8859_1 : mediaType.getCharsetParameter(); } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java index 6c432e672..2be6d9b24 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UrlEncodedParser.java @@ -15,7 +15,6 @@ package com.google.api.client.http; import com.google.api.client.util.ArrayValueMap; -import com.google.api.client.util.Charsets; import com.google.api.client.util.ClassInfo; import com.google.api.client.util.Data; import com.google.api.client.util.FieldInfo; @@ -34,6 +33,7 @@ import java.io.StringWriter; import java.lang.reflect.Type; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -72,7 +72,10 @@ public class UrlEncodedParser implements ObjectParser { * @since 1.13 */ public static final String MEDIA_TYPE = - new HttpMediaType(UrlEncodedParser.CONTENT_TYPE).setCharsetParameter(Charsets.UTF_8).build(); + new HttpMediaType(UrlEncodedParser.CONTENT_TYPE) + .setCharsetParameter(StandardCharsets.UTF_8) + .build(); + /** * Parses the given URL-encoded content into the given data object of data key name/value pairs * using {@link #parse(Reader, Object)}. diff --git a/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java b/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java index b92a55a9c..22825f5f0 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/json/JsonFactory.java @@ -14,7 +14,6 @@ package com.google.api.client.json; -import com.google.api.client.util.Charsets; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; @@ -22,6 +21,7 @@ import java.io.Reader; import java.io.Writer; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; /** * Abstract low-level JSON factory. @@ -159,7 +159,7 @@ private String toString(Object item, boolean pretty) throws IOException { */ private ByteArrayOutputStream toByteStream(Object item, boolean pretty) throws IOException { ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); - JsonGenerator generator = createJsonGenerator(byteStream, Charsets.UTF_8); + JsonGenerator generator = createJsonGenerator(byteStream, StandardCharsets.UTF_8); if (pretty) { generator.enablePrettyPrint(); } diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java index a85759138..115cdd7d1 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java @@ -18,13 +18,13 @@ import com.google.api.client.http.LowLevelHttpRequest; import com.google.api.client.http.LowLevelHttpResponse; import com.google.api.client.util.Beta; -import com.google.api.client.util.Charsets; import com.google.api.client.util.IOUtils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -164,7 +164,7 @@ public String getContentAsString() throws IOException { HttpMediaType mediaType = contentType != null ? new HttpMediaType(contentType) : null; Charset charset = mediaType == null || mediaType.getCharsetParameter() == null - ? Charsets.ISO_8859_1 + ? StandardCharsets.ISO_8859_1 : mediaType.getCharsetParameter(); return out.toString(charset.name()); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java index ed3ec5e53..8b286a983 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java @@ -15,9 +15,9 @@ package com.google.api.client.http; import com.google.api.client.json.Json; -import com.google.api.client.util.Charsets; import com.google.api.client.util.StringUtils; import java.io.ByteArrayOutputStream; +import java.nio.charset.StandardCharsets; import junit.framework.TestCase; /** @@ -77,7 +77,7 @@ public void testRandomContent() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); content.writeTo(out); String expectedContent = expectedStringBuilder.toString(); - assertEquals(expectedContent, out.toString(Charsets.UTF_8.name())); + assertEquals(expectedContent, out.toString(StandardCharsets.UTF_8.name())); assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); } @@ -128,7 +128,7 @@ private void subtestContent(String expectedContent, String boundaryString, Strin // write to string ByteArrayOutputStream out = new ByteArrayOutputStream(); content.writeTo(out); - assertEquals(expectedContent, out.toString(Charsets.UTF_8.name())); + assertEquals(expectedContent, out.toString(StandardCharsets.UTF_8.name())); assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); assertEquals( boundaryString == null From d532b638fdef3ccca5325c6af0f28743de7d78cf Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 23 Feb 2021 16:20:02 -0800 Subject: [PATCH 425/983] build: stop generating samples ci. update templated renovate (#1280) We needed to ignore the samples workflow in synth.py --- .github/workflows/samples.yaml | 14 ------- renovate.json | 70 ++++++++++++++++++++++++++++++---- synth.py | 2 +- 3 files changed, 63 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/samples.yaml diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index c46230a78..000000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,14 +0,0 @@ -on: - pull_request: -name: samples -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Run checkstyle - run: mvn -P lint --quiet --batch-mode checkstyle:check - working-directory: samples/snippets diff --git a/renovate.json b/renovate.json index 37b5f62da..c37889d49 100644 --- a/renovate.json +++ b/renovate.json @@ -1,19 +1,73 @@ { "extends": [ - "config:base" + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" ], "packageRules": [ { - "packagePatterns": ["^com.google.guava:guava"], - "groupName": "Guava packages" + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" }, { - "packagePatterns": ["^com.google.appengine:appengine-"], - "groupName": "AppEngine packages" + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null }, { - "packagePatterns": ["^io.opencensus:opencensus-"], - "groupName": "OpenCensus packages" + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.http-client:google-http-client", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" } - ] + ], + "semanticCommits": true, + "masterIssue": true } diff --git a/synth.py b/synth.py index a22e87e05..cb1a283f1 100644 --- a/synth.py +++ b/synth.py @@ -19,6 +19,6 @@ "README.md", "java.header", "checkstyle.xml", - "renovate.json", "license-checks.xml", + ".github/workflows/samples.yaml", ]) From dfa06bca432f644a7146e3987555f19c5d1be7c5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 01:53:42 +0100 Subject: [PATCH 426/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.2 (#1284) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cb83624e..1f0a556ba 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.1 - 3.15.1 + 3.15.2 30.1-android 1.1.4c 4.5.13 From 85b400501c87ba28af9560f685456a33ed092396 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 18:19:13 +0100 Subject: [PATCH 427/983] chore(deps): update dependency com.google.cloud:libraries-bom to v17 (#1291) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8d4908b63..8a13dbdc1 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.4.0 + 17.0.0 pom import From adad01ef53f9e6e05388417a7d528acc22cb0375 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 24 Feb 2021 15:39:59 -0500 Subject: [PATCH 428/983] chore(deps): libraries BOM 17.0.0 (#1292) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index dd86167bf..987ce3de6 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 16.4.0 + 17.0.0 pom import From 97ffee1a68af6637dd5d53fcd70e2ce02c9c9604 Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Wed, 24 Feb 2021 14:33:04 -0800 Subject: [PATCH 429/983] fix: fix buildRequest setUrl order (#1255) * fix: fix buildRequest setUrl order * chore: add unit test * update * format * Update google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java * Update google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java Co-authored-by: Jeff Ching Co-authored-by: Jeff Ching --- .../api/client/http/HttpRequestFactory.java | 6 +-- .../client/http/HttpRequestFactoryTest.java | 41 +++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java index a14058c8b..7a92a03bf 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequestFactory.java @@ -84,13 +84,13 @@ public HttpRequestInitializer getInitializer() { public HttpRequest buildRequest(String requestMethod, GenericUrl url, HttpContent content) throws IOException { HttpRequest request = transport.buildRequest(); + if (url != null) { + request.setUrl(url); + } if (initializer != null) { initializer.initialize(request); } request.setRequestMethod(requestMethod); - if (url != null) { - request.setUrl(url); - } if (content != null) { request.setContent(content); } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java new file mode 100644 index 000000000..568eb201c --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2021 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 com.google.api.client.http.javanet.NetHttpTransport; +import java.io.IOException; +import junit.framework.TestCase; + +/** Tests {@link HttpRequestFactory}. */ +public class HttpRequestFactoryTest extends TestCase { + + public void testBuildRequest_urlShouldBeSet() throws IllegalArgumentException, IOException { + HttpRequestFactory requestFactory = + new NetHttpTransport() + .createRequestFactory( + new HttpRequestInitializer() { + @Override + public void initialize(HttpRequest request) { + // Url should be set by buildRequest method before calling initialize. + if (request.getUrl() == null) { + throw new IllegalArgumentException("url is not set in request"); + } + } + }); + GenericUrl url = new GenericUrl("https://foo.googleapis.com/"); + HttpRequest request = requestFactory.buildRequest("GET", url, null); + assertEquals(url, request.getUrl()); + } +} From d36ed4b45ab23b1e7f529d360c48f7f3056f5c13 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 24 Feb 2021 22:42:03 +0000 Subject: [PATCH 430/983] chore(master): release 1.39.0 (#1252) :robot: I have created a release \*beep\* \*boop\* --- ## [1.39.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.1...v1.39.0) (2021-02-24) ### Features * add http.status_code attribute to all Spans that have at least a low level http response ([#986](https://www.github.com/googleapis/google-http-java-client/issues/986)) ([fb02042](https://www.github.com/googleapis/google-http-java-client/commit/fb02042ac216379820950879cea45d06eec5278c)) ### Bug Fixes * deprecate obsolete utility methods ([#1231](https://www.github.com/googleapis/google-http-java-client/issues/1231)) ([8f95371](https://www.github.com/googleapis/google-http-java-client/commit/8f95371cf5681fbc67bd598d74089f38742a1177)) * fix buildRequest setUrl order ([#1255](https://www.github.com/googleapis/google-http-java-client/issues/1255)) ([97ffee1](https://www.github.com/googleapis/google-http-java-client/commit/97ffee1a68af6637dd5d53fcd70e2ce02c9c9604)) * refactor to use StandardCharsets ([#1243](https://www.github.com/googleapis/google-http-java-client/issues/1243)) ([03ec798](https://www.github.com/googleapis/google-http-java-client/commit/03ec798d7637ff454614415be7b324cd8dc7c77c)) * remove old broken link ([#1275](https://www.github.com/googleapis/google-http-java-client/issues/1275)) ([12f80e0](https://www.github.com/googleapis/google-http-java-client/commit/12f80e09e71a41b967db548ab93cab2e3f4e549c)), closes [#1278](https://www.github.com/googleapis/google-http-java-client/issues/1278) * remove unused logger ([#1228](https://www.github.com/googleapis/google-http-java-client/issues/1228)) ([779d383](https://www.github.com/googleapis/google-http-java-client/commit/779d3832ffce741b7c4055a14855ce8755695fce)) ### Documentation * Jackson is unable to maintain stable Javadocs ([#1265](https://www.github.com/googleapis/google-http-java-client/issues/1265)) ([9e8fcff](https://www.github.com/googleapis/google-http-java-client/commit/9e8fcfffc6d92505528aff0a89c169bf3e812c41)) ### Dependencies * update dependency com.google.protobuf:protobuf-java to v3.15.1 ([#1270](https://www.github.com/googleapis/google-http-java-client/issues/1270)) ([213726a](https://www.github.com/googleapis/google-http-java-client/commit/213726a0b65f35fdc65713027833d22b553bbc20)) * update dependency com.google.protobuf:protobuf-java to v3.15.2 ([#1284](https://www.github.com/googleapis/google-http-java-client/issues/1284)) ([dfa06bc](https://www.github.com/googleapis/google-http-java-client/commit/dfa06bca432f644a7146e3987555f19c5d1be7c5)) * update OpenCensus to 0.28.0 for consistency with gRPC ([#1242](https://www.github.com/googleapis/google-http-java-client/issues/1242)) ([b810d53](https://www.github.com/googleapis/google-http-java-client/commit/b810d53c8f63380c1b4f398408cfb47c6ab134cc)) * version manage error_prone_annotations to 2.5.1 ([#1268](https://www.github.com/googleapis/google-http-java-client/issues/1268)) ([6a95f6f](https://www.github.com/googleapis/google-http-java-client/commit/6a95f6f2494a9dafd968d212b15c9b329416864f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 29 +++++++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++--------- 17 files changed, 82 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62757901a..d9f8a5284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # Changelog +## [1.39.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.1...v1.39.0) (2021-02-24) + + +### Features + +* add http.status_code attribute to all Spans that have at least a low level http response ([#986](https://www.github.com/googleapis/google-http-java-client/issues/986)) ([fb02042](https://www.github.com/googleapis/google-http-java-client/commit/fb02042ac216379820950879cea45d06eec5278c)) + + +### Bug Fixes + +* deprecate obsolete utility methods ([#1231](https://www.github.com/googleapis/google-http-java-client/issues/1231)) ([8f95371](https://www.github.com/googleapis/google-http-java-client/commit/8f95371cf5681fbc67bd598d74089f38742a1177)) +* fix buildRequest setUrl order ([#1255](https://www.github.com/googleapis/google-http-java-client/issues/1255)) ([97ffee1](https://www.github.com/googleapis/google-http-java-client/commit/97ffee1a68af6637dd5d53fcd70e2ce02c9c9604)) +* refactor to use StandardCharsets ([#1243](https://www.github.com/googleapis/google-http-java-client/issues/1243)) ([03ec798](https://www.github.com/googleapis/google-http-java-client/commit/03ec798d7637ff454614415be7b324cd8dc7c77c)) +* remove old broken link ([#1275](https://www.github.com/googleapis/google-http-java-client/issues/1275)) ([12f80e0](https://www.github.com/googleapis/google-http-java-client/commit/12f80e09e71a41b967db548ab93cab2e3f4e549c)), closes [#1278](https://www.github.com/googleapis/google-http-java-client/issues/1278) +* remove unused logger ([#1228](https://www.github.com/googleapis/google-http-java-client/issues/1228)) ([779d383](https://www.github.com/googleapis/google-http-java-client/commit/779d3832ffce741b7c4055a14855ce8755695fce)) + + +### Documentation + +* Jackson is unable to maintain stable Javadocs ([#1265](https://www.github.com/googleapis/google-http-java-client/issues/1265)) ([9e8fcff](https://www.github.com/googleapis/google-http-java-client/commit/9e8fcfffc6d92505528aff0a89c169bf3e812c41)) + + +### Dependencies + +* update dependency com.google.protobuf:protobuf-java to v3.15.1 ([#1270](https://www.github.com/googleapis/google-http-java-client/issues/1270)) ([213726a](https://www.github.com/googleapis/google-http-java-client/commit/213726a0b65f35fdc65713027833d22b553bbc20)) +* update dependency com.google.protobuf:protobuf-java to v3.15.2 ([#1284](https://www.github.com/googleapis/google-http-java-client/issues/1284)) ([dfa06bc](https://www.github.com/googleapis/google-http-java-client/commit/dfa06bca432f644a7146e3987555f19c5d1be7c5)) +* update OpenCensus to 0.28.0 for consistency with gRPC ([#1242](https://www.github.com/googleapis/google-http-java-client/issues/1242)) ([b810d53](https://www.github.com/googleapis/google-http-java-client/commit/b810d53c8f63380c1b4f398408cfb47c6ab134cc)) +* version manage error_prone_annotations to 2.5.1 ([#1268](https://www.github.com/googleapis/google-http-java-client/issues/1268)) ([6a95f6f](https://www.github.com/googleapis/google-http-java-client/commit/6a95f6f2494a9dafd968d212b15c9b329416864f)) + ### [1.38.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.0...v1.38.1) (2021-01-12) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 04998f413..51d6e3a53 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.38.2-SNAPSHOT + 1.39.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.38.2-SNAPSHOT + 1.39.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.38.2-SNAPSHOT + 1.39.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 2c9d26c4d..9ab015c03 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-android - 1.38.2-SNAPSHOT + 1.39.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a96d280d3..2022ba827 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-apache-v2 - 1.38.2-SNAPSHOT + 1.39.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index d1d6c9ac3..8bfeb7f6c 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-appengine - 1.38.2-SNAPSHOT + 1.39.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6a5ae13a0..6db98d1ed 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.38.2-SNAPSHOT + 1.39.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 8b6fa1ead..3b1cd4d3d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.38.2-SNAPSHOT + 1.39.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-android - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-apache-v2 - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-appengine - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-findbugs - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-gson - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-jackson2 - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-protobuf - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-test - 1.38.2-SNAPSHOT + 1.39.0 com.google.http-client google-http-client-xml - 1.38.2-SNAPSHOT + 1.39.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 30ad5682c..ce9ea5d06 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-findbugs - 1.38.2-SNAPSHOT + 1.39.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 9665206f5..669c08c51 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-gson - 1.38.2-SNAPSHOT + 1.39.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 69a19cb25..9f52689f7 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-jackson2 - 1.38.2-SNAPSHOT + 1.39.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b94aba7ce..cb0d459bc 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-protobuf - 1.38.2-SNAPSHOT + 1.39.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index a2c9a4f0b..56b668fac 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-test - 1.38.2-SNAPSHOT + 1.39.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e84833395..2c1caabf2 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client-xml - 1.38.2-SNAPSHOT + 1.39.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 2a6fbab7e..dc71150bf 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../pom.xml google-http-client - 1.38.2-SNAPSHOT + 1.39.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 1f0a556ba..5a82bb623 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.38.2-SNAPSHOT + 1.39.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 66c31377a..50e340ee1 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.38.2-SNAPSHOT + 1.39.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index fb3908a6c..9e0415d13 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.38.1:1.38.2-SNAPSHOT -google-http-client-bom:1.38.1:1.38.2-SNAPSHOT -google-http-client-parent:1.38.1:1.38.2-SNAPSHOT -google-http-client-android:1.38.1:1.38.2-SNAPSHOT -google-http-client-android-test:1.38.1:1.38.2-SNAPSHOT -google-http-client-apache-v2:1.38.1:1.38.2-SNAPSHOT -google-http-client-appengine:1.38.1:1.38.2-SNAPSHOT -google-http-client-assembly:1.38.1:1.38.2-SNAPSHOT -google-http-client-findbugs:1.38.1:1.38.2-SNAPSHOT -google-http-client-gson:1.38.1:1.38.2-SNAPSHOT -google-http-client-jackson2:1.38.1:1.38.2-SNAPSHOT -google-http-client-protobuf:1.38.1:1.38.2-SNAPSHOT -google-http-client-test:1.38.1:1.38.2-SNAPSHOT -google-http-client-xml:1.38.1:1.38.2-SNAPSHOT +google-http-client:1.39.0:1.39.0 +google-http-client-bom:1.39.0:1.39.0 +google-http-client-parent:1.39.0:1.39.0 +google-http-client-android:1.39.0:1.39.0 +google-http-client-android-test:1.39.0:1.39.0 +google-http-client-apache-v2:1.39.0:1.39.0 +google-http-client-appengine:1.39.0:1.39.0 +google-http-client-assembly:1.39.0:1.39.0 +google-http-client-findbugs:1.39.0:1.39.0 +google-http-client-gson:1.39.0:1.39.0 +google-http-client-jackson2:1.39.0:1.39.0 +google-http-client-protobuf:1.39.0:1.39.0 +google-http-client-test:1.39.0:1.39.0 +google-http-client-xml:1.39.0:1.39.0 From b5fdd7e3d053de163f99588b9c529381d05971b3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 24 Feb 2021 22:54:05 +0000 Subject: [PATCH 431/983] chore(master): release 1.39.1-SNAPSHOT (#1293) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 51d6e3a53..ca6321e01 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.0 + 1.39.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.0 + 1.39.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.0 + 1.39.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 9ab015c03..d89335475 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-android - 1.39.0 + 1.39.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 2022ba827..30ff5994b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.39.0 + 1.39.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 8bfeb7f6c..f67b3f83e 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.39.0 + 1.39.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6db98d1ed..389510f5f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.39.0 + 1.39.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3b1cd4d3d..a58d59ffc 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.0 + 1.39.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-android - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-test - 1.39.0 + 1.39.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.39.0 + 1.39.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index ce9ea5d06..cb1411400 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.39.0 + 1.39.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 669c08c51..689d3280a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.39.0 + 1.39.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 9f52689f7..d05b37a4e 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.39.0 + 1.39.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index cb0d459bc..eda9b0f07 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.39.0 + 1.39.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 56b668fac..84229c742 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-test - 1.39.0 + 1.39.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2c1caabf2..37348babb 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.39.0 + 1.39.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index dc71150bf..cd3a8b58c 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../pom.xml google-http-client - 1.39.0 + 1.39.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 5a82bb623..bd962eee1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.0 + 1.39.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 50e340ee1..52fae4a05 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.0 + 1.39.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 9e0415d13..b20088fef 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.0:1.39.0 -google-http-client-bom:1.39.0:1.39.0 -google-http-client-parent:1.39.0:1.39.0 -google-http-client-android:1.39.0:1.39.0 -google-http-client-android-test:1.39.0:1.39.0 -google-http-client-apache-v2:1.39.0:1.39.0 -google-http-client-appengine:1.39.0:1.39.0 -google-http-client-assembly:1.39.0:1.39.0 -google-http-client-findbugs:1.39.0:1.39.0 -google-http-client-gson:1.39.0:1.39.0 -google-http-client-jackson2:1.39.0:1.39.0 -google-http-client-protobuf:1.39.0:1.39.0 -google-http-client-test:1.39.0:1.39.0 -google-http-client-xml:1.39.0:1.39.0 +google-http-client:1.39.0:1.39.1-SNAPSHOT +google-http-client-bom:1.39.0:1.39.1-SNAPSHOT +google-http-client-parent:1.39.0:1.39.1-SNAPSHOT +google-http-client-android:1.39.0:1.39.1-SNAPSHOT +google-http-client-android-test:1.39.0:1.39.1-SNAPSHOT +google-http-client-apache-v2:1.39.0:1.39.1-SNAPSHOT +google-http-client-appengine:1.39.0:1.39.1-SNAPSHOT +google-http-client-assembly:1.39.0:1.39.1-SNAPSHOT +google-http-client-findbugs:1.39.0:1.39.1-SNAPSHOT +google-http-client-gson:1.39.0:1.39.1-SNAPSHOT +google-http-client-jackson2:1.39.0:1.39.1-SNAPSHOT +google-http-client-protobuf:1.39.0:1.39.1-SNAPSHOT +google-http-client-test:1.39.0:1.39.1-SNAPSHOT +google-http-client-xml:1.39.0:1.39.1-SNAPSHOT From d0a106dd4bf5fb232496b46bceb4648a625d30ab Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Feb 2021 01:12:12 +0100 Subject: [PATCH 432/983] chore(deps): update dependency com.google.cloud:libraries-bom to v18 (#1295) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `17.0.0` -> `18.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/compatibility-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/18.0.0/confidence-slim/17.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 8a13dbdc1..3142c13c5 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 17.0.0 + 18.0.0 pom import From 8d818c33f2cc37bb7b38c91f0a61d1cf7b386003 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Feb 2021 01:17:42 +0100 Subject: [PATCH 433/983] samples(deps): update dependency com.google.http-client:google-http-client-gson to v1.39.0 (#1294) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 3142c13c5..27b1d7961 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client-gson - 1.38.1 + 1.39.0 test From a5806f39aaf3137a81bb836b53baccd69f6b79be Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 25 Feb 2021 10:20:56 -0500 Subject: [PATCH 434/983] chore(deps): libraries-bom 18.0.0 (#1299) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 987ce3de6..d419903e2 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 17.0.0 + 18.0.0 pom import From f17755cf5e8ccbf441131ebb13fe60028fb63850 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 25 Feb 2021 18:45:09 +0000 Subject: [PATCH 435/983] docs: update version (#1296) @chingor13 --- google-http-client-bom/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/README.md b/google-http-client-bom/README.md index ae6c65be3..53c4a9c57 100644 --- a/google-http-client-bom/README.md +++ b/google-http-client-bom/README.md @@ -12,7 +12,7 @@ To use it in Maven, add the following to your `pom.xml`: com.google.http-client google-http-client-bom - 1.32.0 + 1.39.0 pom import From 1db338b8b98465e03e93013b40fd8d821ac245c8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Mar 2021 18:53:24 +0100 Subject: [PATCH 436/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.3 (#1301) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bd962eee1..0411eb29f 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.1 - 3.15.2 + 3.15.3 30.1-android 1.1.4c 4.5.13 From f4d07f43903aad681e790d9c335b56d514e2f898 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 2 Mar 2021 20:50:09 +0000 Subject: [PATCH 437/983] chore: fix build warnings (#1297) * fix build warnings * check requires http * blank line before package --- samples/snippets/pom.xml | 7 +------ .../java/com/example/json/YouTubeSample.java | 3 ++- .../com/example/json/YouTubeSampleTest.java | 18 +++++++++--------- 3 files changed, 12 insertions(+), 16 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/main/java/com/example/json/YouTubeSample.java b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java index 6aff27898..aad2b8a99 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, @@ -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; 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..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, @@ -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 62818cfc6b2b1aaee85cc660e8611d4ea9809f4c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 2 Mar 2021 15:28:15 -0800 Subject: [PATCH 438/983] chore: remove docLava v2 doc generation (#1306) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/dd48a04e-1b79-4cf2-bbe1-c31ca37cdd54/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/21da7d9fa02f6916d9f87cf4072b3547b5c72eb5 --- .kokoro/release/publish_javadoc.cfg | 8 +------- .kokoro/release/publish_javadoc.sh | 19 ------------------- synth.metadata | 6 +++--- 3 files changed, 4 insertions(+), 29 deletions(-) diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index 8bb77da13..e57d3dc96 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,12 +7,6 @@ env_vars: { value: "docs-staging" } -# cloud-rad staging -env_vars: { - key: "STAGING_BUCKET_V2" - value: "docs-staging-v2-staging" -} - env_vars: { key: "TRAMPOLINE_BUILD_FILE" value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" @@ -26,4 +20,4 @@ before_action { keyname: "docuploader_service_account" } } -} \ No newline at end of file +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index afe768251..ab4ccf891 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -56,22 +56,3 @@ python3 -m docuploader create-metadata \ python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET} - -popd - -# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. - -mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" - -pushd target/devsite/reference - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --language java - -# upload docs to staging bucket -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET_V2} diff --git a/synth.metadata b/synth.metadata index 3b2ac37d7..eef620684 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "213726a0b65f35fdc65713027833d22b553bbc20" + "sha": "f4d07f43903aad681e790d9c335b56d514e2f898" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" + "sha": "21da7d9fa02f6916d9f87cf4072b3547b5c72eb5" } } ], @@ -30,7 +30,6 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", @@ -82,6 +81,7 @@ "CONTRIBUTING.md", "LICENSE", "codecov.yaml", + "renovate.json", "samples/install-without-bom/pom.xml", "samples/pom.xml", "samples/snapshot/pom.xml", From c4dfb48cb8248564b19efdf1a4272eb6fafe3138 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 3 Mar 2021 09:20:07 -0800 Subject: [PATCH 439/983] fix: default application/json charset to utf-8 (#1305) Fixes #1102 --- .../google/api/client/http/HttpResponse.java | 15 +++++++-- .../api/client/http/HttpResponseTest.java | 32 +++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index efc3d1e58..37f4d7f11 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -512,8 +512,17 @@ public String parseAsString() throws IOException { * @since 1.10 */ public Charset getContentCharset() { - return mediaType == null || mediaType.getCharsetParameter() == null - ? StandardCharsets.ISO_8859_1 - : mediaType.getCharsetParameter(); + if (mediaType != null) { + // use specified charset parameter from content/type header if available + if (mediaType.getCharsetParameter() != null) { + return mediaType.getCharsetParameter(); + } + // fallback to well-known charsets + if ("application".equals(mediaType.getType()) && "json".equals(mediaType.getSubType())) { + // https://tools.ietf.org/html/rfc4627 - JSON must be encoded with UTF-8 + return StandardCharsets.UTF_8; + } + } + return StandardCharsets.ISO_8859_1; } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index 267d13caa..bfc09b6d2 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -58,10 +58,12 @@ public void testParseAsString_none() throws Exception { private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; private static final String SAMPLE2 = "123abc"; + private static final String JSON_SAMPLE = "{\"foo\": \"ßar\"}"; private static final String VALID_CONTENT_TYPE = "text/plain"; private static final String VALID_CONTENT_TYPE_WITH_PARAMS = "application/vnd.com.google.datastore.entity+json; charset=utf-8; version=v1; q=0.9"; private static final String INVALID_CONTENT_TYPE = "!!!invalid!!!"; + private static final String JSON_CONTENT_TYPE = "application/json"; public void testParseAsString_utf8() throws Exception { HttpTransport transport = @@ -83,6 +85,7 @@ public LowLevelHttpResponse execute() throws IOException { transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); assertEquals(SAMPLE, response.parseAsString()); + assertEquals("UTF-8", response.getContentCharset().name()); } public void testParseAsString_noContentType() throws Exception { @@ -104,6 +107,7 @@ public LowLevelHttpResponse execute() throws IOException { transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); HttpResponse response = request.execute(); assertEquals(SAMPLE2, response.parseAsString()); + assertEquals("ISO-8859-1", response.getContentCharset().name()); } public void testParseAsString_validContentType() throws Exception { @@ -129,6 +133,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(SAMPLE2, response.parseAsString()); assertEquals(VALID_CONTENT_TYPE, response.getContentType()); assertNotNull(response.getMediaType()); + assertEquals("ISO-8859-1", response.getContentCharset().name()); } public void testParseAsString_validContentTypeWithParams() throws Exception { @@ -154,6 +159,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(SAMPLE2, response.parseAsString()); assertEquals(VALID_CONTENT_TYPE_WITH_PARAMS, response.getContentType()); assertNotNull(response.getMediaType()); + assertEquals("UTF-8", response.getContentCharset().name()); } public void testParseAsString_invalidContentType() throws Exception { @@ -179,6 +185,32 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(SAMPLE2, response.parseAsString()); assertEquals(INVALID_CONTENT_TYPE, response.getContentType()); assertNull(response.getMediaType()); + assertEquals("ISO-8859-1", response.getContentCharset().name()); + } + + public void testParseAsString_jsonContentType() throws IOException { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(JSON_SAMPLE); + result.setContentType(JSON_CONTENT_TYPE); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + + HttpResponse response = request.execute(); + assertEquals(JSON_SAMPLE, response.parseAsString()); + assertEquals(JSON_CONTENT_TYPE, response.getContentType()); + assertEquals("UTF-8", response.getContentCharset().name()); } public void testStatusCode_negative_dontThrowException() throws Exception { From 1a77c507f4b6ae6cdd8b150a795c2eb270e812e2 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 3 Mar 2021 11:33:32 -0800 Subject: [PATCH 440/983] chore: update README with CI, stability, latest version badges (#1307) --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index de94456a2..1b65d5469 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Google HTTP Client Library for Java +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] +[![CI Status][ci-status-image]][ci-status-link] + ## Description Written by Google, the Google HTTP Client Library for Java is a flexible, efficient, and powerful Java library for accessing any resource on the web via HTTP. The library has the following @@ -46,15 +50,12 @@ might result, and you are not guaranteed a compilation error. - [Release Notes](https://github.com/googleapis/google-http-java-client/releases) - [Support (Questions, Bugs)](https://developers.google.com/api-client-library/java/google-http-java-client/support) -## CI Status - -Java Version | Status ------------- | ------ -Java 7 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java7.svg)](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java7.html) -Java 8 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java8.svg)](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java8.html) -Java 11 | [![Kokoro CI](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java11.svg)](https://storage.googleapis.com/cloud-devrel-public/java/badges/google-http-java-client/java11.html) - - [google-oauth-client]: https://github.com/googleapis/google-oauth-java-client [google-api-client]: https://github.com/googleapis/google-api-java-client [contributions]: CONTRIBUTING.md + +[ci-status-image]: https://github.com/googleapis/google-http-java-client/actions/workflows/ci.yaml/badge.svg?event=push +[ci-status-link]: https://github.com/googleapis/google-http-java-client/actions?query=event%3Apush +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.http-client/google-http-client.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.http-client%20AND%20a:google-http-client&core=gav +[stability-image]: https://img.shields.io/badge/stability-ga-green From fc00f28f76a01f04f7b81d7bcacce861497caede Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Mar 2021 20:36:32 +0100 Subject: [PATCH 441/983] chore(deps): update dependency com.google.cloud:libraries-bom to v19 (#1311) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `18.0.0` -> `19.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/compatibility-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.0.0/confidence-slim/18.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 937086ec2..0ea76618b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 18.0.0 + 19.0.0 pom import From 62be21b84a5394455d828b0f97f9e53352b8aa18 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 4 Mar 2021 23:07:24 +0000 Subject: [PATCH 442/983] docs: 19.0.0 libraries-bom (#1312) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index d419903e2..9041068ea 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 18.0.0 + 19.0.0 pom import From aa7d703d94e5e34d849bc753cfe8bd332ff80443 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Mar 2021 00:07:52 +0100 Subject: [PATCH 443/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.12.2 (#1309) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0411eb29f..f0de72e82 100644 --- a/pom.xml +++ b/pom.xml @@ -582,7 +582,7 @@ UTF-8 3.0.2 2.8.6 - 2.12.1 + 2.12.2 3.15.3 30.1-android 1.1.4c From bd7390844fb6f7327823ecddd189782eed954206 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Mar 2021 15:08:36 -0800 Subject: [PATCH 444/983] chore: copy README to docfx-yml dir (#1313) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/69766c45-5159-4300-b6d1-f7a09f78f2ab/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/d0bdade9a962042dc0f770cf631086f3db59b5b0 --- .kokoro/release/publish_javadoc11.sh | 5 ++++- synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index c43e56341..79d4d25b1 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -40,6 +40,9 @@ export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # generate yml mvn clean site -B -q -P docFX +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md + pushd target/docfx-yml # create metadata @@ -52,4 +55,4 @@ python3 -m docuploader create-metadata \ python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} \ - --destination-prefix docfx- + --destination-prefix docfx diff --git a/synth.metadata b/synth.metadata index eef620684..ef8a87335 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f4d07f43903aad681e790d9c335b56d514e2f898" + "sha": "fc00f28f76a01f04f7b81d7bcacce861497caede" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21da7d9fa02f6916d9f87cf4072b3547b5c72eb5" + "sha": "d0bdade9a962042dc0f770cf631086f3db59b5b0" } } ], From e5f391a7e454f75e86145f0abebaf4838b150db8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 10 Mar 2021 16:10:09 -0800 Subject: [PATCH 445/983] build(java): update autorelease title check in response to the new multi release branch changes (#1314) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/8cc0a777-d7bc-4b36-bf33-b2f08ac29afb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0b064d767537e0675fc053e53fca473c5c701fb8 --- .github/workflows/auto-release.yaml | 4 ++-- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 7c8816a7d..9b4fd4d83 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore(master): release " - if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { return; } diff --git a/synth.metadata b/synth.metadata index ef8a87335..da6de2e7e 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "fc00f28f76a01f04f7b81d7bcacce861497caede" + "sha": "bd7390844fb6f7327823ecddd189782eed954206" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d0bdade9a962042dc0f770cf631086f3db59b5b0" + "sha": "0b064d767537e0675fc053e53fca473c5c701fb8" } } ], From 9cb50e49e1cfc196b915465bb6ecbd90fb6d04d7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Mar 2021 13:17:35 +0100 Subject: [PATCH 446/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.6 (#1310) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f0de72e82..3c1271811 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.2 - 3.15.3 + 3.15.6 30.1-android 1.1.4c 4.5.13 From f84ed5964f376ada5eb724a3d1f3ac526d31d9c5 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 15 Mar 2021 10:24:02 -0700 Subject: [PATCH 447/983] fix: when disconnecting, close the underlying connection before the response InputStream (#1315) Adds a test to the `NetHttpTransport` and `ApacheHttpTransport` to make sure we don't wait until all the content is read when disconnecting the response. Fixes #1303 --- .../apache/v2/ApacheHttpTransportTest.java | 83 ++++++++++++++++--- .../google/api/client/http/HttpResponse.java | 19 +++-- .../http/javanet/NetHttpTransportTest.java | 67 +++++++++++++++ 3 files changed, 149 insertions(+), 20 deletions(-) diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index 4b9d9b8d7..a0349ad8d 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -35,6 +35,8 @@ import java.io.OutputStream; import java.net.InetSocketAddress; import java.nio.charset.StandardCharsets; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.http.Header; @@ -213,11 +215,32 @@ public void testConnectTimeout() { } } + static class FakeServer implements AutoCloseable { + private final HttpServer server; + private final ExecutorService executorService; + + public FakeServer(HttpHandler httpHandler) throws IOException { + this.server = HttpServer.create(new InetSocketAddress(0), 0); + this.executorService = Executors.newFixedThreadPool(1); + server.setExecutor(this.executorService); + server.createContext("/", httpHandler); + server.start(); + } + + public int getPort() { + return server.getAddress().getPort(); + } + + @Override + public void close() { + this.server.stop(0); + this.executorService.shutdownNow(); + } + } + @Test public void testNormalizedUrl() throws IOException { - HttpServer server = HttpServer.create(new InetSocketAddress(0), 0); - server.createContext( - "/", + final HttpHandler handler = new HttpHandler() { @Override public void handle(HttpExchange httpExchange) throws IOException { @@ -227,19 +250,53 @@ public void handle(HttpExchange httpExchange) throws IOException { out.write(response); } } - }); - server.start(); - - ApacheHttpTransport transport = new ApacheHttpTransport(); - GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); - testUrl.setPort(server.getAddress().getPort()); - com.google.api.client.http.HttpResponse response = - transport.createRequestFactory().buildGetRequest(testUrl).execute(); - assertEquals(200, response.getStatusCode()); - assertEquals("/foo//bar", response.parseAsString()); + }; + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new ApacheHttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpResponse response = + transport.createRequestFactory().buildGetRequest(testUrl).execute(); + assertEquals(200, response.getStatusCode()); + assertEquals("/foo//bar", response.parseAsString()); + } } private boolean isWindows() { return System.getProperty("os.name").startsWith("Windows"); } + + @Test(timeout = 10_000L) + public void testDisconnectShouldNotWaitToReadResponse() throws IOException { + // This handler waits for 100s before returning writing content. The test should + // timeout if disconnect waits for the response before closing the connection. + final HttpHandler handler = + new HttpHandler() { + @Override + public void handle(HttpExchange httpExchange) throws IOException { + byte[] response = httpExchange.getRequestURI().toString().getBytes(); + httpExchange.sendResponseHeaders(200, response.length); + + // Sleep for longer than the test timeout + try { + Thread.sleep(100_000); + } catch (InterruptedException e) { + throw new IOException("interrupted", e); + } + try (OutputStream out = httpExchange.getResponseBody()) { + out.write(response); + } + } + }; + + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new ApacheHttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpResponse response = + transport.createRequestFactory().buildGetRequest(testUrl).execute(); + // disconnect should not wait to read the entire content + response.disconnect(); + } + } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 37f4d7f11..68d8850c8 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -351,9 +351,9 @@ public InputStream getContent() throws IOException { try { // gzip encoding (wrap content with GZipInputStream) if (!returnRawInputStream && this.contentEncoding != null) { - String oontentencoding = this.contentEncoding.trim().toLowerCase(Locale.ENGLISH); - if (CONTENT_ENCODING_GZIP.equals(oontentencoding) - || CONTENT_ENCODING_XGZIP.equals(oontentencoding)) { + String contentEncoding = this.contentEncoding.trim().toLowerCase(Locale.ENGLISH); + if (CONTENT_ENCODING_GZIP.equals(contentEncoding) + || CONTENT_ENCODING_XGZIP.equals(contentEncoding)) { // Wrap the original stream in a ConsumingInputStream before passing it to // GZIPInputStream. The GZIPInputStream leaves content unconsumed in the original // stream (it almost always leaves the last chunk unconsumed in chunked responses). @@ -419,9 +419,12 @@ public void download(OutputStream outputStream) throws IOException { /** Closes the content of the HTTP response from {@link #getContent()}, ignoring any content. */ public void ignore() throws IOException { - InputStream content = getContent(); - if (content != null) { - content.close(); + if (this.response == null) { + return; + } + InputStream lowLevelResponseContent = this.response.getContent(); + if (lowLevelResponseContent != null) { + lowLevelResponseContent.close(); } } @@ -432,8 +435,10 @@ public void ignore() throws IOException { * @since 1.4 */ public void disconnect() throws IOException { - ignore(); + // Close the connection before trying to close the InputStream content. If you are trying to + // disconnect, we shouldn't need to try to read any further content. response.disconnect(); + ignore(); } /** diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java index 338236e9b..835730793 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java @@ -14,17 +14,27 @@ package com.google.api.client.http.javanet; +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpTransport; import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.javanet.MockHttpURLConnection; import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; +import com.sun.net.httpserver.HttpExchange; +import com.sun.net.httpserver.HttpHandler; +import com.sun.net.httpserver.HttpServer; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.net.HttpURLConnection; +import java.net.InetSocketAddress; import java.net.URL; import java.security.KeyStore; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import junit.framework.TestCase; +import org.junit.Test; /** * Tests {@link NetHttpTransport}. @@ -159,4 +169,61 @@ private void setContent(NetHttpRequest request, String type, String value) throw request.setContentType(type); request.setContentLength(bytes.length); } + + static class FakeServer implements AutoCloseable { + private final HttpServer server; + private final ExecutorService executorService; + + public FakeServer(HttpHandler httpHandler) throws IOException { + this.server = HttpServer.create(new InetSocketAddress(0), 0); + this.executorService = Executors.newFixedThreadPool(1); + server.setExecutor(this.executorService); + server.createContext("/", httpHandler); + server.start(); + } + + public int getPort() { + return server.getAddress().getPort(); + } + + @Override + public void close() { + this.server.stop(0); + this.executorService.shutdownNow(); + } + } + + @Test(timeout = 10_000L) + public void testDisconnectShouldNotWaitToReadResponse() throws IOException { + // This handler waits for 100s before returning writing content. The test should + // timeout if disconnect waits for the response before closing the connection. + final HttpHandler handler = + new HttpHandler() { + @Override + public void handle(HttpExchange httpExchange) throws IOException { + byte[] response = httpExchange.getRequestURI().toString().getBytes(); + httpExchange.sendResponseHeaders(200, response.length); + + // Sleep for longer than the test timeout + try { + Thread.sleep(100_000); + } catch (InterruptedException e) { + throw new IOException("interrupted", e); + } + try (OutputStream out = httpExchange.getResponseBody()) { + out.write(response); + } + } + }; + + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new NetHttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpResponse response = + transport.createRequestFactory().buildGetRequest(testUrl).execute(); + // disconnect should not wait to read the entire content + response.disconnect(); + } + } } From 02a2b0b2b3780a8a014eeef7f175cc4833a35c1c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 17:44:07 +0000 Subject: [PATCH 448/983] chore: release 1.39.1 (#1300) :robot: I have created a release \*beep\* \*boop\* --- ### [1.39.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.0...v1.39.1) (2021-03-15) ### Bug Fixes * default application/json charset to utf-8 ([#1305](https://www.github.com/googleapis/google-http-java-client/issues/1305)) ([c4dfb48](https://www.github.com/googleapis/google-http-java-client/commit/c4dfb48cb8248564b19efdf1a4272eb6fafe3138)), closes [#1102](https://www.github.com/googleapis/google-http-java-client/issues/1102) * when disconnecting, close the underlying connection before the response InputStream ([#1315](https://www.github.com/googleapis/google-http-java-client/issues/1315)) ([f84ed59](https://www.github.com/googleapis/google-http-java-client/commit/f84ed5964f376ada5eb724a3d1f3ac526d31d9c5)), closes [#1303](https://www.github.com/googleapis/google-http-java-client/issues/1303) ### Documentation * 19.0.0 libraries-bom ([#1312](https://www.github.com/googleapis/google-http-java-client/issues/1312)) ([62be21b](https://www.github.com/googleapis/google-http-java-client/commit/62be21b84a5394455d828b0f97f9e53352b8aa18)) * update version ([#1296](https://www.github.com/googleapis/google-http-java-client/issues/1296)) ([f17755c](https://www.github.com/googleapis/google-http-java-client/commit/f17755cf5e8ccbf441131ebb13fe60028fb63850)) ### Dependencies * update dependency com.fasterxml.jackson.core:jackson-core to v2.12.2 ([#1309](https://www.github.com/googleapis/google-http-java-client/issues/1309)) ([aa7d703](https://www.github.com/googleapis/google-http-java-client/commit/aa7d703d94e5e34d849bc753cfe8bd332ff80443)) * update dependency com.google.protobuf:protobuf-java to v3.15.3 ([#1301](https://www.github.com/googleapis/google-http-java-client/issues/1301)) ([1db338b](https://www.github.com/googleapis/google-http-java-client/commit/1db338b8b98465e03e93013b40fd8d821ac245c8)) * update dependency com.google.protobuf:protobuf-java to v3.15.6 ([#1310](https://www.github.com/googleapis/google-http-java-client/issues/1310)) ([9cb50e4](https://www.github.com/googleapis/google-http-java-client/commit/9cb50e49e1cfc196b915465bb6ecbd90fb6d04d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 21 ++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 74 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9f8a5284..b39296a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +### [1.39.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.0...v1.39.1) (2021-03-15) + + +### Bug Fixes + +* default application/json charset to utf-8 ([#1305](https://www.github.com/googleapis/google-http-java-client/issues/1305)) ([c4dfb48](https://www.github.com/googleapis/google-http-java-client/commit/c4dfb48cb8248564b19efdf1a4272eb6fafe3138)), closes [#1102](https://www.github.com/googleapis/google-http-java-client/issues/1102) +* when disconnecting, close the underlying connection before the response InputStream ([#1315](https://www.github.com/googleapis/google-http-java-client/issues/1315)) ([f84ed59](https://www.github.com/googleapis/google-http-java-client/commit/f84ed5964f376ada5eb724a3d1f3ac526d31d9c5)), closes [#1303](https://www.github.com/googleapis/google-http-java-client/issues/1303) + + +### Documentation + +* 19.0.0 libraries-bom ([#1312](https://www.github.com/googleapis/google-http-java-client/issues/1312)) ([62be21b](https://www.github.com/googleapis/google-http-java-client/commit/62be21b84a5394455d828b0f97f9e53352b8aa18)) +* update version ([#1296](https://www.github.com/googleapis/google-http-java-client/issues/1296)) ([f17755c](https://www.github.com/googleapis/google-http-java-client/commit/f17755cf5e8ccbf441131ebb13fe60028fb63850)) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.12.2 ([#1309](https://www.github.com/googleapis/google-http-java-client/issues/1309)) ([aa7d703](https://www.github.com/googleapis/google-http-java-client/commit/aa7d703d94e5e34d849bc753cfe8bd332ff80443)) +* update dependency com.google.protobuf:protobuf-java to v3.15.3 ([#1301](https://www.github.com/googleapis/google-http-java-client/issues/1301)) ([1db338b](https://www.github.com/googleapis/google-http-java-client/commit/1db338b8b98465e03e93013b40fd8d821ac245c8)) +* update dependency com.google.protobuf:protobuf-java to v3.15.6 ([#1310](https://www.github.com/googleapis/google-http-java-client/issues/1310)) ([9cb50e4](https://www.github.com/googleapis/google-http-java-client/commit/9cb50e49e1cfc196b915465bb6ecbd90fb6d04d7)) + ## [1.39.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.38.1...v1.39.0) (2021-02-24) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index ca6321e01..c1162613e 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.1-SNAPSHOT + 1.39.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.1-SNAPSHOT + 1.39.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.1-SNAPSHOT + 1.39.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index d89335475..3e003c63e 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-android - 1.39.1-SNAPSHOT + 1.39.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 30ff5994b..7e75be0ce 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-apache-v2 - 1.39.1-SNAPSHOT + 1.39.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index f67b3f83e..371f5d106 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-appengine - 1.39.1-SNAPSHOT + 1.39.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 389510f5f..f7b24ee93 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.39.1-SNAPSHOT + 1.39.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index a58d59ffc..8617604d0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.1-SNAPSHOT + 1.39.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-android - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-apache-v2 - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-appengine - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-findbugs - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-gson - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-jackson2 - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-protobuf - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-test - 1.39.1-SNAPSHOT + 1.39.1 com.google.http-client google-http-client-xml - 1.39.1-SNAPSHOT + 1.39.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index cb1411400..9c8297c48 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-findbugs - 1.39.1-SNAPSHOT + 1.39.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 689d3280a..83bd815e9 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-gson - 1.39.1-SNAPSHOT + 1.39.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d05b37a4e..e9875b2c2 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-jackson2 - 1.39.1-SNAPSHOT + 1.39.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index eda9b0f07..61ad9768b 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-protobuf - 1.39.1-SNAPSHOT + 1.39.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 84229c742..81a6f95d6 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-test - 1.39.1-SNAPSHOT + 1.39.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 37348babb..cf8da5cae 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client-xml - 1.39.1-SNAPSHOT + 1.39.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index cd3a8b58c..3323000a4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../pom.xml google-http-client - 1.39.1-SNAPSHOT + 1.39.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 3c1271811..a52c1a724 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.1-SNAPSHOT + 1.39.1 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 52fae4a05..c28e9ba0c 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.1-SNAPSHOT + 1.39.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b20088fef..2d60c2627 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.0:1.39.1-SNAPSHOT -google-http-client-bom:1.39.0:1.39.1-SNAPSHOT -google-http-client-parent:1.39.0:1.39.1-SNAPSHOT -google-http-client-android:1.39.0:1.39.1-SNAPSHOT -google-http-client-android-test:1.39.0:1.39.1-SNAPSHOT -google-http-client-apache-v2:1.39.0:1.39.1-SNAPSHOT -google-http-client-appengine:1.39.0:1.39.1-SNAPSHOT -google-http-client-assembly:1.39.0:1.39.1-SNAPSHOT -google-http-client-findbugs:1.39.0:1.39.1-SNAPSHOT -google-http-client-gson:1.39.0:1.39.1-SNAPSHOT -google-http-client-jackson2:1.39.0:1.39.1-SNAPSHOT -google-http-client-protobuf:1.39.0:1.39.1-SNAPSHOT -google-http-client-test:1.39.0:1.39.1-SNAPSHOT -google-http-client-xml:1.39.0:1.39.1-SNAPSHOT +google-http-client:1.39.1:1.39.1 +google-http-client-bom:1.39.1:1.39.1 +google-http-client-parent:1.39.1:1.39.1 +google-http-client-android:1.39.1:1.39.1 +google-http-client-android-test:1.39.1:1.39.1 +google-http-client-apache-v2:1.39.1:1.39.1 +google-http-client-appengine:1.39.1:1.39.1 +google-http-client-assembly:1.39.1:1.39.1 +google-http-client-findbugs:1.39.1:1.39.1 +google-http-client-gson:1.39.1:1.39.1 +google-http-client-jackson2:1.39.1:1.39.1 +google-http-client-protobuf:1.39.1:1.39.1 +google-http-client-test:1.39.1:1.39.1 +google-http-client-xml:1.39.1:1.39.1 From 26621a244b0af1564ffd769e2e6e222f77a24487 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 15 Mar 2021 18:08:02 +0000 Subject: [PATCH 449/983] chore: release 1.39.2-SNAPSHOT (#1317) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index c1162613e..036b9d3fe 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.1 + 1.39.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.1 + 1.39.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.1 + 1.39.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 3e003c63e..930da01ac 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-android - 1.39.1 + 1.39.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 7e75be0ce..311ad6df6 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.39.1 + 1.39.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 371f5d106..22fb4ce87 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.39.1 + 1.39.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f7b24ee93..d80e11a76 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.39.1 + 1.39.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 8617604d0..10fcd10ff 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.1 + 1.39.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-android - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-test - 1.39.1 + 1.39.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.39.1 + 1.39.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9c8297c48..82adbc078 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.39.1 + 1.39.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 83bd815e9..924539fb5 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.39.1 + 1.39.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index e9875b2c2..a82c014bb 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.39.1 + 1.39.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 61ad9768b..3c9cb3f87 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.39.1 + 1.39.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 81a6f95d6..bf6378ba0 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-test - 1.39.1 + 1.39.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index cf8da5cae..183f32e79 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.39.1 + 1.39.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 3323000a4..4888f3ac9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../pom.xml google-http-client - 1.39.1 + 1.39.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a52c1a724..4e4203fae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.1 + 1.39.2-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index c28e9ba0c..f6861d810 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.1 + 1.39.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2d60c2627..86824a9b8 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.1:1.39.1 -google-http-client-bom:1.39.1:1.39.1 -google-http-client-parent:1.39.1:1.39.1 -google-http-client-android:1.39.1:1.39.1 -google-http-client-android-test:1.39.1:1.39.1 -google-http-client-apache-v2:1.39.1:1.39.1 -google-http-client-appengine:1.39.1:1.39.1 -google-http-client-assembly:1.39.1:1.39.1 -google-http-client-findbugs:1.39.1:1.39.1 -google-http-client-gson:1.39.1:1.39.1 -google-http-client-jackson2:1.39.1:1.39.1 -google-http-client-protobuf:1.39.1:1.39.1 -google-http-client-test:1.39.1:1.39.1 -google-http-client-xml:1.39.1:1.39.1 +google-http-client:1.39.1:1.39.2-SNAPSHOT +google-http-client-bom:1.39.1:1.39.2-SNAPSHOT +google-http-client-parent:1.39.1:1.39.2-SNAPSHOT +google-http-client-android:1.39.1:1.39.2-SNAPSHOT +google-http-client-android-test:1.39.1:1.39.2-SNAPSHOT +google-http-client-apache-v2:1.39.1:1.39.2-SNAPSHOT +google-http-client-appengine:1.39.1:1.39.2-SNAPSHOT +google-http-client-assembly:1.39.1:1.39.2-SNAPSHOT +google-http-client-findbugs:1.39.1:1.39.2-SNAPSHOT +google-http-client-gson:1.39.1:1.39.2-SNAPSHOT +google-http-client-jackson2:1.39.1:1.39.2-SNAPSHOT +google-http-client-protobuf:1.39.1:1.39.2-SNAPSHOT +google-http-client-test:1.39.1:1.39.2-SNAPSHOT +google-http-client-xml:1.39.1:1.39.2-SNAPSHOT From ff673d0196c2d9e7fd980d9539b571dc523d0b4d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Mar 2021 21:08:08 +0100 Subject: [PATCH 450/983] chore(deps): update dependency com.google.cloud:libraries-bom to v19.1.0 (#1318) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `19.0.0` -> `19.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/compatibility-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.1.0/confidence-slim/19.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 0ea76618b..59ee96cf8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 19.0.0 + 19.1.0 pom import From 8704d24e83fbd7b8e84c00eda9381fdb24b46ca0 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 18 Mar 2021 16:45:07 -0400 Subject: [PATCH 451/983] chore(deps): libraries BOM 19.1.0 (#1319) * chore(deps): libraries BOM 19.1.0 * chore(deps): libraries-bom 19.2.0 * chore(deps): libraries-BOM 19.1.0 --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 9041068ea..06bdb0993 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 19.0.0 + 19.1.0 pom import From 1deeaebde589d99ba3c82bf1d25de7d11b968272 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Mar 2021 19:04:11 +0100 Subject: [PATCH 452/983] chore(deps): update dependency com.google.cloud:libraries-bom to v19.2.1 (#1321) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `19.1.0` -> `19.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/compatibility-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/19.2.1/confidence-slim/19.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 59ee96cf8..2d76a3e7f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 19.1.0 + 19.2.1 pom import From 0ddb54a0e9841309b33d8f274508ee2c8cd64412 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 19 Mar 2021 18:05:56 -0400 Subject: [PATCH 453/983] chore(deps): libraries-bom 19.2.1 (#1322) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 06bdb0993..61989b184 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 19.1.0 + 19.2.1 pom import From 83400cd73a9852f7bdbb7dd09266894de81fa2b2 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 24 Mar 2021 16:08:13 -0700 Subject: [PATCH 454/983] chore(java): detect sample-secrets in build.sh (#1324) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ecc43a3b-beb3-411c-b070-bcdc4f365616/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/bb854b6c048619e3be4e8b8ce8ed10aa74ea78ef --- .kokoro/build.sh | 5 +++++ synth.metadata | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 67856029b..a6b31eee7 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -79,6 +79,11 @@ samples) if [[ -f ${SAMPLES_DIR}/pom.xml ]] then + for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do + [[ -f "$FILE" ]] || continue + source "$FILE" + done + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ diff --git a/synth.metadata b/synth.metadata index da6de2e7e..b0df6f284 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "bd7390844fb6f7327823ecddd189782eed954206" + "sha": "0ddb54a0e9841309b33d8f274508ee2c8cd64412" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0b064d767537e0675fc053e53fca473c5c701fb8" + "sha": "bb854b6c048619e3be4e8b8ce8ed10aa74ea78ef" } } ], From 08b20c8a7cd02987a48f458d02b0d0905ccf6010 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 29 Mar 2021 15:34:25 -0700 Subject: [PATCH 455/983] chore: remove staging bucket v2 (#1326) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0c91a41a-ef95-4c91-9929-f7697c776f6e/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/572ef8f70edd9041f5bcfa71511aed6aecfc2098 --- .kokoro/release/publish_javadoc.sh | 5 ----- synth.metadata | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index ab4ccf891..dcc867fa6 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -24,11 +24,6 @@ if [[ -z "${STAGING_BUCKET}" ]]; then exit 1 fi -if [[ -z "${STAGING_BUCKET_V2}" ]]; then - echo "Need to set STAGING_BUCKET_V2 environment variable" - exit 1 -fi - # work from the git root directory pushd $(dirname "$0")/../../ diff --git a/synth.metadata b/synth.metadata index b0df6f284..7691d0313 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "0ddb54a0e9841309b33d8f274508ee2c8cd64412" + "sha": "83400cd73a9852f7bdbb7dd09266894de81fa2b2" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bb854b6c048619e3be4e8b8ce8ed10aa74ea78ef" + "sha": "572ef8f70edd9041f5bcfa71511aed6aecfc2098" } } ], From 8d39465d22905fefb8493dcce89c78fa4f62ef10 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Apr 2021 01:49:50 +0200 Subject: [PATCH 456/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.22 (#1331) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index bcabd581b..04ab3f5e1 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/samples/pom.xml b/samples/pom.xml index 823a7090f..e83650736 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index aff3bc4c1..dd6ff801c 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 2d76a3e7f..2d3e3d54a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.21 + 1.0.22 From afbbb3fe441a41e8f0d4ecdb3f46b798c708a46b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 8 Apr 2021 15:13:36 +0200 Subject: [PATCH 457/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.7 (#1329) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e4203fae..6c1059f77 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.2 - 3.15.6 + 3.15.7 30.1-android 1.1.4c 4.5.13 From 854942aff7302be77e6f62f9cf7b5dc5e1928c90 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Fri, 9 Apr 2021 00:21:44 +0000 Subject: [PATCH 458/983] deps: update Guava patch (#1333) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c1059f77..8d0b4e4f2 100644 --- a/pom.xml +++ b/pom.xml @@ -584,7 +584,7 @@ 2.8.6 2.12.2 3.15.7 - 30.1-android + 30.1.1-android 1.1.4c 4.5.13 4.4.14 From 3feef0ccd2ca298bdf136da14b4e4b864df423db Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Apr 2021 02:28:03 +0200 Subject: [PATCH 459/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.6.0 (#1327) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.errorprone:error_prone_annotations | `2.5.1` -> `2.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.6.0/compatibility-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.6.0/confidence-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8d0b4e4f2..0941c5551 100644 --- a/pom.xml +++ b/pom.xml @@ -129,7 +129,7 @@ com.google.errorprone error_prone_annotations - 2.5.1 + 2.6.0 com.google.appengine From e10565af31e531f7a1fbd8bbac0a9a69fbef5a80 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Apr 2021 02:30:03 +0200 Subject: [PATCH 460/983] deps: update dependency com.google.protobuf:protobuf-java to v3.15.8 (#1334) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.protobuf:protobuf-java | `3.15.7` -> `3.15.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.15.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.15.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.15.8/compatibility-slim/3.15.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.15.8/confidence-slim/3.15.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0941c5551..b7c819507 100644 --- a/pom.xml +++ b/pom.xml @@ -583,7 +583,7 @@ 3.0.2 2.8.6 2.12.2 - 3.15.7 + 3.15.8 30.1.1-android 1.1.4c 4.5.13 From 5e9b2f1f438205b27dff70b5b7df961fc0607925 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 8 Apr 2021 22:03:50 -0700 Subject: [PATCH 461/983] chore: release 1.39.2 (#1332) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 10 +++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 63 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b39296a97..4869b4479 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +### [1.39.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.1...v1.39.2) (2021-04-09) + + +### Dependencies + +* update dependency com.google.errorprone:error_prone_annotations to v2.6.0 ([#1327](https://www.github.com/googleapis/google-http-java-client/issues/1327)) ([3feef0c](https://www.github.com/googleapis/google-http-java-client/commit/3feef0ccd2ca298bdf136da14b4e4b864df423db)) +* update dependency com.google.protobuf:protobuf-java to v3.15.7 ([#1329](https://www.github.com/googleapis/google-http-java-client/issues/1329)) ([afbbb3f](https://www.github.com/googleapis/google-http-java-client/commit/afbbb3fe441a41e8f0d4ecdb3f46b798c708a46b)) +* update dependency com.google.protobuf:protobuf-java to v3.15.8 ([#1334](https://www.github.com/googleapis/google-http-java-client/issues/1334)) ([e10565a](https://www.github.com/googleapis/google-http-java-client/commit/e10565af31e531f7a1fbd8bbac0a9a69fbef5a80)) +* update Guava patch ([#1333](https://www.github.com/googleapis/google-http-java-client/issues/1333)) ([854942a](https://www.github.com/googleapis/google-http-java-client/commit/854942aff7302be77e6f62f9cf7b5dc5e1928c90)) + ### [1.39.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.0...v1.39.1) (2021-03-15) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 036b9d3fe..9d268e78f 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.2-SNAPSHOT + 1.39.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.2-SNAPSHOT + 1.39.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.2-SNAPSHOT + 1.39.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 930da01ac..e8a57d987 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-android - 1.39.2-SNAPSHOT + 1.39.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 311ad6df6..6701c697a 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-apache-v2 - 1.39.2-SNAPSHOT + 1.39.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 22fb4ce87..9882c9668 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-appengine - 1.39.2-SNAPSHOT + 1.39.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index d80e11a76..39af03d0f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.39.2-SNAPSHOT + 1.39.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 10fcd10ff..d8b9279ea 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.2-SNAPSHOT + 1.39.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-android - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-apache-v2 - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-appengine - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-findbugs - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-gson - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-jackson2 - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-protobuf - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-test - 1.39.2-SNAPSHOT + 1.39.2 com.google.http-client google-http-client-xml - 1.39.2-SNAPSHOT + 1.39.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 82adbc078..f0775fbf4 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-findbugs - 1.39.2-SNAPSHOT + 1.39.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 924539fb5..60baba8e1 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-gson - 1.39.2-SNAPSHOT + 1.39.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a82c014bb..358b8c40a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-jackson2 - 1.39.2-SNAPSHOT + 1.39.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 3c9cb3f87..fd97312d5 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-protobuf - 1.39.2-SNAPSHOT + 1.39.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index bf6378ba0..087a4d390 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-test - 1.39.2-SNAPSHOT + 1.39.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 183f32e79..cd773e20f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client-xml - 1.39.2-SNAPSHOT + 1.39.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4888f3ac9..4098e2ea1 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../pom.xml google-http-client - 1.39.2-SNAPSHOT + 1.39.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index b7c819507..3bd6c79d6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.2-SNAPSHOT + 1.39.2 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f6861d810..de9f8f85f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.2-SNAPSHOT + 1.39.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 86824a9b8..468835daf 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.1:1.39.2-SNAPSHOT -google-http-client-bom:1.39.1:1.39.2-SNAPSHOT -google-http-client-parent:1.39.1:1.39.2-SNAPSHOT -google-http-client-android:1.39.1:1.39.2-SNAPSHOT -google-http-client-android-test:1.39.1:1.39.2-SNAPSHOT -google-http-client-apache-v2:1.39.1:1.39.2-SNAPSHOT -google-http-client-appengine:1.39.1:1.39.2-SNAPSHOT -google-http-client-assembly:1.39.1:1.39.2-SNAPSHOT -google-http-client-findbugs:1.39.1:1.39.2-SNAPSHOT -google-http-client-gson:1.39.1:1.39.2-SNAPSHOT -google-http-client-jackson2:1.39.1:1.39.2-SNAPSHOT -google-http-client-protobuf:1.39.1:1.39.2-SNAPSHOT -google-http-client-test:1.39.1:1.39.2-SNAPSHOT -google-http-client-xml:1.39.1:1.39.2-SNAPSHOT +google-http-client:1.39.2:1.39.2 +google-http-client-bom:1.39.2:1.39.2 +google-http-client-parent:1.39.2:1.39.2 +google-http-client-android:1.39.2:1.39.2 +google-http-client-android-test:1.39.2:1.39.2 +google-http-client-apache-v2:1.39.2:1.39.2 +google-http-client-appengine:1.39.2:1.39.2 +google-http-client-assembly:1.39.2:1.39.2 +google-http-client-findbugs:1.39.2:1.39.2 +google-http-client-gson:1.39.2:1.39.2 +google-http-client-jackson2:1.39.2:1.39.2 +google-http-client-protobuf:1.39.2:1.39.2 +google-http-client-test:1.39.2:1.39.2 +google-http-client-xml:1.39.2:1.39.2 From f1017c9df6925a7c204c31b02544032937f0b101 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 9 Apr 2021 09:12:03 +0000 Subject: [PATCH 462/983] chore: release 1.39.3-SNAPSHOT (#1335) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 9d268e78f..f2e0887c1 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.2 + 1.39.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.2 + 1.39.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.2 + 1.39.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index e8a57d987..0ae5d384c 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-android - 1.39.2 + 1.39.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 6701c697a..54fa935a2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.39.2 + 1.39.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 9882c9668..9679aae38 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.39.2 + 1.39.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 39af03d0f..efecfdf50 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.39.2 + 1.39.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index d8b9279ea..5876e66dd 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.2 + 1.39.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-android - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-test - 1.39.2 + 1.39.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.39.2 + 1.39.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index f0775fbf4..306920871 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.39.2 + 1.39.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 60baba8e1..b3f38c006 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.39.2 + 1.39.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 358b8c40a..22a8efa57 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.39.2 + 1.39.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fd97312d5..d101f8f29 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.39.2 + 1.39.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 087a4d390..6efc015b0 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-test - 1.39.2 + 1.39.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index cd773e20f..ce8c33cfe 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.39.2 + 1.39.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4098e2ea1..056803579 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../pom.xml google-http-client - 1.39.2 + 1.39.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 3bd6c79d6..1cd3e58f7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -577,7 +577,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.2 + 1.39.3-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index de9f8f85f..7d8cb9dbe 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.2 + 1.39.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 468835daf..d3697cd2c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.2:1.39.2 -google-http-client-bom:1.39.2:1.39.2 -google-http-client-parent:1.39.2:1.39.2 -google-http-client-android:1.39.2:1.39.2 -google-http-client-android-test:1.39.2:1.39.2 -google-http-client-apache-v2:1.39.2:1.39.2 -google-http-client-appengine:1.39.2:1.39.2 -google-http-client-assembly:1.39.2:1.39.2 -google-http-client-findbugs:1.39.2:1.39.2 -google-http-client-gson:1.39.2:1.39.2 -google-http-client-jackson2:1.39.2:1.39.2 -google-http-client-protobuf:1.39.2:1.39.2 -google-http-client-test:1.39.2:1.39.2 -google-http-client-xml:1.39.2:1.39.2 +google-http-client:1.39.2:1.39.3-SNAPSHOT +google-http-client-bom:1.39.2:1.39.3-SNAPSHOT +google-http-client-parent:1.39.2:1.39.3-SNAPSHOT +google-http-client-android:1.39.2:1.39.3-SNAPSHOT +google-http-client-android-test:1.39.2:1.39.3-SNAPSHOT +google-http-client-apache-v2:1.39.2:1.39.3-SNAPSHOT +google-http-client-appengine:1.39.2:1.39.3-SNAPSHOT +google-http-client-assembly:1.39.2:1.39.3-SNAPSHOT +google-http-client-findbugs:1.39.2:1.39.3-SNAPSHOT +google-http-client-gson:1.39.2:1.39.3-SNAPSHOT +google-http-client-jackson2:1.39.2:1.39.3-SNAPSHOT +google-http-client-protobuf:1.39.2:1.39.3-SNAPSHOT +google-http-client-test:1.39.2:1.39.3-SNAPSHOT +google-http-client-xml:1.39.2:1.39.3-SNAPSHOT From 6456d8eb508d078b5c4ff356498bc6b0aeaed379 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 12 Apr 2021 07:22:18 -0700 Subject: [PATCH 463/983] build(java): skip javadoc tests during dependencies test (#1336) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e2a34b1c-bf5a-40fb-90d2-d348c259d27f/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/5b0e1592dd7d70b485e157ea4b3eb1704ecbd015 --- .kokoro/dependencies.sh | 1 + synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 0fb8c8436..59d2aafc7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -33,6 +33,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" retry_with_backoff 3 10 \ mvn install -B -V -ntp \ -DskipTests=true \ + -Dmaven.javadoc.skip=true \ -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true diff --git a/synth.metadata b/synth.metadata index 7691d0313..85a332b2c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "83400cd73a9852f7bdbb7dd09266894de81fa2b2" + "sha": "f1017c9df6925a7c204c31b02544032937f0b101" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "572ef8f70edd9041f5bcfa71511aed6aecfc2098" + "sha": "5b0e1592dd7d70b485e157ea4b3eb1704ecbd015" } } ], From 2bbc0e4b77ab2c9956b0a65af0e927d5052a7752 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 13 Apr 2021 03:49:37 -0700 Subject: [PATCH 464/983] fix: typo (#1342) @Neenu1995 Source-Author: Elliotte Rusty Harold Source-Date: Tue Apr 13 00:00:05 2021 +0000 Source-Repo: googleapis/synthtool Source-Sha: 082e1ca0863b13ada8594fe91845380765da5b70 Source-Link: https://github.com/googleapis/synthtool/commit/082e1ca0863b13ada8594fe91845380765da5b70 --- .kokoro/build.sh | 2 +- synth.metadata | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a6b31eee7..75aab9b16 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,7 +37,7 @@ retry_with_backoff 3 10 \ -Dgcloud.download.skip=true \ -T 1C -# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) fi diff --git a/synth.metadata b/synth.metadata index 85a332b2c..d7944bda6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f1017c9df6925a7c204c31b02544032937f0b101" + "sha": "6456d8eb508d078b5c4ff356498bc6b0aeaed379" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5b0e1592dd7d70b485e157ea4b3eb1704ecbd015" + "sha": "082e1ca0863b13ada8594fe91845380765da5b70" } } ], @@ -26,6 +26,7 @@ ".github/readme/synth.py", ".github/release-please.yml", ".github/snippet-bot.yml", + ".github/sync-repo-settings.yaml", ".github/trusted-contribution.yml", ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", From 15ca74b4e8862f8d460ca8f63474caa13c8c1b4a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 13 Apr 2021 14:55:20 +0000 Subject: [PATCH 465/983] build: update protoc plugin (#1341) --- google-http-client-protobuf/pom.xml | 6 +++--- pom.xml | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d101f8f29..33286ef66 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -43,9 +43,9 @@ - com.google.protobuf.tools - maven-protoc-plugin - 0.4.2 + org.xolstice.maven.plugins + protobuf-maven-plugin + 0.6.1 com.google.protobuf:protoc:${project.protobuf-java.version}:exe:${os.detected.classifier} diff --git a/pom.xml b/pom.xml index 1cd3e58f7..30748a6bd 100644 --- a/pom.xml +++ b/pom.xml @@ -87,10 +87,6 @@ Central Repository https://repo.maven.apache.org/maven2 - - protoc-plugin - https://dl.bintray.com/sergei-ivanov/maven/ - maven-project-info-reports-plugin - 3.1.1 + 3.1.2 From 6187b4d55502145d6f6fc21beeaddd551dfede59 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 4 May 2021 13:46:06 -0700 Subject: [PATCH 475/983] build: configure branch 1.39.2-sp as a release branch (#1359) enable releases --- .github/release-please.yml | 5 ++ .github/sync-repo-settings.yaml | 82 +++++++++++++++------------------ 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/.github/release-please.yml b/.github/release-please.yml index 8ca7f9cab..cf39204dd 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,3 +1,8 @@ bumpMinorPreMajor: true handleGHRelease: true releaseType: java-yoshi +branches: + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-lts + branch: 1.39.2-sp diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6afe2d1bc..f5c2c2c4e 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -1,49 +1,43 @@ -# Whether or not rebase-merging is enabled on this repository. -# Defaults to `true` rebaseMergeAllowed: false - -# Whether or not squash-merging is enabled on this repository. -# Defaults to `true` squashMergeAllowed: true - -# Whether or not PRs are merged with a merge commit on this repository. -# Defaults to `false` mergeCommitAllowed: false - -# Rules for master branch protection branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `master` -- pattern: master - # Can admins overwrite branch protection. - # Defaults to `true` - isAdminEnforced: true - # Number of approving reviews required to update matching branches. - # Defaults to `1` - requiredApprovingReviewCount: 1 - # Are reviews from code owners required to update matching branches. - # Defaults to `false` - requiresCodeOwnerReviews: true - # Require up to date branches - requiresStrictStatusChecks: false - # List of required status check contexts that must pass for commits to be accepted to matching branches. - requiredStatusCheckContexts: - - "units (7)" - - "units (8)" - - "units (11)" - - "windows" - - "dependencies (8)" - - "dependencies (11)" - - "linkage-monitor" - - "lint" - - "clirr" - - "cla/google" - -# List of explicit permissions to add (additive only) + - pattern: master + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (7) + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - linkage-monitor + - lint + - clirr + - cla/google + - pattern: 1.39.2-sp + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (7) + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - linkage-monitor + - lint + - clirr + - cla/google permissionRules: -- team: yoshi-admins - permission: admin -- team: yoshi-java-admins - permission: admin -- team: yoshi-java - permission: push + - team: yoshi-admins + permission: admin + - team: yoshi-java-admins + permission: admin + - team: yoshi-java + permission: push From a41387bd001b99f57190db337a9a8d31435d315d Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 4 May 2021 17:00:27 -0400 Subject: [PATCH 476/983] chore(docs): libraries-bom 20.2.0 (#1354) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index f16f778b9..bf809b7c1 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.1.0 + 20.2.0 pom import From f9af74f6d5c81c5c72a0430a8ba7bd83721289e4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 6 May 2021 16:06:03 -0700 Subject: [PATCH 477/983] chore: adding cloud-rad java xrefs (#1365) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0cc59cf8-7a9f-4a86-a52e-a4a3158a6529/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/046994f491c02806aea60118e214a9edd67f5ab7 --- .kokoro/release/publish_javadoc11.sh | 7 +++++++ synth.metadata | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 79d4d25b1..5c811d5fc 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -49,6 +49,13 @@ pushd target/docfx-yml python3 -m docuploader create-metadata \ --name ${NAME} \ --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ --language java # upload yml to production bucket diff --git a/synth.metadata b/synth.metadata index cf5905fee..71873e657 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f94f597e50304f6d729340ddfd7bbea4fb822f78" + "sha": "a41387bd001b99f57190db337a9a8d31435d315d" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8285c2b4cdbc3771d031ad91e1c4ec9e55fff45d" + "sha": "046994f491c02806aea60118e214a9edd67f5ab7" } } ], From 3148f5daab8598957e05849eaec2eab0b634321d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 May 2021 18:45:06 +0200 Subject: [PATCH 478/983] deps: update dependency com.google.protobuf:protobuf-java to v3.16.0 (#1366) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 718441652..410908731 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.6 2.12.3 - 3.15.8 + 3.16.0 30.1.1-android 1.1.4c 4.5.13 From 0d8d2fee8750bcaa79f2c8ee106f17b89de81e58 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 10 May 2021 20:53:33 +0000 Subject: [PATCH 479/983] docs: bom 20.3.0 (#1368) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index bf809b7c1..8ef175c6d 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.2.0 + 20.3.0 pom import From 340158276bd8c894a3081d69d779bb2831ff3dbe Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 May 2021 22:53:53 +0200 Subject: [PATCH 480/983] build(deps): update dependency org.apache.maven.plugins:maven-gpg-plugin to v3 (#1367) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5876e66dd..60cdd7282 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -174,7 +174,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts diff --git a/pom.xml b/pom.xml index 410908731..596db8bc9 100644 --- a/pom.xml +++ b/pom.xml @@ -623,7 +623,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts From 9a03ad4a3d5dc5eebf2f62a89a102fda776a45a0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 12 May 2021 18:55:22 +0200 Subject: [PATCH 481/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.3.0 (#1369) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 82e2dc21a..ad5089696 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.2.0 + 20.3.0 pom import From f4d65c7dc2fac3025273ddc0297b961f3f65f845 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 12 May 2021 10:02:03 -0700 Subject: [PATCH 482/983] test: relax test to allow sp versions (#1370) --- .../test/java/com/google/api/client/http/HttpRequestTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index d78cd8c89..e7075131d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -1090,7 +1090,7 @@ public LowLevelHttpResponse execute() throws IOException { public void testVersion() { assertNotNull("version constant should not be null", HttpRequest.VERSION); - Pattern semverPattern = Pattern.compile("\\d+\\.\\d+\\.\\d+(-SNAPSHOT)?"); + Pattern semverPattern = Pattern.compile("\\d+\\.\\d+\\.\\d+(-sp\\.\\d+)?(-SNAPSHOT)?"); assertTrue(semverPattern.matcher(HttpRequest.VERSION).matches()); } From dffc99b8e741204ef89906934ff78a8c0098cd3c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 May 2021 16:38:29 -0700 Subject: [PATCH 483/983] build(java): remove codecov action (#1374) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0df71788-c971-4d5a-b8a0-6eb8a4cf0e5a/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/4f4b1b9b8d8b52f1e9e4a76165896debce5ab7f1 --- .github/workflows/ci.yaml | 6 +----- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index def8b3a2c..0195b32f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,10 +19,6 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: test - - name: coverage - uses: codecov/codecov-action@v1 - with: - name: actions ${{matrix.java}} windows: runs-on: windows-latest steps: @@ -80,4 +76,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr \ No newline at end of file + JOB_TYPE: clirr diff --git a/synth.metadata b/synth.metadata index 71873e657..a3bd66f4a 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "a41387bd001b99f57190db337a9a8d31435d315d" + "sha": "f4d65c7dc2fac3025273ddc0297b961f3f65f845" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "046994f491c02806aea60118e214a9edd67f5ab7" + "sha": "4f4b1b9b8d8b52f1e9e4a76165896debce5ab7f1" } } ], From d147628742bbd327a405e87b1645d1d4bf1f7610 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 04:02:26 +0200 Subject: [PATCH 484/983] deps: update dependency com.google.protobuf:protobuf-java to v3.17.0 (#1373) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.protobuf:protobuf-java | `3.16.0` -> `3.17.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.0/compatibility-slim/3.16.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.0/confidence-slim/3.16.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 596db8bc9..391d1b699 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.6 2.12.3 - 3.16.0 + 3.17.0 30.1.1-android 1.1.4c 4.5.13 From f48f367444b116deee45ad528d6dfc616c85b9b6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 17 May 2021 03:46:13 +0200 Subject: [PATCH 485/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.4.0 (#1376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `20.3.0` -> `20.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/compatibility-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.4.0/confidence-slim/20.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻️ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ad5089696..1e839b16f 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.3.0 + 20.4.0 pom import From a9aa99cb2aecde39eb138867ec03d7e83259a366 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 17 May 2021 15:16:19 -0700 Subject: [PATCH 486/983] chore: add changelog to cloud-rad (#1379) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b117b6ab-474f-4107-b550-f38eb6386c07/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/c86c7a60985644eab557949363a38301d40d78d2 --- .kokoro/release/publish_javadoc11.sh | 2 ++ synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 5c811d5fc..d89c03401 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -42,6 +42,8 @@ mvn clean site -B -q -P docFX # copy README to docfx-yml dir and rename index.md cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml diff --git a/synth.metadata b/synth.metadata index a3bd66f4a..1c606b261 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f4d65c7dc2fac3025273ddc0297b961f3f65f845" + "sha": "f48f367444b116deee45ad528d6dfc616c85b9b6" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "4f4b1b9b8d8b52f1e9e4a76165896debce5ab7f1" + "sha": "c86c7a60985644eab557949363a38301d40d78d2" } } ], From e69275ecaa4d85372ebc253dd415a02ba63075be Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 May 2021 07:18:19 -0700 Subject: [PATCH 487/983] feat: add `gcf-owl-bot[bot]` to `ignoreAuthors` (#1380) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/54cde021-6f79-42e8-9d4c-c0e9e5165be4/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/7332178a11ddddc91188dc0f25bca1ccadcaa6c6 --- .github/generated-files-bot.yml | 1 + synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 47c2ba132..c644a24e1 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -9,3 +9,4 @@ ignoreAuthors: - 'renovate-bot' - 'yoshi-automation' - 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/synth.metadata b/synth.metadata index 1c606b261..0b8546b13 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "f48f367444b116deee45ad528d6dfc616c85b9b6" + "sha": "a9aa99cb2aecde39eb138867ec03d7e83259a366" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c86c7a60985644eab557949363a38301d40d78d2" + "sha": "7332178a11ddddc91188dc0f25bca1ccadcaa6c6" } } ], From 550abc1e9f3209ec87b20f81c9e0ecdb27aedb7c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 14:18:02 +0200 Subject: [PATCH 488/983] deps: update dependency com.google.code.gson:gson to v2.8.7 (#1386) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 391d1b699..ff8ba6f57 100644 --- a/pom.xml +++ b/pom.xml @@ -577,7 +577,7 @@ 1.9.71 UTF-8 3.0.2 - 2.8.6 + 2.8.7 2.12.3 3.17.0 30.1.1-android From fb5cf2d3695fd6cc73824497660971d7dc0f1d67 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 14:18:21 +0200 Subject: [PATCH 489/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.5.0 (#1385) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1e839b16f..60dd752d2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.4.0 + 20.5.0 pom import From c22a0e0e1c1a4a6e8c93b38db519b49eba4e2f14 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 14:18:36 +0200 Subject: [PATCH 490/983] deps: update dependency com.google.protobuf:protobuf-java to v3.17.1 (#1384) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff8ba6f57..0fe4389fd 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.7 2.12.3 - 3.17.0 + 3.17.1 30.1.1-android 1.1.4c 4.5.13 From 83b164245d4e3298c7cee5b10ab7917f6c85e7b1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 14:18:52 +0200 Subject: [PATCH 491/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.7.1 (#1378) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0fe4389fd..605b165dc 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.6.0 + 2.7.1 com.google.appengine From 38dc3f64d24868f90bfc9728ace0ce6aaeb2940a Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 26 May 2021 15:23:28 +0000 Subject: [PATCH 492/983] docs: libraries-bom 20.5.0 (#1388) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 8ef175c6d..f1096b59a 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.3.0 + 20.5.0 pom import From a3ddd37f47b78d6a77852de20f78c9647f2ad918 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 27 May 2021 12:48:02 -0400 Subject: [PATCH 493/983] build: switch all clients to use the google endpoint on sonatype (#1389) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 605b165dc..688f6aca8 100644 --- a/pom.xml +++ b/pom.xml @@ -271,7 +271,7 @@ true ossrh - https://oss.sonatype.org/ + https://google.oss.sonatype.org/ ${deploy.autorelease} From 7528866e1f61f8ab52a87eed84fab19beda51c6c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 1 Jun 2021 13:04:04 -0700 Subject: [PATCH 494/983] chore: dump maven version along with java (#1382) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bf4eab41-3a8d-48be-9ae4-3bdcbb6db9aa/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/8eae0234a16b26c2ff616d305dbd9786c8b10a47 --- .kokoro/build.sh | 4 ++-- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 75aab9b16..54b11ce71 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -23,8 +23,8 @@ cd ${scriptDir}/.. # include common functions source ${scriptDir}/common.sh -# Print out Java version -java -version +# Print out Maven & Java version +mvn -version echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) diff --git a/synth.metadata b/synth.metadata index 0b8546b13..be82d6014 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "a9aa99cb2aecde39eb138867ec03d7e83259a366" + "sha": "e69275ecaa4d85372ebc253dd415a02ba63075be" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7332178a11ddddc91188dc0f25bca1ccadcaa6c6" + "sha": "8eae0234a16b26c2ff616d305dbd9786c8b10a47" } } ], From b34349f5d303f15b28c69a995763f3842738177c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Jun 2021 02:20:17 +0200 Subject: [PATCH 495/983] deps: update dependency com.google.protobuf:protobuf-java to v3.17.2 (#1390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | com.google.protobuf:protobuf-java | `3.17.1` -> `3.17.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.2/compatibility-slim/3.17.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.17.2/confidence-slim/3.17.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 688f6aca8..7b7cafed7 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.7 2.12.3 - 3.17.1 + 3.17.2 30.1.1-android 1.1.4c 4.5.13 From 02cc7405e2a9e41eb647a405c9a729f86799e78e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Jun 2021 15:38:33 +0200 Subject: [PATCH 496/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.23 (#1391) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 04ab3f5e1..866168cdc 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/samples/pom.xml b/samples/pom.xml index e83650736..84d755df6 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index dd6ff801c..08e83355a 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 60dd752d2..af383ff58 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.22 + 1.0.23 From 6f2ee676471e616da6361c2b6815cf559b680b4e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 7 Jun 2021 10:50:03 -0400 Subject: [PATCH 497/983] chore(deps): libraries-bom 20.6.0 (#1392) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index f1096b59a..3c8b1371e 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.5.0 + 20.6.0 pom import From a90a9eb62b91f77b57d3945d62341871a1bfea6b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Jun 2021 21:00:19 +0200 Subject: [PATCH 498/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.6.0 (#1393) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `20.5.0` -> `20.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/compatibility-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.6.0/confidence-slim/20.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index af383ff58..ae3f20bc6 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.5.0 + 20.6.0 pom import From 4e3b3c3cebeb8439e729a9f99b58e5fc5e13e2cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Jun 2021 19:52:43 +0200 Subject: [PATCH 499/983] deps: update dependency com.google.protobuf:protobuf-java to v3.17.3 (#1394) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b7cafed7..90a8ca2c9 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.7 2.12.3 - 3.17.2 + 3.17.3 30.1.1-android 1.1.4c 4.5.13 From 5b2f80e8ed03a1afb5fc0c3d108244f9fe0e76b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 23 Jun 2021 17:38:41 +0200 Subject: [PATCH 500/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.7.0 (#1399) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ae3f20bc6..6b0b4cb31 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.6.0 + 20.7.0 pom import From 8c24855ffc3d44cb62d838ff6dace6ed530f9c38 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 24 Jun 2021 15:29:40 -0700 Subject: [PATCH 501/983] chore: add cloud-rad doc generation (#1381) --- pom.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/pom.xml b/pom.xml index 90a8ca2c9..26a519ada 100644 --- a/pom.xml +++ b/pom.xml @@ -691,5 +691,44 @@ + + + docFX + + + + docFX + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + docFX + + javadoc + aggregate + aggregate-jar + + + + + com.microsoft.doclet.DocFxDoclet + false + ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.0.jar + + -outputpath ${project.build.directory}/docfx-yml + -projectname ${artifactId} + -excludepackages com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services + + + + + + From 1aa57e75f7d31ebaa9031fd2aef24d8ff0e05571 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 30 Jun 2021 11:46:39 +0000 Subject: [PATCH 502/983] com.google.cloud:libraries-bom:20.7.0 (#1400) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 3c8b1371e..90db10da3 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.6.0 + 20.7.0 pom import From fa07715f528f74e0ef1c5737c6730c505746a7ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 7 Jul 2021 18:40:03 +0200 Subject: [PATCH 503/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.12.4 (#1406) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26a519ada..65310081c 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.7 - 2.12.3 + 2.12.4 3.17.3 30.1.1-android 1.1.4c From fb3e27fa6a2596c182915ef569a179f1e3df300e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 9 Jul 2021 09:32:12 -0400 Subject: [PATCH 504/983] chore(deps): libraries-bom 20.8.0 (#1408) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 90db10da3..a46aaf117 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.7.0 + 20.8.0 pom import From 08e6cb41b0341742bc1657cf021d5a50d6b6bb6e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Jul 2021 16:38:30 +0200 Subject: [PATCH 505/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.8.0 (#1407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `20.7.0` -> `20.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/compatibility-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/20.8.0/confidence-slim/20.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 6b0b4cb31..f43fa985b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.7.0 + 20.8.0 pom import From 33acb8621d6e8dc088cf3bd3324a3db25dafb185 Mon Sep 17 00:00:00 2001 From: Konstantin Lyamshin Date: Mon, 12 Jul 2021 20:46:57 +0400 Subject: [PATCH 506/983] Fix: Use BufferedInputStream to inspect HttpResponse error (#1411) * Fix: Use BufferedInputStream to inspect HttpResponse error --- .../google/api/client/http/HttpResponse.java | 9 ++- .../api/client/http/HttpResponseTest.java | 79 ++++++++++++++++++- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 77497a2a4..2ffa4652b 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -18,6 +18,7 @@ import com.google.api.client.util.LoggingInputStream; import com.google.api.client.util.Preconditions; import com.google.api.client.util.StringUtils; +import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.IOException; @@ -371,7 +372,13 @@ public InputStream getContent() throws IOException { new LoggingInputStream( lowLevelResponseContent, logger, Level.CONFIG, contentLoggingLimit); } - content = lowLevelResponseContent; + if (returnRawInputStream) { + content = lowLevelResponseContent; + } else { + // wrap the content with BufferedInputStream to support + // mark()/reset() while error checking in error handlers + content = new BufferedInputStream(lowLevelResponseContent); + } contentProcessed = true; } catch (EOFException e) { // this may happen for example on a HEAD request since there no actual response data read diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index bfc09b6d2..bed019f42 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -22,9 +22,13 @@ import com.google.api.client.testing.util.LogRecordingHandler; import com.google.api.client.testing.util.TestableByteArrayInputStream; import com.google.api.client.util.Key; +import com.google.common.io.ByteStreams; +import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; +import java.io.FilterInputStream; import java.io.IOException; +import java.io.InputStream; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.text.NumberFormat; @@ -59,6 +63,8 @@ public void testParseAsString_none() throws Exception { private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; private static final String SAMPLE2 = "123abc"; private static final String JSON_SAMPLE = "{\"foo\": \"ßar\"}"; + private static final String ERROR_SAMPLE = + "{domain:'global',reason:'domainPolicy',message:'msg'}"; private static final String VALID_CONTENT_TYPE = "text/plain"; private static final String VALID_CONTENT_TYPE_WITH_PARAMS = "application/vnd.com.google.datastore.entity+json; charset=utf-8; version=v1; q=0.9"; @@ -543,7 +549,8 @@ public LowLevelHttpResponse execute() throws IOException { }; HttpRequest request = transport.createRequestFactory().buildHeadRequest(HttpTesting.SIMPLE_GENERIC_URL); - request.execute().getContent(); + InputStream noContent = request.execute().getContent(); + assertNull(noContent); } public void testGetContent_gzipEncoding_ReturnRawStream() throws IOException { @@ -570,6 +577,9 @@ public LowLevelHttpResponse execute() throws IOException { assertFalse( "it should not decompress stream", request.execute().getContent() instanceof GZIPInputStream); + assertFalse( + "it should not buffer stream", + request.execute().getContent() instanceof BufferedInputStream); } public void testGetContent_gzipEncoding_finishReading() throws IOException { @@ -665,4 +675,71 @@ public LowLevelHttpResponse execute() throws IOException { HttpResponse response = request.execute(); assertEquals("abcd", response.parseAsString()); } + + public void testGetContent_bufferedContent() throws IOException { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + // have to use gzip here because MockLowLevelHttpResponse.setContent() + // returns BufferedStream by itself, so test always success + byte[] dataToCompress = ERROR_SAMPLE.getBytes(StandardCharsets.UTF_8); + ByteArrayOutputStream content = new ByteArrayOutputStream(dataToCompress.length); + try (GZIPOutputStream zipStream = new GZIPOutputStream((content))) { + zipStream.write(dataToCompress); + } + + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(403); + result.setContentType(JSON_CONTENT_TYPE); + result.setContentEncoding("gzip"); + result.setContent(content.toByteArray()); + + return result; + } + }; + } + }; + HttpRequest request = + transport + .createRequestFactory() + .buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL) + .setThrowExceptionOnExecuteError(false); + + HttpResponse response = request.execute(); + InputStream content = response.getContent(); + assertTrue(content.markSupported()); + + // inspect content like in HttpUnsuccessfulResponseHandler + try (RollbackInputStream is = new RollbackInputStream(content)) { + byte[] bytes = ByteStreams.toByteArray(is); + String text = new String(bytes, response.getContentCharset()); + assertEquals(ERROR_SAMPLE, text); + } + + // original response still parsable by HttpResponseException + HttpResponseException exception = new HttpResponseException(response); + assertEquals(exception.getStatusCode(), 403); + assertEquals(exception.getContent(), ERROR_SAMPLE); + } + + static class RollbackInputStream extends FilterInputStream { + private boolean closed; + + RollbackInputStream(InputStream in) { + super(in); + in.mark(8192); // big enough to keep most error messages + } + + @Override + public void close() throws IOException { + if (!closed) { + closed = true; + in.reset(); + } + } + } } From 933b0bd386f413bd960f81c706edae81d9dc030a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Jul 2021 14:08:37 -0700 Subject: [PATCH 507/983] fix: Add shopt -s nullglob to dependencies script (#1412) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5578fa0d-17b2-4f89-98ac-63f3516a90a9/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/87254ac89a9559864c0a245d6b150406439ce3d8 Source-Link: https://github.com/googleapis/synthtool/commit/1c0c698705e668ccb3d68556ae7260f16ce63a6e Source-Link: https://github.com/googleapis/synthtool/commit/8f76a885deaaf2fe234daeba4a8cc4d1b3de8086 fix: Update dependencies.sh to not break on mac --- .kokoro/coerce_logs.sh | 1 - .kokoro/dependencies.sh | 5 +++-- synth.metadata | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh index 5cf7ba49e..46edbf7f2 100755 --- a/.kokoro/coerce_logs.sh +++ b/.kokoro/coerce_logs.sh @@ -28,7 +28,6 @@ job=$(basename ${KOKORO_JOB_NAME}) echo "coercing sponge logs..." for xml in `find . -name *-sponge_log.xml` do - echo "processing ${xml}" class=$(basename ${xml} | cut -d- -f2) dir=$(dirname ${xml})/${job}/${class} text=$(dirname ${xml})/${class}-sponge_log.txt diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 59d2aafc7..9030ba8f9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -14,6 +14,7 @@ # limitations under the License. set -eo pipefail +shopt -s nullglob ## Get the directory of the build script scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) @@ -46,7 +47,7 @@ function completenessCheck() { # This is stripped from the output as it is not present in the flattened pom. # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) msg "Generating dependency list using flattened pom..." @@ -70,7 +71,7 @@ function completenessCheck() { set +e error_count=0 -for path in $(find -name ".flattened-pom.xml") +for path in **/.flattened-pom.xml do # Check flattened pom in each dir that contains it for completeness dir=$(dirname "$path") diff --git a/synth.metadata b/synth.metadata index be82d6014..844468f85 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "e69275ecaa4d85372ebc253dd415a02ba63075be" + "sha": "33acb8621d6e8dc088cf3bd3324a3db25dafb185" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8eae0234a16b26c2ff616d305dbd9786c8b10a47" + "sha": "87254ac89a9559864c0a245d6b150406439ce3d8" } } ], @@ -81,6 +81,7 @@ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", + "SECURITY.md", "codecov.yaml", "renovate.json", "samples/install-without-bom/pom.xml", From 434f97130ee0cd94a4b21cc0db84f8e067554c24 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 15 Jul 2021 07:28:14 -0700 Subject: [PATCH 508/983] chore: add dependencyDashboardLabels to renovate.json (#1413) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/923c98bd-f772-481f-9c0b-fee96b042065/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) Source-Link: https://github.com/googleapis/synthtool/commit/5d3c52f5db664eee9026db76b5bcb466f3a09ca9 --- renovate.json | 5 ++++- synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/renovate.json b/renovate.json index c37889d49..87e183ebd 100644 --- a/renovate.json +++ b/renovate.json @@ -69,5 +69,8 @@ } ], "semanticCommits": true, - "masterIssue": true + "dependencyDashboard": true, + "dependencyDashboardLabels": [ + "type: process" + ] } diff --git a/synth.metadata b/synth.metadata index 844468f85..70951b3ea 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "33acb8621d6e8dc088cf3bd3324a3db25dafb185" + "sha": "933b0bd386f413bd960f81c706edae81d9dc030a" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "87254ac89a9559864c0a245d6b150406439ce3d8" + "sha": "5d3c52f5db664eee9026db76b5bcb466f3a09ca9" } } ], From 722ff2d1ccd6927597fe47104b31adc8f046e095 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 19 Jul 2021 17:00:59 +0200 Subject: [PATCH 509/983] test(deps): update dependency com.google.truth:truth to v1.1.3 (#1387) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 65310081c..dd18c9899 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 866168cdc..7980adb7a 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -42,7 +42,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 08e83355a..0cc5be9cc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -40,7 +40,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f43fa985b..79c224057 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -58,7 +58,7 @@ com.google.truth truth - 1.1.2 + 1.1.3 test From 4ccad0e9f37adaf5adac469e8dec478eb424a410 Mon Sep 17 00:00:00 2001 From: dan1st Date: Mon, 19 Jul 2021 17:02:16 +0200 Subject: [PATCH 510/983] fix: make depencence on javax.annotation optional (#1323) (#1405) --- google-http-client/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 056803579..5ff0a0d2d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -107,6 +107,11 @@ + + + javax.annotation;resolution:=optional + + From c6aba10ea9a5c5acc9d07317c5b983309b45e2eb Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 27 Jul 2021 12:48:04 +0000 Subject: [PATCH 511/983] docs: libraries-bom 20.9.0 (#1416) @suztomo --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index a46aaf117..308573b0b 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.8.0 + 20.9.0 pom import From 1508657d27b41babb530a914bd2708c567ac08ef Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Jul 2021 14:48:28 +0200 Subject: [PATCH 512/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.8.0 (#1414) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd18c9899..3935a85a5 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.7.1 + 2.8.0 com.google.appengine From 41e54fa4d2268767359cbe12dc199328bd615486 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 27 Jul 2021 14:48:50 +0200 Subject: [PATCH 513/983] chore(deps): update dependency com.google.cloud:libraries-bom to v20.9.0 (#1415) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 79c224057..d80c54e20 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.8.0 + 20.9.0 pom import From 26f3da4b6426625d0d88afdad525dbf99c65bc8b Mon Sep 17 00:00:00 2001 From: Rohit Date: Wed, 11 Aug 2021 09:58:14 -0700 Subject: [PATCH 514/983] fix: default charset to UTF-8 for text/csv if not specified (#1423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some servers don't return the charset. This causes german characters to be encoded incorrectly, since ISO_8859_1 does not work very well in such cases defaulting to UTF-8 if its missing. https://www.iana.org/assignments/media-types/text/csv Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-http-java-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #1421 ☕️ --- .../google/api/client/http/HttpResponse.java | 5 ++++ .../api/client/http/HttpResponseTest.java | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index 2ffa4652b..f7bf0b42c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -534,6 +534,11 @@ public Charset getContentCharset() { // https://tools.ietf.org/html/rfc4627 - JSON must be encoded with UTF-8 return StandardCharsets.UTF_8; } + // fallback to well-kown charset for text/csv + if ("text".equals(mediaType.getType()) && "csv".equals(mediaType.getSubType())) { + // https://www.iana.org/assignments/media-types/text/csv - CSV must be encoded with UTF-8 + return StandardCharsets.UTF_8; + } } return StandardCharsets.ISO_8859_1; } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index bed019f42..ef7599197 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -68,6 +68,7 @@ public void testParseAsString_none() throws Exception { private static final String VALID_CONTENT_TYPE = "text/plain"; private static final String VALID_CONTENT_TYPE_WITH_PARAMS = "application/vnd.com.google.datastore.entity+json; charset=utf-8; version=v1; q=0.9"; + private static final String VALID_CONTENT_TYPE_WITHOUT_CHARSET = "text/csv; version=v1; q=0.9"; private static final String INVALID_CONTENT_TYPE = "!!!invalid!!!"; private static final String JSON_CONTENT_TYPE = "application/json"; @@ -194,6 +195,32 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("ISO-8859-1", response.getContentCharset().name()); } + public void testParseAsString_validContentTypeWithoutCharSetWithParams() throws Exception { + HttpTransport transport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setContent(SAMPLE2); + result.setContentType(VALID_CONTENT_TYPE_WITHOUT_CHARSET); + return result; + } + }; + } + }; + HttpRequest request = + transport.createRequestFactory().buildGetRequest(HttpTesting.SIMPLE_GENERIC_URL); + + HttpResponse response = request.execute(); + assertEquals(SAMPLE2, response.parseAsString()); + assertEquals(VALID_CONTENT_TYPE_WITHOUT_CHARSET, response.getContentType()); + assertNotNull(response.getMediaType()); + assertEquals("UTF-8", response.getContentCharset().name()); + } + public void testParseAsString_jsonContentType() throws IOException { HttpTransport transport = new MockHttpTransport() { From 27da9a1c5a3f6e28f5069f6efd955b7450f18509 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 19 Aug 2021 13:07:54 -0400 Subject: [PATCH 515/983] chore(deps): libraries-bom 21.0.0 (#1426) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 308573b0b..9f624d319 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 20.9.0 + 21.0.0 pom import From 42e444301ffe5d9bc17e14422f2d14a6dff9c090 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Aug 2021 19:13:25 +0200 Subject: [PATCH 516/983] chore(deps): update dependency com.google.cloud:libraries-bom to v21 (#1425) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index d80c54e20..576dc62cc 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 20.9.0 + 21.0.0 pom import From 1f8be1c222d7f3fd165abe57387d2f8d9e63d82f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Aug 2021 19:41:22 +0200 Subject: [PATCH 517/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.8.1 (#1420) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3935a85a5..ff6f8ef4e 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.8.0 + 2.8.1 com.google.appengine From ae4b0dbbcf2535e660c70dd9ac0ea20d7f040181 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 20 Aug 2021 21:45:16 +0200 Subject: [PATCH 518/983] deps: update dependency com.google.code.gson:gson to v2.8.8 (#1430) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff6f8ef4e..7382d252e 100644 --- a/pom.xml +++ b/pom.xml @@ -577,7 +577,7 @@ 1.9.71 UTF-8 3.0.2 - 2.8.7 + 2.8.8 2.12.4 3.17.3 30.1.1-android From 834ade362070c9c93f9eb8a08df3308df46d51f2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 20 Aug 2021 21:45:37 +0200 Subject: [PATCH 519/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.9.0 (#1429) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7382d252e..6b96c9ed4 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.8.1 + 2.9.0 com.google.appengine From 35aeecaa3dfb52b759612d2364b1bf6a2f50d772 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Fri, 20 Aug 2021 14:20:47 -0700 Subject: [PATCH 520/983] chore: update doclet version (#1428) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b96c9ed4..db225adca 100644 --- a/pom.xml +++ b/pom.xml @@ -719,7 +719,7 @@ com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.0.jar + ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.1.1.jar -outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId} From 92ceee6256b804138b4a3c83b9b2d2ba0f839311 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:21:48 -0700 Subject: [PATCH 521/983] chore: release 1.40.0 (#1343) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 44 +++++++++++++++++++ google-http-client-android-test/pom.xml | 6 +-- google-http-client-android/pom.xml | 4 +- google-http-client-apache-v2/pom.xml | 4 +- google-http-client-appengine/pom.xml | 4 +- google-http-client-assembly/pom.xml | 4 +- google-http-client-bom/pom.xml | 22 +++++----- google-http-client-findbugs/pom.xml | 4 +- google-http-client-gson/pom.xml | 4 +- google-http-client-jackson2/pom.xml | 4 +- google-http-client-protobuf/pom.xml | 4 +- google-http-client-test/pom.xml | 4 +- google-http-client-xml/pom.xml | 4 +- google-http-client/pom.xml | 4 +- pom.xml | 4 +- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 ++++++------ 17 files changed, 97 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4869b4479..97b53ab36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## [1.40.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.2...v1.40.0) (2021-08-20) + + +### Features + +* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#1380](https://www.github.com/googleapis/google-http-java-client/issues/1380)) ([e69275e](https://www.github.com/googleapis/google-http-java-client/commit/e69275ecaa4d85372ebc253dd415a02ba63075be)) + + +### Bug Fixes + +* Add shopt -s nullglob to dependencies script ([#1412](https://www.github.com/googleapis/google-http-java-client/issues/1412)) ([933b0bd](https://www.github.com/googleapis/google-http-java-client/commit/933b0bd386f413bd960f81c706edae81d9dc030a)) +* default charset to UTF-8 for text/csv if not specified ([#1423](https://www.github.com/googleapis/google-http-java-client/issues/1423)) ([26f3da4](https://www.github.com/googleapis/google-http-java-client/commit/26f3da4b6426625d0d88afdad525dbf99c65bc8b)) +* make depencence on javax.annotation optional ([#1323](https://www.github.com/googleapis/google-http-java-client/issues/1323)) ([#1405](https://www.github.com/googleapis/google-http-java-client/issues/1405)) ([4ccad0e](https://www.github.com/googleapis/google-http-java-client/commit/4ccad0e9f37adaf5adac469e8dec478eb424a410)) +* release scripts from issuing overlapping phases ([#1344](https://www.github.com/googleapis/google-http-java-client/issues/1344)) ([539407e](https://www.github.com/googleapis/google-http-java-client/commit/539407ef7133df7f5b1e0f371c673dbc75e79ff2)) +* test error responses such as 403 ([#1345](https://www.github.com/googleapis/google-http-java-client/issues/1345)) ([a83c43f](https://www.github.com/googleapis/google-http-java-client/commit/a83c43fa86966ca1be625086a211211e3861f7b1)) +* typo ([#1342](https://www.github.com/googleapis/google-http-java-client/issues/1342)) ([2bbc0e4](https://www.github.com/googleapis/google-http-java-client/commit/2bbc0e4b77ab2c9956b0a65af0e927d5052a7752)) +* Update dependencies.sh to not break on mac ([933b0bd](https://www.github.com/googleapis/google-http-java-client/commit/933b0bd386f413bd960f81c706edae81d9dc030a)) +* Use BufferedInputStream to inspect HttpResponse error ([#1411](https://www.github.com/googleapis/google-http-java-client/issues/1411)) ([33acb86](https://www.github.com/googleapis/google-http-java-client/commit/33acb8621d6e8dc088cf3bd3324a3db25dafb185)) + + +### Documentation + +* bom 20.3.0 ([#1368](https://www.github.com/googleapis/google-http-java-client/issues/1368)) ([0d8d2fe](https://www.github.com/googleapis/google-http-java-client/commit/0d8d2fee8750bcaa79f2c8ee106f17b89de81e58)) +* libraries-bom 20.1.0 ([#1347](https://www.github.com/googleapis/google-http-java-client/issues/1347)) ([2570889](https://www.github.com/googleapis/google-http-java-client/commit/2570889e95c7c3bf26d5666dc69a7bb09efd7655)) +* libraries-bom 20.5.0 ([#1388](https://www.github.com/googleapis/google-http-java-client/issues/1388)) ([38dc3f6](https://www.github.com/googleapis/google-http-java-client/commit/38dc3f64d24868f90bfc9728ace0ce6aaeb2940a)) +* libraries-bom 20.9.0 ([#1416](https://www.github.com/googleapis/google-http-java-client/issues/1416)) ([c6aba10](https://www.github.com/googleapis/google-http-java-client/commit/c6aba10ea9a5c5acc9d07317c5b983309b45e2eb)) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.12.3 ([#1340](https://www.github.com/googleapis/google-http-java-client/issues/1340)) ([81e479a](https://www.github.com/googleapis/google-http-java-client/commit/81e479ac59797ad49e503eb2d41ff17c9cb77d7b)) +* update dependency com.fasterxml.jackson.core:jackson-core to v2.12.4 ([#1406](https://www.github.com/googleapis/google-http-java-client/issues/1406)) ([fa07715](https://www.github.com/googleapis/google-http-java-client/commit/fa07715f528f74e0ef1c5737c6730c505746a7ad)) +* update dependency com.google.code.gson:gson to v2.8.7 ([#1386](https://www.github.com/googleapis/google-http-java-client/issues/1386)) ([550abc1](https://www.github.com/googleapis/google-http-java-client/commit/550abc1e9f3209ec87b20f81c9e0ecdb27aedb7c)) +* update dependency com.google.code.gson:gson to v2.8.8 ([#1430](https://www.github.com/googleapis/google-http-java-client/issues/1430)) ([ae4b0db](https://www.github.com/googleapis/google-http-java-client/commit/ae4b0dbbcf2535e660c70dd9ac0ea20d7f040181)) +* update dependency com.google.errorprone:error_prone_annotations to v2.7.1 ([#1378](https://www.github.com/googleapis/google-http-java-client/issues/1378)) ([83b1642](https://www.github.com/googleapis/google-http-java-client/commit/83b164245d4e3298c7cee5b10ab7917f6c85e7b1)) +* update dependency com.google.errorprone:error_prone_annotations to v2.8.0 ([#1414](https://www.github.com/googleapis/google-http-java-client/issues/1414)) ([1508657](https://www.github.com/googleapis/google-http-java-client/commit/1508657d27b41babb530a914bd2708c567ac08ef)) +* update dependency com.google.errorprone:error_prone_annotations to v2.8.1 ([#1420](https://www.github.com/googleapis/google-http-java-client/issues/1420)) ([1f8be1c](https://www.github.com/googleapis/google-http-java-client/commit/1f8be1c222d7f3fd165abe57387d2f8d9e63d82f)) +* update dependency com.google.errorprone:error_prone_annotations to v2.9.0 ([#1429](https://www.github.com/googleapis/google-http-java-client/issues/1429)) ([834ade3](https://www.github.com/googleapis/google-http-java-client/commit/834ade362070c9c93f9eb8a08df3308df46d51f2)) +* update dependency com.google.protobuf:protobuf-java to v3.16.0 ([#1366](https://www.github.com/googleapis/google-http-java-client/issues/1366)) ([3148f5d](https://www.github.com/googleapis/google-http-java-client/commit/3148f5daab8598957e05849eaec2eab0b634321d)) +* update dependency com.google.protobuf:protobuf-java to v3.17.0 ([#1373](https://www.github.com/googleapis/google-http-java-client/issues/1373)) ([d147628](https://www.github.com/googleapis/google-http-java-client/commit/d147628742bbd327a405e87b1645d1d4bf1f7610)) +* update dependency com.google.protobuf:protobuf-java to v3.17.1 ([#1384](https://www.github.com/googleapis/google-http-java-client/issues/1384)) ([c22a0e0](https://www.github.com/googleapis/google-http-java-client/commit/c22a0e0e1c1a4a6e8c93b38db519b49eba4e2f14)) +* update dependency com.google.protobuf:protobuf-java to v3.17.2 ([#1390](https://www.github.com/googleapis/google-http-java-client/issues/1390)) ([b34349f](https://www.github.com/googleapis/google-http-java-client/commit/b34349f5d303f15b28c69a995763f3842738177c)) +* update dependency com.google.protobuf:protobuf-java to v3.17.3 ([#1394](https://www.github.com/googleapis/google-http-java-client/issues/1394)) ([4e3b3c3](https://www.github.com/googleapis/google-http-java-client/commit/4e3b3c3cebeb8439e729a9f99b58e5fc5e13e2cf)) + ### [1.39.2](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.1...v1.39.2) (2021-04-09) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index f2e0887c1..6583e08d8 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.39.3-SNAPSHOT + 1.40.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.39.3-SNAPSHOT + 1.40.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.39.3-SNAPSHOT + 1.40.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 0ae5d384c..c579bc866 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-android - 1.39.3-SNAPSHOT + 1.40.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 54fa935a2..77f0508ce 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-apache-v2 - 1.39.3-SNAPSHOT + 1.40.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 9679aae38..4977aeee6 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-appengine - 1.39.3-SNAPSHOT + 1.40.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index efecfdf50..8e6493410 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.39.3-SNAPSHOT + 1.40.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 60cdd7282..35a82a3e7 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.39.3-SNAPSHOT + 1.40.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-android - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-apache-v2 - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-appengine - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-findbugs - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-gson - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-jackson2 - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-protobuf - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-test - 1.39.3-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-xml - 1.39.3-SNAPSHOT + 1.40.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 306920871..80792af8b 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-findbugs - 1.39.3-SNAPSHOT + 1.40.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index b3f38c006..a7fed0710 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-gson - 1.39.3-SNAPSHOT + 1.40.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 22a8efa57..ca510c01a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-jackson2 - 1.39.3-SNAPSHOT + 1.40.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 33286ef66..514cc32ac 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-protobuf - 1.39.3-SNAPSHOT + 1.40.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 6efc015b0..2783c17f2 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-test - 1.39.3-SNAPSHOT + 1.40.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index ce8c33cfe..8ac11ed9b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-xml - 1.39.3-SNAPSHOT + 1.40.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5ff0a0d2d..cdf8829cd 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../pom.xml google-http-client - 1.39.3-SNAPSHOT + 1.40.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index db225adca..a51d372ba 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.39.3-SNAPSHOT + 1.40.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 7d8cb9dbe..2f3d241a6 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.39.3-SNAPSHOT + 1.40.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d3697cd2c..d9550157d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.39.2:1.39.3-SNAPSHOT -google-http-client-bom:1.39.2:1.39.3-SNAPSHOT -google-http-client-parent:1.39.2:1.39.3-SNAPSHOT -google-http-client-android:1.39.2:1.39.3-SNAPSHOT -google-http-client-android-test:1.39.2:1.39.3-SNAPSHOT -google-http-client-apache-v2:1.39.2:1.39.3-SNAPSHOT -google-http-client-appengine:1.39.2:1.39.3-SNAPSHOT -google-http-client-assembly:1.39.2:1.39.3-SNAPSHOT -google-http-client-findbugs:1.39.2:1.39.3-SNAPSHOT -google-http-client-gson:1.39.2:1.39.3-SNAPSHOT -google-http-client-jackson2:1.39.2:1.39.3-SNAPSHOT -google-http-client-protobuf:1.39.2:1.39.3-SNAPSHOT -google-http-client-test:1.39.2:1.39.3-SNAPSHOT -google-http-client-xml:1.39.2:1.39.3-SNAPSHOT +google-http-client:1.40.0:1.40.0 +google-http-client-bom:1.40.0:1.40.0 +google-http-client-parent:1.40.0:1.40.0 +google-http-client-android:1.40.0:1.40.0 +google-http-client-android-test:1.40.0:1.40.0 +google-http-client-apache-v2:1.40.0:1.40.0 +google-http-client-appengine:1.40.0:1.40.0 +google-http-client-assembly:1.40.0:1.40.0 +google-http-client-findbugs:1.40.0:1.40.0 +google-http-client-gson:1.40.0:1.40.0 +google-http-client-jackson2:1.40.0:1.40.0 +google-http-client-protobuf:1.40.0:1.40.0 +google-http-client-test:1.40.0:1.40.0 +google-http-client-xml:1.40.0:1.40.0 From e8231c08c097d1050cc2c2a4cc7aaf9b13a77d84 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 21:30:25 +0000 Subject: [PATCH 522/983] chore: release 1.40.1-SNAPSHOT (#1431) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 6583e08d8..cbdc8673b 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.0 + 1.40.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c579bc866..c8f9978dc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 77f0508ce..a2768ead2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.40.0 + 1.40.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4977aeee6..cc6feee4b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.40.0 + 1.40.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 8e6493410..29587862d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.40.0 + 1.40.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 35a82a3e7..150ba9bd8 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.0 + 1.40.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.40.0 + 1.40.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 80792af8b..6c2fe5b7f 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.40.0 + 1.40.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a7fed0710..ad1de18a8 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.40.0 + 1.40.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index ca510c01a..28985e0c4 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.40.0 + 1.40.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 514cc32ac..fda09d2c2 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.40.0 + 1.40.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 2783c17f2..ab4460210 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8ac11ed9b..551066df3 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.40.0 + 1.40.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index cdf8829cd..3ec4a28b3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client - 1.40.0 + 1.40.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a51d372ba..5ba8a7b5b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.0 + 1.40.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2f3d241a6..969cb37c7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d9550157d..ed3410fcf 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.0:1.40.0 -google-http-client-bom:1.40.0:1.40.0 -google-http-client-parent:1.40.0:1.40.0 -google-http-client-android:1.40.0:1.40.0 -google-http-client-android-test:1.40.0:1.40.0 -google-http-client-apache-v2:1.40.0:1.40.0 -google-http-client-appengine:1.40.0:1.40.0 -google-http-client-assembly:1.40.0:1.40.0 -google-http-client-findbugs:1.40.0:1.40.0 -google-http-client-gson:1.40.0:1.40.0 -google-http-client-jackson2:1.40.0:1.40.0 -google-http-client-protobuf:1.40.0:1.40.0 -google-http-client-test:1.40.0:1.40.0 -google-http-client-xml:1.40.0:1.40.0 +google-http-client:1.40.0:1.40.1-SNAPSHOT +google-http-client-bom:1.40.0:1.40.1-SNAPSHOT +google-http-client-parent:1.40.0:1.40.1-SNAPSHOT +google-http-client-android:1.40.0:1.40.1-SNAPSHOT +google-http-client-android-test:1.40.0:1.40.1-SNAPSHOT +google-http-client-apache-v2:1.40.0:1.40.1-SNAPSHOT +google-http-client-appengine:1.40.0:1.40.1-SNAPSHOT +google-http-client-assembly:1.40.0:1.40.1-SNAPSHOT +google-http-client-findbugs:1.40.0:1.40.1-SNAPSHOT +google-http-client-gson:1.40.0:1.40.1-SNAPSHOT +google-http-client-jackson2:1.40.0:1.40.1-SNAPSHOT +google-http-client-protobuf:1.40.0:1.40.1-SNAPSHOT +google-http-client-test:1.40.0:1.40.1-SNAPSHOT +google-http-client-xml:1.40.0:1.40.1-SNAPSHOT From 4d8554361e74a89ba0a54375f64dcdb1c8b47623 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 26 Aug 2021 13:30:27 -0400 Subject: [PATCH 523/983] chore: migrate to new sonatype endpoint (#1433) --- google-http-client-bom/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 150ba9bd8..30df349bf 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -37,11 +37,11 @@ sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots + https://google.oss.sonatype.org/content/repositories/snapshots sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + https://google.oss.sonatype.org/service/local/staging/deploy/maven2/ github-pages-site @@ -121,7 +121,7 @@ true sonatype-nexus-staging - https://oss.sonatype.org/ + https://google.oss.sonatype.org/ false From 0a505a7ce012efcce14af94aa130d0eab2ac89b6 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 26 Aug 2021 18:36:10 +0000 Subject: [PATCH 524/983] fix: GSON parser now throws IOException on invalid JSON input (#1355) Previously, the `GsonParser` class threw an `IllegalArgument` (unchecked) exception. This does not change the interface for `JsonParser` which already declares `throws IOException` --- google-http-client-gson/pom.xml | 5 ---- .../api/client/json/gson/GsonParser.java | 28 +++++++++---------- .../api/client/json/gson/GsonFactoryTest.java | 24 ++++++++++------ google-http-client-jackson2/pom.xml | 5 ---- .../json/jackson2/JacksonFactoryTest.java | 22 ++++++++++----- .../test/json/AbstractJsonParserTest.java | 24 ++++++++++++++++ 6 files changed, 69 insertions(+), 39 deletions(-) diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index ad1de18a8..d27e7254a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -81,10 +81,5 @@ com.google.code.gson gson - - com.google.guava - guava - test - diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java index 1527660d5..dc90369c7 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java @@ -17,7 +17,6 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonParser; import com.google.api.client.json.JsonToken; -import com.google.api.client.util.Preconditions; import com.google.gson.stream.JsonReader; import java.io.EOFException; import java.io.IOException; @@ -44,8 +43,7 @@ class GsonParser extends JsonParser { GsonParser(GsonFactory factory, JsonReader reader) { this.factory = factory; this.reader = reader; - // lenient to allow top-level values of any type - reader.setLenient(true); + reader.setLenient(false); } @Override @@ -69,56 +67,58 @@ public JsonFactory getFactory() { } @Override - public byte getByteValue() { + public byte getByteValue() throws IOException { checkNumber(); return Byte.parseByte(currentText); } @Override - public short getShortValue() { + public short getShortValue() throws IOException { checkNumber(); return Short.parseShort(currentText); } @Override - public int getIntValue() { + public int getIntValue() throws IOException { checkNumber(); return Integer.parseInt(currentText); } @Override - public float getFloatValue() { + public float getFloatValue() throws IOException { checkNumber(); return Float.parseFloat(currentText); } @Override - public BigInteger getBigIntegerValue() { + public BigInteger getBigIntegerValue() throws IOException { checkNumber(); return new BigInteger(currentText); } @Override - public BigDecimal getDecimalValue() { + public BigDecimal getDecimalValue() throws IOException { checkNumber(); return new BigDecimal(currentText); } @Override - public double getDoubleValue() { + public double getDoubleValue() throws IOException { checkNumber(); return Double.parseDouble(currentText); } @Override - public long getLongValue() { + public long getLongValue() throws IOException { checkNumber(); return Long.parseLong(currentText); } - private void checkNumber() { - Preconditions.checkArgument( - currentToken == JsonToken.VALUE_NUMBER_INT || currentToken == JsonToken.VALUE_NUMBER_FLOAT); + private void checkNumber() throws IOException { + if (currentToken != JsonToken.VALUE_NUMBER_INT + && currentToken != JsonToken.VALUE_NUMBER_FLOAT) { + throw new IOException("Token is not a number"); + } } @Override diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java index 57d98041e..05ab5bf04 100644 --- a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Google Inc. + * Copyright 2010 Google Inc. * * 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 @@ -17,8 +17,7 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonParser; import com.google.api.client.test.json.AbstractJsonFactoryTest; -import com.google.common.base.Charsets; -import java.io.ByteArrayInputStream; +import java.io.IOException; import java.util.ArrayList; /** @@ -80,10 +79,19 @@ public final void testToPrettyString_Feed() throws Exception { assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); } - public final void testParse_directValue() throws Exception { - byte[] jsonData = Charsets.UTF_8.encode("123").array(); - JsonParser jp = - newFactory().createJsonParser(new ByteArrayInputStream(jsonData), Charsets.UTF_8); - assertEquals(123, jp.parse(Integer.class, true)); + public final void testParse_directValue() throws IOException { + JsonParser parser = newFactory().createJsonParser("123"); + assertEquals(123, parser.parse(Integer.class, true)); + } + + public final void testGetByteValue() throws IOException { + JsonParser parser = newFactory().createJsonParser("123"); + + try { + parser.getByteValue(); + fail("should throw IOException"); + } catch (IOException ex) { + assertNotNull(ex.getMessage()); + } } } diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 28985e0c4..2eeeb0361 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -80,10 +80,5 @@ com.fasterxml.jackson.core jackson-core - - com.google.guava - guava - test - diff --git a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java index 86d13783c..c90edc2e3 100644 --- a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java +++ b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Google Inc. + * Copyright 2012 Google Inc. * * 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 @@ -18,8 +18,7 @@ import com.google.api.client.json.JsonParser; import com.google.api.client.test.json.AbstractJsonFactoryTest; import com.google.api.client.util.StringUtils; -import com.google.common.base.Charsets; -import java.io.ByteArrayInputStream; +import java.io.IOException; import java.util.ArrayList; /** @@ -74,9 +73,18 @@ public final void testToPrettyString_Feed() throws Exception { } public final void testParse_directValue() throws Exception { - byte[] jsonData = Charsets.UTF_8.encode("123").array(); - JsonParser jp = - newFactory().createJsonParser(new ByteArrayInputStream(jsonData), Charsets.UTF_8); - assertEquals(123, jp.parse(Integer.class, true)); + JsonParser parser = newFactory().createJsonParser("123"); + assertEquals(123, parser.parse(Integer.class, true)); + } + + public final void testGetByteValue() throws IOException { + JsonParser parser = newFactory().createJsonParser("123"); + + try { + parser.getByteValue(); + fail("should throw IOException"); + } catch (IOException ex) { + assertNotNull(ex.getMessage()); + } } } diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java index 2a68c639c..985637aea 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import junit.framework.TestCase; +import org.junit.Assert; public abstract class AbstractJsonParserTest extends TestCase { @@ -44,6 +45,29 @@ public void testParse_basic() throws IOException { assertEquals(Boolean.FALSE, json.get("boolValue")); } + public void testGetWrongType() throws IOException { + JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); + InputStream inputStream = new ByteArrayInputStream(TEST_JSON.getBytes(StandardCharsets.UTF_8)); + GenericJson json = parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + assertTrue(json.get("strValue") instanceof String); + assertEquals("bar", json.get("strValue")); + assertTrue(json.get("intValue") instanceof BigDecimal); + assertEquals(new BigDecimal(123), json.get("intValue")); + assertTrue(json.get("boolValue") instanceof Boolean); + assertEquals(Boolean.FALSE, json.get("boolValue")); + } + + public void testParse_badJson() throws IOException { + JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); + InputStream inputStream = new ByteArrayInputStream("not json".getBytes(StandardCharsets.UTF_8)); + try { + parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + fail("Malformed JSON not detected"); + } catch (IOException ex) { + Assert.assertNotNull(ex.getMessage()); + } + } + public void testParse_bigDecimal() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); InputStream inputStream = From f77608fbfb41410a8f62f40bc5a2df256c751d52 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 Aug 2021 19:02:11 +0000 Subject: [PATCH 525/983] chore: release 1.40.0 (#1434) :robot: I have created a release \*beep\* \*boop\* --- ### [1.40.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.0...v1.40.1) (2021-08-26) ### Features * add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#1380](https://www.github.com/googleapis/google-http-java-client/issues/1380)) ([e69275e](https://www.github.com/googleapis/google-http-java-client/commit/e69275ecaa4d85372ebc253dd415a02ba63075be)) ### Bug Fixes * GSON parser now throws IOException on invalid JSON input ([#1355](https://www.github.com/googleapis/google-http-java-client/issues/1355)) ([0a505a7](https://www.github.com/googleapis/google-http-java-client/commit/0a505a7ce012efcce14af94aa130d0eab2ac89b6)) * Add shopt -s nullglob to dependencies script ([#1412](https://www.github.com/googleapis/google-http-java-client/issues/1412)) ([933b0bd](https://www.github.com/googleapis/google-http-java-client/commit/933b0bd386f413bd960f81c706edae81d9dc030a)) * default charset to UTF-8 for text/csv if not specified ([#1423](https://www.github.com/googleapis/google-http-java-client/issues/1423)) ([26f3da4](https://www.github.com/googleapis/google-http-java-client/commit/26f3da4b6426625d0d88afdad525dbf99c65bc8b)) * make depencence on javax.annotation optional ([#1323](https://www.github.com/googleapis/google-http-java-client/issues/1323)) ([#1405](https://www.github.com/googleapis/google-http-java-client/issues/1405)) ([4ccad0e](https://www.github.com/googleapis/google-http-java-client/commit/4ccad0e9f37adaf5adac469e8dec478eb424a410)) * release scripts from issuing overlapping phases ([#1344](https://www.github.com/googleapis/google-http-java-client/issues/1344)) ([539407e](https://www.github.com/googleapis/google-http-java-client/commit/539407ef7133df7f5b1e0f371c673dbc75e79ff2)) * test error responses such as 403 ([#1345](https://www.github.com/googleapis/google-http-java-client/issues/1345)) ([a83c43f](https://www.github.com/googleapis/google-http-java-client/commit/a83c43fa86966ca1be625086a211211e3861f7b1)) * typo ([#1342](https://www.github.com/googleapis/google-http-java-client/issues/1342)) ([2bbc0e4](https://www.github.com/googleapis/google-http-java-client/commit/2bbc0e4b77ab2c9956b0a65af0e927d5052a7752)) * Update dependencies.sh to not break on mac ([933b0bd](https://www.github.com/googleapis/google-http-java-client/commit/933b0bd386f413bd960f81c706edae81d9dc030a)) * Use BufferedInputStream to inspect HttpResponse error ([#1411](https://www.github.com/googleapis/google-http-java-client/issues/1411)) ([33acb86](https://www.github.com/googleapis/google-http-java-client/commit/33acb8621d6e8dc088cf3bd3324a3db25dafb185)) ### Documentation * bom 20.3.0 ([#1368](https://www.github.com/googleapis/google-http-java-client/issues/1368)) ([0d8d2fe](https://www.github.com/googleapis/google-http-java-client/commit/0d8d2fee8750bcaa79f2c8ee106f17b89de81e58)) * libraries-bom 20.1.0 ([#1347](https://www.github.com/googleapis/google-http-java-client/issues/1347)) ([2570889](https://www.github.com/googleapis/google-http-java-client/commit/2570889e95c7c3bf26d5666dc69a7bb09efd7655)) * libraries-bom 20.5.0 ([#1388](https://www.github.com/googleapis/google-http-java-client/issues/1388)) ([38dc3f6](https://www.github.com/googleapis/google-http-java-client/commit/38dc3f64d24868f90bfc9728ace0ce6aaeb2940a)) * libraries-bom 20.9.0 ([#1416](https://www.github.com/googleapis/google-http-java-client/issues/1416)) ([c6aba10](https://www.github.com/googleapis/google-http-java-client/commit/c6aba10ea9a5c5acc9d07317c5b983309b45e2eb)) ### Dependencies * update dependency com.fasterxml.jackson.core:jackson-core to v2.12.3 ([#1340](https://www.github.com/googleapis/google-http-java-client/issues/1340)) ([81e479a](https://www.github.com/googleapis/google-http-java-client/commit/81e479ac59797ad49e503eb2d41ff17c9cb77d7b)) * update dependency com.fasterxml.jackson.core:jackson-core to v2.12.4 ([#1406](https://www.github.com/googleapis/google-http-java-client/issues/1406)) ([fa07715](https://www.github.com/googleapis/google-http-java-client/commit/fa07715f528f74e0ef1c5737c6730c505746a7ad)) * update dependency com.google.code.gson:gson to v2.8.7 ([#1386](https://www.github.com/googleapis/google-http-java-client/issues/1386)) ([550abc1](https://www.github.com/googleapis/google-http-java-client/commit/550abc1e9f3209ec87b20f81c9e0ecdb27aedb7c)) * update dependency com.google.code.gson:gson to v2.8.8 ([#1430](https://www.github.com/googleapis/google-http-java-client/issues/1430)) ([ae4b0db](https://www.github.com/googleapis/google-http-java-client/commit/ae4b0dbbcf2535e660c70dd9ac0ea20d7f040181)) * update dependency com.google.errorprone:error_prone_annotations to v2.7.1 ([#1378](https://www.github.com/googleapis/google-http-java-client/issues/1378)) ([83b1642](https://www.github.com/googleapis/google-http-java-client/commit/83b164245d4e3298c7cee5b10ab7917f6c85e7b1)) * update dependency com.google.errorprone:error_prone_annotations to v2.8.0 ([#1414](https://www.github.com/googleapis/google-http-java-client/issues/1414)) ([1508657](https://www.github.com/googleapis/google-http-java-client/commit/1508657d27b41babb530a914bd2708c567ac08ef)) * update dependency com.google.errorprone:error_prone_annotations to v2.8.1 ([#1420](https://www.github.com/googleapis/google-http-java-client/issues/1420)) ([1f8be1c](https://www.github.com/googleapis/google-http-java-client/commit/1f8be1c222d7f3fd165abe57387d2f8d9e63d82f)) * update dependency com.google.errorprone:error_prone_annotations to v2.9.0 ([#1429](https://www.github.com/googleapis/google-http-java-client/issues/1429)) ([834ade3](https://www.github.com/googleapis/google-http-java-client/commit/834ade362070c9c93f9eb8a08df3308df46d51f2)) * update dependency com.google.protobuf:protobuf-java to v3.16.0 ([#1366](https://www.github.com/googleapis/google-http-java-client/issues/1366)) ([3148f5d](https://www.github.com/googleapis/google-http-java-client/commit/3148f5daab8598957e05849eaec2eab0b634321d)) * update dependency com.google.protobuf:protobuf-java to v3.17.0 ([#1373](https://www.github.com/googleapis/google-http-java-client/issues/1373)) ([d147628](https://www.github.com/googleapis/google-http-java-client/commit/d147628742bbd327a405e87b1645d1d4bf1f7610)) * update dependency com.google.protobuf:protobuf-java to v3.17.1 ([#1384](https://www.github.com/googleapis/google-http-java-client/issues/1384)) ([c22a0e0](https://www.github.com/googleapis/google-http-java-client/commit/c22a0e0e1c1a4a6e8c93b38db519b49eba4e2f14)) * update dependency com.google.protobuf:protobuf-java to v3.17.2 ([#1390](https://www.github.com/googleapis/google-http-java-client/issues/1390)) ([b34349f](https://www.github.com/googleapis/google-http-java-client/commit/b34349f5d303f15b28c69a995763f3842738177c)) * update dependency com.google.protobuf:protobuf-java to v3.17.3 ([#1394](https://www.github.com/googleapis/google-http-java-client/issues/1394)) ([4e3b3c3](https://www.github.com/googleapis/google-http-java-client/commit/4e3b3c3cebeb8439e729a9f99b58e5fc5e13e2cf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 1 + google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 54 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97b53ab36..c9af4966a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bug Fixes +* GSON parser now throws IOException on invalid JSON input ([#1355](https://www.github.com/googleapis/google-http-java-client/issues/1355)) ([0a505a7](https://www.github.com/googleapis/google-http-java-client/commit/0a505a7ce012efcce14af94aa130d0eab2ac89b6)) * Add shopt -s nullglob to dependencies script ([#1412](https://www.github.com/googleapis/google-http-java-client/issues/1412)) ([933b0bd](https://www.github.com/googleapis/google-http-java-client/commit/933b0bd386f413bd960f81c706edae81d9dc030a)) * default charset to UTF-8 for text/csv if not specified ([#1423](https://www.github.com/googleapis/google-http-java-client/issues/1423)) ([26f3da4](https://www.github.com/googleapis/google-http-java-client/commit/26f3da4b6426625d0d88afdad525dbf99c65bc8b)) * make depencence on javax.annotation optional ([#1323](https://www.github.com/googleapis/google-http-java-client/issues/1323)) ([#1405](https://www.github.com/googleapis/google-http-java-client/issues/1405)) ([4ccad0e](https://www.github.com/googleapis/google-http-java-client/commit/4ccad0e9f37adaf5adac469e8dec478eb424a410)) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index cbdc8673b..6583e08d8 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.1-SNAPSHOT + 1.40.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.1-SNAPSHOT + 1.40.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.1-SNAPSHOT + 1.40.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c8f9978dc..c579bc866 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-android - 1.40.1-SNAPSHOT + 1.40.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a2768ead2..77f0508ce 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-apache-v2 - 1.40.1-SNAPSHOT + 1.40.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index cc6feee4b..4977aeee6 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-appengine - 1.40.1-SNAPSHOT + 1.40.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 29587862d..8e6493410 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.40.1-SNAPSHOT + 1.40.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 30df349bf..88a4215c6 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.1-SNAPSHOT + 1.40.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-android - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-apache-v2 - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-appengine - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-findbugs - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-gson - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-jackson2 - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-protobuf - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-test - 1.40.1-SNAPSHOT + 1.40.0 com.google.http-client google-http-client-xml - 1.40.1-SNAPSHOT + 1.40.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6c2fe5b7f..80792af8b 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-findbugs - 1.40.1-SNAPSHOT + 1.40.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d27e7254a..6baf63ccb 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-gson - 1.40.1-SNAPSHOT + 1.40.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2eeeb0361..6c815fe9a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-jackson2 - 1.40.1-SNAPSHOT + 1.40.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fda09d2c2..514cc32ac 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-protobuf - 1.40.1-SNAPSHOT + 1.40.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ab4460210..2783c17f2 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-test - 1.40.1-SNAPSHOT + 1.40.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 551066df3..8ac11ed9b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client-xml - 1.40.1-SNAPSHOT + 1.40.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 3ec4a28b3..cdf8829cd 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../pom.xml google-http-client - 1.40.1-SNAPSHOT + 1.40.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 5ba8a7b5b..a51d372ba 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.1-SNAPSHOT + 1.40.0 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 969cb37c7..2f3d241a6 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ed3410fcf..d9550157d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.0:1.40.1-SNAPSHOT -google-http-client-bom:1.40.0:1.40.1-SNAPSHOT -google-http-client-parent:1.40.0:1.40.1-SNAPSHOT -google-http-client-android:1.40.0:1.40.1-SNAPSHOT -google-http-client-android-test:1.40.0:1.40.1-SNAPSHOT -google-http-client-apache-v2:1.40.0:1.40.1-SNAPSHOT -google-http-client-appengine:1.40.0:1.40.1-SNAPSHOT -google-http-client-assembly:1.40.0:1.40.1-SNAPSHOT -google-http-client-findbugs:1.40.0:1.40.1-SNAPSHOT -google-http-client-gson:1.40.0:1.40.1-SNAPSHOT -google-http-client-jackson2:1.40.0:1.40.1-SNAPSHOT -google-http-client-protobuf:1.40.0:1.40.1-SNAPSHOT -google-http-client-test:1.40.0:1.40.1-SNAPSHOT -google-http-client-xml:1.40.0:1.40.1-SNAPSHOT +google-http-client:1.40.0:1.40.0 +google-http-client-bom:1.40.0:1.40.0 +google-http-client-parent:1.40.0:1.40.0 +google-http-client-android:1.40.0:1.40.0 +google-http-client-android-test:1.40.0:1.40.0 +google-http-client-apache-v2:1.40.0:1.40.0 +google-http-client-appengine:1.40.0:1.40.0 +google-http-client-assembly:1.40.0:1.40.0 +google-http-client-findbugs:1.40.0:1.40.0 +google-http-client-gson:1.40.0:1.40.0 +google-http-client-jackson2:1.40.0:1.40.0 +google-http-client-protobuf:1.40.0:1.40.0 +google-http-client-test:1.40.0:1.40.0 +google-http-client-xml:1.40.0:1.40.0 From a6b63c068bac09cf3796812a1fd7d6cfea3aba4f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 Aug 2021 19:14:24 +0000 Subject: [PATCH 526/983] chore: release 1.40.1-SNAPSHOT (#1435) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 6583e08d8..cbdc8673b 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.0 + 1.40.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c579bc866..c8f9978dc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 77f0508ce..a2768ead2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.40.0 + 1.40.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4977aeee6..cc6feee4b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.40.0 + 1.40.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 8e6493410..29587862d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.40.0 + 1.40.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 88a4215c6..30df349bf 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.0 + 1.40.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-android - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.40.0 + 1.40.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 80792af8b..6c2fe5b7f 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.40.0 + 1.40.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 6baf63ccb..d27e7254a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.40.0 + 1.40.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 6c815fe9a..2eeeb0361 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.40.0 + 1.40.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 514cc32ac..fda09d2c2 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.40.0 + 1.40.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 2783c17f2..ab4460210 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-test - 1.40.0 + 1.40.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8ac11ed9b..551066df3 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.40.0 + 1.40.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index cdf8829cd..3ec4a28b3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../pom.xml google-http-client - 1.40.0 + 1.40.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a51d372ba..5ba8a7b5b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -573,7 +573,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.0 + 1.40.1-SNAPSHOT 1.9.71 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2f3d241a6..969cb37c7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.0 + 1.40.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d9550157d..ed3410fcf 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.0:1.40.0 -google-http-client-bom:1.40.0:1.40.0 -google-http-client-parent:1.40.0:1.40.0 -google-http-client-android:1.40.0:1.40.0 -google-http-client-android-test:1.40.0:1.40.0 -google-http-client-apache-v2:1.40.0:1.40.0 -google-http-client-appengine:1.40.0:1.40.0 -google-http-client-assembly:1.40.0:1.40.0 -google-http-client-findbugs:1.40.0:1.40.0 -google-http-client-gson:1.40.0:1.40.0 -google-http-client-jackson2:1.40.0:1.40.0 -google-http-client-protobuf:1.40.0:1.40.0 -google-http-client-test:1.40.0:1.40.0 -google-http-client-xml:1.40.0:1.40.0 +google-http-client:1.40.0:1.40.1-SNAPSHOT +google-http-client-bom:1.40.0:1.40.1-SNAPSHOT +google-http-client-parent:1.40.0:1.40.1-SNAPSHOT +google-http-client-android:1.40.0:1.40.1-SNAPSHOT +google-http-client-android-test:1.40.0:1.40.1-SNAPSHOT +google-http-client-apache-v2:1.40.0:1.40.1-SNAPSHOT +google-http-client-appengine:1.40.0:1.40.1-SNAPSHOT +google-http-client-assembly:1.40.0:1.40.1-SNAPSHOT +google-http-client-findbugs:1.40.0:1.40.1-SNAPSHOT +google-http-client-gson:1.40.0:1.40.1-SNAPSHOT +google-http-client-jackson2:1.40.0:1.40.1-SNAPSHOT +google-http-client-protobuf:1.40.0:1.40.1-SNAPSHOT +google-http-client-test:1.40.0:1.40.1-SNAPSHOT +google-http-client-xml:1.40.0:1.40.1-SNAPSHOT From f5b4a6240068ab286a65fe0d6e7aa08dbf28fc93 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 27 Aug 2021 17:02:31 +0200 Subject: [PATCH 527/983] chore(deps): update dependency com.google.cloud:libraries-bom to v22 (#1436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `21.0.0` -> `22.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/compatibility-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/22.0.0/confidence-slim/21.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 576dc62cc..cd45ed6d3 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 21.0.0 + 22.0.0 pom import From 7ebc6ca7807424b6372f1b52ac7b129752a9acf5 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 27 Aug 2021 14:35:15 -0400 Subject: [PATCH 528/983] chore(deps): libraries-bom 22.0.0 (#1438) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 9f624d319..a867beca0 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 21.0.0 + 22.0.0 pom import From 59fc8b03e5518864c60ce4dd47664e8935da343b Mon Sep 17 00:00:00 2001 From: dan1st Date: Wed, 1 Sep 2021 20:47:35 +0200 Subject: [PATCH 529/983] fix: add used packages to OSGI manifest again (#1439) (#1440) --- google-http-client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 3ec4a28b3..dd91f9594 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -109,7 +109,7 @@ - javax.annotation;resolution:=optional + javax.annotation;resolution:=optional,* From 8d2366d438a5588b77f46a43023a27774bc80aed Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 8 Sep 2021 23:14:28 +0200 Subject: [PATCH 530/983] chore(deps): update dependency com.google.cloud:libraries-bom to v23 (#1448) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `22.0.0` -> `23.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/compatibility-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.0.0/confidence-slim/22.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index cd45ed6d3..b21b12cc8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import From 5584a641ca120e7d0c90e41aff718af8351b9fe9 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 9 Sep 2021 12:46:09 -0700 Subject: [PATCH 531/983] chore: remove readme autosynth config (#1451) --- .github/readme/synth.py | 19 ------------ .kokoro/continuous/readme.cfg | 55 ----------------------------------- 2 files changed, 74 deletions(-) delete mode 100644 .github/readme/synth.py delete mode 100644 .kokoro/continuous/readme.cfg diff --git a/.github/readme/synth.py b/.github/readme/synth.py deleted file mode 100644 index 7b48cc28d..000000000 --- a/.github/readme/synth.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2020 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. - -"""This script is used to synthesize generated the README for this library.""" - -from synthtool.languages import java - -java.custom_templates(["java_library/README.md"]) diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg deleted file mode 100644 index 5056c884d..000000000 --- a/.kokoro/continuous/readme.cfg +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2020 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. - -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/readme.sh" -} - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.log" - } -} - -# The github token is stored here. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - # TODO(theacodes): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH - } - } -} - -# Common env vars for all repositories and builds. -env_vars: { - key: "GITHUB_USER" - value: "yoshi-automation" -} -env_vars: { - key: "GITHUB_EMAIL" - value: "yoshi-automation@google.com" -} From b8df1171176daef83adeb9231180aa9b7e2012ec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 13 Sep 2021 10:52:37 -0700 Subject: [PATCH 532/983] changes without context (#1452) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .github/readme/synth.py | 19 ++++++++++++ .kokoro/continuous/readme.cfg | 55 +++++++++++++++++++++++++++++++++++ synth.metadata | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .github/readme/synth.py create mode 100644 .kokoro/continuous/readme.cfg diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 000000000..7b48cc28d --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 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. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 000000000..5056c884d --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 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. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-http-java-client/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/synth.metadata b/synth.metadata index 70951b3ea..83d86d4e7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "933b0bd386f413bd960f81c706edae81d9dc030a" + "sha": "5584a641ca120e7d0c90e41aff718af8351b9fe9" } }, { From 0ce84676bfbe4cc8e237d5e33dfaa532b13e798c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Sep 2021 19:57:11 +0200 Subject: [PATCH 533/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.12.5 (#1437) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.12.4` -> `2.12.5` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.12.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.12.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.12.5/compatibility-slim/2.12.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.12.5/confidence-slim/2.12.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5ba8a7b5b..dc5e35724 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.8 - 2.12.4 + 2.12.5 3.17.3 30.1.1-android 1.1.4c From 86954f8ca8a1d68d585a8e6a26bd1e9cbe3e0ea9 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 16 Sep 2021 11:20:43 -0700 Subject: [PATCH 534/983] chore: update java docfx doclet (#1453) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dc5e35724..bdac91716 100644 --- a/pom.xml +++ b/pom.xml @@ -719,7 +719,7 @@ com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.1.1.jar + ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.0.jar -outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId} From cc63e41fac8295c7fea751191a6fe9537c1f70e3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Sep 2021 00:25:06 +0200 Subject: [PATCH 535/983] deps: update dependency com.google.protobuf:protobuf-java to v3.18.0 (#1454) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bdac91716..f8585be5c 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.8 2.12.5 - 3.17.3 + 3.18.0 30.1.1-android 1.1.4c 4.5.13 From f0c0488a961d40781eb44a006da101bf95dd22d9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 Sep 2021 12:31:09 -0700 Subject: [PATCH 536/983] chore: update common templates (#1449) * chore: remove java 7 units check Source-Author: Neenu Shaji Source-Date: Wed Jul 28 18:18:26 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 1a2878d6909dd10ca4e3c1b5943d6622e996054e Source-Link: https://github.com/googleapis/synthtool/commit/1a2878d6909dd10ca4e3c1b5943d6622e996054e * build(java): use ENABLE_FLAKYBOT env variable Kokoro job config now supports both environment variables during this migration period. Source-Author: Jeff Ching Source-Date: Thu Aug 12 10:10:27 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: ff01716e16d2c6e87eaf87197b753ac9fcbbed5d Source-Link: https://github.com/googleapis/synthtool/commit/ff01716e16d2c6e87eaf87197b753ac9fcbbed5d * chore: enable release-trigger bot Source-Author: Jeff Ching Source-Date: Tue Aug 24 15:30:40 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: 63cff634aabb85854caa511c5837ea6b45f42b4b Source-Link: https://github.com/googleapis/synthtool/commit/63cff634aabb85854caa511c5837ea6b45f42b4b * ci: removing linkage-monitor from the required checks Source-Author: Tomo Suzuki Source-Date: Wed Aug 25 13:18:10 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: e2aa5bcc3356d9e3b8b53de3b5c86226447d3a22 Source-Link: https://github.com/googleapis/synthtool/commit/e2aa5bcc3356d9e3b8b53de3b5c86226447d3a22 * build(java): update renovate config to mark conformance tests as a test commit type Source-Author: kolea2 <45548808+kolea2@users.noreply.github.com> Source-Date: Tue Aug 31 14:35:19 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 9a238a0623879c3de129a376c6085d4a862f6eb9 Source-Link: https://github.com/googleapis/synthtool/commit/9a238a0623879c3de129a376c6085d4a862f6eb9 * chore(java): install maven 3.8.1 at runtime * chore: pin github action runner at ubuntu-16.04 * chore: install maven 3.8.1 at runtime * chore: fix typo Source-Author: Neenu Shaji Source-Date: Thu Sep 2 15:46:06 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: ad7fd76e17bf9494a3e47ff9cf445f61564432e0 Source-Link: https://github.com/googleapis/synthtool/commit/ad7fd76e17bf9494a3e47ff9cf445f61564432e0 * chore(java): update windows build to install maven 3.8.1 at runtime too (related to #1202) Tested in [java-bigquerystorage](https://github.com/googleapis/java-bigquerystorage/pull/1291/commits/7834f4ff86858f6ed0b8068ea66dadf6365e399a) Source-Author: Stephanie Wang Source-Date: Tue Sep 7 13:04:27 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 17ee6e5c08f2eb47029beee4776ce990e56b3925 Source-Link: https://github.com/googleapis/synthtool/commit/17ee6e5c08f2eb47029beee4776ce990e56b3925 Co-authored-by: Neenu Shaji --- .github/release-trigger.yml | 1 + .github/workflows/ci.yaml | 30 ++++++++++++++++-------------- .kokoro/build.sh | 2 +- .kokoro/nightly/integration.cfg | 2 +- .kokoro/nightly/samples.cfg | 2 +- renovate.json | 3 ++- synth.metadata | 3 ++- 7 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 .github/release-trigger.yml diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 000000000..d4ca94189 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1 @@ +enabled: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0195b32f0..3becb5c02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,9 +9,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [7, 8, 11] + java: [8, 11] steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: ${{matrix.java}} @@ -23,6 +26,9 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 @@ -37,28 +43,21 @@ jobs: java: [8, 11] steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh - linkage-monitor: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - name: Install artifacts to local Maven repository - run: .kokoro/build.sh - shell: bash - - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 @@ -70,6 +69,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: stCarolas/setup-maven@v4 + with: + maven-version: 3.8.1 - uses: actions/setup-java@v1 with: java-version: 8 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 54b11ce71..0ab303fec 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -115,7 +115,7 @@ fi # fix output location of logs bash .kokoro/coerce_logs.sh -if [[ "${ENABLE_BUILD_COP}" == "true" ]] +if [[ "${ENABLE_FLAKYBOT}" == "true" ]] then chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-http-java-client diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index 0048c8ece..e51c7b4c6 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -22,7 +22,7 @@ env_vars: { } env_vars: { - key: "ENABLE_BUILD_COP" + key: "ENABLE_FLAKYBOT" value: "true" } diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index f25429314..9761fd864 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -33,6 +33,6 @@ env_vars: { } env_vars: { - key: "ENABLE_BUILD_COP" + key: "ENABLE_FLAKYBOT" value: "true" } diff --git a/renovate.json b/renovate.json index 87e183ebd..eeedeff5f 100644 --- a/renovate.json +++ b/renovate.json @@ -50,7 +50,8 @@ "^junit:junit", "^com.google.truth:truth", "^org.mockito:mockito-core", - "^org.objenesis:objenesis" + "^org.objenesis:objenesis", + "^com.google.cloud:google-cloud-conformance-tests" ], "semanticCommitType": "test", "semanticCommitScope": "deps" diff --git a/synth.metadata b/synth.metadata index 83d86d4e7..5ed11c548 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5d3c52f5db664eee9026db76b5bcb466f3a09ca9" + "sha": "17ee6e5c08f2eb47029beee4776ce990e56b3925" } } ], @@ -25,6 +25,7 @@ ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", + ".github/release-trigger.yml", ".github/snippet-bot.yml", ".github/sync-repo-settings.yaml", ".github/trusted-contribution.yml", From da6ae5aeb482075a7dc9cd50fbfafb124923d367 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 20 Sep 2021 15:38:12 -0400 Subject: [PATCH 537/983] chore: remove units(7) and linkage monitor from required checks (#1455) --- .github/sync-repo-settings.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index f5c2c2c4e..dd92a9594 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -8,13 +8,11 @@ branchProtectionRules: requiresCodeOwnerReviews: true requiresStrictStatusChecks: false requiredStatusCheckContexts: - - units (7) - units (8) - units (11) - windows - dependencies (8) - dependencies (11) - - linkage-monitor - lint - clirr - cla/google @@ -24,13 +22,11 @@ branchProtectionRules: requiresCodeOwnerReviews: true requiresStrictStatusChecks: false requiredStatusCheckContexts: - - units (7) - units (8) - units (11) - windows - dependencies (8) - dependencies (11) - - linkage-monitor - lint - clirr - cla/google From 09ebf8d7e3860f2b94a6fea0ef134c93904d4ed1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Sep 2021 22:01:20 +0200 Subject: [PATCH 538/983] deps: update project.appengine.version to v1.9.91 (#1287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.71` -> `1.9.91` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.91/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.91/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.91/compatibility-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.91/confidence-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.71` -> `1.9.91` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.91/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.91/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.91/compatibility-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.91/confidence-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.71` -> `1.9.91` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.91/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.91/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.91/compatibility-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.91/confidence-slim/1.9.71)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f8585be5c..87c302005 100644 --- a/pom.xml +++ b/pom.xml @@ -574,7 +574,7 @@ - Internally, update the default features.json file --> 1.40.1-SNAPSHOT - 1.9.71 + 1.9.91 UTF-8 3.0.2 2.8.8 From fc2f668e2a064d7bfc3f101bd038f99126bc9e82 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Sep 2021 14:02:39 -0700 Subject: [PATCH 539/983] chore: add gcf-owl-bot to list of trusted contributors (#1456) * chore(java): remove readme autosynth job config README generation is now handled by owlbot Source-Author: Jeff Ching Source-Date: Wed Sep 8 12:11:28 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: df5093b950d4aafd49a4c7758d74c44485263ada Source-Link: https://github.com/googleapis/synthtool/commit/df5093b950d4aafd49a4c7758d74c44485263ada * chore: remove readme synth.py config Source-Author: Jeff Ching Source-Date: Wed Sep 8 13:23:41 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: 2d31a9243781b282202b4f76dc7bbc8b45803196 Source-Link: https://github.com/googleapis/synthtool/commit/2d31a9243781b282202b4f76dc7bbc8b45803196 * chore: add gcf-owl-bot to list of trusted contributors Source-Author: Jeff Ching Source-Date: Wed Sep 8 13:42:12 2021 -0700 Source-Repo: googleapis/synthtool Source-Sha: a6b97202771f89a4b76873d43ea9a07d7fc95f91 Source-Link: https://github.com/googleapis/synthtool/commit/a6b97202771f89a4b76873d43ea9a07d7fc95f91 * chore(java): update shared-config and shared-dependencies version in pom template Source-Author: Neenu Shaji Source-Date: Wed Sep 8 17:28:48 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 396d9b84a1e93880f5bf88b59ecd38a0a6dffc5e Source-Link: https://github.com/googleapis/synthtool/commit/396d9b84a1e93880f5bf88b59ecd38a0a6dffc5e --- .github/readme/synth.py | 19 ---------- .github/trusted-contribution.yml | 3 +- .kokoro/continuous/readme.cfg | 55 ---------------------------- .kokoro/release/common.sh | 2 +- .kokoro/release/drop.sh | 2 +- .kokoro/release/promote.sh | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 2 +- .kokoro/trampoline.sh | 2 +- synth.metadata | 6 +-- 11 files changed, 11 insertions(+), 86 deletions(-) delete mode 100644 .github/readme/synth.py delete mode 100644 .kokoro/continuous/readme.cfg diff --git a/.github/readme/synth.py b/.github/readme/synth.py deleted file mode 100644 index 7b48cc28d..000000000 --- a/.github/readme/synth.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2020 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. - -"""This script is used to synthesize generated the README for this library.""" - -from synthtool.languages import java - -java.custom_templates(["java_library/README.md"]) diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml index f247d5c78..a0ba1f7d9 100644 --- a/.github/trusted-contribution.yml +++ b/.github/trusted-contribution.yml @@ -1,2 +1,3 @@ trustedContributors: -- renovate-bot \ No newline at end of file +- renovate-bot +- gcf-owl-bot[bot] diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg deleted file mode 100644 index 5056c884d..000000000 --- a/.kokoro/continuous/readme.cfg +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2020 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. - -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/readme.sh" -} - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.log" - } -} - -# The github token is stored here. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - # TODO(theacodes): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH - } - } -} - -# Common env vars for all repositories and builds. -env_vars: { - key: "GITHUB_USER" - value: "yoshi-automation" -} -env_vars: { - key: "GITHUB_EMAIL" - value: "yoshi-automation@google.com" -} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index 6e3f65999..7f78ee414 100755 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh index 5c4551efa..742ec1a88 100755 --- a/.kokoro/release/drop.sh +++ b/.kokoro/release/drop.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh index 1fa95fa53..3cac3d8a9 100755 --- a/.kokoro/release/promote.sh +++ b/.kokoro/release/promote.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index dcc867fa6..c131d1542 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google Inc. +# 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. diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index d89c03401..7c5f7f6f6 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2021 Google Inc. +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 8a1033843..77dc4e8f0 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index 9da0f8398..8b69b793c 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2018 Google Inc. +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/synth.metadata b/synth.metadata index 5ed11c548..14d9f971d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "5584a641ca120e7d0c90e41aff718af8351b9fe9" + "sha": "09ebf8d7e3860f2b94a6fea0ef134c93904d4ed1" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "17ee6e5c08f2eb47029beee4776ce990e56b3925" + "sha": "396d9b84a1e93880f5bf88b59ecd38a0a6dffc5e" } } ], @@ -23,7 +23,6 @@ ".github/PULL_REQUEST_TEMPLATE.md", ".github/blunderbuss.yml", ".github/generated-files-bot.yml", - ".github/readme/synth.py", ".github/release-please.yml", ".github/release-trigger.yml", ".github/snippet-bot.yml", @@ -39,7 +38,6 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", - ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", From c21e7458a2485326b64ef4e5081fa6719c8e5f41 Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Thu, 23 Sep 2021 10:21:46 -0400 Subject: [PATCH 540/983] Revert the order of stream closure and disconnect (#1427) --- .../apache/v2/ApacheHttpTransportTest.java | 34 ------------------- .../google/api/client/http/HttpResponse.java | 4 +-- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index f6800ff47..be6f983c6 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -321,38 +321,4 @@ public void handle(HttpExchange httpExchange) throws IOException { private boolean isWindows() { return System.getProperty("os.name").startsWith("Windows"); } - - @Test(timeout = 10_000L) - public void testDisconnectShouldNotWaitToReadResponse() throws IOException { - // This handler waits for 100s before returning writing content. The test should - // timeout if disconnect waits for the response before closing the connection. - final HttpHandler handler = - new HttpHandler() { - @Override - public void handle(HttpExchange httpExchange) throws IOException { - byte[] response = httpExchange.getRequestURI().toString().getBytes(); - httpExchange.sendResponseHeaders(200, response.length); - - // Sleep for longer than the test timeout - try { - Thread.sleep(100_000); - } catch (InterruptedException e) { - throw new IOException("interrupted", e); - } - try (OutputStream out = httpExchange.getResponseBody()) { - out.write(response); - } - } - }; - - try (FakeServer server = new FakeServer(handler)) { - HttpTransport transport = new ApacheHttpTransport(); - GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); - testUrl.setPort(server.getPort()); - com.google.api.client.http.HttpResponse response = - transport.createRequestFactory().buildGetRequest(testUrl).execute(); - // disconnect should not wait to read the entire content - response.disconnect(); - } - } } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index f7bf0b42c..e97943210 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -442,10 +442,8 @@ public void ignore() throws IOException { * @since 1.4 */ public void disconnect() throws IOException { - // Close the connection before trying to close the InputStream content. If you are trying to - // disconnect, we shouldn't need to read any further content. - response.disconnect(); ignore(); + response.disconnect(); } /** From 1212f0619b973bbad8d690fe1170ff677d8897ee Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 24 Sep 2021 11:45:00 -0700 Subject: [PATCH 541/983] chore(java): remove dependencyDashboardLabel config from renovate.json (#1459) Source-Author: Neenu Shaji Source-Date: Thu Sep 23 14:36:33 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 0752ff727a19a467dffed335d5e59303689cf0d1 Source-Link: https://github.com/googleapis/synthtool/commit/0752ff727a19a467dffed335d5e59303689cf0d1 --- renovate.json | 5 +---- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/renovate.json b/renovate.json index eeedeff5f..93a8a717a 100644 --- a/renovate.json +++ b/renovate.json @@ -70,8 +70,5 @@ } ], "semanticCommits": true, - "dependencyDashboard": true, - "dependencyDashboardLabels": [ - "type: process" - ] + "dependencyDashboard": true } diff --git a/synth.metadata b/synth.metadata index 14d9f971d..9f73dc50c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "09ebf8d7e3860f2b94a6fea0ef134c93904d4ed1" + "sha": "c21e7458a2485326b64ef4e5081fa6719c8e5f41" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "396d9b84a1e93880f5bf88b59ecd38a0a6dffc5e" + "sha": "0752ff727a19a467dffed335d5e59303689cf0d1" } } ], From 9f389ef89195af77eff8f1e1c1c9ee9bf9c7792c Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Mon, 27 Sep 2021 13:47:53 -0700 Subject: [PATCH 542/983] chore: update java-docfx-doclet version (#1457) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 87c302005..0cc1ebeab 100644 --- a/pom.xml +++ b/pom.xml @@ -719,7 +719,7 @@ com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.0.jar + ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.1.jar -outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId} From ab9dcae8b9b594da202f8825e3e2615fc0f78bbe Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Tue, 28 Sep 2021 14:14:18 -0400 Subject: [PATCH 543/983] chore: change branch master to main in sync-repo-settings.yaml (#1463) --- .github/sync-repo-settings.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index dd92a9594..a1781ed43 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -2,7 +2,7 @@ rebaseMergeAllowed: false squashMergeAllowed: true mergeCommitAllowed: false branchProtectionRules: - - pattern: master + - pattern: main isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true From f8b419bbaa198a625703937f66948e51d706fcc7 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 29 Sep 2021 10:30:16 -0400 Subject: [PATCH 544/983] chore: change branch master to main in github configurations (#1465) --- .github/blunderbuss.yml | 2 +- .github/workflows/ci.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 1a23ea42b..2176b0543 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3becb5c02..3932a70d4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: name: ci jobs: From 5cf89e5cc38fc66dc7a27139c5c3346dc4c95a0a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 16:12:36 +0200 Subject: [PATCH 545/983] chore(deps): update dependency com.google.cloud:libraries-bom to v23.1.0 (#1468) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `23.0.0` -> `23.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/compatibility-slim/23.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/23.1.0/confidence-slim/23.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index b21b12cc8..9d0257028 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 23.0.0 + 23.1.0 pom import From 7d9a042110b8879b592d7e80bd73e77c7a84d8b7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 16:14:17 +0200 Subject: [PATCH 546/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.0 (#1469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.12.5` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.0/compatibility-slim/2.12.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.0/confidence-slim/2.12.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0cc1ebeab..cd7a58158 100644 --- a/pom.xml +++ b/pom.xml @@ -578,7 +578,7 @@ UTF-8 3.0.2 2.8.8 - 2.12.5 + 2.13.0 3.18.0 30.1.1-android 1.1.4c From c36637acbca536992349970664026cf145ad8964 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Oct 2021 00:23:09 +0200 Subject: [PATCH 547/983] deps: update dependency com.google.protobuf:protobuf-java to v3.18.1 (#1470) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cd7a58158..7015186b4 100644 --- a/pom.xml +++ b/pom.xml @@ -579,7 +579,7 @@ 3.0.2 2.8.8 2.13.0 - 3.18.0 + 3.18.1 30.1.1-android 1.1.4c 4.5.13 From c95e44f00d2386ef6d0094993c119804718cf966 Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Wed, 6 Oct 2021 14:59:57 -0400 Subject: [PATCH 548/983] chore(deps): libraries-bom 23.0.0 (#1447) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index a867beca0..dc5e809ec 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 22.0.0 + 23.0.0 pom import From 135bd2555007cbfe0d0ca603ccc8dd22c336607d Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 7 Oct 2021 10:40:43 -0700 Subject: [PATCH 549/983] chore: update repo-metadata.json client_documentation link (#1476) * chore: updating doc link * chore: fix missing comma --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index db2d13700..8413b6807 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,7 +1,7 @@ { "name": "google-http-client", "name_pretty": "Google HTTP Java Client", - "client_documentation": "https://googleapis.dev/java/google-http-client/latest/", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-http-client/latest/history", "release_level": "ga", "language": "java", "repo": "googleapis/google-http-java-client", From 57ef11a0e1904bb932e5493a30f0a2ca2a2798cf Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Thu, 7 Oct 2021 15:02:49 -0400 Subject: [PATCH 550/983] fix: update NetHttpRequest to prevent silent retry of DELETE requests (#1472) HttpURLConnection will silently retry `DELETE` requests. This behavior is similar to other existing JDK bugs (JDK-6382788[1], JDK-6427251[2]). google-http-java-client already contains a workaround for POST and PUT requests NetHttpRequest.java#L108-L112, but does not account for `DELETE` with an empty body. This change adds handling for DELETE to leverage the same workaround as POST and PUT. [1] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382788 [2] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=6427251 Fixes #1471 --- .../client/http/javanet/NetHttpRequest.java | 3 +++ .../http/javanet/MockHttpURLConnection.java | 24 +++++++++++++++++++ .../http/javanet/NetHttpRequestTest.java | 13 ++++++++++ 3 files changed, 40 insertions(+) diff --git a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java index 1d043472b..fa201b06f 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpRequest.java @@ -141,6 +141,9 @@ LowLevelHttpResponse execute(final OutputWriter outputWriter) throws IOException Preconditions.checkArgument( contentLength == 0, "%s with non-zero content length is not supported", requestMethod); } + } else if ("DELETE".equals(connection.getRequestMethod())) { + connection.setDoOutput(true); + connection.setFixedLengthStreamingMode(0L); } // connect boolean successfulConnection = false; diff --git a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java index 2fba28b48..ba6f2f539 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java @@ -42,6 +42,10 @@ public class MockHttpURLConnection extends HttpURLConnection { /** Whether {@link #doOutput} was called. */ private boolean doOutputCalled; + /** Whether {@link #setFixedLengthStreamingMode(int)} was called. */ + private boolean setFixedLengthStreamingModeIntCalled = false; + /** Whether {@link #setFixedLengthStreamingMode(long)} was called. */ + private boolean setFixedLengthStreamingModeLongCalled = false; /** * Output stream or {@code null} to throw an {@link UnknownServiceException} when {@link @@ -205,4 +209,24 @@ public String getHeaderField(String name) { public int getChunkLength() { return chunkLength; } + + @Override + public void setFixedLengthStreamingMode(int contentLength) { + this.setFixedLengthStreamingModeIntCalled = true; + super.setFixedLengthStreamingMode(contentLength); + } + + @Override + public void setFixedLengthStreamingMode(long contentLength) { + this.setFixedLengthStreamingModeLongCalled = true; + super.setFixedLengthStreamingMode(contentLength); + } + + public boolean isSetFixedLengthStreamingModeIntCalled() { + return setFixedLengthStreamingModeIntCalled; + } + + public boolean isSetFixedLengthStreamingModeLongCalled() { + return setFixedLengthStreamingModeLongCalled; + } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java index ae3606ca5..754ae8fad 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java @@ -233,4 +233,17 @@ public void testChunkedLengthNotSet() throws Exception { assertEquals(connection.getChunkLength(), -1); assertEquals("6", request.getRequestProperty("Content-Length")); } + + // see https://github.com/googleapis/google-http-java-client/issues/1471 for more details + @Test + public void testDeleteSetsContentLengthToZeroWithoutContent() throws Exception { + MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); + connection.setRequestMethod("DELETE"); + NetHttpRequest request = new NetHttpRequest(connection); + request.execute(); + + assertTrue(connection.doOutputCalled()); + assertTrue(connection.isSetFixedLengthStreamingModeLongCalled()); + assertFalse(connection.isSetFixedLengthStreamingModeIntCalled()); + } } From 06f8845637d37bb9ca563e3b23e0b5b44414bdd6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Oct 2021 12:43:26 -0700 Subject: [PATCH 551/983] build: add jdk 17 to java units and dependency builds (#1461) * chore(java): rename master branch to main Source-Author: Neenu Shaji Source-Date: Mon Sep 27 10:04:11 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: 67ab4f9f4272ad13f4b809de47fd0dec05f425ad Source-Link: https://github.com/googleapis/synthtool/commit/67ab4f9f4272ad13f4b809de47fd0dec05f425ad * build: add jdk 17 to java units and dependency builds * update dependencies.sh to not pass MaxPermSize when jdk 17 is used. MaxPermSize is an unrecognized flag in jdk 17. Source-Author: BenWhitehead Source-Date: Mon Sep 27 11:34:46 2021 -0400 Source-Repo: googleapis/synthtool Source-Sha: a4be3384ccb92364795d981f2863f6986fcee620 Source-Link: https://github.com/googleapis/synthtool/commit/a4be3384ccb92364795d981f2863f6986fcee620 * Fix for Java 17 * Remove unused dependency * Fix for Java 17 * Fix format * Clean up Co-authored-by: Chanseok Oh --- .github/workflows/ci.yaml | 19 +++--- .kokoro/dependencies.sh | 23 +++++++- google-http-client-apache-v2/pom.xml | 5 -- .../apache/v2/ApacheHttpTransportTest.java | 43 ++++++++++---- google-http-client/pom.xml | 5 -- .../google/api/client/http/GZipEncoding.java | 2 + .../client/testing/json/MockJsonParser.java | 2 +- .../api/client/http/GZipEncodingTest.java | 18 +++++- .../HttpEncodingStreamingContentTest.java | 18 +++++- .../api/client/json/JsonObjectParserTest.java | 59 ++++++++++++------- pom.xml | 5 -- synth.metadata | 4 +- 12 files changed, 138 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3932a70d4..2425d7234 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -29,8 +30,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -40,14 +42,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -58,8 +61,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -72,8 +76,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9030ba8f9..9a5105d7e 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + case $javaVersion in + "17") + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + ;; + *) + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + ;; + esac +} + +export MAVEN_OPTS=$(determineMavenOpts) # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a2768ead2..97d307302 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -99,10 +99,5 @@ org.apache.httpcomponents httpcore - - org.mockito - mockito-all - test - diff --git a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java index be6f983c6..48a9d1c56 100644 --- a/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java +++ b/google-http-client-apache-v2/src/test/java/com/google/api/client/http/apache/v2/ApacheHttpTransportTest.java @@ -20,14 +20,13 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.junit.Assume.assumeFalse; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; +import static org.junit.Assume.assumeTrue; import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpResponseException; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.testing.http.apache.MockHttpClient; import com.google.api.client.util.ByteArrayStreamingContent; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; @@ -47,7 +46,9 @@ import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; +import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.ConnectTimeoutException; import org.apache.http.conn.HttpHostConnectException; @@ -65,6 +66,15 @@ */ public class ApacheHttpTransportTest { + private static class MockHttpResponse extends BasicHttpResponse implements CloseableHttpResponse { + public MockHttpResponse() { + super(HttpVersion.HTTP_1_1, 200, "OK"); + } + + @Override + public void close() throws IOException {} + } + @Test public void testApacheHttpTransport() { ApacheHttpTransport transport = new ApacheHttpTransport(); @@ -99,10 +109,14 @@ private void checkHttpClient(HttpClient client) { @Test public void testRequestsWithContent() throws IOException { - HttpClient mockClient = mock(HttpClient.class); - HttpResponse mockResponse = mock(HttpResponse.class); - when(mockClient.execute(any(HttpUriRequest.class))).thenReturn(mockResponse); - + HttpClient mockClient = + new MockHttpClient() { + @Override + public CloseableHttpResponse execute(HttpUriRequest request) + throws IOException, ClientProtocolException { + return new MockHttpResponse(); + } + }; ApacheHttpTransport transport = new ApacheHttpTransport(mockClient); // Test GET. @@ -204,6 +218,9 @@ public void process(HttpRequest request, HttpContext context) public void testConnectTimeout() { // Apache HttpClient doesn't appear to behave correctly on windows assumeFalse(isWindows()); + // TODO(chanseok): Java 17 returns an IOException (SocketException: Network is unreachable). + // Figure out a way to verify connection timeout works on Java 17+. + assumeTrue(System.getProperty("java.version").compareTo("17") < 0); HttpTransport httpTransport = new ApacheHttpTransport(); GenericUrl url = new GenericUrl("http://google.com:81"); @@ -213,7 +230,7 @@ public void testConnectTimeout() { } catch (HttpHostConnectException | ConnectTimeoutException expected) { // expected } catch (IOException e) { - fail("unexpected IOException: " + e.getClass().getName()); + fail("unexpected IOException: " + e.getClass().getName() + ": " + e.getMessage()); } } @@ -222,9 +239,9 @@ private static class FakeServer implements AutoCloseable { private final ExecutorService executorService; FakeServer(HttpHandler httpHandler) throws IOException { - this.server = HttpServer.create(new InetSocketAddress(0), 0); - this.executorService = Executors.newFixedThreadPool(1); - server.setExecutor(this.executorService); + server = HttpServer.create(new InetSocketAddress(0), 0); + executorService = Executors.newFixedThreadPool(1); + server.setExecutor(executorService); server.createContext("/", httpHandler); server.start(); } @@ -235,8 +252,8 @@ public int getPort() { @Override public void close() { - this.server.stop(0); - this.executorService.shutdownNow(); + server.stop(0); + executorService.shutdownNow(); } } diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index dd91f9594..8ef066b16 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -167,11 +167,6 @@ truth test - - org.mockito - mockito-all - test - io.opencensus opencensus-impl diff --git a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java index 28574a80d..c811b002c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java @@ -28,10 +28,12 @@ */ public class GZipEncoding implements HttpEncoding { + @Override public String getName() { return "gzip"; } + @Override public void encode(StreamingContent content, OutputStream out) throws IOException { // must not close the underlying output stream OutputStream out2 = diff --git a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java index 422ddd962..64b48bcee 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/json/MockJsonParser.java @@ -38,7 +38,7 @@ public class MockJsonParser extends JsonParser { private final JsonFactory factory; - MockJsonParser(JsonFactory factory) { + public MockJsonParser(JsonFactory factory) { this.factory = factory; } diff --git a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java index 5ecd0f8e9..4963b05bd 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java @@ -28,19 +28,33 @@ */ public class GZipEncodingTest extends TestCase { - byte[] EXPECED_ZIPPED = + private static final byte[] EXPECED_ZIPPED = + new byte[] { + 31, -117, 8, 0, 0, 0, 0, 0, 0, -1, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + + // TODO: remove when no longer using Java < 16: https://bugs.openjdk.java.net/browse/JDK-8244706 + @Deprecated + private static final byte[] EXPECED_ZIPPED_BELOW_JAVA_16 = new byte[] { 31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; public void test() throws IOException { + // TODO: remove when no longer using Java < 16. + byte[] expected = + System.getProperty("java.version").compareTo("16") >= 0 + ? EXPECED_ZIPPED + : EXPECED_ZIPPED_BELOW_JAVA_16; + GZipEncoding encoding = new GZipEncoding(); ByteArrayStreamingContent content = new ByteArrayStreamingContent(StringUtils.getBytesUtf8("oooooooooooooooooooooooooooo")); TestableByteArrayOutputStream out = new TestableByteArrayOutputStream(); encoding.encode(content, out); assertFalse(out.isClosed()); - Assert.assertArrayEquals(EXPECED_ZIPPED, out.getBuffer()); + Assert.assertArrayEquals(expected, out.getBuffer()); } } diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java index f353004a2..265814722 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java @@ -28,13 +28,27 @@ */ public class HttpEncodingStreamingContentTest extends TestCase { - byte[] EXPECED_ZIPPED = + private static final byte[] EXPECED_ZIPPED = + new byte[] { + 31, -117, 8, 0, 0, 0, 0, 0, 0, -1, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + }; + + // TODO: remove when no longer using Java < 16: https://bugs.openjdk.java.net/browse/JDK-8244706 + @Deprecated + private static final byte[] EXPECED_ZIPPED_BELOW_JAVA_16 = new byte[] { 31, -117, 8, 0, 0, 0, 0, 0, 0, 0, -53, -49, -57, 13, 0, -30, -66, -14, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; public void test() throws IOException { + // TODO: remove when no longer using Java < 16. + byte[] expected = + System.getProperty("java.version").compareTo("16") >= 0 + ? EXPECED_ZIPPED + : EXPECED_ZIPPED_BELOW_JAVA_16; + GZipEncoding encoding = new GZipEncoding(); ByteArrayStreamingContent content = new ByteArrayStreamingContent(StringUtils.getBytesUtf8("oooooooooooooooooooooooooooo")); @@ -43,6 +57,6 @@ public void test() throws IOException { new HttpEncodingStreamingContent(content, encoding); encodingContent.writeTo(out); assertFalse(out.isClosed()); - Assert.assertArrayEquals(EXPECED_ZIPPED, out.getBuffer()); + Assert.assertArrayEquals(expected, out.getBuffer()); } } diff --git a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java index 3192b62ba..d4f030a22 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java @@ -14,17 +14,18 @@ package com.google.api.client.json; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - +import com.google.api.client.testing.json.MockJsonFactory; +import com.google.api.client.testing.json.MockJsonParser; import com.google.common.base.Charsets; import java.io.ByteArrayInputStream; +import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.lang.reflect.Type; import java.nio.charset.Charset; import junit.framework.TestCase; +import org.junit.Test; /** * Tests for the {@link JsonObjectParser} class. @@ -34,6 +35,7 @@ */ public class JsonObjectParserTest extends TestCase { + @Test public void testConstructor_null() { try { new JsonObjectParser((JsonFactory) null); @@ -42,36 +44,49 @@ public void testConstructor_null() { } } + @Test public void testParse_InputStream() throws Exception { - InputStream in = new ByteArrayInputStream(new byte[256]); - Charset utf8 = Charsets.UTF_8; - Type type = Integer[].class; + InputStream in = new ByteArrayInputStream(new byte[0]); Integer[] parsed = new Integer[1]; - JsonParser mockJsonParser = mock(JsonParser.class); - when(mockJsonParser.parse(type, true)).thenReturn(parsed); - - JsonFactory mockJsonFactory = mock(JsonFactory.class); - when(mockJsonFactory.createJsonParser(in, utf8)).thenReturn(mockJsonParser); - // Test the JsonObjectParser - JsonObjectParser jop = new JsonObjectParser(mockJsonFactory); - assertEquals(parsed, jop.parseAndClose(in, utf8, type)); + JsonObjectParser jop = new JsonObjectParser(setUpMockJsonFactory(Integer[].class, parsed)); + assertEquals(parsed, jop.parseAndClose(in, Charsets.UTF_8, Integer[].class)); } + @Test public void testParse_Reader() throws Exception { Reader in = new StringReader("something"); - Type type = Integer[].class; Integer[] parsed = new Integer[1]; - JsonParser mockJsonParser = mock(JsonParser.class); - when(mockJsonParser.parse(type, true)).thenReturn(parsed); + // Test the JsonObjectParser + JsonObjectParser jop = new JsonObjectParser(setUpMockJsonFactory(Integer[].class, parsed)); + assertEquals(parsed, jop.parseAndClose(in, Integer[].class)); + } - JsonFactory mockJsonFactory = mock(JsonFactory.class); - when(mockJsonFactory.createJsonParser(in)).thenReturn(mockJsonParser); + // Mockito.mock() on JsonFactory and JsonParser fails with Java 17, so set them up manually. + private static final JsonFactory setUpMockJsonFactory( + final Class clazz, final T parsedResult) { + final MockJsonParser jsonParser = + new MockJsonParser(null) { + @Override + public Object parse(Type dataType, boolean close) throws IOException { + assertEquals(clazz, dataType); + return parsedResult; + } + }; - // Test the JsonObjectParser - JsonObjectParser jop = new JsonObjectParser(mockJsonFactory); - assertEquals(parsed, jop.parseAndClose(in, type)); + return new MockJsonFactory() { + @Override + public JsonParser createJsonParser(Reader in) throws IOException { + return jsonParser; + } + + @Override + public JsonParser createJsonParser(InputStream in, Charset charset) throws IOException { + assertEquals(Charsets.UTF_8, charset); + return jsonParser; + } + }; } } diff --git a/pom.xml b/pom.xml index 7015186b4..6fc5609c3 100644 --- a/pom.xml +++ b/pom.xml @@ -227,11 +227,6 @@ google-http-client-test ${project.http-client.version} - - org.mockito - mockito-all - 1.10.19 - com.google.j2objc j2objc-annotations diff --git a/synth.metadata b/synth.metadata index 9f73dc50c..53b033004 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "c21e7458a2485326b64ef4e5081fa6719c8e5f41" + "sha": "9f389ef89195af77eff8f1e1c1c9ee9bf9c7792c" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0752ff727a19a467dffed335d5e59303689cf0d1" + "sha": "a4be3384ccb92364795d981f2863f6986fcee620" } } ], From 82b1bf32f3c898218fb42cbd0279149763e24712 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Oct 2021 21:56:49 +0200 Subject: [PATCH 552/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.3.1 (#1446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) | `3.2.0` -> `3.3.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.1/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.1/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 30df349bf..12ea1915c 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.1 true diff --git a/pom.xml b/pom.xml index 6fc5609c3..33eaec2dd 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.1 attach-javadocs @@ -700,7 +700,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.3.1 docFX From a95cd9717fc8accd80252b12357971cb71887d90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Oct 2021 22:24:31 +0200 Subject: [PATCH 553/983] deps: update dependency com.puppycrawl.tools:checkstyle to v9 (#1441) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.puppycrawl.tools:checkstyle](https://checkstyle.org/) ([source](https://github.com/checkstyle/checkstyle)) | `8.23` -> `9.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.0.1/compatibility-slim/8.23)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.0.1/confidence-slim/8.23)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- checkstyle.xml | 14 +++++++------- pom.xml | 2 +- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index d7917523a..37934c4a6 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -32,6 +32,11 @@ + + + + + @@ -46,10 +51,6 @@ - - - - @@ -239,12 +240,11 @@ value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> - + - - + diff --git a/pom.xml b/pom.xml index 33eaec2dd..7db368c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -667,7 +667,7 @@ com.puppycrawl.tools checkstyle - 8.23 + 9.0.1 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 969cb37c7..02bc39a44 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 8.23 + 9.0.1 From 99d61c73b3cbd42b28c6fad0aaa5eb4c1ae5fcca Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 7 Oct 2021 17:09:22 -0400 Subject: [PATCH 554/983] chore(deps): libraries-bom 23.1.0 (#1467) Co-authored-by: Neenu Shaji --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index dc5e809ec..3e57c0741 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 23.0.0 + 23.1.0 pom import From 0b533c9d1f251ce11e57f2e05bfcde545c5772fa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Oct 2021 21:12:25 +0000 Subject: [PATCH 555/983] chore: release 1.40.1 (#1462) :robot: I have created a release \*beep\* \*boop\* --- ### [1.40.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.0...v1.40.1) (2021-10-07) ### Bug Fixes * add used packages to OSGI manifest again ([#1439](https://www.github.com/googleapis/google-http-java-client/issues/1439)) ([#1440](https://www.github.com/googleapis/google-http-java-client/issues/1440)) ([59fc8b0](https://www.github.com/googleapis/google-http-java-client/commit/59fc8b03e5518864c60ce4dd47664e8935da343b)) * update NetHttpRequest to prevent silent retry of DELETE requests ([#1472](https://www.github.com/googleapis/google-http-java-client/issues/1472)) ([57ef11a](https://www.github.com/googleapis/google-http-java-client/commit/57ef11a0e1904bb932e5493a30f0a2ca2a2798cf)), closes [#1471](https://www.github.com/googleapis/google-http-java-client/issues/1471) ### Dependencies * update dependency com.fasterxml.jackson.core:jackson-core to v2.12.5 ([#1437](https://www.github.com/googleapis/google-http-java-client/issues/1437)) ([0ce8467](https://www.github.com/googleapis/google-http-java-client/commit/0ce84676bfbe4cc8e237d5e33dfaa532b13e798c)) * update dependency com.fasterxml.jackson.core:jackson-core to v2.13.0 ([#1469](https://www.github.com/googleapis/google-http-java-client/issues/1469)) ([7d9a042](https://www.github.com/googleapis/google-http-java-client/commit/7d9a042110b8879b592d7e80bd73e77c7a84d8b7)) * update dependency com.google.protobuf:protobuf-java to v3.18.0 ([#1454](https://www.github.com/googleapis/google-http-java-client/issues/1454)) ([cc63e41](https://www.github.com/googleapis/google-http-java-client/commit/cc63e41fac8295c7fea751191a6fe9537c1f70e3)) * update dependency com.google.protobuf:protobuf-java to v3.18.1 ([#1470](https://www.github.com/googleapis/google-http-java-client/issues/1470)) ([c36637a](https://www.github.com/googleapis/google-http-java-client/commit/c36637acbca536992349970664026cf145ad8964)) * update dependency com.puppycrawl.tools:checkstyle to v9 ([#1441](https://www.github.com/googleapis/google-http-java-client/issues/1441)) ([a95cd97](https://www.github.com/googleapis/google-http-java-client/commit/a95cd9717fc8accd80252b12357971cb71887d90)) * update project.appengine.version to v1.9.91 ([#1287](https://www.github.com/googleapis/google-http-java-client/issues/1287)) ([09ebf8d](https://www.github.com/googleapis/google-http-java-client/commit/09ebf8d7e3860f2b94a6fea0ef134c93904d4ed1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 18 ++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 71 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9af4966a..9c3c2da18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +### [1.40.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.0...v1.40.1) (2021-10-07) + + +### Bug Fixes + +* add used packages to OSGI manifest again ([#1439](https://www.github.com/googleapis/google-http-java-client/issues/1439)) ([#1440](https://www.github.com/googleapis/google-http-java-client/issues/1440)) ([59fc8b0](https://www.github.com/googleapis/google-http-java-client/commit/59fc8b03e5518864c60ce4dd47664e8935da343b)) +* update NetHttpRequest to prevent silent retry of DELETE requests ([#1472](https://www.github.com/googleapis/google-http-java-client/issues/1472)) ([57ef11a](https://www.github.com/googleapis/google-http-java-client/commit/57ef11a0e1904bb932e5493a30f0a2ca2a2798cf)), closes [#1471](https://www.github.com/googleapis/google-http-java-client/issues/1471) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.12.5 ([#1437](https://www.github.com/googleapis/google-http-java-client/issues/1437)) ([0ce8467](https://www.github.com/googleapis/google-http-java-client/commit/0ce84676bfbe4cc8e237d5e33dfaa532b13e798c)) +* update dependency com.fasterxml.jackson.core:jackson-core to v2.13.0 ([#1469](https://www.github.com/googleapis/google-http-java-client/issues/1469)) ([7d9a042](https://www.github.com/googleapis/google-http-java-client/commit/7d9a042110b8879b592d7e80bd73e77c7a84d8b7)) +* update dependency com.google.protobuf:protobuf-java to v3.18.0 ([#1454](https://www.github.com/googleapis/google-http-java-client/issues/1454)) ([cc63e41](https://www.github.com/googleapis/google-http-java-client/commit/cc63e41fac8295c7fea751191a6fe9537c1f70e3)) +* update dependency com.google.protobuf:protobuf-java to v3.18.1 ([#1470](https://www.github.com/googleapis/google-http-java-client/issues/1470)) ([c36637a](https://www.github.com/googleapis/google-http-java-client/commit/c36637acbca536992349970664026cf145ad8964)) +* update dependency com.puppycrawl.tools:checkstyle to v9 ([#1441](https://www.github.com/googleapis/google-http-java-client/issues/1441)) ([a95cd97](https://www.github.com/googleapis/google-http-java-client/commit/a95cd9717fc8accd80252b12357971cb71887d90)) +* update project.appengine.version to v1.9.91 ([#1287](https://www.github.com/googleapis/google-http-java-client/issues/1287)) ([09ebf8d](https://www.github.com/googleapis/google-http-java-client/commit/09ebf8d7e3860f2b94a6fea0ef134c93904d4ed1)) + ## [1.40.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.39.2...v1.40.0) (2021-08-20) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index cbdc8673b..189057394 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.1-SNAPSHOT + 1.40.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.1-SNAPSHOT + 1.40.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.1-SNAPSHOT + 1.40.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c8f9978dc..383e11642 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-android - 1.40.1-SNAPSHOT + 1.40.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 97d307302..f65cef781 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-apache-v2 - 1.40.1-SNAPSHOT + 1.40.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index cc6feee4b..1ceaf996a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-appengine - 1.40.1-SNAPSHOT + 1.40.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 29587862d..0c6c62104 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.40.1-SNAPSHOT + 1.40.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 12ea1915c..01519dbc1 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.1-SNAPSHOT + 1.40.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-android - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-apache-v2 - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-appengine - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-findbugs - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-gson - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-jackson2 - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-protobuf - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-test - 1.40.1-SNAPSHOT + 1.40.1 com.google.http-client google-http-client-xml - 1.40.1-SNAPSHOT + 1.40.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6c2fe5b7f..f9d9b03f4 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-findbugs - 1.40.1-SNAPSHOT + 1.40.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d27e7254a..ad768a4d0 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-gson - 1.40.1-SNAPSHOT + 1.40.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2eeeb0361..1d9ef4286 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-jackson2 - 1.40.1-SNAPSHOT + 1.40.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fda09d2c2..5f6cd1b84 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-protobuf - 1.40.1-SNAPSHOT + 1.40.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ab4460210..5bd3dc575 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-test - 1.40.1-SNAPSHOT + 1.40.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 551066df3..2e533db6f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client-xml - 1.40.1-SNAPSHOT + 1.40.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 8ef066b16..5c5314c17 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../pom.xml google-http-client - 1.40.1-SNAPSHOT + 1.40.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 7db368c1d..c66450055 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.1-SNAPSHOT + 1.40.1 1.9.91 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 02bc39a44..259925535 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.1-SNAPSHOT + 1.40.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ed3410fcf..106d4e30f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.0:1.40.1-SNAPSHOT -google-http-client-bom:1.40.0:1.40.1-SNAPSHOT -google-http-client-parent:1.40.0:1.40.1-SNAPSHOT -google-http-client-android:1.40.0:1.40.1-SNAPSHOT -google-http-client-android-test:1.40.0:1.40.1-SNAPSHOT -google-http-client-apache-v2:1.40.0:1.40.1-SNAPSHOT -google-http-client-appengine:1.40.0:1.40.1-SNAPSHOT -google-http-client-assembly:1.40.0:1.40.1-SNAPSHOT -google-http-client-findbugs:1.40.0:1.40.1-SNAPSHOT -google-http-client-gson:1.40.0:1.40.1-SNAPSHOT -google-http-client-jackson2:1.40.0:1.40.1-SNAPSHOT -google-http-client-protobuf:1.40.0:1.40.1-SNAPSHOT -google-http-client-test:1.40.0:1.40.1-SNAPSHOT -google-http-client-xml:1.40.0:1.40.1-SNAPSHOT +google-http-client:1.40.1:1.40.1 +google-http-client-bom:1.40.1:1.40.1 +google-http-client-parent:1.40.1:1.40.1 +google-http-client-android:1.40.1:1.40.1 +google-http-client-android-test:1.40.1:1.40.1 +google-http-client-apache-v2:1.40.1:1.40.1 +google-http-client-appengine:1.40.1:1.40.1 +google-http-client-assembly:1.40.1:1.40.1 +google-http-client-findbugs:1.40.1:1.40.1 +google-http-client-gson:1.40.1:1.40.1 +google-http-client-jackson2:1.40.1:1.40.1 +google-http-client-protobuf:1.40.1:1.40.1 +google-http-client-test:1.40.1:1.40.1 +google-http-client-xml:1.40.1:1.40.1 From 08180a7650c75231c00e6a6282dbd1bb7668c5d4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 7 Oct 2021 21:16:24 +0000 Subject: [PATCH 556/983] chore: release 1.40.2-SNAPSHOT (#1477) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 189057394..f9b2e3896 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.1 + 1.40.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.1 + 1.40.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.1 + 1.40.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 383e11642..dfa33aa74 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-android - 1.40.1 + 1.40.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index f65cef781..665c42aa2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.40.1 + 1.40.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1ceaf996a..e43b5528a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.40.1 + 1.40.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 0c6c62104..fe09e59f4 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.40.1 + 1.40.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 01519dbc1..3c22fee5b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.1 + 1.40.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-android - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-test - 1.40.1 + 1.40.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.40.1 + 1.40.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index f9d9b03f4..d64698aa4 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.40.1 + 1.40.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index ad768a4d0..ec2fcae68 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.40.1 + 1.40.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 1d9ef4286..adfee37c9 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.40.1 + 1.40.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5f6cd1b84..5428450cf 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.40.1 + 1.40.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 5bd3dc575..f93185c28 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-test - 1.40.1 + 1.40.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2e533db6f..a9ba1e312 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.40.1 + 1.40.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5c5314c17..1c15a597d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../pom.xml google-http-client - 1.40.1 + 1.40.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c66450055..6eaabafac 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.1 + 1.40.2-SNAPSHOT 1.9.91 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 259925535..79c34b57e 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.1 + 1.40.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 106d4e30f..1f2460758 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.1:1.40.1 -google-http-client-bom:1.40.1:1.40.1 -google-http-client-parent:1.40.1:1.40.1 -google-http-client-android:1.40.1:1.40.1 -google-http-client-android-test:1.40.1:1.40.1 -google-http-client-apache-v2:1.40.1:1.40.1 -google-http-client-appengine:1.40.1:1.40.1 -google-http-client-assembly:1.40.1:1.40.1 -google-http-client-findbugs:1.40.1:1.40.1 -google-http-client-gson:1.40.1:1.40.1 -google-http-client-jackson2:1.40.1:1.40.1 -google-http-client-protobuf:1.40.1:1.40.1 -google-http-client-test:1.40.1:1.40.1 -google-http-client-xml:1.40.1:1.40.1 +google-http-client:1.40.1:1.40.2-SNAPSHOT +google-http-client-bom:1.40.1:1.40.2-SNAPSHOT +google-http-client-parent:1.40.1:1.40.2-SNAPSHOT +google-http-client-android:1.40.1:1.40.2-SNAPSHOT +google-http-client-android-test:1.40.1:1.40.2-SNAPSHOT +google-http-client-apache-v2:1.40.1:1.40.2-SNAPSHOT +google-http-client-appengine:1.40.1:1.40.2-SNAPSHOT +google-http-client-assembly:1.40.1:1.40.2-SNAPSHOT +google-http-client-findbugs:1.40.1:1.40.2-SNAPSHOT +google-http-client-gson:1.40.1:1.40.2-SNAPSHOT +google-http-client-jackson2:1.40.1:1.40.2-SNAPSHOT +google-http-client-protobuf:1.40.1:1.40.2-SNAPSHOT +google-http-client-test:1.40.1:1.40.2-SNAPSHOT +google-http-client-xml:1.40.1:1.40.2-SNAPSHOT From f8e62ec779c36024d4c5c552db38faefea20aa33 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 7 Oct 2021 14:40:46 -0700 Subject: [PATCH 557/983] chore: migrate to owlbot (#1458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: migrate to owlbot * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Neenu1995 --- .github/.OwlBot.lock.yaml | 3 ++ synth.py => .github/.OwlBot.yaml | 14 ++---- .github/blunderbuss.yml | 2 +- .github/workflows/ci.yaml | 21 +++----- .kokoro/dependencies.sh | 23 +-------- .../android/json/AndroidJsonFactoryTest.java | 29 ++++++++--- .../extensions/android/json/FakeTest.java | 3 +- .../extensions/android/json/package-info.java | 2 - .../api/client/findbugs/test/BetaClass.java | 6 +-- .../findbugs/test/ClassWithBetaField.java | 6 +-- .../findbugs/test/ClassWithBetaMethod.java | 3 +- owlbot.py | 32 ++++++++++++ renovate.json | 5 +- .../java/com/example/json/YouTubeSample.java | 49 ++++++------------- .../com/example/json/YouTubeSampleTest.java | 13 ++--- 15 files changed, 102 insertions(+), 109 deletions(-) create mode 100644 .github/.OwlBot.lock.yaml rename synth.py => .github/.OwlBot.yaml (64%) create mode 100644 owlbot.py diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 000000000..ec24ba682 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:db1616f2f70823d8381d859835229e04371d14f59ac78063c5af73c55c3fffbb + image: gcr.io/repo-automation-bots/owlbot-java:latest diff --git a/synth.py b/.github/.OwlBot.yaml similarity index 64% rename from synth.py rename to .github/.OwlBot.yaml index cb1a283f1..8c5f03b4d 100644 --- a/synth.py +++ b/.github/.OwlBot.yaml @@ -1,4 +1,4 @@ -# Copyright 2019 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,14 +11,6 @@ # 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. -"""This script is used to synthesize generated parts of this library.""" -import synthtool.languages.java as java - -java.common_templates(excludes=[ - "README.md", - "java.header", - "checkstyle.xml", - "license-checks.xml", - ".github/workflows/samples.yaml", -]) +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 2176b0543..1a23ea42b 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d7234..3becb5c02 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - main + - master pull_request: name: ci jobs: @@ -9,15 +9,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11, 17] + java: [8, 11] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v1 with: - distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -30,9 +29,8 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v1 with: - distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -42,15 +40,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11, 17] + java: [8, 11] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v1 with: - distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -61,9 +58,8 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v1 with: - distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -76,9 +72,8 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v1 with: - distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7e..9030ba8f9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,28 +28,7 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -function determineMavenOpts() { - local javaVersion=$( - # filter down to the version line, then pull out the version between quotes, - # then trim the version number down to its minimal number (removing any - # update or suffix number). - java -version 2>&1 | grep "version" \ - | sed -E 's/^.*"(.*?)".*$/\1/g' \ - | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' - ) - - case $javaVersion in - "17") - # MaxPermSize is no longer supported as of jdk 17 - echo -n "-Xmx1024m" - ;; - *) - echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac -} - -export MAVEN_OPTS=$(determineMavenOpts) +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java index 9357ffdd0..0665acc2a 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/AndroidJsonFactoryTest.java @@ -15,7 +15,6 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.test.json.AbstractJsonFactoryTest; - import java.util.ArrayList; /** @@ -24,16 +23,31 @@ * @author Yaniv Inbar */ public class AndroidJsonFactoryTest extends AbstractJsonFactoryTest { - + private static final String GSON_LINE_SEPARATOR = "\n"; private static final String JSON_ENTRY_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" + GSON_LINE_SEPARATOR + "}"; - private static final String JSON_FEED_PRETTY = "{" + GSON_LINE_SEPARATOR + " \"entries\": [" - + GSON_LINE_SEPARATOR + " {" + GSON_LINE_SEPARATOR + " \"title\": \"foo\"" - + GSON_LINE_SEPARATOR + " }," + GSON_LINE_SEPARATOR + " {" - + GSON_LINE_SEPARATOR + " \"title\": \"bar\"" + GSON_LINE_SEPARATOR + " }" - + GSON_LINE_SEPARATOR + " ]" + GSON_LINE_SEPARATOR + "}"; + private static final String JSON_FEED_PRETTY = + "{" + + GSON_LINE_SEPARATOR + + " \"entries\": [" + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"foo\"" + + GSON_LINE_SEPARATOR + + " }," + + GSON_LINE_SEPARATOR + + " {" + + GSON_LINE_SEPARATOR + + " \"title\": \"bar\"" + + GSON_LINE_SEPARATOR + + " }" + + GSON_LINE_SEPARATOR + + " ]" + + GSON_LINE_SEPARATOR + + "}"; public AndroidJsonFactoryTest(String name) { super(name); @@ -61,5 +75,4 @@ public final void testToPrettyString_Feed() throws Exception { feed.entries.add(entryBar); assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); } - } diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java index 755613857..e917e114b 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/FakeTest.java @@ -26,6 +26,5 @@ public FakeTest(String name) { super(name); } - public final void test() throws Exception { - } + public final void test() throws Exception {} } diff --git a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java index 8fdf668d9..7ecefd770 100644 --- a/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java +++ b/google-http-client-android-test/src/main/java/com/google/api/client/extensions/android/json/package-info.java @@ -17,6 +17,4 @@ * * @author Yaniv Inbar */ - package com.google.api.client.extensions.android.json; - diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java index bd2ddb50e..13ed288cc 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/BetaClass.java @@ -20,8 +20,7 @@ @Beta public class BetaClass { - public void method() { - } + public void method() {} @Beta public void betaMethod() { @@ -36,8 +35,7 @@ public BetaClass() { int field; - @Beta - int betaField; + @Beta int betaField; @Override public String toString() { diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java index ea1c5315c..4ceb1cb17 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaField.java @@ -19,12 +19,10 @@ /** A class which contains {@link Beta} fields. */ public class ClassWithBetaField { - @Beta - public int betaField; + @Beta public int betaField; public int field; - @Beta - public static final int betaStaticField = 10; + @Beta public static final int betaStaticField = 10; public static final int staticField = 20; public ClassWithBetaField() { diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java index 85082217b..3c80ee4be 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java +++ b/google-http-client-findbugs/google-http-client-findbugs-test/src/main/java/com/google/api/client/findbugs/test/ClassWithBetaMethod.java @@ -19,8 +19,7 @@ /** A class which contains {@link Beta} methods. */ public class ClassWithBetaMethod { - @Beta - int betaField = 10; + @Beta int betaField = 10; @Beta public void betaMethod() { diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 000000000..8a64e3837 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,32 @@ +# Copyright 2021 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 +# +# https://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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + excludes=[ + "README.md", + "java.header", + "checkstyle.xml", + "license-checks.xml", + ".github/workflows/samples.yaml", + ] +) diff --git a/renovate.json b/renovate.json index 93a8a717a..eeedeff5f 100644 --- a/renovate.json +++ b/renovate.json @@ -70,5 +70,8 @@ } ], "semanticCommits": true, - "dependencyDashboard": true + "dependencyDashboard": true, + "dependencyDashboardLabels": [ + "type: process" + ] } 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 aad2b8a99..56107f943 100644 --- a/samples/snippets/src/main/java/com/example/json/YouTubeSample.java +++ b/samples/snippets/src/main/java/com/example/json/YouTubeSample.java @@ -18,7 +18,6 @@ import com.google.api.client.http.HttpResponse; import com.google.api.client.util.Key; - import java.io.IOException; import java.util.List; import java.util.Map; @@ -28,8 +27,7 @@ public static class ListResponse { @Key("items") private List searchResults; - @Key - private PageInfo pageInfo; + @Key private PageInfo pageInfo; public List getSearchResults() { return searchResults; @@ -41,11 +39,9 @@ public PageInfo getPageInfo() { } public static class PageInfo { - @Key - private long totalResults; + @Key private long totalResults; - @Key - private long resultsPerPage; + @Key private long resultsPerPage; public long getTotalResults() { return totalResults; @@ -57,14 +53,12 @@ public long getResultsPerPage() { } public static class SearchResult { - @Key - private String kind; + @Key private String kind; @Key("id") private VideoId videoId; - @Key - private Snippet snippet; + @Key private Snippet snippet; public String getKind() { return kind; @@ -80,11 +74,9 @@ public Snippet getSnippet() { } public static class VideoId { - @Key - private String kind; + @Key private String kind; - @Key - private String videoId; + @Key private String videoId; public String getKind() { return kind; @@ -96,20 +88,15 @@ public String getVideoId() { } public static class Snippet { - @Key - private String publishedAt; + @Key private String publishedAt; - @Key - private String channelId; + @Key private String channelId; - @Key - private String title; + @Key private String title; - @Key - private String description; + @Key private String description; - @Key - private Map thumbnails; + @Key private Map thumbnails; public String getPublishedAt() { return publishedAt; @@ -133,14 +120,11 @@ public Map getThumbnails() { } public static class Thumbnail { - @Key - private String url; + @Key private String url; - @Key - private long width; + @Key private long width; - @Key - private long height; + @Key private long height; public String getUrl() { return url; @@ -171,5 +155,4 @@ public static ListResponse parseJson(HttpResponse httpResponse) throws IOExcepti } return listResponse; } - -} \ No newline at end of file +} 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 8454437f5..92ed5ab3a 100644 --- a/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java +++ b/samples/snippets/src/test/java/com/example/json/YouTubeSampleTest.java @@ -19,10 +19,6 @@ 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; @@ -36,12 +32,17 @@ import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; import com.google.common.base.Preconditions; +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import org.junit.Test; public class YouTubeSampleTest { @Test public void testParsing() throws IOException { - final InputStream contents = getClass().getClassLoader().getResourceAsStream("youtube-search.json"); + final InputStream contents = + getClass().getClassLoader().getResourceAsStream("youtube-search.json"); Preconditions.checkNotNull(contents); HttpTransport transport = new MockHttpTransport() { @@ -91,4 +92,4 @@ public LowLevelHttpResponse execute() throws IOException { } } } -} \ No newline at end of file +} From 3ad4831da00579f534ff7eb7de3a0386068902ba Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 7 Oct 2021 17:48:15 -0400 Subject: [PATCH 558/983] feat: next release from main branch is 1.41.0 (#1478) enable releases --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index cf39204dd..202596e5c 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -6,3 +6,7 @@ branches: handleGHRelease: true releaseType: java-lts branch: 1.39.2-sp + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.40.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a1781ed43..3c0c8aa6c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -30,6 +30,20 @@ branchProtectionRules: - lint - clirr - cla/google + - pattern: 1.40.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - lint + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From af0d34fb9e158e2b9a3ab8a946de8fefeac93385 Mon Sep 17 00:00:00 2001 From: Kevin Binswanger Date: Fri, 8 Oct 2021 15:04:43 -0500 Subject: [PATCH 559/983] chore: fix various non-functional checkstyle warnings (#865) * Fix various non-functional checkstyle warnings * Update google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java * Update google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java Co-authored-by: Chanseok Oh --- .../src/main/java/com/google/api/client/http/GZipEncoding.java | 1 + .../api/client/testing/util/TestableByteArrayInputStream.java | 2 +- .../src/main/java/com/google/api/client/util/ArrayValueMap.java | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java index c811b002c..fce2289da 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java +++ b/google-http-client/src/main/java/com/google/api/client/http/GZipEncoding.java @@ -45,6 +45,7 @@ public void close() throws IOException { try { flush(); } catch (IOException ignored) { + // fall through } } }; diff --git a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java index 270925a8f..3513579b5 100644 --- a/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java +++ b/google-http-client/src/main/java/com/google/api/client/testing/util/TestableByteArrayInputStream.java @@ -41,7 +41,7 @@ public TestableByteArrayInputStream(byte[] buf) { * @param offset offset in the buffer of the first byte to read * @param length maximum number of bytes to read from the buffer */ - public TestableByteArrayInputStream(byte buf[], int offset, int length) { + public TestableByteArrayInputStream(byte[] buf, int offset, int length) { super(buf); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java index 07119ab96..41d5ca717 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java +++ b/google-http-client/src/main/java/com/google/api/client/util/ArrayValueMap.java @@ -11,6 +11,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ + package com.google.api.client.util; import java.lang.reflect.Field; From 7f0fe4d08cab9fee2ab2e4d4ec6519623fada9c1 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 14 Oct 2021 08:35:30 -0700 Subject: [PATCH 560/983] chore: update doclet version (#1482) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6eaabafac..6d403e025 100644 --- a/pom.xml +++ b/pom.xml @@ -714,7 +714,7 @@ com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.2.1.jar + ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.3.0.jar -outputpath ${project.build.directory}/docfx-yml -projectname ${artifactId} From 1f2bd430905765ca930b10dc98cd02ab5c72ac4d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 16:52:10 +0000 Subject: [PATCH 561/983] build(java): Introduce Native Image testing build script changes (#1485) --- .github/.OwlBot.lock.yaml | 2 +- .github/blunderbuss.yml | 2 +- .github/workflows/ci.yaml | 21 +++++++++++------- .kokoro/build.sh | 5 +++++ .kokoro/dependencies.sh | 23 ++++++++++++++++++- .kokoro/presubmit/graalvm-native.cfg | 33 ++++++++++++++++++++++++++++ renovate.json | 5 +---- 7 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 .kokoro/presubmit/graalvm-native.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ec24ba682..a600ac229 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - digest: sha256:db1616f2f70823d8381d859835229e04371d14f59ac78063c5af73c55c3fffbb image: gcr.io/repo-automation-bots/owlbot-java:latest + digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 1a23ea42b..2176b0543 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3becb5c02..2425d7234 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: name: ci jobs: @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -29,8 +30,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -40,14 +42,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -58,8 +61,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -72,8 +76,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 0ab303fec..df4251729 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,6 +69,11 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn test -Pnative -Penable-integration-tests + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9030ba8f9..9a5105d7e 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + case $javaVersion in + "17") + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + ;; + *) + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + ;; + esac +} + +export MAVEN_OPTS=$(determineMavenOpts) # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 000000000..4c7225ec9 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/renovate.json b/renovate.json index eeedeff5f..93a8a717a 100644 --- a/renovate.json +++ b/renovate.json @@ -70,8 +70,5 @@ } ], "semanticCommits": true, - "dependencyDashboard": true, - "dependencyDashboardLabels": [ - "type: process" - ] + "dependencyDashboard": true } From 4a26e1881075a4f361ec746c2444111c911a8d9f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:10:58 +0000 Subject: [PATCH 562/983] fix(java): java 17 dependency arguments (#1266) (#1489) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/dependencies.sh | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a600ac229..ee664785f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7e..d7476cfe9 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) From fbdecb487c8e5856b7c0bfa06d2eac44d895c67a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 18:16:33 +0200 Subject: [PATCH 563/983] chore(deps): update dependency com.google.cloud:libraries-bom to v24 (#1490) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `23.1.0` -> `24.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/compatibility-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.0.0/confidence-slim/23.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9d0257028..085db12e0 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import From 6615933e3162969f16d8a0d887afe9f4011e9e5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 02:48:24 +0100 Subject: [PATCH 564/983] deps: update dependency com.google.code.gson:gson to v2.8.9 (#1492) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.code.gson:gson](https://github.com/google/gson) | `2.8.8` -> `2.8.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.8.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.8.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.8.9/compatibility-slim/2.8.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.8.9/confidence-slim/2.8.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes

              google/gson ### [`v2.8.9`](https://github.com/google/gson/blob/master/CHANGELOG.md#Version-289) - Make OSGi bundle's dependency on `sun.misc` optional ([#​1993](https://github.com/google/gson/issues/1993)). - Deprecate `Gson.excluder()` exposing internal `Excluder` class ([#​1986](https://github.com/google/gson/issues/1986)). - Prevent Java deserialization of internal classes ([#​1991](https://github.com/google/gson/issues/1991)). - Improve number strategy implementation ([#​1987](https://github.com/google/gson/issues/1987)). - Fix LongSerializationPolicy null handling being inconsistent with Gson ([#​1990](https://github.com/google/gson/issues/1990)). - Support arbitrary Number implementation for Object and Number deserialization ([#​1290](https://github.com/google/gson/issues/1290)). - Bump proguard-maven-plugin from 2.4.0 to 2.5.1 ([#​1980](https://github.com/google/gson/issues/1980)). - Don't exclude static local classes ([#​1969](https://github.com/google/gson/issues/1969)). - Fix `RuntimeTypeAdapterFactory` depending on internal `Streams` class ([#​1959](https://github.com/google/gson/issues/1959)). - Improve Maven build ([#​1964](https://github.com/google/gson/issues/1964)). - Make dependency on `java.sql` optional ([#​1707](https://github.com/google/gson/issues/1707)).
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6d403e025..9c21a7235 100644 --- a/pom.xml +++ b/pom.xml @@ -572,7 +572,7 @@ 1.9.91 UTF-8 3.0.2 - 2.8.8 + 2.8.9 2.13.0 3.18.1 30.1.1-android From 87b980b72f7764aae2a1c5f38d321b25ed7471c4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 02:52:18 +0100 Subject: [PATCH 565/983] deps: update dependency com.puppycrawl.tools:checkstyle to v9.1 (#1493) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.puppycrawl.tools:checkstyle](https://checkstyle.org/) ([source](https://github.com/checkstyle/checkstyle)) | `9.0.1` -> `9.1` | [![age](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.1/compatibility-slim/9.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.1/confidence-slim/9.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9c21a7235..6135c43d1 100644 --- a/pom.xml +++ b/pom.xml @@ -667,7 +667,7 @@ com.puppycrawl.tools checkstyle - 9.0.1 + 9.1 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 79c34b57e..9b32309f3 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 9.0.1 + 9.1 From 43c3b116a173d639a1214121e21ffea2fc32935c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 02:54:22 +0100 Subject: [PATCH 566/983] deps: update project.appengine.version to v1.9.92 (#1495) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.91` -> `1.9.92` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.92/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.92/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.92/compatibility-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/1.9.92/confidence-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.91` -> `1.9.92` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.92/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.92/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.92/compatibility-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/1.9.92/confidence-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://cloud.google.com/appengine/docs/standard/java/javadoc/) ([source](http://svn.sonatype.org/spice/tags/oss-parent-4)) | `1.9.91` -> `1.9.92` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.92/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.92/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.92/compatibility-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/1.9.92/confidence-slim/1.9.91)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6135c43d1..022c65a94 100644 --- a/pom.xml +++ b/pom.xml @@ -569,7 +569,7 @@ - Internally, update the default features.json file --> 1.40.2-SNAPSHOT - 1.9.91 + 1.9.92 UTF-8 3.0.2 2.8.9 From bf8a1a671e3a814492129103ffc0105035b60ca7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 20:58:32 +0000 Subject: [PATCH 567/983] chore(java): remove pin on Apache Maven 3.8.1 from github actions (#1268) (#1497) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ee664785f..86fe60037 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 + digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d7234..d95a11a26 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,9 +12,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +24,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +39,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,9 +49,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -73,9 +61,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -83,4 +68,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr + JOB_TYPE: clirr \ No newline at end of file From a6a73c25104aa2074b0a2bcf021513f943c727d4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Nov 2021 18:52:16 +0100 Subject: [PATCH 568/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.10.0 (#1498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.9.0` -> `2.10.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/compatibility-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.10.0/confidence-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.10.0`](https://github.com/google/error-prone/releases/v2.10.0) [Compare Source](https://github.com/google/error-prone/compare/v2.9.0...v2.10.0) New checks - [`AlwaysThrows`](http://errorprone.info/bugpattern/AlwaysThrows) - [`StackTraceElementGetClass`](http://errorprone.info/bugpattern/StackTraceElementGetClass) - [`BareDotMetacharacter`](http://errorprone.info/bugpattern/BareDotMetacharacter) - [`DistinctVarargsChecker`](http://errorprone.info/bugpattern/DistinctVarargsChecker) - [`MalformedInlineTag`](http://errorprone.info/bugpattern/MalformedInlineTag) - [`MemoizeConstantVisitorStateLookups`](http://errorprone.info/bugpattern/MemoizeConstantVisitorStateLookups) - [`UnicodeEscape`](http://errorprone.info/bugpattern/UnicodeEscape) - [`FieldMissingNullable`](http://errorprone.info/bugpattern/FieldMissingNullable) - [`Java8ApiChecker`](http://errorprone.info/bugpattern/Java8ApiChecker) - [`ParameterMissingNullable`](http://errorprone.info/bugpattern/ParameterMissingNullable) - [`TooManyParameters`](http://errorprone.info/bugpattern/TooManyParameters) - [`TryWithResourcesVariable`](http://errorprone.info/bugpattern/TryWithResourcesVariable) - [`UnnecessaryFinal`](http://errorprone.info/bugpattern/UnnecessaryFinal) - [`VoidMissingNullable`](http://errorprone.info/bugpattern/VoidMissingNullable) Fixed issues: [#​2616](https://github.com/google/error-prone/issues/2616), [#​2629](https://github.com/google/error-prone/issues/2629) **Full Changelog**: https://github.com/google/error-prone/compare/v2.9.0...v2.10.0
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 022c65a94..9a294f1d4 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.9.0 + 2.10.0 com.google.appengine From bf6540ece7d384064b3f21334e2e0429128b1611 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 6 Nov 2021 00:34:12 +0000 Subject: [PATCH 569/983] Update ci.yaml (#1275) (#1500) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 86fe60037..323e24243 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e + digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d95a11a26..93b337c62 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,7 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: @@ -68,4 +69,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr \ No newline at end of file + JOB_TYPE: clirr From 486e8761dd696a120a714baa6d51fa24c1be5636 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 22:00:19 +0000 Subject: [PATCH 570/983] chore: cleanup cloud RAD generation (#1269) (#1501) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc11.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 323e24243..74090051c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c + digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 7c5f7f6f6..62ffd0776 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-http-client export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -mvn clean site -B -q -P docFX - -# copy README to docfx-yml dir and rename index.md -cp README.md target/docfx-yml/index.md -# copy CHANGELOG to docfx-yml dir and rename history.md +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml From 24e6c51112e42f12701b5213a4c5f96466d3f7e2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Nov 2021 01:50:14 +0100 Subject: [PATCH 571/983] deps: update dependency com.google.protobuf:protobuf-java to v3.19.1 (#1488) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9a294f1d4..94d13770d 100644 --- a/pom.xml +++ b/pom.xml @@ -574,7 +574,7 @@ 3.0.2 2.8.9 2.13.0 - 3.18.1 + 3.19.1 30.1.1-android 1.1.4c 4.5.13 From 73957ed10ba76449a96109131c183e2db43fca83 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 8 Nov 2021 19:51:26 -0500 Subject: [PATCH 572/983] chore(deps): libraries-bom 24.0.0 release (#1491) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 3e57c0741..01d840a6c 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 23.1.0 + 24.0.0 pom import From 1a5826d5a8cbd8b2afa121bff1ed99ac6f8a4e0f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 14:42:21 +0000 Subject: [PATCH 573/983] chore: update jre to 11 for linter (#1278) (#1504) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 74090051c..4435ffcbb 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa + digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93b337c62..05de1f60d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: From ded05acc2d630518d6b7c41140454059ef001760 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Wed, 10 Nov 2021 09:36:19 -0800 Subject: [PATCH 574/983] chore: cleanup cloud RAD generation (#1502) Same as https://github.com/googleapis/java-shared-config/pull/344 --- pom.xml | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index 94d13770d..e3496f93b 100644 --- a/pom.xml +++ b/pom.xml @@ -695,35 +695,44 @@ docFX - + + + java-docfx-doclet-1.3.0 + ${project.build.directory}/docfx-yml + ${project.artifactId} + + com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services + 8 + + + org.apache.maven.plugins maven-javadoc-plugin 3.3.1 - - - docFX - - javadoc - aggregate - aggregate-jar - - - com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/java-docfx-doclet-1.3.0.jar + + ${env.KOKORO_GFILE_DIR}/${docletName}.jar - -outputpath ${project.build.directory}/docfx-yml - -projectname ${artifactId} - -excludepackages com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services + -outputpath ${outputpath} + -projectname ${projectname} + -excludeclasses ${excludeclasses}: + -excludepackages ${excludePackages}: + none + protected + true + ${source} + + ${sourceFileExclude} + - + - - + + From 8b1b8f280774115d0521e0f5eada6dd0ef995ca2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 23:04:36 +0100 Subject: [PATCH 575/983] deps: update dependency com.coveo:fmt-maven-plugin to v2.12 (#1487) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format) | `1.7` -> `1.12.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.googlejavaformat:google-java-format/1.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.googlejavaformat:google-java-format/1.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.googlejavaformat:google-java-format/1.12.0/compatibility-slim/1.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.googlejavaformat:google-java-format/1.12.0/confidence-slim/1.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/google-java-format ### [`v1.12.0`](https://github.com/google/google-java-format/releases/v1.12.0) [Compare Source](https://github.com/google/google-java-format/compare/v1.11.0...v1.12.0) ##### What's Changed - Format type annotation as part of the type, not part of the modifiers list ([https://github.com/google/google-java-format/pull/653](https://github.com/google/google-java-format/pull/653)) - Fix indentation of case statements on JDK 17 ([https://github.com/google/google-java-format/pull/654](https://github.com/google/google-java-format/pull/654)) **Full Changelog**: https://github.com/google/google-java-format/compare/v1.11.0...v1.12.0 ### [`v1.11.0`](https://github.com/google/google-java-format/releases/v1.11.0) [Compare Source](https://github.com/google/google-java-format/compare/v1.10.0...v1.11.0) `google-java-format` now has improved support for running on JDK 17 early access builds. Changes: - Handle `final` variables in `instanceof` patterns ([#​588](https://github.com/google/google-java-format/issues/588)) - Fix handling of annotations in compact record constructors ([#​574](https://github.com/google/google-java-format/issues/574)) - Fix a crash in `instanceof` pattern handling ([#​594](https://github.com/google/google-java-format/issues/594)) - Wrap multiple values in switch expression case ([#​540](https://github.com/google/google-java-format/issues/540)) - Fix formatting of module trees after [JDK-8255464](https://bugs.openjdk.java.net/browse/JDK-8255464) - Support `sealed` classes ([#​603](https://github.com/google/google-java-format/issues/603)) ### [`v1.10.0`](https://github.com/google/google-java-format/releases/v1.10.0) `google-java-format` now supports running on JDK 16. The following flags are required when running on JDK 16, due to [JEP 396: Strongly Encapsulate JDK Internals by Default](https://openjdk.java.net/jeps/396): java \ --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \ -jar google-java-format-1.10.0-all-deps.jar T... Other changes: - Handle extra `;` in import lists (https://github.com/google/google-java-format/commit/b769e812a052d7cff4a2d86eff4981a5d358ee2d) - Add missing space between unary `-` and negative literals (https://github.com/google/google-java-format/commit/6da736d786ac71a134ed6cc43e9cd825c83de0fd) - Fix an off-by-one issue on the reflowing of string literals (https://github.com/google/google-java-format/commit/b9fd8d2242869ea7c9efd10cbbe7278c4b6611b1)
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 10 +--------- .../google/api/client/http/HttpRequestTracingTest.java | 4 +--- pom.xml | 10 +--------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3c22fee5b..6ce779b91 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -144,18 +144,10 @@ com.coveo fmt-maven-plugin - 2.9 + 2.12 - true - - - com.google.googlejavaformat - google-java-format - 1.7 - - diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 6fc9cb37d..9618be795 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -44,9 +44,7 @@ public class HttpRequestTracingTest { public void setupTestTracer() { Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); TraceParams params = - Tracing.getTraceConfig() - .getActiveTraceParams() - .toBuilder() + Tracing.getTraceConfig().getActiveTraceParams().toBuilder() .setSampler(Samplers.alwaysSample()) .build(); Tracing.getTraceConfig().updateActiveTraceParams(params); diff --git a/pom.xml b/pom.xml index e3496f93b..83122b22f 100644 --- a/pom.xml +++ b/pom.xml @@ -542,18 +542,10 @@ com.coveo fmt-maven-plugin - 2.9 + 2.12 - true - - - com.google.googlejavaformat - google-java-format - 1.7 - - From ea0f6c0f58e8abffae1362feb344a9309d6d814e Mon Sep 17 00:00:00 2001 From: Timur Sadykov Date: Mon, 22 Nov 2021 16:25:57 -0800 Subject: [PATCH 576/983] feat: add AttemptCount to HttpResponseException (#1505) * feat: add tests for attemptCount * fix: more renaming * fix: linter fixes --- .../google/api/client/http/HttpRequest.java | 4 +- .../client/http/HttpResponseException.java | 28 +++++++++++ .../http/HttpResponseExceptionTest.java | 48 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java index 312702b9a..78f15d868 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java @@ -1113,7 +1113,9 @@ public HttpResponse execute() throws IOException { // throw an exception if unsuccessful response if (throwExceptionOnExecuteError && !response.isSuccessStatusCode()) { try { - throw new HttpResponseException(response); + throw new HttpResponseException.Builder(response) + .setAttemptCount(numRetries - retriesRemaining) + .build(); } finally { response.disconnect(); } diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java index a9d80a4f5..63bf6fe4c 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponseException.java @@ -42,6 +42,9 @@ public class HttpResponseException extends IOException { /** HTTP response content or {@code null} for none. */ private final String content; + /** Number of attempts performed */ + private final int attemptCount; + /** * Constructor that constructs a detail message from the given HTTP response that includes the * status code, status message and HTTP response content. @@ -73,6 +76,7 @@ protected HttpResponseException(Builder builder) { statusMessage = builder.statusMessage; headers = builder.headers; content = builder.content; + attemptCount = builder.attemptCount; } /** @@ -121,6 +125,15 @@ public final String getContent() { return content; } + /** + * Returns the attempt count + * + * @since 1.41 + */ + public final int getAttemptCount() { + return attemptCount; + } + /** * Builder. * @@ -145,6 +158,9 @@ public static class Builder { /** Detail message to use or {@code null} for none. */ String message; + /** Number of attempts performed */ + int attemptCount; + /** * @param statusCode HTTP status code * @param statusMessage status message or {@code null} @@ -260,6 +276,18 @@ public Builder setContent(String content) { return this; } + /** Returns the request attempt count */ + public final int getAttemptCount() { + return attemptCount; + } + + /** Sets the attempt count for the related HTTP request execution. */ + public Builder setAttemptCount(int attemptCount) { + Preconditions.checkArgument(attemptCount >= 0); + this.attemptCount = attemptCount; + return this; + } + /** Returns a new instance of {@link HttpResponseException} based on this builder. */ public HttpResponseException build() { return new HttpResponseException(this); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java index 9066e9d70..cbe6e6a0d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java @@ -23,6 +23,7 @@ import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.api.client.util.ExponentialBackOff; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -30,6 +31,7 @@ import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.framework.TestCase; +import org.junit.Assert; import org.junit.function.ThrowingRunnable; /** @@ -208,6 +210,8 @@ public void run() throws Throwable { + SIMPLE_GENERIC_URL + LINE_SEPARATOR + "Unable to find resource"); + // no retries expected + assertEquals(1, responseException.getAttemptCount()); } public void testInvalidCharset() throws Exception { @@ -245,6 +249,50 @@ public void run() throws Throwable { .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } + public void testAttemptCountWithBackOff() throws Exception { + HttpTransport fakeTransport = + new MockHttpTransport() { + @Override + public LowLevelHttpRequest buildRequest(String method, String url) throws IOException { + return new MockLowLevelHttpRequest() { + @Override + public LowLevelHttpResponse execute() throws IOException { + MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); + result.setStatusCode(HttpStatusCodes.STATUS_CODE_SERVER_ERROR); + result.setReasonPhrase("Error"); + result.setContent("Unknown Error"); + return result; + } + }; + } + }; + ExponentialBackOff backoff = new ExponentialBackOff.Builder().build(); + final HttpRequest request = + fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://not/used")); + request.setUnsuccessfulResponseHandler( + new HttpBackOffUnsuccessfulResponseHandler(backoff) + .setBackOffRequired( + new HttpBackOffUnsuccessfulResponseHandler.BackOffRequired() { + public boolean isRequired(HttpResponse response) { + return true; + } + })); + request.setNumberOfRetries(1); + HttpResponseException responseException = + assertThrows( + HttpResponseException.class, + new ThrowingRunnable() { + @Override + public void run() throws Throwable { + request.execute(); + } + }); + + Assert.assertEquals(500, responseException.getStatusCode()); + // original request and 1 retry - total 2 + assertEquals(2, responseException.getAttemptCount()); + } + public void testUnsupportedCharset() throws Exception { HttpTransport transport = new MockHttpTransport() { From 0076d48950f99385112b76454396aab8d8e299fa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 00:20:30 +0100 Subject: [PATCH 577/983] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.2.0 (#1519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud.samples:shared-configuration](https://github.com/GoogleCloudPlatform/java-repo-tools) | `1.0.23` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/compatibility-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/confidence-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              GoogleCloudPlatform/java-repo-tools ### [`v1.2.0`](https://github.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) [Compare Source](https://github.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) ### [`v1.0.24`](https://github.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24) [Compare Source](https://github.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24)
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 7980adb7a..a95f36f36 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/pom.xml b/samples/pom.xml index 84d755df6..d6b2bfa7e 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0cc5be9cc..69a5e5c7b 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 085db12e0..1abfd0e14 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 From 39f63c3ea255fe256391567e66ada7b4122b16f6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 17:54:19 +0000 Subject: [PATCH 578/983] fix(java): add -ntp flag to native image testing command (#1299) (#1522) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 3 +- CONTRIBUTING.md | 61 +++++---------------------------------- 3 files changed, 9 insertions(+), 57 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 4435ffcbb..26bd2d098 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 + digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index df4251729..74b4365ea 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,7 +71,7 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn test -Pnative -Penable-integration-tests + mvn -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; samples) @@ -91,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee06..b65dd279c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file From 6148d9732a7bd745064d68706de75707a9acbb8f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 19:06:55 +0100 Subject: [PATCH 579/983] deps: update dependency org.apache.httpcomponents:httpcore to v4.4.15 (#1523) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83122b22f..8ea6d7ad6 100644 --- a/pom.xml +++ b/pom.xml @@ -570,7 +570,7 @@ 30.1.1-android 1.1.4c 4.5.13 - 4.4.14 + 4.4.15 0.28.0 .. false From 2fa47c63e5422bf88fe1320e97e0f61265792d8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 19:08:20 +0100 Subject: [PATCH 580/983] deps: update project.appengine.version to v1.9.93 (#1516) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ea6d7ad6..44d9e6ae0 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.40.2-SNAPSHOT - 1.9.92 + 1.9.93 UTF-8 3.0.2 2.8.9 From 0922b670e4949ca45b2b25a2d89eea2818349a35 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 19:08:45 +0100 Subject: [PATCH 581/983] deps: update dependency com.puppycrawl.tools:checkstyle to v9.2 (#1510) --- pom.xml | 2 +- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 44d9e6ae0..26f7f8bb9 100644 --- a/pom.xml +++ b/pom.xml @@ -659,7 +659,7 @@ com.puppycrawl.tools checkstyle - 9.1 + 9.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 9b32309f3..4f7b4cec3 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 9.1 + 9.2 From 52757737c3db79f660044916ac532671014f6ed3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 19:09:11 +0100 Subject: [PATCH 582/983] build(deps): update dependency com.coveo:fmt-maven-plugin to v2.13 (#1509) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6ce779b91..ec438b540 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -144,7 +144,7 @@ com.coveo fmt-maven-plugin - 2.12 + 2.13 true diff --git a/pom.xml b/pom.xml index 26f7f8bb9..b549d3a9c 100644 --- a/pom.xml +++ b/pom.xml @@ -542,7 +542,7 @@ com.coveo fmt-maven-plugin - 2.12 + 2.13 true From b4ec31308bf2cbc9bd9b1681ec453ac63b1fd088 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Tue, 7 Dec 2021 11:40:02 -0800 Subject: [PATCH 583/983] chore: update doclet version (#1512) Same as https://github.com/googleapis/java-shared-config/pull/368 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b549d3a9c..8c5536015 100644 --- a/pom.xml +++ b/pom.xml @@ -689,7 +689,7 @@ - java-docfx-doclet-1.3.0 + java-docfx-doclet-1.4.0 ${project.build.directory}/docfx-yml ${project.artifactId} From a042291a3287ac76230c9f1e4cd288041184d704 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Dec 2021 00:06:17 +0100 Subject: [PATCH 584/983] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.0 (#1525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `24.0.0` -> `24.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/compatibility-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.0/confidence-slim/24.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1abfd0e14..41a77864d 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 24.0.0 + 24.1.0 pom import From 198e0d5c71cf08a2f629f51d5e24ed3f8e03e403 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 9 Dec 2021 00:38:09 -0500 Subject: [PATCH 585/983] chore(docs): libraries-bom 24.1.0 (#1524) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 01d840a6c..3de4c99f7 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 24.0.0 + 24.1.0 pom import From ea93fc68ab198b96c4694c7eb0c47bf5b04688ae Mon Sep 17 00:00:00 2001 From: Daniel Zou Date: Wed, 22 Dec 2021 12:06:48 -0500 Subject: [PATCH 586/983] chore(docs): libraries-bom 24.1.1 (#1528) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 3de4c99f7..0db41a40f 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 24.1.0 + 24.1.1 pom import From e833abe43c80d8474ace3f9d33f9ce5d6ef0ddf9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Dec 2021 21:58:17 +0100 Subject: [PATCH 587/983] chore(deps): update dependency com.google.cloud:libraries-bom to v24.1.1 (#1529) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://github.com/GoogleCloudPlatform/cloud-opensource-java) | `24.1.0` -> `24.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/compatibility-slim/24.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.1.1/confidence-slim/24.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 41a77864d..28eb6b006 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 24.1.0 + 24.1.1 pom import From 772370aad7269d30971a38b4471e534d1af9c45a Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 5 Jan 2022 17:14:22 -0500 Subject: [PATCH 588/983] deps: update dependency com.google.protobuf:protobuf-java to v3.19.2 (#1539) --- .github/.OwlBot.lock.yaml | 4 ++-- .github/.OwlBot.yaml | 2 +- .kokoro/build.sh | 10 +++++----- pom.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 26bd2d098..731a0eb4a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87 + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest + digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 8c5f03b4d..5d9a9d8b5 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: - image: "gcr.io/repo-automation-bots/owlbot-java:latest" + image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 74b4365ea..f0b868377 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -47,15 +47,15 @@ set +e case ${JOB_TYPE} in test) - mvn test -B -Dclirr.skip=true -Denforcer.skip=true + mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true RETURN_CODE=$? ;; lint) - mvn com.coveo:fmt-maven-plugin:check + mvn com.coveo:fmt-maven-plugin:check -B -ntp RETURN_CODE=$? ;; javadoc) - mvn javadoc:javadoc javadoc:test-javadoc + mvn javadoc:javadoc javadoc:test-javadoc -B -ntp RETURN_CODE=$? ;; integration) @@ -71,7 +71,7 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; samples) @@ -104,7 +104,7 @@ samples) fi ;; clirr) - mvn -B -Denforcer.skip=true clirr:check + mvn -B -ntp -Denforcer.skip=true clirr:check RETURN_CODE=$? ;; *) diff --git a/pom.xml b/pom.xml index 8c5536015..da7dd667f 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.8.9 2.13.0 - 3.19.1 + 3.19.2 30.1.1-android 1.1.4c 4.5.13 From 0717d7608b06ea317f12287c3956ff22de6e2f38 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 5 Jan 2022 17:27:09 -0500 Subject: [PATCH 589/983] chore: release 1.41.0 (#1480) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release 1.41.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- CHANGELOG.md | 28 +++++++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- .../client/http/HttpRequestTracingTest.java | 4 ++- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 18 files changed, 84 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c3c2da18..02c1f66b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [1.41.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.1...v1.41.0) (2022-01-05) + + +### Features + +* add AttemptCount to HttpResponseException ([#1505](https://www.github.com/googleapis/google-http-java-client/issues/1505)) ([ea0f6c0](https://www.github.com/googleapis/google-http-java-client/commit/ea0f6c0f58e8abffae1362feb344a9309d6d814e)) +* next release from main branch is 1.41.0 ([#1478](https://www.github.com/googleapis/google-http-java-client/issues/1478)) ([3ad4831](https://www.github.com/googleapis/google-http-java-client/commit/3ad4831da00579f534ff7eb7de3a0386068902ba)) + + +### Bug Fixes + +* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/google-http-java-client/issues/1299)) ([#1522](https://www.github.com/googleapis/google-http-java-client/issues/1522)) ([39f63c3](https://www.github.com/googleapis/google-http-java-client/commit/39f63c3ea255fe256391567e66ada7b4122b16f6)) +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/google-http-java-client/issues/1266)) ([#1489](https://www.github.com/googleapis/google-http-java-client/issues/1489)) ([4a26e18](https://www.github.com/googleapis/google-http-java-client/commit/4a26e1881075a4f361ec746c2444111c911a8d9f)) + + +### Dependencies + +* update dependency com.coveo:fmt-maven-plugin to v2.12 ([#1487](https://www.github.com/googleapis/google-http-java-client/issues/1487)) ([8b1b8f2](https://www.github.com/googleapis/google-http-java-client/commit/8b1b8f280774115d0521e0f5eada6dd0ef995ca2)) +* update dependency com.google.code.gson:gson to v2.8.9 ([#1492](https://www.github.com/googleapis/google-http-java-client/issues/1492)) ([6615933](https://www.github.com/googleapis/google-http-java-client/commit/6615933e3162969f16d8a0d887afe9f4011e9e5c)) +* update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#1498](https://www.github.com/googleapis/google-http-java-client/issues/1498)) ([a6a73c2](https://www.github.com/googleapis/google-http-java-client/commit/a6a73c25104aa2074b0a2bcf021513f943c727d4)) +* update dependency com.google.protobuf:protobuf-java to v3.19.1 ([#1488](https://www.github.com/googleapis/google-http-java-client/issues/1488)) ([24e6c51](https://www.github.com/googleapis/google-http-java-client/commit/24e6c51112e42f12701b5213a4c5f96466d3f7e2)) +* update dependency com.google.protobuf:protobuf-java to v3.19.2 ([#1539](https://www.github.com/googleapis/google-http-java-client/issues/1539)) ([772370a](https://www.github.com/googleapis/google-http-java-client/commit/772370aad7269d30971a38b4471e534d1af9c45a)) +* update dependency com.puppycrawl.tools:checkstyle to v9.1 ([#1493](https://www.github.com/googleapis/google-http-java-client/issues/1493)) ([87b980b](https://www.github.com/googleapis/google-http-java-client/commit/87b980b72f7764aae2a1c5f38d321b25ed7471c4)) +* update dependency com.puppycrawl.tools:checkstyle to v9.2 ([#1510](https://www.github.com/googleapis/google-http-java-client/issues/1510)) ([0922b67](https://www.github.com/googleapis/google-http-java-client/commit/0922b670e4949ca45b2b25a2d89eea2818349a35)) +* update dependency org.apache.httpcomponents:httpcore to v4.4.15 ([#1523](https://www.github.com/googleapis/google-http-java-client/issues/1523)) ([6148d97](https://www.github.com/googleapis/google-http-java-client/commit/6148d9732a7bd745064d68706de75707a9acbb8f)) +* update project.appengine.version to v1.9.92 ([#1495](https://www.github.com/googleapis/google-http-java-client/issues/1495)) ([43c3b11](https://www.github.com/googleapis/google-http-java-client/commit/43c3b116a173d639a1214121e21ffea2fc32935c)) +* update project.appengine.version to v1.9.93 ([#1516](https://www.github.com/googleapis/google-http-java-client/issues/1516)) ([2fa47c6](https://www.github.com/googleapis/google-http-java-client/commit/2fa47c63e5422bf88fe1320e97e0f61265792d8a)) + ### [1.40.1](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.0...v1.40.1) (2021-10-07) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index f9b2e3896..530aa1612 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.40.2-SNAPSHOT + 1.41.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.40.2-SNAPSHOT + 1.41.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.40.2-SNAPSHOT + 1.41.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index dfa33aa74..ea7daee37 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-android - 1.40.2-SNAPSHOT + 1.41.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 665c42aa2..3487aa514 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-apache-v2 - 1.40.2-SNAPSHOT + 1.41.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index e43b5528a..4c7e2db64 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-appengine - 1.40.2-SNAPSHOT + 1.41.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index fe09e59f4..664eff698 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.40.2-SNAPSHOT + 1.41.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ec438b540..62e749d90 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.40.2-SNAPSHOT + 1.41.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-android - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-apache-v2 - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-appengine - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-findbugs - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-gson - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-jackson2 - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-protobuf - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-test - 1.40.2-SNAPSHOT + 1.41.0 com.google.http-client google-http-client-xml - 1.40.2-SNAPSHOT + 1.41.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index d64698aa4..c8e0bc4a4 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-findbugs - 1.40.2-SNAPSHOT + 1.41.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index ec2fcae68..f7d6040fe 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-gson - 1.40.2-SNAPSHOT + 1.41.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index adfee37c9..0096fe1d8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-jackson2 - 1.40.2-SNAPSHOT + 1.41.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5428450cf..05872012b 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-protobuf - 1.40.2-SNAPSHOT + 1.41.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index f93185c28..c41739b50 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-test - 1.40.2-SNAPSHOT + 1.41.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index a9ba1e312..ca706248c 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client-xml - 1.40.2-SNAPSHOT + 1.41.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1c15a597d..2939d4696 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../pom.xml google-http-client - 1.40.2-SNAPSHOT + 1.41.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 9618be795..6fc9cb37d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -44,7 +44,9 @@ public class HttpRequestTracingTest { public void setupTestTracer() { Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); TraceParams params = - Tracing.getTraceConfig().getActiveTraceParams().toBuilder() + Tracing.getTraceConfig() + .getActiveTraceParams() + .toBuilder() .setSampler(Samplers.alwaysSample()) .build(); Tracing.getTraceConfig().updateActiveTraceParams(params); diff --git a/pom.xml b/pom.xml index da7dd667f..ceb5b2aa9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.40.2-SNAPSHOT + 1.41.0 1.9.93 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 4f7b4cec3..522b5cd33 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.40.2-SNAPSHOT + 1.41.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 1f2460758..2a515a551 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.40.1:1.40.2-SNAPSHOT -google-http-client-bom:1.40.1:1.40.2-SNAPSHOT -google-http-client-parent:1.40.1:1.40.2-SNAPSHOT -google-http-client-android:1.40.1:1.40.2-SNAPSHOT -google-http-client-android-test:1.40.1:1.40.2-SNAPSHOT -google-http-client-apache-v2:1.40.1:1.40.2-SNAPSHOT -google-http-client-appengine:1.40.1:1.40.2-SNAPSHOT -google-http-client-assembly:1.40.1:1.40.2-SNAPSHOT -google-http-client-findbugs:1.40.1:1.40.2-SNAPSHOT -google-http-client-gson:1.40.1:1.40.2-SNAPSHOT -google-http-client-jackson2:1.40.1:1.40.2-SNAPSHOT -google-http-client-protobuf:1.40.1:1.40.2-SNAPSHOT -google-http-client-test:1.40.1:1.40.2-SNAPSHOT -google-http-client-xml:1.40.1:1.40.2-SNAPSHOT +google-http-client:1.41.0:1.41.0 +google-http-client-bom:1.41.0:1.41.0 +google-http-client-parent:1.41.0:1.41.0 +google-http-client-android:1.41.0:1.41.0 +google-http-client-android-test:1.41.0:1.41.0 +google-http-client-apache-v2:1.41.0:1.41.0 +google-http-client-appengine:1.41.0:1.41.0 +google-http-client-assembly:1.41.0:1.41.0 +google-http-client-findbugs:1.41.0:1.41.0 +google-http-client-gson:1.41.0:1.41.0 +google-http-client-jackson2:1.41.0:1.41.0 +google-http-client-protobuf:1.41.0:1.41.0 +google-http-client-test:1.41.0:1.41.0 +google-http-client-xml:1.41.0:1.41.0 From d45ffe80c490ff5d58982fe34452ff37b762e29b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 5 Jan 2022 17:41:02 -0500 Subject: [PATCH 590/983] chore: release 1.41.1-SNAPSHOT (#1540) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 530aa1612..2e1f7d428 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.0 + 1.41.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.0 + 1.41.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.0 + 1.41.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index ea7daee37..2f5f27a77 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-android - 1.41.0 + 1.41.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 3487aa514..0bfa7dcc8 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.0 + 1.41.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4c7e2db64..959635145 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.0 + 1.41.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 664eff698..51ff7bc99 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.0 + 1.41.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 62e749d90..7ecb5e7be 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.0 + 1.41.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-android - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-test - 1.41.0 + 1.41.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.0 + 1.41.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c8e0bc4a4..6a9761012 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.0 + 1.41.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index f7d6040fe..31bb270c0 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.0 + 1.41.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 0096fe1d8..d59282de9 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.0 + 1.41.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 05872012b..6a044d823 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.0 + 1.41.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index c41739b50..ffd147fa6 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-test - 1.41.0 + 1.41.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index ca706248c..3632ae9db 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.0 + 1.41.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 2939d4696..b32005b4f 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../pom.xml google-http-client - 1.41.0 + 1.41.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index ceb5b2aa9..5ceaadfea 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.0 + 1.41.1-SNAPSHOT 1.9.93 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 522b5cd33..10a4485f9 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.0 + 1.41.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2a515a551..99a7ca4cf 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.0:1.41.0 -google-http-client-bom:1.41.0:1.41.0 -google-http-client-parent:1.41.0:1.41.0 -google-http-client-android:1.41.0:1.41.0 -google-http-client-android-test:1.41.0:1.41.0 -google-http-client-apache-v2:1.41.0:1.41.0 -google-http-client-appengine:1.41.0:1.41.0 -google-http-client-assembly:1.41.0:1.41.0 -google-http-client-findbugs:1.41.0:1.41.0 -google-http-client-gson:1.41.0:1.41.0 -google-http-client-jackson2:1.41.0:1.41.0 -google-http-client-protobuf:1.41.0:1.41.0 -google-http-client-test:1.41.0:1.41.0 -google-http-client-xml:1.41.0:1.41.0 +google-http-client:1.41.0:1.41.1-SNAPSHOT +google-http-client-bom:1.41.0:1.41.1-SNAPSHOT +google-http-client-parent:1.41.0:1.41.1-SNAPSHOT +google-http-client-android:1.41.0:1.41.1-SNAPSHOT +google-http-client-android-test:1.41.0:1.41.1-SNAPSHOT +google-http-client-apache-v2:1.41.0:1.41.1-SNAPSHOT +google-http-client-appengine:1.41.0:1.41.1-SNAPSHOT +google-http-client-assembly:1.41.0:1.41.1-SNAPSHOT +google-http-client-findbugs:1.41.0:1.41.1-SNAPSHOT +google-http-client-gson:1.41.0:1.41.1-SNAPSHOT +google-http-client-jackson2:1.41.0:1.41.1-SNAPSHOT +google-http-client-protobuf:1.41.0:1.41.1-SNAPSHOT +google-http-client-test:1.41.0:1.41.1-SNAPSHOT +google-http-client-xml:1.41.0:1.41.1-SNAPSHOT From 6b6ec4e0b393d56a747f6f8aa457ed62e3acb120 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Fri, 14 Jan 2022 10:21:41 -0500 Subject: [PATCH 591/983] chore: update release-level in .repo-metadata.json (#1552) --- .repo-metadata.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 8413b6807..ab8e8d5e9 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,10 +1,11 @@ { - "name": "google-http-client", + "api_shortname": "google-http-client", "name_pretty": "Google HTTP Java Client", "client_documentation": "https://cloud.google.com/java/docs/reference/google-http-client/latest/history", - "release_level": "ga", + "release_level": "stable", "language": "java", "repo": "googleapis/google-http-java-client", "repo_short": "google-http-java-client", + "library_type": "CORE", "distribution_name": "com.google.http-client:google-http-client" } From d10f698340b0ed2e9cc61268c560b1c83b6a10e4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 19 Jan 2022 02:36:18 +0100 Subject: [PATCH 592/983] build(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.10.0 (#1530) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-site-plugin](https://maven.apache.org/plugins/) | `3.9.1` -> `3.10.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.10.0/compatibility-slim/3.9.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.10.0/confidence-slim/3.9.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 7ecb5e7be..e15763e5a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.1 + 3.10.0 true diff --git a/pom.xml b/pom.xml index 5ceaadfea..cf301cac0 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.1 + 3.10.0 org.apache.maven.plugins From 2bf3e4f71aeb312cdb551c1484f5898df77310bc Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Fri, 21 Jan 2022 10:26:44 -0800 Subject: [PATCH 593/983] chore: update cloud rad doclet (#1556) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf301cac0..fd74aa23a 100644 --- a/pom.xml +++ b/pom.xml @@ -689,7 +689,7 @@ - java-docfx-doclet-1.4.0 + java-docfx-doclet-1.5.0 ${project.build.directory}/docfx-yml ${project.artifactId} From 6eea2baca8752d2934e9194c82f88158d6e672df Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Fri, 21 Jan 2022 13:30:41 -0500 Subject: [PATCH 594/983] chore: update owlbot image (#1558) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update owlbot image * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 731a0eb4a..dcdda8c6d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d + digest: sha256:9669c169d0582f13d6b2d319a43a78fc49f296a883aa48519bd0e5c7d34087c4 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d7a51c216..fe674a052 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ If you are still having issues, please include as much information as possible: General, Core, and Other are also allowed as types 2. OS type and version: 3. Java version: -4. google-http-client version(s): +4. version(s): #### Steps to reproduce From 8bd09c7e29ba0c6774668f64882d8701c5b84013 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 21 Jan 2022 10:33:31 -0800 Subject: [PATCH 595/983] chore(java): update release_type choices to stable and preview (#1331) (#1553) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(java): update release_type choices to stable and preview (#1331) * chore(java): update release_type choices to stable and preview * chore: update badge names Source-Link: https://github.com/googleapis/synthtool/commit/d10357a0b84f40c19108bc0bde3f1f841b76441f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:9669c169d0582f13d6b2d319a43a78fc49f296a883aa48519bd0e5c7d34087c4 * format fix * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Emily Ball From c361ac87ad23526fbf7f0c2573ea8de198bde065 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:36:52 +0100 Subject: [PATCH 596/983] build(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.2.2 (#1543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.2.2 * format * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * format Co-authored-by: Emily Ball Co-authored-by: Owl Bot --- .../google-http-client-findbugs-test/pom.xml | 2 +- .../com/google/api/client/http/HttpRequestTracingTest.java | 4 +--- pom.xml | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index 1685b19e6..fe74ce25d 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -19,7 +19,7 @@ maven-jar-plugin - 3.2.0 + 3.2.2 diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 6fc9cb37d..9618be795 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -44,9 +44,7 @@ public class HttpRequestTracingTest { public void setupTestTracer() { Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); TraceParams params = - Tracing.getTraceConfig() - .getActiveTraceParams() - .toBuilder() + Tracing.getTraceConfig().getActiveTraceParams().toBuilder() .setSampler(Samplers.alwaysSample()) .build(); Tracing.getTraceConfig().updateActiveTraceParams(params); diff --git a/pom.xml b/pom.xml index fd74aa23a..26b8cff40 100644 --- a/pom.xml +++ b/pom.xml @@ -315,7 +315,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 From 50c0765f1eadbf7aef2dccf5f78ab62e2533c6f6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:37:05 +0100 Subject: [PATCH 597/983] deps: update dependency com.google.protobuf:protobuf-java to v3.19.3 (#1549) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26b8cff40..7ebafeea6 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.8.9 2.13.0 - 3.19.2 + 3.19.3 30.1.1-android 1.1.4c 4.5.13 From 318e54ae9be6bfeb4f5af0af0cb954031d95d1f9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:38:21 +0100 Subject: [PATCH 598/983] deps: update project.opencensus.version to v0.30.0 (#1526) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ebafeea6..36f74b433 100644 --- a/pom.xml +++ b/pom.xml @@ -571,7 +571,7 @@ 1.1.4c 4.5.13 4.4.15 - 0.28.0 + 0.30.0 .. false From e13eebd288afbde3aa7bdc0229c2d0db90ebbd4c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:39:09 +0100 Subject: [PATCH 599/983] deps: update dependency com.puppycrawl.tools:checkstyle to v9.2.1 (#1532) --- pom.xml | 2 +- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 36f74b433..4f6ddfd81 100644 --- a/pom.xml +++ b/pom.xml @@ -659,7 +659,7 @@ com.puppycrawl.tools checkstyle - 9.2 + 9.2.1 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 10a4485f9..ab48e8a58 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 9.2 + 9.2.1 From 8df0dbe53521e918985e8f4882392cd2e0a0a1c3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:39:46 +0100 Subject: [PATCH 600/983] deps: update dependency kr.motd.maven:os-maven-plugin to v1.7.0 (#1547) --- google-http-client-protobuf/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 6a044d823..8d96b3eb3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -16,7 +16,7 @@ kr.motd.maven os-maven-plugin - 1.6.2 + 1.7.0 From 05c78f4bee92cc501aa084ad970ed6ac9c0e0444 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:40:07 +0100 Subject: [PATCH 601/983] deps: update project.appengine.version to v1.9.94 (#1557) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4f6ddfd81..ae382b3fd 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.41.1-SNAPSHOT - 1.9.93 + 1.9.94 UTF-8 3.0.2 2.8.9 From 2741e8414ddab95d7f74bc71d5612ffe3a6f2d1e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:40:23 +0100 Subject: [PATCH 602/983] build(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.9.0 (#1550) --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index fe74ce25d..3ecc1060e 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -11,7 +11,7 @@ maven-compiler-plugin - 3.8.1 + 3.9.0 1.7 1.7 diff --git a/pom.xml b/pom.xml index ae382b3fd..b5ce30dc1 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ maven-compiler-plugin - 3.8.1 + 3.9.0 1.7 1.7 From 11ea648d7ac77439f8d70419dc84deb278e3fbda Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:41:29 +0100 Subject: [PATCH 603/983] build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.3.0 (#1542) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0bfa7dcc8..fe3166fc0 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 31bb270c0..9dbd51693 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -39,7 +39,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d59282de9..b9e08c8aa 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ffd147fa6..ade7d390f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 3632ae9db..cacccd9d2 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -38,7 +38,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-test-source diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index a95f36f36..5891c62c8 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 69a5e5c7b..cc6cb1fa8 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source From e37781c8c23dded3c1f2f5184a5720ea3f3efdc4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:41:53 +0100 Subject: [PATCH 604/983] chore(deps): update dependency com.google.cloud:libraries-bom to v24.2.0 (#1541) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 28eb6b006..21dba3811 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 24.1.1 + 24.2.0 pom import From 7750398d6f4d6e447bfe078092f5cb146f747e50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:45:27 +0100 Subject: [PATCH 605/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.1 (#1527) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.1 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../com/google/api/client/http/HttpRequestTracingTest.java | 4 +++- pom.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 9618be795..6fc9cb37d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -44,7 +44,9 @@ public class HttpRequestTracingTest { public void setupTestTracer() { Tracing.getExportComponent().getSpanExporter().registerHandler("test", testHandler); TraceParams params = - Tracing.getTraceConfig().getActiveTraceParams().toBuilder() + Tracing.getTraceConfig() + .getActiveTraceParams() + .toBuilder() .setSampler(Samplers.alwaysSample()) .build(); Tracing.getTraceConfig().updateActiveTraceParams(params); diff --git a/pom.xml b/pom.xml index b5ce30dc1..b4523a07e 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.8.9 - 2.13.0 + 2.13.1 3.19.3 30.1.1-android 1.1.4c From ac10b6c9fbe4986b8bf130d9f83ae77e84d74e5f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:50:26 +0100 Subject: [PATCH 606/983] deps: update dependency org.apache.felix:maven-bundle-plugin to v5 (#1548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency org.apache.felix:maven-bundle-plugin to v5 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index fe3166fc0..7890eb177 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -68,7 +68,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.4 bundle-manifest diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index b32005b4f..46458ebc0 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -97,7 +97,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.4 bundle-manifest From 8c70a6976653599b35a4bde748d4a5a6883e1d71 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 19:50:33 +0100 Subject: [PATCH 607/983] build(deps): update dependency org.codehaus.mojo:animal-sniffer-maven-plugin to v1.20 (#1546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency org.codehaus.mojo:animal-sniffer-maven-plugin to v1.20 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4523a07e..912a212a7 100644 --- a/pom.xml +++ b/pom.xml @@ -350,7 +350,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.17 + 1.20 org.apache.maven.plugins From 2c5121c7c6f7690bb30a4daec973a6988b3f7523 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 21 Jan 2022 12:11:17 -0800 Subject: [PATCH 608/983] chore(main): release 1.41.1 (#1559) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 66 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02c1f66b1..52b6ca2dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +### [1.41.1](https://github.com/googleapis/google-http-java-client/compare/v1.41.0...v1.41.1) (2022-01-21) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.13.1 ([#1527](https://github.com/googleapis/google-http-java-client/issues/1527)) ([7750398](https://github.com/googleapis/google-http-java-client/commit/7750398d6f4d6e447bfe078092f5cb146f747e50)) +* update dependency com.google.protobuf:protobuf-java to v3.19.3 ([#1549](https://github.com/googleapis/google-http-java-client/issues/1549)) ([50c0765](https://github.com/googleapis/google-http-java-client/commit/50c0765f1eadbf7aef2dccf5f78ab62e2533c6f6)) +* update dependency com.puppycrawl.tools:checkstyle to v9.2.1 ([#1532](https://github.com/googleapis/google-http-java-client/issues/1532)) ([e13eebd](https://github.com/googleapis/google-http-java-client/commit/e13eebd288afbde3aa7bdc0229c2d0db90ebbd4c)) +* update dependency kr.motd.maven:os-maven-plugin to v1.7.0 ([#1547](https://github.com/googleapis/google-http-java-client/issues/1547)) ([8df0dbe](https://github.com/googleapis/google-http-java-client/commit/8df0dbe53521e918985e8f4882392cd2e0a0a1c3)) +* update dependency org.apache.felix:maven-bundle-plugin to v5 ([#1548](https://github.com/googleapis/google-http-java-client/issues/1548)) ([ac10b6c](https://github.com/googleapis/google-http-java-client/commit/ac10b6c9fbe4986b8bf130d9f83ae77e84d74e5f)) +* update project.appengine.version to v1.9.94 ([#1557](https://github.com/googleapis/google-http-java-client/issues/1557)) ([05c78f4](https://github.com/googleapis/google-http-java-client/commit/05c78f4bee92cc501aa084ad970ed6ac9c0e0444)) +* update project.opencensus.version to v0.30.0 ([#1526](https://github.com/googleapis/google-http-java-client/issues/1526)) ([318e54a](https://github.com/googleapis/google-http-java-client/commit/318e54ae9be6bfeb4f5af0af0cb954031d95d1f9)) + ## [1.41.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.40.1...v1.41.0) (2022-01-05) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 2e1f7d428..0f3c213d1 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.1-SNAPSHOT + 1.41.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.1-SNAPSHOT + 1.41.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.1-SNAPSHOT + 1.41.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 2f5f27a77..cec67fd36 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-android - 1.41.1-SNAPSHOT + 1.41.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 7890eb177..e51bbdada 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-apache-v2 - 1.41.1-SNAPSHOT + 1.41.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 959635145..24d0924cb 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-appengine - 1.41.1-SNAPSHOT + 1.41.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 51ff7bc99..d275aea92 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.1-SNAPSHOT + 1.41.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e15763e5a..3970e5be1 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.1-SNAPSHOT + 1.41.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-android - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-apache-v2 - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-appengine - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-findbugs - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-gson - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-jackson2 - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-protobuf - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-test - 1.41.1-SNAPSHOT + 1.41.1 com.google.http-client google-http-client-xml - 1.41.1-SNAPSHOT + 1.41.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6a9761012..e1b17f033 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-findbugs - 1.41.1-SNAPSHOT + 1.41.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 9dbd51693..56c08b6b8 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-gson - 1.41.1-SNAPSHOT + 1.41.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index b9e08c8aa..96ea67182 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-jackson2 - 1.41.1-SNAPSHOT + 1.41.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 8d96b3eb3..68a42c7d0 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-protobuf - 1.41.1-SNAPSHOT + 1.41.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ade7d390f..fbb17c1bb 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-test - 1.41.1-SNAPSHOT + 1.41.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index cacccd9d2..bb5dbf032 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client-xml - 1.41.1-SNAPSHOT + 1.41.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 46458ebc0..7c4334d82 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../pom.xml google-http-client - 1.41.1-SNAPSHOT + 1.41.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 912a212a7..51c01d4fc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.1-SNAPSHOT + 1.41.1 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ab48e8a58..59a40e7b6 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.1-SNAPSHOT + 1.41.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 99a7ca4cf..fd91f6d3a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.0:1.41.1-SNAPSHOT -google-http-client-bom:1.41.0:1.41.1-SNAPSHOT -google-http-client-parent:1.41.0:1.41.1-SNAPSHOT -google-http-client-android:1.41.0:1.41.1-SNAPSHOT -google-http-client-android-test:1.41.0:1.41.1-SNAPSHOT -google-http-client-apache-v2:1.41.0:1.41.1-SNAPSHOT -google-http-client-appengine:1.41.0:1.41.1-SNAPSHOT -google-http-client-assembly:1.41.0:1.41.1-SNAPSHOT -google-http-client-findbugs:1.41.0:1.41.1-SNAPSHOT -google-http-client-gson:1.41.0:1.41.1-SNAPSHOT -google-http-client-jackson2:1.41.0:1.41.1-SNAPSHOT -google-http-client-protobuf:1.41.0:1.41.1-SNAPSHOT -google-http-client-test:1.41.0:1.41.1-SNAPSHOT -google-http-client-xml:1.41.0:1.41.1-SNAPSHOT +google-http-client:1.41.1:1.41.1 +google-http-client-bom:1.41.1:1.41.1 +google-http-client-parent:1.41.1:1.41.1 +google-http-client-android:1.41.1:1.41.1 +google-http-client-android-test:1.41.1:1.41.1 +google-http-client-apache-v2:1.41.1:1.41.1 +google-http-client-appengine:1.41.1:1.41.1 +google-http-client-assembly:1.41.1:1.41.1 +google-http-client-findbugs:1.41.1:1.41.1 +google-http-client-gson:1.41.1:1.41.1 +google-http-client-jackson2:1.41.1:1.41.1 +google-http-client-protobuf:1.41.1:1.41.1 +google-http-client-test:1.41.1:1.41.1 +google-http-client-xml:1.41.1:1.41.1 From d9609b00089952d816deffa178640bfcae1f2c3a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 27 Jan 2022 18:45:32 +0100 Subject: [PATCH 609/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.11.0 (#1560) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 51c01d4fc..96bd2115d 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.10.0 + 2.11.0 com.google.appengine From c5dbec1bbfb5f26f952cb8d80f607327594ab7a8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 12:45:55 -0500 Subject: [PATCH 610/983] deps(java): update actions/github-script action to v5 (#1339) (#1561) Source-Link: https://github.com/googleapis/synthtool/commit/466412a75d636d69bcf8a42d9a5f956e73ac421d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 15 ++++++++++++++- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dcdda8c6d..be3b9bde4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,16 @@ +# Copyright 2022 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. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:9669c169d0582f13d6b2d319a43a78fc49f296a883aa48519bd0e5c7d34087c4 + digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 7513acaeb..c51324279 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 9b4fd4d83..59c7cadde 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true From 618fe509c017d206441d236091e889108abab9a4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 17:50:39 +0000 Subject: [PATCH 611/983] chore(main): release 1.41.2-SNAPSHOT (#1564) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 0f3c213d1..6dd37de99 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.1 + 1.41.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.1 + 1.41.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.1 + 1.41.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index cec67fd36..ea9de1911 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-android - 1.41.1 + 1.41.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index e51bbdada..adb578ff2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.1 + 1.41.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 24d0924cb..aea775914 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.1 + 1.41.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index d275aea92..46843ab22 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.1 + 1.41.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3970e5be1..fc12cdc60 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.1 + 1.41.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-android - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-test - 1.41.1 + 1.41.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.1 + 1.41.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index e1b17f033..146a76605 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.1 + 1.41.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 56c08b6b8..e2b03dfb7 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.1 + 1.41.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 96ea67182..a61c5bf3c 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.1 + 1.41.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 68a42c7d0..cc5291598 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.1 + 1.41.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index fbb17c1bb..0c3f79b99 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-test - 1.41.1 + 1.41.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index bb5dbf032..a11498afa 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.1 + 1.41.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 7c4334d82..ea8468c79 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../pom.xml google-http-client - 1.41.1 + 1.41.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 96bd2115d..9052a18f8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.1 + 1.41.2-SNAPSHOT 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 59a40e7b6..8a3918679 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.1 + 1.41.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index fd91f6d3a..1a03d2c78 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.1:1.41.1 -google-http-client-bom:1.41.1:1.41.1 -google-http-client-parent:1.41.1:1.41.1 -google-http-client-android:1.41.1:1.41.1 -google-http-client-android-test:1.41.1:1.41.1 -google-http-client-apache-v2:1.41.1:1.41.1 -google-http-client-appengine:1.41.1:1.41.1 -google-http-client-assembly:1.41.1:1.41.1 -google-http-client-findbugs:1.41.1:1.41.1 -google-http-client-gson:1.41.1:1.41.1 -google-http-client-jackson2:1.41.1:1.41.1 -google-http-client-protobuf:1.41.1:1.41.1 -google-http-client-test:1.41.1:1.41.1 -google-http-client-xml:1.41.1:1.41.1 +google-http-client:1.41.1:1.41.2-SNAPSHOT +google-http-client-bom:1.41.1:1.41.2-SNAPSHOT +google-http-client-parent:1.41.1:1.41.2-SNAPSHOT +google-http-client-android:1.41.1:1.41.2-SNAPSHOT +google-http-client-android-test:1.41.1:1.41.2-SNAPSHOT +google-http-client-apache-v2:1.41.1:1.41.2-SNAPSHOT +google-http-client-appengine:1.41.1:1.41.2-SNAPSHOT +google-http-client-assembly:1.41.1:1.41.2-SNAPSHOT +google-http-client-findbugs:1.41.1:1.41.2-SNAPSHOT +google-http-client-gson:1.41.1:1.41.2-SNAPSHOT +google-http-client-jackson2:1.41.1:1.41.2-SNAPSHOT +google-http-client-protobuf:1.41.1:1.41.2-SNAPSHOT +google-http-client-test:1.41.1:1.41.2-SNAPSHOT +google-http-client-xml:1.41.1:1.41.2-SNAPSHOT From f7948014150d0205ffb6abf322e97e0c03b4ee16 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 12:59:19 -0500 Subject: [PATCH 612/983] chore(main): release 1.41.2 (#1565) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 61 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b6ca2dc..decb43509 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.41.2](https://github.com/googleapis/google-http-java-client/compare/v1.41.1...v1.41.2) (2022-01-27) + + +### Dependencies + +* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/google-http-java-client/issues/1339)) ([#1561](https://github.com/googleapis/google-http-java-client/issues/1561)) ([c5dbec1](https://github.com/googleapis/google-http-java-client/commit/c5dbec1bbfb5f26f952cb8d80f607327594ab7a8)) +* update dependency com.google.errorprone:error_prone_annotations to v2.11.0 ([#1560](https://github.com/googleapis/google-http-java-client/issues/1560)) ([d9609b0](https://github.com/googleapis/google-http-java-client/commit/d9609b00089952d816deffa178640bfcae1f2c3a)) + ### [1.41.1](https://github.com/googleapis/google-http-java-client/compare/v1.41.0...v1.41.1) (2022-01-21) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 6dd37de99..da73b93ae 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.2-SNAPSHOT + 1.41.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.2-SNAPSHOT + 1.41.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.2-SNAPSHOT + 1.41.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index ea9de1911..076b27303 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-android - 1.41.2-SNAPSHOT + 1.41.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index adb578ff2..32a937384 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-apache-v2 - 1.41.2-SNAPSHOT + 1.41.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index aea775914..71c0ac750 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-appengine - 1.41.2-SNAPSHOT + 1.41.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 46843ab22..c7cea4b23 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.2-SNAPSHOT + 1.41.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index fc12cdc60..39a7fab5b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.2-SNAPSHOT + 1.41.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-android - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-apache-v2 - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-appengine - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-findbugs - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-gson - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-jackson2 - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-protobuf - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-test - 1.41.2-SNAPSHOT + 1.41.2 com.google.http-client google-http-client-xml - 1.41.2-SNAPSHOT + 1.41.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 146a76605..3d2eb96eb 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-findbugs - 1.41.2-SNAPSHOT + 1.41.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index e2b03dfb7..868a76ae8 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-gson - 1.41.2-SNAPSHOT + 1.41.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a61c5bf3c..051ffe1c3 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-jackson2 - 1.41.2-SNAPSHOT + 1.41.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index cc5291598..227d70b8d 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-protobuf - 1.41.2-SNAPSHOT + 1.41.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 0c3f79b99..af2697706 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-test - 1.41.2-SNAPSHOT + 1.41.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index a11498afa..8885f76d7 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client-xml - 1.41.2-SNAPSHOT + 1.41.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ea8468c79..ef2a11339 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../pom.xml google-http-client - 1.41.2-SNAPSHOT + 1.41.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 9052a18f8..12d32980e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.2-SNAPSHOT + 1.41.2 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8a3918679..e061e4800 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.2-SNAPSHOT + 1.41.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 1a03d2c78..b4c760909 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.1:1.41.2-SNAPSHOT -google-http-client-bom:1.41.1:1.41.2-SNAPSHOT -google-http-client-parent:1.41.1:1.41.2-SNAPSHOT -google-http-client-android:1.41.1:1.41.2-SNAPSHOT -google-http-client-android-test:1.41.1:1.41.2-SNAPSHOT -google-http-client-apache-v2:1.41.1:1.41.2-SNAPSHOT -google-http-client-appengine:1.41.1:1.41.2-SNAPSHOT -google-http-client-assembly:1.41.1:1.41.2-SNAPSHOT -google-http-client-findbugs:1.41.1:1.41.2-SNAPSHOT -google-http-client-gson:1.41.1:1.41.2-SNAPSHOT -google-http-client-jackson2:1.41.1:1.41.2-SNAPSHOT -google-http-client-protobuf:1.41.1:1.41.2-SNAPSHOT -google-http-client-test:1.41.1:1.41.2-SNAPSHOT -google-http-client-xml:1.41.1:1.41.2-SNAPSHOT +google-http-client:1.41.2:1.41.2 +google-http-client-bom:1.41.2:1.41.2 +google-http-client-parent:1.41.2:1.41.2 +google-http-client-android:1.41.2:1.41.2 +google-http-client-android-test:1.41.2:1.41.2 +google-http-client-apache-v2:1.41.2:1.41.2 +google-http-client-appengine:1.41.2:1.41.2 +google-http-client-assembly:1.41.2:1.41.2 +google-http-client-findbugs:1.41.2:1.41.2 +google-http-client-gson:1.41.2:1.41.2 +google-http-client-jackson2:1.41.2:1.41.2 +google-http-client-protobuf:1.41.2:1.41.2 +google-http-client-test:1.41.2:1.41.2 +google-http-client-xml:1.41.2:1.41.2 From d97d609d155f2538dd347b0150971a967cb064bb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 16:56:47 -0500 Subject: [PATCH 613/983] chore: update auto-release script to fix breaking changes in v5 (#1350) (#1575) Source-Link: https://github.com/googleapis/synthtool/commit/53a58c23eb4decb3a17fab07388d42799e158b5f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 15 +++++++++++ .github/workflows/auto-release.yaml | 27 ++++++++++++++----- .github/workflows/ci.yaml | 15 +++++++++++ .kokoro/build.bat | 15 +++++++++++ .kokoro/nightly/java11-integration.cfg | 37 ++++++++++++++++++++++++++ 6 files changed, 104 insertions(+), 7 deletions(-) create mode 100644 .kokoro/nightly/java11-integration.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index be3b9bde4..9786771c4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 + digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index c51324279..1bb182327 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-merge-readme diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 59c7cadde..18e23230d 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-release @@ -16,13 +31,13 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(main): release " + if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { return; } // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.pulls.listFiles.endpoint({ + const filesPromise = github.rest.pulls.listFiles.endpoint({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.payload.pull_request.number, @@ -54,7 +69,7 @@ jobs: return; } - const promise = github.pulls.list.endpoint({ + const promise = github.rest.pulls.list.endpoint({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' @@ -71,7 +86,7 @@ jobs: } // approve release PR - await github.pulls.createReview({ + await github.rest.pulls.createReview({ owner: context.repo.owner, repo: context.repo.repo, body: 'Rubber stamped release!', @@ -80,7 +95,7 @@ jobs: }); // attach kokoro:force-run and automerge labels - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 05de1f60d..6b5e56aaa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: push: branches: diff --git a/.kokoro/build.bat b/.kokoro/build.bat index 05826ad93..cc602c9eb 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +1,18 @@ :: See documentation in type-shell-output.bat +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg new file mode 100644 index 000000000..58049cc38 --- /dev/null +++ b/.kokoro/nightly/java11-integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/java11014" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} From 78d00636d86b34967a3670cd471ef808ea209160 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 22:04:54 +0000 Subject: [PATCH 614/983] chore(main): release 1.41.3-SNAPSHOT (#1566) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index da73b93ae..a48dcbd6b 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.2 + 1.41.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.2 + 1.41.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.2 + 1.41.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 076b27303..8ac1754ba 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-android - 1.41.2 + 1.41.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 32a937384..bcc57f9e5 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.2 + 1.41.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 71c0ac750..cfb81d735 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.2 + 1.41.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index c7cea4b23..148d578a5 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.2 + 1.41.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 39a7fab5b..4acc4a3ae 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.2 + 1.41.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-android - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-test - 1.41.2 + 1.41.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.2 + 1.41.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 3d2eb96eb..bcf5ea6b8 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.2 + 1.41.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 868a76ae8..838a119c0 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.2 + 1.41.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 051ffe1c3..4952f8627 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.2 + 1.41.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 227d70b8d..254f9075f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.2 + 1.41.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index af2697706..2fb68fada 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-test - 1.41.2 + 1.41.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8885f76d7..c94046c21 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.2 + 1.41.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ef2a11339..a4ad1dc1b 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../pom.xml google-http-client - 1.41.2 + 1.41.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 12d32980e..48ba2bab8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.2 + 1.41.3-SNAPSHOT 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index e061e4800..dae54d75f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.2 + 1.41.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b4c760909..7e2d09754 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.2:1.41.2 -google-http-client-bom:1.41.2:1.41.2 -google-http-client-parent:1.41.2:1.41.2 -google-http-client-android:1.41.2:1.41.2 -google-http-client-android-test:1.41.2:1.41.2 -google-http-client-apache-v2:1.41.2:1.41.2 -google-http-client-appengine:1.41.2:1.41.2 -google-http-client-assembly:1.41.2:1.41.2 -google-http-client-findbugs:1.41.2:1.41.2 -google-http-client-gson:1.41.2:1.41.2 -google-http-client-jackson2:1.41.2:1.41.2 -google-http-client-protobuf:1.41.2:1.41.2 -google-http-client-test:1.41.2:1.41.2 -google-http-client-xml:1.41.2:1.41.2 +google-http-client:1.41.2:1.41.3-SNAPSHOT +google-http-client-bom:1.41.2:1.41.3-SNAPSHOT +google-http-client-parent:1.41.2:1.41.3-SNAPSHOT +google-http-client-android:1.41.2:1.41.3-SNAPSHOT +google-http-client-android-test:1.41.2:1.41.3-SNAPSHOT +google-http-client-apache-v2:1.41.2:1.41.3-SNAPSHOT +google-http-client-appengine:1.41.2:1.41.3-SNAPSHOT +google-http-client-assembly:1.41.2:1.41.3-SNAPSHOT +google-http-client-findbugs:1.41.2:1.41.3-SNAPSHOT +google-http-client-gson:1.41.2:1.41.3-SNAPSHOT +google-http-client-jackson2:1.41.2:1.41.3-SNAPSHOT +google-http-client-protobuf:1.41.2:1.41.3-SNAPSHOT +google-http-client-test:1.41.2:1.41.3-SNAPSHOT +google-http-client-xml:1.41.2:1.41.3-SNAPSHOT From cc1e7b6977caf67ac30e7dea8972d26b3feed290 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 9 Feb 2022 17:16:24 -0500 Subject: [PATCH 615/983] chore(docs): libraries-bom 24.3.0 (#1577) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 0db41a40f..24beb7317 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 24.1.1 + 24.3.0 pom import From 416e5d7146ad145e3d5140110144b5119c6126df Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Feb 2022 00:40:54 +0100 Subject: [PATCH 616/983] deps: update dependency com.google.protobuf:protobuf-java to v3.19.4 (#1568) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.19.3` -> `3.19.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.19.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.19.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.19.4/compatibility-slim/3.19.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.19.4/confidence-slim/3.19.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.19.4`](https://github.com/protocolbuffers/protobuf/releases/v3.19.4) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.19.3...v3.19.4) ### Python - Make libprotobuf symbols local on OSX to fix issue [#​9395](https://github.com/protocolbuffers/protobuf/issues/9395) ([#​9435](https://github.com/protocolbuffers/protobuf/issues/9435)) ### Ruby - Fixed a data loss bug that could occur when the number of `optional` fields in a message is an exact multiple of 32. ([#​9440](https://github.com/protocolbuffers/protobuf/issues/9440)). ### PHP - Fixed a data loss bug that could occur when the number of `optional` fields in a message is an exact multiple of 32. ([#​9440](https://github.com/protocolbuffers/protobuf/issues/9440)).
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48ba2bab8..b02ddef67 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.8.9 2.13.1 - 3.19.3 + 3.19.4 30.1.1-android 1.1.4c 4.5.13 From 0f9d2b77ae23ea143b5b8caaa21af6548ca92345 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Feb 2022 00:42:44 +0100 Subject: [PATCH 617/983] deps: update project.opencensus.version to v0.31.0 (#1563) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opencensus:opencensus-testing](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-impl](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-contrib-http-util](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-api](https://github.com/census-instrumentation/opencensus-java) | `0.30.0` -> `0.31.0` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/compatibility-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.0/confidence-slim/0.30.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              census-instrumentation/opencensus-java ### [`v0.31.0`](https://github.com/census-instrumentation/opencensus-java/releases/v0.31.0) [Compare Source](https://github.com/census-instrumentation/opencensus-java/compare/v0.30.0...v0.31.0) - fix: Shutdown Stackdriver MetricServiceClient properly by [@​janhicken](https://github.com/janhicken) in [https://github.com/census-instrumentation/opencensus-java/pull/2091](https://github.com/census-instrumentation/opencensus-java/pull/2091) - implement gRPC client retry stats measures and views by [@​mackenziestarr](https://github.com/mackenziestarr) in [https://github.com/census-instrumentation/opencensus-java/pull/2084](https://github.com/census-instrumentation/opencensus-java/pull/2084) **Full Changelog**: https://github.com/census-instrumentation/opencensus-java/compare/v0.29.0...v0.31.0
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b02ddef67..ea03b8bff 100644 --- a/pom.xml +++ b/pom.xml @@ -571,7 +571,7 @@ 1.1.4c 4.5.13 4.4.15 - 0.30.0 + 0.31.0 .. false
              From 9c7ade85eceb2dc348e1f9aa0637d0509d634160 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Feb 2022 00:42:48 +0100 Subject: [PATCH 618/983] deps: update dependency com.puppycrawl.tools:checkstyle to v9.3 (#1569) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.puppycrawl.tools:checkstyle](https://checkstyle.org/) ([source](https://github.com/checkstyle/checkstyle)) | `9.2.1` -> `9.3` | [![age](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.3/compatibility-slim/9.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.puppycrawl.tools:checkstyle/9.3/confidence-slim/9.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ea03b8bff..a4494cac2 100644 --- a/pom.xml +++ b/pom.xml @@ -659,7 +659,7 @@ com.puppycrawl.tools checkstyle - 9.2.1 + 9.3 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index dae54d75f..2fa9888b0 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -95,7 +95,7 @@ com.puppycrawl.tools checkstyle - 9.2.1 + 9.3 From c2885b343e9c93505a6370e1aea08b35db70c1ba Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 23:55:03 +0000 Subject: [PATCH 619/983] chore(main): release 1.41.3 (#1578) :robot: I have created a release *beep* *boop* --- ### [1.41.3](https://github.com/googleapis/google-http-java-client/compare/v1.41.2...v1.41.3) (2022-02-09) ### Dependencies * update dependency com.google.protobuf:protobuf-java to v3.19.4 ([#1568](https://github.com/googleapis/google-http-java-client/issues/1568)) ([416e5d7](https://github.com/googleapis/google-http-java-client/commit/416e5d7146ad145e3d5140110144b5119c6126df)) * update dependency com.puppycrawl.tools:checkstyle to v9.3 ([#1569](https://github.com/googleapis/google-http-java-client/issues/1569)) ([9c7ade8](https://github.com/googleapis/google-http-java-client/commit/9c7ade85eceb2dc348e1f9aa0637d0509d634160)) * update project.opencensus.version to v0.31.0 ([#1563](https://github.com/googleapis/google-http-java-client/issues/1563)) ([0f9d2b7](https://github.com/googleapis/google-http-java-client/commit/0f9d2b77ae23ea143b5b8caaa21af6548ca92345)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 9 ++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 62 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index decb43509..2f52f510c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +### [1.41.3](https://github.com/googleapis/google-http-java-client/compare/v1.41.2...v1.41.3) (2022-02-09) + + +### Dependencies + +* update dependency com.google.protobuf:protobuf-java to v3.19.4 ([#1568](https://github.com/googleapis/google-http-java-client/issues/1568)) ([416e5d7](https://github.com/googleapis/google-http-java-client/commit/416e5d7146ad145e3d5140110144b5119c6126df)) +* update dependency com.puppycrawl.tools:checkstyle to v9.3 ([#1569](https://github.com/googleapis/google-http-java-client/issues/1569)) ([9c7ade8](https://github.com/googleapis/google-http-java-client/commit/9c7ade85eceb2dc348e1f9aa0637d0509d634160)) +* update project.opencensus.version to v0.31.0 ([#1563](https://github.com/googleapis/google-http-java-client/issues/1563)) ([0f9d2b7](https://github.com/googleapis/google-http-java-client/commit/0f9d2b77ae23ea143b5b8caaa21af6548ca92345)) + ### [1.41.2](https://github.com/googleapis/google-http-java-client/compare/v1.41.1...v1.41.2) (2022-01-27) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index a48dcbd6b..f2adf812f 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.3-SNAPSHOT + 1.41.3 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.3-SNAPSHOT + 1.41.3 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.3-SNAPSHOT + 1.41.3 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 8ac1754ba..c12b84321 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-android - 1.41.3-SNAPSHOT + 1.41.3 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index bcc57f9e5..af5d28c73 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-apache-v2 - 1.41.3-SNAPSHOT + 1.41.3 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index cfb81d735..1812efe4a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-appengine - 1.41.3-SNAPSHOT + 1.41.3 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 148d578a5..8ec1377e9 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.3-SNAPSHOT + 1.41.3 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 4acc4a3ae..04fb1c48d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.3-SNAPSHOT + 1.41.3 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-android - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-apache-v2 - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-appengine - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-findbugs - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-gson - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-jackson2 - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-protobuf - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-test - 1.41.3-SNAPSHOT + 1.41.3 com.google.http-client google-http-client-xml - 1.41.3-SNAPSHOT + 1.41.3 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index bcf5ea6b8..9d6fb0998 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-findbugs - 1.41.3-SNAPSHOT + 1.41.3 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 838a119c0..0ef684db3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-gson - 1.41.3-SNAPSHOT + 1.41.3 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 4952f8627..483754558 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-jackson2 - 1.41.3-SNAPSHOT + 1.41.3 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 254f9075f..ea3c95434 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-protobuf - 1.41.3-SNAPSHOT + 1.41.3 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 2fb68fada..db4fd5994 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-test - 1.41.3-SNAPSHOT + 1.41.3 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c94046c21..fc86275cb 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client-xml - 1.41.3-SNAPSHOT + 1.41.3 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index a4ad1dc1b..416c47e80 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../pom.xml google-http-client - 1.41.3-SNAPSHOT + 1.41.3 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a4494cac2..908cbe214 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.3-SNAPSHOT + 1.41.3 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2fa9888b0..8d949cfa1 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.3-SNAPSHOT + 1.41.3 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 7e2d09754..2920248bb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.2:1.41.3-SNAPSHOT -google-http-client-bom:1.41.2:1.41.3-SNAPSHOT -google-http-client-parent:1.41.2:1.41.3-SNAPSHOT -google-http-client-android:1.41.2:1.41.3-SNAPSHOT -google-http-client-android-test:1.41.2:1.41.3-SNAPSHOT -google-http-client-apache-v2:1.41.2:1.41.3-SNAPSHOT -google-http-client-appengine:1.41.2:1.41.3-SNAPSHOT -google-http-client-assembly:1.41.2:1.41.3-SNAPSHOT -google-http-client-findbugs:1.41.2:1.41.3-SNAPSHOT -google-http-client-gson:1.41.2:1.41.3-SNAPSHOT -google-http-client-jackson2:1.41.2:1.41.3-SNAPSHOT -google-http-client-protobuf:1.41.2:1.41.3-SNAPSHOT -google-http-client-test:1.41.2:1.41.3-SNAPSHOT -google-http-client-xml:1.41.2:1.41.3-SNAPSHOT +google-http-client:1.41.3:1.41.3 +google-http-client-bom:1.41.3:1.41.3 +google-http-client-parent:1.41.3:1.41.3 +google-http-client-android:1.41.3:1.41.3 +google-http-client-android-test:1.41.3:1.41.3 +google-http-client-apache-v2:1.41.3:1.41.3 +google-http-client-appengine:1.41.3:1.41.3 +google-http-client-assembly:1.41.3:1.41.3 +google-http-client-findbugs:1.41.3:1.41.3 +google-http-client-gson:1.41.3:1.41.3 +google-http-client-jackson2:1.41.3:1.41.3 +google-http-client-protobuf:1.41.3:1.41.3 +google-http-client-test:1.41.3:1.41.3 +google-http-client-xml:1.41.3:1.41.3 From 9c10486dacab2b4e74ac6f119c8ff7cf4a238f6a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Feb 2022 00:55:09 +0100 Subject: [PATCH 620/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.2.1 (#1572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.1.2` -> `3.2.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/compatibility-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/confidence-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 908cbe214..bb00481e7 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.2.1 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.1.2 + 3.2.1 From 21a4000a2d633507fcf281f2979d91b2e3678f7d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Feb 2022 02:17:12 +0100 Subject: [PATCH 621/983] build(deps): update dependency org.codehaus.mojo:animal-sniffer-maven-plugin to v1.21 (#1570) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.mojo:animal-sniffer-maven-plugin](https://www.mojohaus.org/animal-sniffer) ([source](https://github.com/mojohaus/animal-sniffer)) | `1.20` -> `1.21` | [![age](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.21/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.21/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.21/compatibility-slim/1.20)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.21/confidence-slim/1.20)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb00481e7..697014932 100644 --- a/pom.xml +++ b/pom.xml @@ -350,7 +350,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.20 + 1.21 org.apache.maven.plugins From ba7021b270c56f582cb50ae53ebcb29dcc981bc8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Feb 2022 01:23:04 +0000 Subject: [PATCH 622/983] chore(main): release 1.41.4-SNAPSHOT (#1579) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index f2adf812f..165503059 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.3 + 1.41.4-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.3 + 1.41.4-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.3 + 1.41.4-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c12b84321..bb32b0440 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-android - 1.41.3 + 1.41.4-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index af5d28c73..a7c11bd1e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.3 + 1.41.4-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1812efe4a..bd607bba4 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.3 + 1.41.4-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 8ec1377e9..5b844aab3 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.3 + 1.41.4-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 04fb1c48d..94f44cb7f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.3 + 1.41.4-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-android - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-test - 1.41.3 + 1.41.4-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.3 + 1.41.4-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9d6fb0998..59a3386f3 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.3 + 1.41.4-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 0ef684db3..80483cf16 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.3 + 1.41.4-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 483754558..09125f749 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.3 + 1.41.4-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index ea3c95434..fd8ca8e02 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.3 + 1.41.4-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index db4fd5994..e048d0bb7 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-test - 1.41.3 + 1.41.4-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index fc86275cb..5352fc1f5 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.3 + 1.41.4-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 416c47e80..c4cf6cb89 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../pom.xml google-http-client - 1.41.3 + 1.41.4-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 697014932..e2eb78615 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.3 + 1.41.4-SNAPSHOT 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8d949cfa1..0ba4cd614 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.3 + 1.41.4-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2920248bb..0dfe4acee 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.3:1.41.3 -google-http-client-bom:1.41.3:1.41.3 -google-http-client-parent:1.41.3:1.41.3 -google-http-client-android:1.41.3:1.41.3 -google-http-client-android-test:1.41.3:1.41.3 -google-http-client-apache-v2:1.41.3:1.41.3 -google-http-client-appengine:1.41.3:1.41.3 -google-http-client-assembly:1.41.3:1.41.3 -google-http-client-findbugs:1.41.3:1.41.3 -google-http-client-gson:1.41.3:1.41.3 -google-http-client-jackson2:1.41.3:1.41.3 -google-http-client-protobuf:1.41.3:1.41.3 -google-http-client-test:1.41.3:1.41.3 -google-http-client-xml:1.41.3:1.41.3 +google-http-client:1.41.3:1.41.4-SNAPSHOT +google-http-client-bom:1.41.3:1.41.4-SNAPSHOT +google-http-client-parent:1.41.3:1.41.4-SNAPSHOT +google-http-client-android:1.41.3:1.41.4-SNAPSHOT +google-http-client-android-test:1.41.3:1.41.4-SNAPSHOT +google-http-client-apache-v2:1.41.3:1.41.4-SNAPSHOT +google-http-client-appengine:1.41.3:1.41.4-SNAPSHOT +google-http-client-assembly:1.41.3:1.41.4-SNAPSHOT +google-http-client-findbugs:1.41.3:1.41.4-SNAPSHOT +google-http-client-gson:1.41.3:1.41.4-SNAPSHOT +google-http-client-jackson2:1.41.3:1.41.4-SNAPSHOT +google-http-client-protobuf:1.41.3:1.41.4-SNAPSHOT +google-http-client-test:1.41.3:1.41.4-SNAPSHOT +google-http-client-xml:1.41.3:1.41.4-SNAPSHOT From 23fede79ab08903190066e9766dab37091f65415 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Fri, 11 Feb 2022 15:14:11 -0500 Subject: [PATCH 623/983] chore: downstream check for all libraries in single job (#1554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: add downstream checks * chore: change java version to 8 * Update downstream-client-library-check.sh * Update downstream-client-library-check.sh * Update README.md * Update .OwlBot.lock.yaml * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update downstream-client-library-check.sh * Update downstream.yaml * Update downstream-client-library-check.sh Co-authored-by: Owl Bot --- .github/workflows/downstream.yaml | 142 +++++++++++++++++++++ .kokoro/downstream-client-library-check.sh | 104 +++++++++++++++ README.md | 2 +- 3 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/downstream.yaml create mode 100755 .kokoro/downstream-client-library-check.sh diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml new file mode 100644 index 000000000..b3448d9c4 --- /dev/null +++ b/.github/workflows/downstream.yaml @@ -0,0 +1,142 @@ +on: + pull_request: + types: [ labeled ] + branches: + - main +name: downstream +jobs: + dependencies: + if: ${{ github.event.label.name == 'downstream-check:run' }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [8] + repo: + # This list needs to be updated manually until an automated solution is in place. + - accessapproval + - accesscontextmanager + - aiplatform + - analytics-admin + - analytics-data + - api-gateway + - apigee-connect + - appengine-admin + - area120-tables + - artifact-registry + - asset + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigtable + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsublite + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: sudo apt-get install libxml2-utils + - run: .kokoro/downstream-client-library-check.sh google-http-client-bom ${{matrix.repo}} diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh new file mode 100755 index 000000000..852db9e21 --- /dev/null +++ b/.kokoro/downstream-client-library-check.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# Copyright 2022 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. + +set -eo pipefail +# Display commands being run. +set -x + + +CORE_LIBRARY_ARTIFACT=$1 +CLIENT_LIBRARY=$2 +## Get the directory of the build script +scriptDir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +## cd to the parent directory, i.e. the root of the git repo +cd "${scriptDir}"/.. + +# Make java core library artifacts available for 'mvn verify' at the bottom +mvn verify install -B -V -ntp -fae \ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true + +# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +CORE_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +CORE_VERSION=$(sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -) + +if [ -z "${CORE_VERSION}" ]; then + echo "Version is not found in ${CORE_VERSION_POM}" + exit 1 +fi +echo "Version: ${CORE_VERSION}" + +# Round 1 +# Check this java core library against HEAD of java-shared dependencies + +git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +pushd java-shared-dependencies/first-party-dependencies + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +cd ../x:version +set ${CORE_VERSION} +save pom.xml +EOF + +# run dependencies script +cd .. +mvn verify install -B -V -ntp -fae \ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true + +SHARED_DEPS_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +SHARED_DEPS_VERSION=$(sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -) + +if [ -z "${SHARED_DEPS_VERSION}" ]; then + echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" + exit 1 +fi + +# Round 2 + +# Check this BOM against java client libraries +git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +pushd java-"${CLIENT_LIBRARY}" + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + pushd google-cloud-bigtable-deps-bom +fi + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +cd ../x:version +set ${SHARED_DEPS_VERSION} +save pom.xml +EOF + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + popd +fi + +mvn verify install -B -V -ntp -fae \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true diff --git a/README.md b/README.md index 1b65d5469..b9aa0f867 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,4 @@ might result, and you are not guaranteed a compilation error. [ci-status-link]: https://github.com/googleapis/google-http-java-client/actions?query=event%3Apush [maven-version-image]: https://img.shields.io/maven-central/v/com.google.http-client/google-http-client.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.http-client%20AND%20a:google-http-client&core=gav -[stability-image]: https://img.shields.io/badge/stability-ga-green +[stability-image]: https://img.shields.io/badge/stability-stable-green From 877277821dad65545518b06123e6e7b9801147a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 11 Feb 2022 22:17:05 +0100 Subject: [PATCH 624/983] deps: update dependency com.google.code.gson:gson to v2.9.0 (#1582) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.code.gson:gson](https://github.com/google/gson) | `2.8.9` -> `2.9.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.0/compatibility-slim/2.8.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.0/confidence-slim/2.8.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/gson ### [`v2.9.0`](https://github.com/google/gson/blob/HEAD/CHANGELOG.md#Version-290) **The minimum supported Java version changes from 6 to 7.** - Change target Java version to 7 ([#​2043](https://github.com/google/gson/issues/2043)) - Put `module-info.class` into Multi-Release JAR folder ([#​2013](https://github.com/google/gson/issues/2013)) - Improve error message when abstract class cannot be constructed ([#​1814](https://github.com/google/gson/issues/1814)) - Support EnumMap deserialization ([#​2071](https://github.com/google/gson/issues/2071)) - Add LazilyParsedNumber default adapter ([#​2060](https://github.com/google/gson/issues/2060)) - Fix JsonReader.hasNext() returning true at end of document ([#​2061](https://github.com/google/gson/issues/2061)) - Remove Gradle build support. Build script was outdated and not actively maintained anymore ([#​2063](https://github.com/google/gson/issues/2063)) - Add `GsonBuilder.disableJdkUnsafe()` ([#​1904](https://github.com/google/gson/issues/1904)) - Add `UPPER_CASE_WITH_UNDERSCORES` in FieldNamingPolicy ([#​2024](https://github.com/google/gson/issues/2024)) - Fix failing to serialize Collection or Map with inaccessible constructor ([#​1902](https://github.com/google/gson/issues/1902)) - Improve TreeTypeAdapter thread-safety ([#​1976](https://github.com/google/gson/issues/1976)) - Fix `Gson.newJsonWriter` ignoring lenient and HTML-safe setting ([#​1989](https://github.com/google/gson/issues/1989)) - Delete unused LinkedHashTreeMap ([#​1992](https://github.com/google/gson/issues/1992)) - Make default adapters stricter; improve exception messages ([#​2000](https://github.com/google/gson/issues/2000)) - Fix `FieldNamingPolicy.upperCaseFirstLetter` uppercasing non-letter ([#​2004](https://github.com/google/gson/issues/2004))
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e2eb78615..ad39c03e1 100644 --- a/pom.xml +++ b/pom.xml @@ -564,7 +564,7 @@ 1.9.94 UTF-8 3.0.2 - 2.8.9 + 2.9.0 2.13.1 3.19.4 30.1.1-android From 119122994ee3e435bd5cac8077b1046bc2fad5c2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:23:07 +0000 Subject: [PATCH 625/983] chore(main): release 1.41.4 (#1583) :robot: I have created a release *beep* *boop* --- ### [1.41.4](https://github.com/googleapis/google-http-java-client/compare/v1.41.3...v1.41.4) (2022-02-11) ### Dependencies * update dependency com.google.code.gson:gson to v2.9.0 ([#1582](https://github.com/googleapis/google-http-java-client/issues/1582)) ([8772778](https://github.com/googleapis/google-http-java-client/commit/877277821dad65545518b06123e6e7b9801147a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f52f510c..a326fa602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.41.4](https://github.com/googleapis/google-http-java-client/compare/v1.41.3...v1.41.4) (2022-02-11) + + +### Dependencies + +* update dependency com.google.code.gson:gson to v2.9.0 ([#1582](https://github.com/googleapis/google-http-java-client/issues/1582)) ([8772778](https://github.com/googleapis/google-http-java-client/commit/877277821dad65545518b06123e6e7b9801147a1)) + ### [1.41.3](https://github.com/googleapis/google-http-java-client/compare/v1.41.2...v1.41.3) (2022-02-09) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 165503059..04270e7ec 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.4-SNAPSHOT + 1.41.4 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.4-SNAPSHOT + 1.41.4 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.4-SNAPSHOT + 1.41.4 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index bb32b0440..eccac49f5 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-android - 1.41.4-SNAPSHOT + 1.41.4 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a7c11bd1e..df289c2c7 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-apache-v2 - 1.41.4-SNAPSHOT + 1.41.4 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index bd607bba4..c65787f89 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-appengine - 1.41.4-SNAPSHOT + 1.41.4 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 5b844aab3..a1ef3f9d8 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.4-SNAPSHOT + 1.41.4 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 94f44cb7f..9698f4fce 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.4-SNAPSHOT + 1.41.4 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-android - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-apache-v2 - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-appengine - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-findbugs - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-gson - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-jackson2 - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-protobuf - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-test - 1.41.4-SNAPSHOT + 1.41.4 com.google.http-client google-http-client-xml - 1.41.4-SNAPSHOT + 1.41.4 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 59a3386f3..405633af6 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-findbugs - 1.41.4-SNAPSHOT + 1.41.4 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 80483cf16..49fd928f3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-gson - 1.41.4-SNAPSHOT + 1.41.4 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 09125f749..029676351 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-jackson2 - 1.41.4-SNAPSHOT + 1.41.4 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fd8ca8e02..aae085125 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-protobuf - 1.41.4-SNAPSHOT + 1.41.4 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index e048d0bb7..a039fa7c7 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-test - 1.41.4-SNAPSHOT + 1.41.4 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 5352fc1f5..12aacf968 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client-xml - 1.41.4-SNAPSHOT + 1.41.4 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index c4cf6cb89..0ea91d999 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../pom.xml google-http-client - 1.41.4-SNAPSHOT + 1.41.4 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index ad39c03e1..b7b194214 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.4-SNAPSHOT + 1.41.4 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 0ba4cd614..3d7bb6b62 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.4-SNAPSHOT + 1.41.4 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 0dfe4acee..cd791f79a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.3:1.41.4-SNAPSHOT -google-http-client-bom:1.41.3:1.41.4-SNAPSHOT -google-http-client-parent:1.41.3:1.41.4-SNAPSHOT -google-http-client-android:1.41.3:1.41.4-SNAPSHOT -google-http-client-android-test:1.41.3:1.41.4-SNAPSHOT -google-http-client-apache-v2:1.41.3:1.41.4-SNAPSHOT -google-http-client-appengine:1.41.3:1.41.4-SNAPSHOT -google-http-client-assembly:1.41.3:1.41.4-SNAPSHOT -google-http-client-findbugs:1.41.3:1.41.4-SNAPSHOT -google-http-client-gson:1.41.3:1.41.4-SNAPSHOT -google-http-client-jackson2:1.41.3:1.41.4-SNAPSHOT -google-http-client-protobuf:1.41.3:1.41.4-SNAPSHOT -google-http-client-test:1.41.3:1.41.4-SNAPSHOT -google-http-client-xml:1.41.3:1.41.4-SNAPSHOT +google-http-client:1.41.4:1.41.4 +google-http-client-bom:1.41.4:1.41.4 +google-http-client-parent:1.41.4:1.41.4 +google-http-client-android:1.41.4:1.41.4 +google-http-client-android-test:1.41.4:1.41.4 +google-http-client-apache-v2:1.41.4:1.41.4 +google-http-client-appengine:1.41.4:1.41.4 +google-http-client-assembly:1.41.4:1.41.4 +google-http-client-findbugs:1.41.4:1.41.4 +google-http-client-gson:1.41.4:1.41.4 +google-http-client-jackson2:1.41.4:1.41.4 +google-http-client-protobuf:1.41.4:1.41.4 +google-http-client-test:1.41.4:1.41.4 +google-http-client-xml:1.41.4:1.41.4 From a294ff56d1af8e5e7a7077c9157ecc842c5a0f49 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:34:52 +0000 Subject: [PATCH 626/983] chore(main): release 1.41.5-SNAPSHOT (#1584) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 04270e7ec..cb7c239eb 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.4 + 1.41.5-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.4 + 1.41.5-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.4 + 1.41.5-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index eccac49f5..3450e7862 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-android - 1.41.4 + 1.41.5-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index df289c2c7..c6694a0aa 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.4 + 1.41.5-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c65787f89..75e2427be 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.4 + 1.41.5-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index a1ef3f9d8..572531f65 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.4 + 1.41.5-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9698f4fce..312da6703 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.4 + 1.41.5-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-android - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-test - 1.41.4 + 1.41.5-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.4 + 1.41.5-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 405633af6..268d23661 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.4 + 1.41.5-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 49fd928f3..210266a76 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.4 + 1.41.5-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 029676351..743944aaf 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.4 + 1.41.5-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index aae085125..6298f6f95 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.4 + 1.41.5-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index a039fa7c7..44a0526ca 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-test - 1.41.4 + 1.41.5-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 12aacf968..21d5bdbd5 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.4 + 1.41.5-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0ea91d999..26aeac5ed 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../pom.xml google-http-client - 1.41.4 + 1.41.5-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index b7b194214..49d4c5355 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.4 + 1.41.5-SNAPSHOT 1.9.94 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 3d7bb6b62..4b6035a09 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.4 + 1.41.5-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index cd791f79a..00fdc7c9f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.4:1.41.4 -google-http-client-bom:1.41.4:1.41.4 -google-http-client-parent:1.41.4:1.41.4 -google-http-client-android:1.41.4:1.41.4 -google-http-client-android-test:1.41.4:1.41.4 -google-http-client-apache-v2:1.41.4:1.41.4 -google-http-client-appengine:1.41.4:1.41.4 -google-http-client-assembly:1.41.4:1.41.4 -google-http-client-findbugs:1.41.4:1.41.4 -google-http-client-gson:1.41.4:1.41.4 -google-http-client-jackson2:1.41.4:1.41.4 -google-http-client-protobuf:1.41.4:1.41.4 -google-http-client-test:1.41.4:1.41.4 -google-http-client-xml:1.41.4:1.41.4 +google-http-client:1.41.4:1.41.5-SNAPSHOT +google-http-client-bom:1.41.4:1.41.5-SNAPSHOT +google-http-client-parent:1.41.4:1.41.5-SNAPSHOT +google-http-client-android:1.41.4:1.41.5-SNAPSHOT +google-http-client-android-test:1.41.4:1.41.5-SNAPSHOT +google-http-client-apache-v2:1.41.4:1.41.5-SNAPSHOT +google-http-client-appengine:1.41.4:1.41.5-SNAPSHOT +google-http-client-assembly:1.41.4:1.41.5-SNAPSHOT +google-http-client-findbugs:1.41.4:1.41.5-SNAPSHOT +google-http-client-gson:1.41.4:1.41.5-SNAPSHOT +google-http-client-jackson2:1.41.4:1.41.5-SNAPSHOT +google-http-client-protobuf:1.41.4:1.41.5-SNAPSHOT +google-http-client-test:1.41.4:1.41.5-SNAPSHOT +google-http-client-xml:1.41.4:1.41.5-SNAPSHOT From 327fe12a122ebb4022a2da55694217233a2badaf Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 9 Mar 2022 14:39:35 -0500 Subject: [PATCH 627/983] docs(deps): libraries-bom 24.4.0 release (#1596) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 24beb7317..702c665a7 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 24.3.0 + 24.4.0 pom import From e6184ffe6dc9f74fc0a0245c37f8807f9651dced Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 17 Mar 2022 09:58:49 -0700 Subject: [PATCH 628/983] chore: fix link in doc (#1606) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix link in doc b/208292008 * formatting * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../main/java/com/google/api/client/http/HttpMediaType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java b/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java index 9bab77b13..f39499328 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpMediaType.java @@ -26,8 +26,8 @@ import java.util.regex.Pattern; /** - * HTTP Media-type as specified in the HTTP RFC ( {@link - * "http://tools.ietf.org/html/rfc2616#section-3.7"}). + * HTTP Media-type as specified in the HTTP RFC. * *

              Implementation is not thread-safe. * From a7364dea4c2ee13d5df471393cde83f605e2bf5e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 17 Mar 2022 14:55:05 -0400 Subject: [PATCH 629/983] ci: not checking lint until Owlbot migration finishes (#1605) --- .github/sync-repo-settings.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 3c0c8aa6c..62199c957 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -13,7 +13,6 @@ branchProtectionRules: - windows - dependencies (8) - dependencies (11) - - lint - clirr - cla/google - pattern: 1.39.2-sp From c06cf95f9b1be77e2229c3b2f78ece0789eaec15 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 19:58:13 +0100 Subject: [PATCH 630/983] deps: update project.appengine.version to v2 (major) (#1597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `1.9.94` -> `2.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.4/compatibility-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.4/confidence-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `1.9.94` -> `2.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.4/compatibility-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.4/confidence-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `1.9.94` -> `2.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.4/compatibility-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.4/confidence-slim/1.9.94)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes

              GoogleCloudPlatform/appengine-java-standard ### [`v2.0.4`](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.3...v2.0.4) [Compare Source](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.3...v2.0.4) ### [`v2.0.3`](https://github.com/GoogleCloudPlatform/appengine-java-standard/releases/v2.0.3) Release 2.0.3 from github open source code.
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 49d4c5355..e83353573 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.41.5-SNAPSHOT - 1.9.94 + 2.0.4 UTF-8 3.0.2 2.9.0 From 8a5233c6efd1d4d60475755ab70dc4c1fbeb908e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 19:58:17 +0100 Subject: [PATCH 631/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.2.2 (#1590) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.2.1` -> `3.2.2` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/compatibility-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/confidence-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e83353573..03cacac5c 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.1 + 3.2.2 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.2.1 + 3.2.2 From 17f2e30a9a9eb1fae4e41e1720322cc2c9cb3fc9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 19:58:21 +0100 Subject: [PATCH 632/983] chore(deps): update dependency com.google.cloud:libraries-bom to v24.4.0 (#1576) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.2.0` -> `24.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/compatibility-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/24.4.0/confidence-slim/24.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 21dba3811..1b6a12a9a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 24.2.0 + 24.4.0 pom import From d26fe5218b72d8f25ebc8dcf4e53be7045058608 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 19:58:23 +0100 Subject: [PATCH 633/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.3.2 (#1580) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) ([source](https://github.com/apache/maven-javadoc-plugin)) | `3.3.1` -> `3.3.2` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/compatibility-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/confidence-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 312da6703..521014da3 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 true diff --git a/pom.xml b/pom.xml index 03cacac5c..af0b178f1 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 attach-javadocs @@ -702,7 +702,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 com.microsoft.doclet.DocFxDoclet false From 9a87d0600367c156a3c6c079cb4f6cdc9805fe0e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 14:58:33 -0400 Subject: [PATCH 634/983] chore: fix license header in build.bat (#1363) (#1595) * chore: fix license header in build.bat * chore: add disctribution field for setup-java action Source-Link: https://github.com/googleapis/synthtool/commit/4fea5f40a9075f3ba205ede0b453010cf080e194 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- .github/workflows/ci.yaml | 20 +++++++++--------- .kokoro/build.bat | 30 +++++++++++++-------------- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c4..3473042c0 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f36e6e579..a4b083ea1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 1bb182327..f5fc7d516 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18e23230d..7a106d007 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b5e56aaa..83ef7f9c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -39,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 @@ -54,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -64,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 11 @@ -76,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 diff --git a/.kokoro/build.bat b/.kokoro/build.bat index cc602c9eb..067cf4a4c 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,18 +1,18 @@ +:: Copyright 2022 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. +:: Github action job to test core java library features on +:: downstream client libraries before they are released. :: See documentation in type-shell-output.bat -# Copyright 2022 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. -# Github action job to test core java library features on -# downstream client libraries before they are released. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh From fe26c4f4a6975715161fe2b00a02fbb793e442e0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 20:00:17 +0100 Subject: [PATCH 635/983] build(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.10.1 (#1586) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-compiler-plugin](https://maven.apache.org/plugins/) ([source](https://github.com/apache/maven-compiler-plugin)) | `3.9.0` -> `3.10.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-compiler-plugin/3.10.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-compiler-plugin/3.10.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-compiler-plugin/3.10.1/compatibility-slim/3.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-compiler-plugin/3.10.1/confidence-slim/3.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index 3ecc1060e..ad36ce907 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -11,7 +11,7 @@ maven-compiler-plugin - 3.9.0 + 3.10.1 1.7 1.7 diff --git a/pom.xml b/pom.xml index af0b178f1..9008061bd 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ maven-compiler-plugin - 3.9.0 + 3.10.1 1.7 1.7 From 6405710f118ce68f5b8aa81748df06ecef0ad860 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 20:06:39 +0100 Subject: [PATCH 636/983] build(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.11.0 (#1587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-site-plugin](https://maven.apache.org/plugins/) | `3.10.0` -> `3.11.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.11.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.11.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.11.0/compatibility-slim/3.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.11.0/confidence-slim/3.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 521014da3..839c2ec2e 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.10.0 + 3.11.0 true diff --git a/pom.xml b/pom.xml index 9008061bd..6bd824dc6 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ org.apache.maven.plugins maven-site-plugin - 3.10.0 + 3.11.0 org.apache.maven.plugins From 331cfc9dc678bdfad4ef24fbe89f53c6ca32abb7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 20:08:16 +0100 Subject: [PATCH 637/983] chore(deps): update dependency com.google.cloud:libraries-bom to v25 (#1601) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/GoogleCloudPlatform/cloud-opensource-java)) | `24.4.0` -> `25.0.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/compatibility-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.0.0/confidence-slim/24.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1b6a12a9a..70e7f4105 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 24.4.0 + 25.0.0 pom import From 41ac833249e18cbbd304f825b12202e51bebec85 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 20:10:17 +0100 Subject: [PATCH 638/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.2 (#1598) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.13.1` -> `2.13.2` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.2/compatibility-slim/2.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.2/confidence-slim/2.13.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6bd824dc6..94ae43ef7 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.9.0 - 2.13.1 + 2.13.2 3.19.4 30.1.1-android 1.1.4c From 92002c07d60b738657383e2484f56abc1cde6920 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 17 Mar 2022 20:28:47 +0100 Subject: [PATCH 639/983] deps: update actions/checkout action to v3 (#1593) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update actions/checkout action to v3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .github/workflows/downstream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index b3448d9c4..3d3729264 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -133,7 +133,7 @@ jobs: - workflow-executions - workflows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v1 with: java-version: ${{matrix.java}} From 3aae26b3eac9cac9f0cda6b8deaaf39a7a33c97e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 18 Mar 2022 21:06:54 +0100 Subject: [PATCH 640/983] build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.3.0 (#1607) --- google-http-client/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 26aeac5ed..5135c8cc9 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -21,7 +21,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.2 + 3.3.0 io.opencensus:opencensus-impl diff --git a/pom.xml b/pom.xml index 94ae43ef7..518cccd26 100644 --- a/pom.xml +++ b/pom.xml @@ -365,7 +365,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.2 + 3.3.0 org.apache.maven.plugins From d040a09766f7fa4aea0fe7ff857d6c190294d2c5 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 21 Mar 2022 09:56:01 -0400 Subject: [PATCH 641/983] chore(deps): libraries-bom 25.0.0 release in google-http-java-client (#1602) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 702c665a7..41f4710fd 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 24.4.0 + 25.0.0 pom import From 757723b7006f4ca9248d6193b4c5fcf74a89a2f7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:27:51 -0400 Subject: [PATCH 642/983] chore(main): release 1.41.5 (#1600) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 14 ++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 67 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a326fa602..03f5a60d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +### [1.41.5](https://github.com/googleapis/google-http-java-client/compare/v1.41.4...v1.41.5) (2022-03-21) + + +### Documentation + +* **deps:** libraries-bom 24.4.0 release ([#1596](https://github.com/googleapis/google-http-java-client/issues/1596)) ([327fe12](https://github.com/googleapis/google-http-java-client/commit/327fe12a122ebb4022a2da55694217233a2badaf)) + + +### Dependencies + +* update actions/checkout action to v3 ([#1593](https://github.com/googleapis/google-http-java-client/issues/1593)) ([92002c0](https://github.com/googleapis/google-http-java-client/commit/92002c07d60b738657383e2484f56abc1cde6920)) +* update dependency com.fasterxml.jackson.core:jackson-core to v2.13.2 ([#1598](https://github.com/googleapis/google-http-java-client/issues/1598)) ([41ac833](https://github.com/googleapis/google-http-java-client/commit/41ac833249e18cbbd304f825b12202e51bebec85)) +* update project.appengine.version to v2 (major) ([#1597](https://github.com/googleapis/google-http-java-client/issues/1597)) ([c06cf95](https://github.com/googleapis/google-http-java-client/commit/c06cf95f9b1be77e2229c3b2f78ece0789eaec15)) + ### [1.41.4](https://github.com/googleapis/google-http-java-client/compare/v1.41.3...v1.41.4) (2022-02-11) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index cb7c239eb..bce13eba5 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.5-SNAPSHOT + 1.41.5 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.5-SNAPSHOT + 1.41.5 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.5-SNAPSHOT + 1.41.5 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 3450e7862..0cd3c8b6a 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-android - 1.41.5-SNAPSHOT + 1.41.5 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index c6694a0aa..d16d0c3c5 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-apache-v2 - 1.41.5-SNAPSHOT + 1.41.5 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 75e2427be..717747411 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-appengine - 1.41.5-SNAPSHOT + 1.41.5 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 572531f65..88ead5637 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.5-SNAPSHOT + 1.41.5 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 839c2ec2e..1bb3e4a46 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.5-SNAPSHOT + 1.41.5 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-android - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-apache-v2 - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-appengine - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-findbugs - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-gson - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-jackson2 - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-protobuf - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-test - 1.41.5-SNAPSHOT + 1.41.5 com.google.http-client google-http-client-xml - 1.41.5-SNAPSHOT + 1.41.5 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 268d23661..49237bae1 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-findbugs - 1.41.5-SNAPSHOT + 1.41.5 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 210266a76..531e0f99b 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-gson - 1.41.5-SNAPSHOT + 1.41.5 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 743944aaf..a2b150ec6 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-jackson2 - 1.41.5-SNAPSHOT + 1.41.5 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 6298f6f95..ebe32c52a 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-protobuf - 1.41.5-SNAPSHOT + 1.41.5 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 44a0526ca..4e2d14e8f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-test - 1.41.5-SNAPSHOT + 1.41.5 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 21d5bdbd5..feb84fd33 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client-xml - 1.41.5-SNAPSHOT + 1.41.5 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5135c8cc9..85d0534b3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../pom.xml google-http-client - 1.41.5-SNAPSHOT + 1.41.5 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 518cccd26..e7aa2183f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.5-SNAPSHOT + 1.41.5 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 4b6035a09..d4ca3ffab 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.5-SNAPSHOT + 1.41.5 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 00fdc7c9f..d6d237ef1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.4:1.41.5-SNAPSHOT -google-http-client-bom:1.41.4:1.41.5-SNAPSHOT -google-http-client-parent:1.41.4:1.41.5-SNAPSHOT -google-http-client-android:1.41.4:1.41.5-SNAPSHOT -google-http-client-android-test:1.41.4:1.41.5-SNAPSHOT -google-http-client-apache-v2:1.41.4:1.41.5-SNAPSHOT -google-http-client-appengine:1.41.4:1.41.5-SNAPSHOT -google-http-client-assembly:1.41.4:1.41.5-SNAPSHOT -google-http-client-findbugs:1.41.4:1.41.5-SNAPSHOT -google-http-client-gson:1.41.4:1.41.5-SNAPSHOT -google-http-client-jackson2:1.41.4:1.41.5-SNAPSHOT -google-http-client-protobuf:1.41.4:1.41.5-SNAPSHOT -google-http-client-test:1.41.4:1.41.5-SNAPSHOT -google-http-client-xml:1.41.4:1.41.5-SNAPSHOT +google-http-client:1.41.5:1.41.5 +google-http-client-bom:1.41.5:1.41.5 +google-http-client-parent:1.41.5:1.41.5 +google-http-client-android:1.41.5:1.41.5 +google-http-client-android-test:1.41.5:1.41.5 +google-http-client-apache-v2:1.41.5:1.41.5 +google-http-client-appengine:1.41.5:1.41.5 +google-http-client-assembly:1.41.5:1.41.5 +google-http-client-findbugs:1.41.5:1.41.5 +google-http-client-gson:1.41.5:1.41.5 +google-http-client-jackson2:1.41.5:1.41.5 +google-http-client-protobuf:1.41.5:1.41.5 +google-http-client-test:1.41.5:1.41.5 +google-http-client-xml:1.41.5:1.41.5 From 2ed19b71ea730095e23224b02a1aa0791ed10dab Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 22:32:11 +0000 Subject: [PATCH 643/983] chore(main): release 1.41.6-SNAPSHOT (#1609) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index bce13eba5..d9741e5cc 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.5 + 1.41.6-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.5 + 1.41.6-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.5 + 1.41.6-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 0cd3c8b6a..0278df849 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-android - 1.41.5 + 1.41.6-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index d16d0c3c5..542c6e0f3 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.5 + 1.41.6-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 717747411..814bb715b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.5 + 1.41.6-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 88ead5637..af10fe954 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.5 + 1.41.6-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 1bb3e4a46..392e97c0d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.5 + 1.41.6-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-android - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-test - 1.41.5 + 1.41.6-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.5 + 1.41.6-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 49237bae1..cb86215f7 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.5 + 1.41.6-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 531e0f99b..fb24ceea7 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.5 + 1.41.6-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a2b150ec6..178641fc4 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.5 + 1.41.6-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index ebe32c52a..2810bd9f8 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.5 + 1.41.6-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 4e2d14e8f..3d049edcc 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-test - 1.41.5 + 1.41.6-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index feb84fd33..19f01e72c 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.5 + 1.41.6-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 85d0534b3..f519fec1c 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../pom.xml google-http-client - 1.41.5 + 1.41.6-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index e7aa2183f..5bf1b762c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.5 + 1.41.6-SNAPSHOT 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index d4ca3ffab..96b4c8d05 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.5 + 1.41.6-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d6d237ef1..b94bfbde0 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.5:1.41.5 -google-http-client-bom:1.41.5:1.41.5 -google-http-client-parent:1.41.5:1.41.5 -google-http-client-android:1.41.5:1.41.5 -google-http-client-android-test:1.41.5:1.41.5 -google-http-client-apache-v2:1.41.5:1.41.5 -google-http-client-appengine:1.41.5:1.41.5 -google-http-client-assembly:1.41.5:1.41.5 -google-http-client-findbugs:1.41.5:1.41.5 -google-http-client-gson:1.41.5:1.41.5 -google-http-client-jackson2:1.41.5:1.41.5 -google-http-client-protobuf:1.41.5:1.41.5 -google-http-client-test:1.41.5:1.41.5 -google-http-client-xml:1.41.5:1.41.5 +google-http-client:1.41.5:1.41.6-SNAPSHOT +google-http-client-bom:1.41.5:1.41.6-SNAPSHOT +google-http-client-parent:1.41.5:1.41.6-SNAPSHOT +google-http-client-android:1.41.5:1.41.6-SNAPSHOT +google-http-client-android-test:1.41.5:1.41.6-SNAPSHOT +google-http-client-apache-v2:1.41.5:1.41.6-SNAPSHOT +google-http-client-appengine:1.41.5:1.41.6-SNAPSHOT +google-http-client-assembly:1.41.5:1.41.6-SNAPSHOT +google-http-client-findbugs:1.41.5:1.41.6-SNAPSHOT +google-http-client-gson:1.41.5:1.41.6-SNAPSHOT +google-http-client-jackson2:1.41.5:1.41.6-SNAPSHOT +google-http-client-protobuf:1.41.5:1.41.6-SNAPSHOT +google-http-client-test:1.41.5:1.41.6-SNAPSHOT +google-http-client-xml:1.41.5:1.41.6-SNAPSHOT From 7e91e67b33e55b6847a6fe3f7f38c3b3c6c1c686 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 28 Mar 2022 18:33:02 -0400 Subject: [PATCH 644/983] chore: fix downstream check (#1611) --- .github/workflows/downstream.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 3d3729264..1366d24df 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -133,10 +133,12 @@ jobs: - workflow-executions - workflows steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v2 + - uses: actions/setup-java@v3 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version + - run: sudo apt-get update -y - run: sudo apt-get install libxml2-utils - run: .kokoro/downstream-client-library-check.sh google-http-client-bom ${{matrix.repo}} From 941da8badf64068d11a53ac57a4ba35b2ad13490 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Tue, 29 Mar 2022 15:12:09 -0400 Subject: [PATCH 645/983] fix: `Content-Encoding: gzip` along with `Transfer-Encoding: chunked` sometimes terminates early (#1608) #### The issue When `GZIPInputStream` completes processing an individual member it will call `InputStream#available()` to determine if there is more stream to try and process. If the call to `available()` returns 0 `GZIPInputStream` will determine it has processed the entirety of the underlying stream. This is spurious, as `InputStream#available()` is allowed to return 0 if it would require blocking in order for more bytes to be available. When `GZIPInputStream` is reading from a `Transfer-Encoding: chunked` response, if the chunk boundary happens to align closely enough to the member boundary `GZIPInputStream` won't consume the whole response. #### The fix Add new `OptimisticAvailabilityInputStream`, which provides an optimistic "estimate" of the number of `available()` bytes in the underlying stream. When instantiating a `GZIPInputStream` for a response, automatically decorate the provided `InputStream` with an `OptimisticAvailabilityInputStream`. #### Verification This scenario isn't unique to processing of chunked responses, and can be replicated reliably using a `java.io.SequenceInputStream` with two underlying `java.io.ByteArrayInputStream`. See GzipSupportTest.java for a reproduction. The need for this class has been verified for the following JVMs: * ``` openjdk version "1.8.0_292" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode) ``` * ``` openjdk version "11.0.14.1" 2022-02-08 OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1) OpenJDK 64-Bit Server VM Temurin-11.0.14.1+1 (build 11.0.14.1+1, mixed mode) ``` * ``` openjdk version "17" 2021-09-14 OpenJDK Runtime Environment Temurin-17+35 (build 17+35) OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing) ``` --- .../google/api/client/http/GzipSupport.java | 90 ++++++++++++++++ .../google/api/client/http/HttpResponse.java | 3 +- .../api/client/http/GzipSupportTest.java | 101 ++++++++++++++++++ 3 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/http/GzipSupport.java create mode 100644 google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/http/GzipSupport.java b/google-http-client/src/main/java/com/google/api/client/http/GzipSupport.java new file mode 100644 index 000000000..6dc5df304 --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/http/GzipSupport.java @@ -0,0 +1,90 @@ +package com.google.api.client.http; + +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.zip.GZIPInputStream; + +final class GzipSupport { + + private GzipSupport() {} + + static GZIPInputStream newGzipInputStream(InputStream in) throws IOException { + return new GZIPInputStream(new OptimisticAvailabilityInputStream(in)); + } + + /** + * When {@link GZIPInputStream} completes processing an individual member it will call {@link + * InputStream#available()} to determine if there is more stream to try and process. If the call + * to {@code available()} returns 0 {@code GZIPInputStream} will determine it has processed the + * entirety of the underlying stream. This is spurious, as {@link InputStream#available()} is + * allowed to return 0 if it would require blocking in order for more bytes to be available. When + * {@code GZIPInputStream} is reading from a {@code Transfer-Encoding: chunked} response, if the + * chunk boundary happens to align closely enough to the member boundary {@code GZIPInputStream} + * won't consume the whole response. + * + *

              This class, provides an optimistic "estimate" (in actuality, a lie) of the number of {@code + * available()} bytes in the underlying stream. It does this by tracking the last number of bytes + * read. If the last number of bytes read is grater than -1, we return {@link Integer#MAX_VALUE} + * to any call of {@link #available()}. + * + *

              We're breaking the contract of available() in that we're lying about how much data we have + * accessible without blocking, however in the case where we're weaving {@link GZIPInputStream} + * into response processing we already know there are going to be blocking calls to read before + * the stream is exhausted. + * + *

              This scenario isn't unique to processing of chunked responses, and can be replicated + * reliably using a {@link java.io.SequenceInputStream} with two underlying {@link + * java.io.ByteArrayInputStream}. See the corresponding test class for a reproduction. + * + *

              The need for this class has been verified for the following JVMs: + * + *

                + *
              1. + *
                +   * openjdk version "1.8.0_292"
                +   * OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)
                +   * OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.292-b10, mixed mode)
                +   *   
                + *
              2. + *
                +   * openjdk version "11.0.14.1" 2022-02-08
                +   * OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1)
                +   * OpenJDK 64-Bit Server VM Temurin-11.0.14.1+1 (build 11.0.14.1+1, mixed mode)
                +   *   
                + *
              3. + *
                +   * openjdk version "17" 2021-09-14
                +   * OpenJDK Runtime Environment Temurin-17+35 (build 17+35)
                +   * OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
                +   *   
                + *
              + */ + private static final class OptimisticAvailabilityInputStream extends FilterInputStream { + private int lastRead = 0; + + OptimisticAvailabilityInputStream(InputStream delegate) { + super(delegate); + } + + @Override + public int available() throws IOException { + return lastRead > -1 ? Integer.MAX_VALUE : 0; + } + + @Override + public int read() throws IOException { + return lastRead = super.read(); + } + + @Override + public int read(byte[] b) throws IOException { + return lastRead = super.read(b); + } + + @Override + public int read(byte[] b, int off, int len) throws IOException { + return lastRead = super.read(b, off, len); + } + } +} diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java index e97943210..130208671 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java @@ -30,7 +30,6 @@ import java.util.Locale; import java.util.logging.Level; import java.util.logging.Logger; -import java.util.zip.GZIPInputStream; /** * HTTP response. @@ -362,7 +361,7 @@ public InputStream getContent() throws IOException { // GZIPInputStream.close() --> ConsumingInputStream.close() --> // exhaust(ConsumingInputStream) lowLevelResponseContent = - new GZIPInputStream(new ConsumingInputStream(lowLevelResponseContent)); + GzipSupport.newGzipInputStream(new ConsumingInputStream(lowLevelResponseContent)); } } // logging (wrap content with LoggingInputStream) diff --git a/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java b/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java new file mode 100644 index 000000000..f7c863222 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java @@ -0,0 +1,101 @@ +/* + * Copyright 2022 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 static com.google.common.truth.Truth.assertThat; + +import com.google.common.io.ByteStreams; +import com.google.common.io.CountingInputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.SequenceInputStream; +import java.util.zip.GZIPInputStream; +import org.junit.Test; + +public final class GzipSupportTest { + + @SuppressWarnings("UnstableApiUsage") // CountingInputStream is @Beta + @Test + public void gzipInputStreamConsumesAllBytes() throws IOException { + byte[] data = new byte[] {(byte) 'a', (byte) 'b'}; + // `echo -n a > a.txt && gzip -n9 a.txt` + byte[] member0 = + new byte[] { + 0x1f, + (byte) 0x8b, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x02, + 0x03, + 0x4b, + 0x04, + 0x00, + (byte) 0x43, + (byte) 0xbe, + (byte) 0xb7, + (byte) 0xe8, + 0x01, + 0x00, + 0x00, + 0x00 + }; + // `echo -n b > b.txt && gzip -n9 b.txt` + byte[] member1 = + new byte[] { + 0x1f, + (byte) 0x8b, + 0x08, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x02, + 0x03, + 0x4b, + 0x02, + 0x00, + (byte) 0xf9, + (byte) 0xef, + (byte) 0xbe, + (byte) 0x71, + 0x01, + 0x00, + 0x00, + 0x00 + }; + int totalZippedBytes = member0.length + member1.length; + try (InputStream s = + new SequenceInputStream( + new ByteArrayInputStream(member0), new ByteArrayInputStream(member1)); + CountingInputStream countS = new CountingInputStream(s); + GZIPInputStream g = GzipSupport.newGzipInputStream(countS); + CountingInputStream countG = new CountingInputStream(g)) { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ByteStreams.copy(countG, baos); + assertThat(baos.toByteArray()).isEqualTo(data); + assertThat(countG.getCount()).isEqualTo(data.length); + assertThat(countS.getCount()).isEqualTo(totalZippedBytes); + } + } +} From 5d0cca0a715d0066ff36d3e823fcb4ce210728b1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Apr 2022 18:40:15 +0200 Subject: [PATCH 646/983] chore(deps): update dependency com.google.cloud:libraries-bom to v25.1.0 (#1614) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.0.0` -> `25.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/compatibility-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.1.0/confidence-slim/25.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 70e7f4105..4d21285d8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 25.0.0 + 25.1.0 pom import From fd3b31af7df8ebe6b436287380bbebd9f0870942 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Apr 2022 17:04:15 -0400 Subject: [PATCH 647/983] chore(deps): libraries-bom 25.1.0 document update in google-http-java-client repo (#1618) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 41f4710fd..36dea6914 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 25.0.0 + 25.1.0 pom import From 640dc4080249b65e5cabb7e1ae6cd9cd5b11bd8e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Apr 2022 20:40:40 +0200 Subject: [PATCH 648/983] deps: update dependency com.google.protobuf:protobuf-java to v3.20.0 (#1621) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5bf1b762c..05520d8e0 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.2 - 3.19.4 + 3.20.0 30.1.1-android 1.1.4c 4.5.13 From 08491f8b9ad1c974fccd68f5b8458ac32a001855 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Apr 2022 20:43:16 +0200 Subject: [PATCH 649/983] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.0.0-m6 (#1620) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 05520d8e0..1e33beeaf 100644 --- a/pom.xml +++ b/pom.xml @@ -326,7 +326,7 @@
              maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M6 -Xmx1024m sponge_log From 4ace2943c21c17effc044a406da413b9687326fd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:43:50 -0700 Subject: [PATCH 650/983] chore(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.12 (#1388) (#1617) Co-authored-by: Neenu Shaji Source-Link: https://github.com/googleapis/synthtool/commit/4c770a0c6ef46b8462608c485735801b65be65ea Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 Co-authored-by: Owl Bot Co-authored-by: Neenu Shaji --- .github/.OwlBot.lock.yaml | 3 ++- .kokoro/nightly/integration.cfg | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 3473042c0..0598f87d9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e + digest: sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 +# created: 2022-04-01T19:51:01.017179449Z diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index e51c7b4c6..a2907a257 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -13,12 +13,12 @@ env_vars: { # TODO: remove this after we've migrated all tests and scripts env_vars: { key: "GCLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { From 4e1101d7674cb5715b88a00750cdd5286a9ae077 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 6 Apr 2022 20:44:09 +0200 Subject: [PATCH 651/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.12.1 (#1622) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e33beeaf..12a1de4ac 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.11.0 + 2.12.1 com.google.appengine From 71f720c7cd27b277816f24bec527302fd81ca2ef Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 19:00:25 +0000 Subject: [PATCH 652/983] chore: Enable Size-Label bot in all googleapis Java repositories (#1381) (#1623) * chore: Enable Size-Label bot in all googleapis Java repositories Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis Java repositories * Remove product Remove product since it is by default true * add license header Co-authored-by: Neenu Shaji Source-Link: https://github.com/googleapis/synthtool/commit/54b2c6ac75370a4a3582431b4a3080f777ba1f11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .github/auto-label.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0598f87d9..095b0d19f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 -# created: 2022-04-01T19:51:01.017179449Z + digest: sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 +# created: 2022-04-06T16:30:03.627422514Z \ No newline at end of file diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 000000000..4caef688b --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,15 @@ +# Copyright 2021 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. +requestsize: + enabled: true From 983f8f5f0da9afd7a1bd200fab705f991823e473 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 12:19:13 -0700 Subject: [PATCH 653/983] chore(main): release 1.41.6 (#1612) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 13 +++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 66 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f5a60d1..d6ba5fb82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +### [1.41.6](https://github.com/googleapis/google-http-java-client/compare/v1.41.5...v1.41.6) (2022-04-06) + + +### Bug Fixes + +* `Content-Encoding: gzip` along with `Transfer-Encoding: chunked` sometimes terminates early ([#1608](https://github.com/googleapis/google-http-java-client/issues/1608)) ([941da8b](https://github.com/googleapis/google-http-java-client/commit/941da8badf64068d11a53ac57a4ba35b2ad13490)) + + +### Dependencies + +* update dependency com.google.errorprone:error_prone_annotations to v2.12.1 ([#1622](https://github.com/googleapis/google-http-java-client/issues/1622)) ([4e1101d](https://github.com/googleapis/google-http-java-client/commit/4e1101d7674cb5715b88a00750cdd5286a9ae077)) +* update dependency com.google.protobuf:protobuf-java to v3.20.0 ([#1621](https://github.com/googleapis/google-http-java-client/issues/1621)) ([640dc40](https://github.com/googleapis/google-http-java-client/commit/640dc4080249b65e5cabb7e1ae6cd9cd5b11bd8e)) + ### [1.41.5](https://github.com/googleapis/google-http-java-client/compare/v1.41.4...v1.41.5) (2022-03-21) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d9741e5cc..1a263f7a1 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.6-SNAPSHOT + 1.41.6 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.6-SNAPSHOT + 1.41.6 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.6-SNAPSHOT + 1.41.6 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 0278df849..dc4b3f025 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-android - 1.41.6-SNAPSHOT + 1.41.6 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 542c6e0f3..9bab7ee6c 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-apache-v2 - 1.41.6-SNAPSHOT + 1.41.6 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 814bb715b..a0f159934 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-appengine - 1.41.6-SNAPSHOT + 1.41.6 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index af10fe954..aae5e1f2b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.6-SNAPSHOT + 1.41.6 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 392e97c0d..a27220339 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.6-SNAPSHOT + 1.41.6 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-android - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-apache-v2 - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-appengine - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-findbugs - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-gson - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-jackson2 - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-protobuf - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-test - 1.41.6-SNAPSHOT + 1.41.6 com.google.http-client google-http-client-xml - 1.41.6-SNAPSHOT + 1.41.6 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index cb86215f7..580931e7f 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-findbugs - 1.41.6-SNAPSHOT + 1.41.6 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index fb24ceea7..bd767d56e 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-gson - 1.41.6-SNAPSHOT + 1.41.6 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 178641fc4..b25322f7a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-jackson2 - 1.41.6-SNAPSHOT + 1.41.6 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 2810bd9f8..c469a090e 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-protobuf - 1.41.6-SNAPSHOT + 1.41.6 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 3d049edcc..1f2edde0e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-test - 1.41.6-SNAPSHOT + 1.41.6 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 19f01e72c..576903ef6 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client-xml - 1.41.6-SNAPSHOT + 1.41.6 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f519fec1c..eb3cce16e 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../pom.xml google-http-client - 1.41.6-SNAPSHOT + 1.41.6 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 12a1de4ac..c6ecd75c7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.6-SNAPSHOT + 1.41.6 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 96b4c8d05..5458d45ec 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.6-SNAPSHOT + 1.41.6 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b94bfbde0..c755d649d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.5:1.41.6-SNAPSHOT -google-http-client-bom:1.41.5:1.41.6-SNAPSHOT -google-http-client-parent:1.41.5:1.41.6-SNAPSHOT -google-http-client-android:1.41.5:1.41.6-SNAPSHOT -google-http-client-android-test:1.41.5:1.41.6-SNAPSHOT -google-http-client-apache-v2:1.41.5:1.41.6-SNAPSHOT -google-http-client-appengine:1.41.5:1.41.6-SNAPSHOT -google-http-client-assembly:1.41.5:1.41.6-SNAPSHOT -google-http-client-findbugs:1.41.5:1.41.6-SNAPSHOT -google-http-client-gson:1.41.5:1.41.6-SNAPSHOT -google-http-client-jackson2:1.41.5:1.41.6-SNAPSHOT -google-http-client-protobuf:1.41.5:1.41.6-SNAPSHOT -google-http-client-test:1.41.5:1.41.6-SNAPSHOT -google-http-client-xml:1.41.5:1.41.6-SNAPSHOT +google-http-client:1.41.6:1.41.6 +google-http-client-bom:1.41.6:1.41.6 +google-http-client-parent:1.41.6:1.41.6 +google-http-client-android:1.41.6:1.41.6 +google-http-client-android-test:1.41.6:1.41.6 +google-http-client-apache-v2:1.41.6:1.41.6 +google-http-client-appengine:1.41.6:1.41.6 +google-http-client-assembly:1.41.6:1.41.6 +google-http-client-findbugs:1.41.6:1.41.6 +google-http-client-gson:1.41.6:1.41.6 +google-http-client-jackson2:1.41.6:1.41.6 +google-http-client-protobuf:1.41.6:1.41.6 +google-http-client-test:1.41.6:1.41.6 +google-http-client-xml:1.41.6:1.41.6 From 8a9332b2654237da6f94fa06f318882a0f216c5e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 19:30:20 +0000 Subject: [PATCH 654/983] chore(main): release 1.41.7-SNAPSHOT (#1624) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 1a263f7a1..f2cd2790d 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.6 + 1.41.7-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.6 + 1.41.7-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.6 + 1.41.7-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index dc4b3f025..97040a121 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-android - 1.41.6 + 1.41.7-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 9bab7ee6c..5dede1866 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.6 + 1.41.7-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index a0f159934..3eda1bc54 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.6 + 1.41.7-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index aae5e1f2b..4edc2beae 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.6 + 1.41.7-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index a27220339..0ef0e780b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.6 + 1.41.7-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-android - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-test - 1.41.6 + 1.41.7-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.6 + 1.41.7-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 580931e7f..22c494275 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.6 + 1.41.7-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index bd767d56e..6c3a0b04b 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.6 + 1.41.7-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index b25322f7a..eb6b249b0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.6 + 1.41.7-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index c469a090e..f30e8bb77 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.6 + 1.41.7-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 1f2edde0e..9c98c340d 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-test - 1.41.6 + 1.41.7-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 576903ef6..b10ec4782 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.6 + 1.41.7-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index eb3cce16e..d894f2cd3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../pom.xml google-http-client - 1.41.6 + 1.41.7-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c6ecd75c7..f4e835e91 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.6 + 1.41.7-SNAPSHOT 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 5458d45ec..7183fcd15 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.6 + 1.41.7-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index c755d649d..4ebe7fedb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.6:1.41.6 -google-http-client-bom:1.41.6:1.41.6 -google-http-client-parent:1.41.6:1.41.6 -google-http-client-android:1.41.6:1.41.6 -google-http-client-android-test:1.41.6:1.41.6 -google-http-client-apache-v2:1.41.6:1.41.6 -google-http-client-appengine:1.41.6:1.41.6 -google-http-client-assembly:1.41.6:1.41.6 -google-http-client-findbugs:1.41.6:1.41.6 -google-http-client-gson:1.41.6:1.41.6 -google-http-client-jackson2:1.41.6:1.41.6 -google-http-client-protobuf:1.41.6:1.41.6 -google-http-client-test:1.41.6:1.41.6 -google-http-client-xml:1.41.6:1.41.6 +google-http-client:1.41.6:1.41.7-SNAPSHOT +google-http-client-bom:1.41.6:1.41.7-SNAPSHOT +google-http-client-parent:1.41.6:1.41.7-SNAPSHOT +google-http-client-android:1.41.6:1.41.7-SNAPSHOT +google-http-client-android-test:1.41.6:1.41.7-SNAPSHOT +google-http-client-apache-v2:1.41.6:1.41.7-SNAPSHOT +google-http-client-appengine:1.41.6:1.41.7-SNAPSHOT +google-http-client-assembly:1.41.6:1.41.7-SNAPSHOT +google-http-client-findbugs:1.41.6:1.41.7-SNAPSHOT +google-http-client-gson:1.41.6:1.41.7-SNAPSHOT +google-http-client-jackson2:1.41.6:1.41.7-SNAPSHOT +google-http-client-protobuf:1.41.6:1.41.7-SNAPSHOT +google-http-client-test:1.41.6:1.41.7-SNAPSHOT +google-http-client-xml:1.41.6:1.41.7-SNAPSHOT From 076433f3c233a757f31d5fa39bb6cedbb43b8361 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 11 Apr 2022 16:58:13 -0400 Subject: [PATCH 655/983] deps: revert dependency com.google.protobuf:protobuf-java to v3.19.4 (#1626) Reverts googleapis/google-http-java-client#1621 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f4e835e91..8fb239f79 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.2 - 3.20.0 + 3.19.4 30.1.1-android 1.1.4c 4.5.13 From 76dae5781c764a9a93d48bf9004b8c33de86270b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 17:02:51 -0400 Subject: [PATCH 656/983] chore(main): release 1.41.7 (#1627) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6ba5fb82..ef6263271 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.41.7](https://github.com/googleapis/google-http-java-client/compare/v1.41.6...v1.41.7) (2022-04-11) + + +### Dependencies + +* revert dependency com.google.protobuf:protobuf-java to v3.19.4 ([#1626](https://github.com/googleapis/google-http-java-client/issues/1626)) ([076433f](https://github.com/googleapis/google-http-java-client/commit/076433f3c233a757f31d5fa39bb6cedbb43b8361)) + ### [1.41.6](https://github.com/googleapis/google-http-java-client/compare/v1.41.5...v1.41.6) (2022-04-06) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index f2cd2790d..e0e686dbd 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.7-SNAPSHOT + 1.41.7 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.7-SNAPSHOT + 1.41.7 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.7-SNAPSHOT + 1.41.7 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 97040a121..06820ccce 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-android - 1.41.7-SNAPSHOT + 1.41.7 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 5dede1866..eb5c83373 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-apache-v2 - 1.41.7-SNAPSHOT + 1.41.7 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3eda1bc54..acf0dfdb5 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-appengine - 1.41.7-SNAPSHOT + 1.41.7 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 4edc2beae..7c03aa82a 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.7-SNAPSHOT + 1.41.7 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0ef0e780b..b13e89eb4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.7-SNAPSHOT + 1.41.7 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-android - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-apache-v2 - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-appengine - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-findbugs - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-gson - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-jackson2 - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-protobuf - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-test - 1.41.7-SNAPSHOT + 1.41.7 com.google.http-client google-http-client-xml - 1.41.7-SNAPSHOT + 1.41.7 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 22c494275..7733619d6 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-findbugs - 1.41.7-SNAPSHOT + 1.41.7 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 6c3a0b04b..658a36773 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-gson - 1.41.7-SNAPSHOT + 1.41.7 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index eb6b249b0..f8160f625 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-jackson2 - 1.41.7-SNAPSHOT + 1.41.7 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index f30e8bb77..e5a1dbe6c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-protobuf - 1.41.7-SNAPSHOT + 1.41.7 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 9c98c340d..ff94ef724 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-test - 1.41.7-SNAPSHOT + 1.41.7 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index b10ec4782..f9052874d 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client-xml - 1.41.7-SNAPSHOT + 1.41.7 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index d894f2cd3..c394333db 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../pom.xml google-http-client - 1.41.7-SNAPSHOT + 1.41.7 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 8fb239f79..ca03c3d2a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.7-SNAPSHOT + 1.41.7 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 7183fcd15..d8d700410 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.7-SNAPSHOT + 1.41.7 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 4ebe7fedb..de91a3e38 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.6:1.41.7-SNAPSHOT -google-http-client-bom:1.41.6:1.41.7-SNAPSHOT -google-http-client-parent:1.41.6:1.41.7-SNAPSHOT -google-http-client-android:1.41.6:1.41.7-SNAPSHOT -google-http-client-android-test:1.41.6:1.41.7-SNAPSHOT -google-http-client-apache-v2:1.41.6:1.41.7-SNAPSHOT -google-http-client-appengine:1.41.6:1.41.7-SNAPSHOT -google-http-client-assembly:1.41.6:1.41.7-SNAPSHOT -google-http-client-findbugs:1.41.6:1.41.7-SNAPSHOT -google-http-client-gson:1.41.6:1.41.7-SNAPSHOT -google-http-client-jackson2:1.41.6:1.41.7-SNAPSHOT -google-http-client-protobuf:1.41.6:1.41.7-SNAPSHOT -google-http-client-test:1.41.6:1.41.7-SNAPSHOT -google-http-client-xml:1.41.6:1.41.7-SNAPSHOT +google-http-client:1.41.7:1.41.7 +google-http-client-bom:1.41.7:1.41.7 +google-http-client-parent:1.41.7:1.41.7 +google-http-client-android:1.41.7:1.41.7 +google-http-client-android-test:1.41.7:1.41.7 +google-http-client-apache-v2:1.41.7:1.41.7 +google-http-client-appengine:1.41.7:1.41.7 +google-http-client-assembly:1.41.7:1.41.7 +google-http-client-findbugs:1.41.7:1.41.7 +google-http-client-gson:1.41.7:1.41.7 +google-http-client-jackson2:1.41.7:1.41.7 +google-http-client-protobuf:1.41.7:1.41.7 +google-http-client-test:1.41.7:1.41.7 +google-http-client-xml:1.41.7:1.41.7 From f648b5083150f222a9a3ea2c5ca907834467999b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Apr 2022 21:08:17 +0000 Subject: [PATCH 657/983] chore(main): release 1.41.8-SNAPSHOT (#1628) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index e0e686dbd..4e8ba9246 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.7 + 1.41.8-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.7 + 1.41.8-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.7 + 1.41.8-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 06820ccce..222357aef 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-android - 1.41.7 + 1.41.8-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index eb5c83373..6721e64e7 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.41.7 + 1.41.8-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index acf0dfdb5..e95102967 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-appengine - 1.41.7 + 1.41.8-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 7c03aa82a..2dcf18198 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.41.7 + 1.41.8-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b13e89eb4..9a21d04d4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.7 + 1.41.8-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-android - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-appengine - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-gson - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-test - 1.41.7 + 1.41.8-SNAPSHOT com.google.http-client google-http-client-xml - 1.41.7 + 1.41.8-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 7733619d6..c13a58c67 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.41.7 + 1.41.8-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 658a36773..8296c8732 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-gson - 1.41.7 + 1.41.8-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index f8160f625..b0a15f312 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.41.7 + 1.41.8-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index e5a1dbe6c..8b6bf3fc3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.41.7 + 1.41.8-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ff94ef724..4e3e880d6 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-test - 1.41.7 + 1.41.8-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index f9052874d..a55c2937f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client-xml - 1.41.7 + 1.41.8-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index c394333db..014a337d1 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../pom.xml google-http-client - 1.41.7 + 1.41.8-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index ca03c3d2a..173384ef3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.7 + 1.41.8-SNAPSHOT 2.0.4 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index d8d700410..f9710ecee 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.7 + 1.41.8-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index de91a3e38..e8042266f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.7:1.41.7 -google-http-client-bom:1.41.7:1.41.7 -google-http-client-parent:1.41.7:1.41.7 -google-http-client-android:1.41.7:1.41.7 -google-http-client-android-test:1.41.7:1.41.7 -google-http-client-apache-v2:1.41.7:1.41.7 -google-http-client-appengine:1.41.7:1.41.7 -google-http-client-assembly:1.41.7:1.41.7 -google-http-client-findbugs:1.41.7:1.41.7 -google-http-client-gson:1.41.7:1.41.7 -google-http-client-jackson2:1.41.7:1.41.7 -google-http-client-protobuf:1.41.7:1.41.7 -google-http-client-test:1.41.7:1.41.7 -google-http-client-xml:1.41.7:1.41.7 +google-http-client:1.41.7:1.41.8-SNAPSHOT +google-http-client-bom:1.41.7:1.41.8-SNAPSHOT +google-http-client-parent:1.41.7:1.41.8-SNAPSHOT +google-http-client-android:1.41.7:1.41.8-SNAPSHOT +google-http-client-android-test:1.41.7:1.41.8-SNAPSHOT +google-http-client-apache-v2:1.41.7:1.41.8-SNAPSHOT +google-http-client-appengine:1.41.7:1.41.8-SNAPSHOT +google-http-client-assembly:1.41.7:1.41.8-SNAPSHOT +google-http-client-findbugs:1.41.7:1.41.8-SNAPSHOT +google-http-client-gson:1.41.7:1.41.8-SNAPSHOT +google-http-client-jackson2:1.41.7:1.41.8-SNAPSHOT +google-http-client-protobuf:1.41.7:1.41.8-SNAPSHOT +google-http-client-test:1.41.7:1.41.8-SNAPSHOT +google-http-client-xml:1.41.7:1.41.8-SNAPSHOT From bf777b364c8aafec09c486dc965587eae90549df Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Apr 2022 01:24:14 +0200 Subject: [PATCH 658/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.13.0 (#1630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.12.1` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.0/compatibility-slim/2.12.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.0/confidence-slim/2.12.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.13.0`](https://github.com/google/error-prone/releases/v2.13.0) [Compare Source](https://github.com/google/error-prone/compare/v2.12.1...v2.13.0) - Handle all annotations with the simple name `Generated` in `-XepDisableWarningsInGeneratedCode` ([#​3094](https://github.com/google/error-prone/issues/3094)) - Reconcile `BugChecker#isSuppressed` with suppression handling in `ErrorProneScanner` ([#​3094](https://github.com/google/error-prone/issues/3094)) - Fix a bug in `enclosingPackage` ([`8fa64d4`](https://github.com/google/error-prone/commit/8fa64d48f3a1d8df852ed2546ba02b0e2b7585af)) - Improve performance of fix application ([`186334b`](https://github.com/google/error-prone/commit/186334bcc45d9c275037cdcce3eb509ae8b7ff50)) - Implicitly treat `@AutoBuilder` setter methods as `@CanIgnoreReturnValue`. - Remove some obsolete checks (`PublicConstructorForAbstractClass`, `HashCodeToString`) [Release Diff: v2.12.1...v2.13.0](https://github.com/google/error-prone/compare/v2.12.1...v2.13.0).
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 173384ef3..ba3275d24 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.12.1 + 2.13.0 com.google.appengine From 9acb1abaa97392174dd35c5e0e68346f8f653b5b Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 18 Apr 2022 10:50:13 -0400 Subject: [PATCH 659/983] feat: next release from main branch is 1.42.0 (#1633) enable releases --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 202596e5c..c72276e92 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -10,3 +10,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.40.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.41.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 62199c957..a6cf56cbb 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -43,6 +43,19 @@ branchProtectionRules: - lint - clirr - cla/google + - pattern: 1.41.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From 9e46cd85ed1c14161f6473f926802bf281edc4ad Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Apr 2022 17:42:33 +0200 Subject: [PATCH 660/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.13.1 (#1632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.13.0` -> `2.13.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.13.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.13.1`](https://github.com/google/error-prone/releases/v2.13.1) [Compare Source](https://github.com/google/error-prone/compare/v2.13.0...v2.13.1) #### What's Changed - Fix a crash in `UnnecessaryBoxedVariable` in [https://github.com/google/error-prone/pull/3118](https://github.com/google/error-prone/pull/3118) - Include the unicode character in the diagnostic message in [https://github.com/google/error-prone/pull/3119](https://github.com/google/error-prone/pull/3119) **Full Changelog**: https://github.com/google/error-prone/compare/v2.13.0...v2.13.1
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ba3275d24..da3c21ea9 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.13.0 + 2.13.1 com.google.appengine From 7e97329bf9e72305f9709da6e0433ea23620ac86 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 16:46:16 +0200 Subject: [PATCH 661/983] build(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.12.0 (#1637) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-site-plugin](https://maven.apache.org/plugins/) | `3.11.0` -> `3.12.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.0/compatibility-slim/3.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.0/confidence-slim/3.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9a21d04d4..c9b26b0ab 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.11.0 + 3.12.0 true diff --git a/pom.xml b/pom.xml index da3c21ea9..40d94ef7b 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ org.apache.maven.plugins maven-site-plugin - 3.11.0 + 3.12.0 org.apache.maven.plugins From 36795b4492b2c57544b8821a65c2b800733796d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 16:46:29 +0200 Subject: [PATCH 662/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.0 (#1636) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) ([source](https://github.com/apache/maven-javadoc-plugin)) | `3.3.2` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/compatibility-slim/3.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/confidence-slim/3.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index c9b26b0ab..44a20bb4b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.0 true diff --git a/pom.xml b/pom.xml index 40d94ef7b..67e33b5ea 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.0 attach-javadocs @@ -702,7 +702,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.0 com.microsoft.doclet.DocFxDoclet false From f7bb82e2ff8bfa2da8ccce2cfb1b949bac5f617d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 19:42:16 +0200 Subject: [PATCH 663/983] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.13 (#1638) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://github.com/sonatype/nexus-maven-plugins)) | `1.6.8` -> `1.6.13` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/compatibility-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/confidence-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              sonatype/nexus-maven-plugins ### [`v1.6.13`](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) [Compare Source](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) ### [`v1.6.12`](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12) [Compare Source](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.11...release-1.6.12) ### [`v1.6.11`](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11) [Compare Source](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11) ### [`v1.6.10`](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10) [Compare Source](https://github.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10)
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- samples/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 44a20bb4b..fdc8c5a48 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true sonatype-nexus-staging diff --git a/pom.xml b/pom.xml index 67e33b5ea..5bd16e4c9 100644 --- a/pom.xml +++ b/pom.xml @@ -262,7 +262,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true ossrh diff --git a/samples/pom.xml b/samples/pom.xml index d6b2bfa7e..7645ae91e 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true From 90a99e27b053f5dc6078d6d8cd9bfe150237e2b4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 22 Apr 2022 16:12:30 +0200 Subject: [PATCH 664/983] deps: update dependency com.google.protobuf:protobuf-java to v3.20.1 (#1639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.19.4` -> `3.20.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.20.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.20.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.20.1/compatibility-slim/3.19.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.20.1/confidence-slim/3.19.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.20.1`](https://github.com/protocolbuffers/protobuf/releases/v3.20.1) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.20.0...v3.20.1) ##### PHP - Fix building packaged PHP extension ([#​9727](https://github.com/protocolbuffers/protobuf/issues/9727)) - Fixed composer.json to only advertise compatibility with PHP 7.0+. ([#​9819](https://github.com/protocolbuffers/protobuf/issues/9819)) ##### Ruby - Disable the aarch64 build on macOS until it can be fixed. ([#​9816](https://github.com/protocolbuffers/protobuf/issues/9816)) ##### Other - Fix versioning issues in 3.20.0 ### [`v3.20.0`](https://github.com/protocolbuffers/protobuf/releases/v3.20.0) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.19.4...v3.20.0) 2022-03-25 version 3.20.0 (C++/Java/Python/PHP/Objective-C/C#/Ruby/JavaScript) ##### Ruby - Dropped Ruby 2.3 and 2.4 support for CI and releases. ([#​9311](https://github.com/protocolbuffers/protobuf/issues/9311)) - Added Ruby 3.1 support for CI and releases ([#​9566](https://github.com/protocolbuffers/protobuf/issues/9566)). - Message.decode/encode: Add recursion_limit option ([#​9218](https://github.com/protocolbuffers/protobuf/issues/9218)/[#​9486](https://github.com/protocolbuffers/protobuf/issues/9486)) - Allocate with xrealloc()/xfree() so message allocation is visible to the Ruby GC. In certain tests this leads to much lower memory usage due to more frequent GC runs ([#​9586](https://github.com/protocolbuffers/protobuf/issues/9586)). - Fix conversion of singleton classes in Ruby ([#​9342](https://github.com/protocolbuffers/protobuf/issues/9342)) - Suppress warning for intentional circular require ([#​9556](https://github.com/protocolbuffers/protobuf/issues/9556)) - JSON will now output shorter strings for double and float fields when possible without losing precision. - Encoding and decoding of binary format will now work properly on big-endian systems. - UTF-8 verification was fixed to properly reject surrogate code points. - Unknown enums for proto2 protos now properly implement proto2's behavior of putting such values in unknown fields. ##### Java - Revert "Standardize on Array copyOf" ([#​9400](https://github.com/protocolbuffers/protobuf/issues/9400)) - Resolve more java field accessor name conflicts ([#​8198](https://github.com/protocolbuffers/protobuf/issues/8198)) - Don't support map fields in DynamicMessage.Builder.{getFieldBuilder,getRepeatedFieldBuilder} - Fix parseFrom to only throw InvalidProtocolBufferException - InvalidProtocolBufferException now allows arbitrary wrapped Exception types. - Fix bug in `FieldSet.Builder.mergeFrom` - Flush CodedOutputStream also flushes underlying OutputStream - When oneof case is the same and the field type is Message, merge the subfield. (previously it was replaced.)’ - Add [@​CheckReturnValue](https://github.com/CheckReturnValue) to some protobuf types - Report original exceptions when parsing JSON - Add more info to [@​deprecated](https://github.com/deprecated) javadoc for set/get/has methods - Fix initialization bug in doc comment line numbers - Fix comments for message set wire format. ##### Kotlin - Add test scope to kotlin-test for protobuf-kotlin-lite ([#​9518](https://github.com/protocolbuffers/protobuf/issues/9518)) - Add orNull extensions for optional message fields. - Add orNull extensions to all proto3 message fields. ##### Python - Dropped support for Python < 3.7 ([#​9480](https://github.com/protocolbuffers/protobuf/issues/9480)) - Protoc is now able to generate python stubs (.pyi) with --pyi_out - Pin multibuild scripts to get manylinux1 wheels back ([#​9216](https://github.com/protocolbuffers/protobuf/issues/9216)) - Fix type annotations of some Duration and Timestamp methods. - Repeated field containers are now generic in field types and could be used in type annotations. - Protobuf python generated codes are simplified. Descriptors and message classes' definitions are now dynamic created in internal/builder.py. Insertion Points for messages classes are discarded. - has_presence is added for FieldDescriptor in python - Loosen indexing type requirements to allow valid **index**() implementations rather than only PyLongObjects. - Fix the deepcopy bug caused by not copying message_listener. - Added python JSON parse recursion limit (default 100) - Path info is added for python JSON parse errors - Pure python repeated scalar fields will not able to pickle. Convert to list first. - Timestamp.ToDatetime() now accepts an optional tzinfo parameter. If specified, the function returns a timezone-aware datetime in the given time zone. If omitted or None, the function returns a timezone-naive UTC datetime (as previously). - Adds client_streaming and server_streaming fields to MethodDescriptor. - Add "ensure_ascii" parameter to json_format.MessageToJson. This allows smaller JSON serializations with UTF-8 or other non-ASCII encodings. - Added experimental support for directly assigning numpy scalars and array. - Improve the calculation of public_dependencies in DescriptorPool. - \[Breaking Change] Disallow setting fields to numpy singleton arrays or repeated fields to numpy multi-dimensional arrays. Numpy arrays should be indexed or flattened explicitly before assignment. ##### Compiler - Migrate IsDefault(const std::string\*) and UnsafeSetDefault(const std::string\*) - Implement strong qualified tags for TaggedPtr - Rework allocations to power-of-two byte sizes. - Migrate IsDefault(const std::string\*) and UnsafeSetDefault(const std::string\*) - Implement strong qualified tags for TaggedPtr - Make TaggedPtr Set...() calls explicitly spell out the content type. - Check for parsing error before verifying UTF8. - Enforce a maximum message nesting limit of 32 in the descriptor builder to guard against stack overflows - Fixed bugs in operators for RepeatedPtrIterator - Assert a maximum map alignment for allocated values - Fix proto1 group extension protodb parsing error - Do not log/report the same descriptor symbol multiple times if it contains more than one invalid character. - Add UnknownFieldSet::SerializeToString and SerializeToCodedStream. - Remove explicit default pointers and deprecated API from protocol compiler ##### Arenas - Change Repeated\*Field to reuse memory when using arenas. - Implements pbarenaz for profiling proto arenas - Introduce CreateString() and CreateArenaString() for cleaner semantics - Fix unreferenced parameter for MSVC builds - Add UnsafeSetAllocated to be used for one-of string fields. - Make Arena::AllocateAligned() a public function. - Determine if ArenaDtor related code generation is necessary in one place. - Implement on demand register ArenaDtor for InlinedStringField ##### C++ - Enable testing via CTest ([#​8737](https://github.com/protocolbuffers/protobuf/issues/8737)) - Add option to use external GTest in CMake ([#​8736](https://github.com/protocolbuffers/protobuf/issues/8736)) - CMake: Set correct sonames for libprotobuf-lite.so and libprotoc.so ([#​8635](https://github.com/protocolbuffers/protobuf/issues/8635)) ([#​9529](https://github.com/protocolbuffers/protobuf/issues/9529)) - Add cmake option `protobuf_INSTALL` to not install files ([#​7123](https://github.com/protocolbuffers/protobuf/issues/7123)) - CMake: Allow custom plugin options e.g. to generate mocks ([#​9105](https://github.com/protocolbuffers/protobuf/issues/9105)) - CMake: Use linker version scripts ([#​9545](https://github.com/protocolbuffers/protobuf/issues/9545)) - Manually \*struct Cord fields to work better with arenas. - Manually destruct map fields. - Generate narrower code - Fix [https://github.com/protocolbuffers/protobuf/issues/9378](https://github.com/protocolbuffers/protobuf/issues/9378) by removing shadowed *cached_size* field - Remove GetPointer() and explicit nullptr defaults. - Add proto_h flag for speeding up large builds - Add missing overload for reference wrapped fields. - Add MergedDescriptorDatabase::FindAllFileNames() - RepeatedField now defines an iterator type instead of using a pointer. - Remove obsolete macros GOOGLE_PROTOBUF_HAS_ONEOF and GOOGLE_PROTOBUF_HAS_ARENAS. ##### PHP - Fix: add missing reserved classnames ([#​9458](https://github.com/protocolbuffers/protobuf/issues/9458)) - PHP 8.1 compatibility ([#​9370](https://github.com/protocolbuffers/protobuf/issues/9370)) ##### C\# - Fix trim warnings ([#​9182](https://github.com/protocolbuffers/protobuf/issues/9182)) - Fixes NullReferenceException when accessing FieldDescriptor.IsPacked ([#​9430](https://github.com/protocolbuffers/protobuf/issues/9430)) - Add ToProto() method to all descriptor classes ([#​9426](https://github.com/protocolbuffers/protobuf/issues/9426)) - Add an option to preserve proto names in JsonFormatter ([#​6307](https://github.com/protocolbuffers/protobuf/issues/6307)) ##### Objective-C - Add prefix_to_proto_package_mappings_path option. ([#​9498](https://github.com/protocolbuffers/protobuf/issues/9498)) - Rename `proto_package_to_prefix_mappings_path` to `package_to_prefix_mappings_path`. ([#​9552](https://github.com/protocolbuffers/protobuf/issues/9552)) - Add a generation option to control use of forward declarations in headers. ([#​9568](https://github.com/protocolbuffers/protobuf/issues/9568))
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5bd16e4c9..f2f5f052e 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.2 - 3.19.4 + 3.20.1 30.1.1-android 1.1.4c 4.5.13 From e87362852a16223a705b05a465cd7b9e51c2b46d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Apr 2022 17:38:11 +0200 Subject: [PATCH 665/983] chore(deps): update dependency com.google.cloud:libraries-bom to v25.2.0 (#1640) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.1.0` -> `25.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/compatibility-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.2.0/confidence-slim/25.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4d21285d8..ac5eedd2c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 25.1.0 + 25.2.0 pom import From 27b81fd6ee8325381f0e842a0c6179455597af18 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:30:12 +0200 Subject: [PATCH 666/983] chore(deps): update dependency com.google.http-client:google-http-client-android to v1.41.8 (#1649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-android](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-android-test/pom.xml | 2 +- google-http-client-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 4e8ba9246..dce587b83 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.8-SNAPSHOT + 1.41.8 android diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index fdc8c5a48..14f95d748 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -68,7 +68,7 @@ com.google.http-client google-http-client-android - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From 3c65a07c14d2bf7aa6cce25122df85670955d459 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:30:16 +0200 Subject: [PATCH 667/983] deps: update project.opencensus.version to v0.31.1 (#1644) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opencensus:opencensus-testing](https://github.com/census-instrumentation/opencensus-java) | `0.31.0` -> `0.31.1` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.1/compatibility-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-testing/0.31.1/confidence-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-impl](https://github.com/census-instrumentation/opencensus-java) | `0.31.0` -> `0.31.1` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.1/compatibility-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-impl/0.31.1/confidence-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-contrib-http-util](https://github.com/census-instrumentation/opencensus-java) | `0.31.0` -> `0.31.1` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.1/compatibility-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-contrib-http-util/0.31.1/confidence-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | | [io.opencensus:opencensus-api](https://github.com/census-instrumentation/opencensus-java) | `0.31.0` -> `0.31.1` | [![age](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.1/compatibility-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.opencensus:opencensus-api/0.31.1/confidence-slim/0.31.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              census-instrumentation/opencensus-java ### [`v0.31.1`](https://github.com/census-instrumentation/opencensus-java/releases/v0.31.1) [Compare Source](https://github.com/census-instrumentation/opencensus-java/compare/v0.31.0...v0.31.1) ##### What's Changed - \[v0.31.x] Fix retry stat measures to match those in grpc-java exactly ([#​2097](https://github.com/census-instrumentation/opencensus-java/issues/2097)) by [@​mackenziestarr](https://github.com/mackenziestarr) in [https://github.com/census-instrumentation/opencensus-java/pull/2102](https://github.com/census-instrumentation/opencensus-java/pull/2102) **Full Changelog**: https://github.com/census-instrumentation/opencensus-java/compare/v0.31.0...v0.31.1
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f2f5f052e..cf857ae84 100644 --- a/pom.xml +++ b/pom.xml @@ -571,7 +571,7 @@ 1.1.4c 4.5.13 4.4.15 - 0.31.0 + 0.31.1 .. false
              From bf3b2e1f9690844546cd6c676e9041e329dec260 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:30:20 +0200 Subject: [PATCH 668/983] chore(deps): update dependency com.google.http-client:google-http-client-gson to v1.41.8 (#1653) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 14f95d748..2e0fdffa4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -88,7 +88,7 @@ com.google.http-client google-http-client-gson - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From b3b65578ac67735dc633e03d17e1efb19dab29c9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:30:28 +0200 Subject: [PATCH 669/983] chore(deps): update dependency com.google.http-client:google-http-client-findbugs to v1.41.8 (#1652) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-findbugs](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 2e0fdffa4..b5b738c5a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -83,7 +83,7 @@ com.google.http-client google-http-client-findbugs - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From b3ef2ea1b02b5833390f4f9a2a7624cac1a2e52a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:32:25 +0200 Subject: [PATCH 670/983] chore(deps): update dependency com.google.http-client:google-http-client to v1.41.8 (#1648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b5b738c5a..5aef05990 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -63,7 +63,7 @@ com.google.http-client google-http-client - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From 7393c3c370dab21f3f39affbfc9052a20c9a05a9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:38:14 +0200 Subject: [PATCH 671/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.3.0 (#1641) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.2.2` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/compatibility-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/confidence-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cf857ae84..18326a52c 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.2 + 3.3.0 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.2.2 + 3.3.0 From 5616a4e9a8cc433a1309890753b86b060eec33c4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:44:38 +0200 Subject: [PATCH 672/983] chore(deps): update dependency com.google.http-client:google-http-client-apache-v2 to v1.41.8 (#1650) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-apache-v2](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5aef05990..1d5265e63 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -73,7 +73,7 @@ com.google.http-client google-http-client-apache-v2 - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From ff3a228c8d73957805a6c2dde3ddc4699c6cf0cc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:50:12 +0200 Subject: [PATCH 673/983] chore(deps): update dependency com.google.http-client:google-http-client-appengine to v1.41.8 (#1651) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-appengine](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 1d5265e63..0ba6e2283 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -78,7 +78,7 @@ com.google.http-client google-http-client-appengine - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From 37d47c4d1364ec7f9325fbc84cb6248e8b7f848c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:50:15 +0200 Subject: [PATCH 674/983] chore(deps): update dependency com.google.http-client:google-http-client-test to v1.41.8 (#1657) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-test](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-android-test/pom.xml | 2 +- google-http-client-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index dce587b83..e189bb1b3 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.8-SNAPSHOT + 1.41.8 junit diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0ba6e2283..95dfd83ec 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -103,7 +103,7 @@ com.google.http-client google-http-client-test - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From 34e488de121a190059cb1ce3ff86e9e831b81f91 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:50:21 +0200 Subject: [PATCH 675/983] chore(deps): update dependency com.google.http-client:google-http-client-jackson2 to v1.41.8 (#1654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 95dfd83ec..8ac731f5f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -93,7 +93,7 @@ com.google.http-client google-http-client-jackson2 - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From a7eb295e161fd9ba23b22908f2a8beda0f26ee13 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 00:56:17 +0200 Subject: [PATCH 676/983] chore(deps): update dependency com.google.http-client:google-http-client-protobuf to v1.41.8 (#1656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-protobuf](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-protobuf/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-protobuf/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-protobuf/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-protobuf/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 8ac731f5f..9e4e8c741 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -98,7 +98,7 @@ com.google.http-client google-http-client-protobuf - 1.41.8-SNAPSHOT + 1.41.8 com.google.http-client From 8f22569ef51baa813767b2f83c4eb4cfee40626b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 6 May 2022 01:14:18 +0200 Subject: [PATCH 677/983] chore(deps): update dependency com.google.http-client:google-http-client-xml to v1.41.8 (#1658) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-xml](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9e4e8c741..b00ed2189 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -108,7 +108,7 @@ com.google.http-client google-http-client-xml - 1.41.8-SNAPSHOT + 1.41.8 From e4f095997050047d9a6cc20f034f5ef744aefd44 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:22:58 +0200 Subject: [PATCH 678/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.3 (#1665) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18326a52c..aff4f54c5 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.9.0 - 2.13.2 + 2.13.3 3.20.1 30.1.1-android 1.1.4c From d8cf7217947e3a078e53414809a8ec52832efe65 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:23:21 +0200 Subject: [PATCH 679/983] chore(deps): update dependency com.google.cloud:libraries-bom to v25.3.0 (#1664) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ac5eedd2c..12b0d68a5 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 25.2.0 + 25.3.0 pom import From 2c82c0d4da1162cbc6950cdd6b2f4472b884db13 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:23:35 +0200 Subject: [PATCH 680/983] deps: update project.appengine.version to v2.0.5 (#1662) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aff4f54c5..05124c87b 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.41.8-SNAPSHOT - 2.0.4 + 2.0.5 UTF-8 3.0.2 2.9.0 From 8547f5fff9b27782162b0b6f0db7445c02918a45 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:24:53 +0200 Subject: [PATCH 681/983] deps: update dependency org.apache.felix:maven-bundle-plugin to v5.1.6 (#1643) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 6721e64e7..bfb4e6ae4 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -68,7 +68,7 @@ org.apache.felix maven-bundle-plugin - 5.1.4 + 5.1.6 bundle-manifest diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 014a337d1..826513bf0 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -97,7 +97,7 @@ org.apache.felix maven-bundle-plugin - 5.1.4 + 5.1.6 bundle-manifest From f505a4b42819292e177d44a6fe4913d4961dbe79 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 May 2022 19:28:13 +0200 Subject: [PATCH 682/983] chore(deps): update project.http-client.version to v1.41.8 (#1659) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.http-client:google-http-client-findbugs](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-findbugs/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-test](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-test/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-xml](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-xml/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-jackson2/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-gson](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-gson/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-android](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-android/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-appengine](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-appengine/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client-apache-v2](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client-apache-v2/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client) | `1.41.8-SNAPSHOT` -> `1.41.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/compatibility-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.http-client:google-http-client/1.41.8/confidence-slim/1.41.8-SNAPSHOT)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From c309b86a300312a1b809390c93150e174415d583 Mon Sep 17 00:00:00 2001 From: Solomon Duskis Date: Wed, 18 May 2022 12:20:23 -0400 Subject: [PATCH 683/983] chore: Update IOUtils.java (#1661) Adding `@Deprecated` to match the `@deprecated` annotation. --- .../src/main/java/com/google/api/client/util/IOUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java index 6d7ff929e..a74a59493 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/IOUtils.java @@ -179,6 +179,7 @@ public static S deserialize(InputStream inputStream) th * @since 1.16 * @deprecated use java.nio.file.Path#isSymbolicLink */ + @Deprecated public static boolean isSymbolicLink(File file) throws IOException { // first try using Java 7 try { From 05d40193d40097e5a793154a0951f2577fc80f04 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 17:03:48 -0400 Subject: [PATCH 684/983] feat: add build scripts for native image testing in Java 17 (#1440) (#1666) Source-Link: https://github.com/googleapis/synthtool/commit/505ce5a7edb58bf6d9d4de10b4bb4e81000ae324 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 +-- .kokoro/build.sh | 5 ++++ .kokoro/presubmit/graalvm-native-17.cfg | 33 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .kokoro/presubmit/graalvm-native-17.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 095b0d19f..a79f06271 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 -# created: 2022-04-06T16:30:03.627422514Z \ No newline at end of file + digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 +# created: 2022-05-19T15:12:45.278246753Z diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f0b868377..a68837b7a 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -74,6 +74,11 @@ graalvm) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; +graalvm17) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg new file mode 100644 index 000000000..a3f7fb9d4 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm17" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} \ No newline at end of file From 3516e185b811d1935eebce31ba65da4813f7e998 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 00:18:33 +0200 Subject: [PATCH 685/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.14.0 (#1667) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.13.1` -> `2.14.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.14.0/compatibility-slim/2.13.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.14.0/confidence-slim/2.13.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.14.0`](https://github.com/google/error-prone/releases/tag/v2.14.0) [Compare Source](https://github.com/google/error-prone/compare/v2.13.1...v2.14.0) New checkers: - [`BanJNDI`](https://errorprone.info/bugpattern/BanJNDI) - [`EmptyTopLevelDeclaration`](https://errorprone.info/bugpattern/EmptyTopLevelDeclaration) - [`ErroneousBitwiseExpression`](https://errorprone.info/bugpattern/ErroneousBitwiseExpression) - [`FuzzyEqualsShouldNotBeUsedInEqualsMethod`](https://errorprone.info/bugpattern/FuzzyEqualsShouldNotBeUsedInEqualsMethod) - [`Interruption`](https://errorprone.info/bugpattern/Interruption) - [`NullableOnContainingClass`](https://errorprone.info/bugpattern/NullableOnContainingClass) Fixed issues: [#​3110](https://github.com/google/error-prone/issues/3110), [#​3193](https://github.com/google/error-prone/issues/3193) **Full Changelog**: https://github.com/google/error-prone/compare/v2.13.1...v2.14.0
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 05124c87b..dd49e8c0f 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.13.1 + 2.14.0 com.google.appengine From babbe94104710db7b4b428756d7db6c069674ff1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 16:36:19 +0200 Subject: [PATCH 686/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.0 (#1668) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.20.1` -> `3.21.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.0/compatibility-slim/3.20.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.0/confidence-slim/3.20.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.0`](https://github.com/protocolbuffers/protobuf/compare/v3.20.1...v3.21.0) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.20.1...v3.21.0)
              --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd49e8c0f..426a0ecca 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.3 - 3.20.1 + 3.21.0 30.1.1-android 1.1.4c 4.5.13 From c82f6d3cc02c9bcf15c481eec2e4dc76e35e05a2 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 3 Jun 2022 14:53:45 -0400 Subject: [PATCH 687/983] chore(deps): libraries-bom 25.4.0 doc update (#1671) --- docs/setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/setup.md b/docs/setup.md index 36dea6914..e0da06569 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -23,7 +23,7 @@ the `dependencyManagement` section of your `pom.xml`: com.google.cloud libraries-bom - 25.1.0 + 25.4.0 pom import From 30ec091faea7b5ec9f130cb3fdee396e9923a4b9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:26:26 +0200 Subject: [PATCH 688/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.1 (#1669) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.0` -> `3.21.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.1/compatibility-slim/3.21.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.1/confidence-slim/3.21.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.1`](https://github.com/protocolbuffers/protobuf/compare/v3.21.0...v3.21.1) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.0...v3.21.1)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 426a0ecca..c351e5209 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.3 - 3.21.0 + 3.21.1 30.1.1-android 1.1.4c 4.5.13 From d6ab5c2f07545e150d1336e3f5efe2b12e62210a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jun 2022 19:36:14 +0200 Subject: [PATCH 689/983] chore(deps): update dependency com.google.cloud:libraries-bom to v25.4.0 (#1670) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/GoogleCloudPlatform/cloud-opensource-java)) | `25.3.0` -> `25.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/compatibility-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/25.4.0/confidence-slim/25.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 12b0d68a5..dc3952ae2 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 25.3.0 + 25.4.0 pom import From ce3f5f0b9205a2b1f75564829e71f0570290f90a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Jun 2022 18:14:21 +0200 Subject: [PATCH 690/983] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.0.0-m7 (#1672) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c351e5209..d384d4749 100644 --- a/pom.xml +++ b/pom.xml @@ -326,7 +326,7 @@
              maven-surefire-plugin - 3.0.0-M6 + 3.0.0-M7 -Xmx1024m sponge_log From 0e2c7e872998c9dca7828387e20764218603caf8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:18:11 +0000 Subject: [PATCH 691/983] chore(main): release 1.42.0 (#1631) :robot: I have created a release *beep* *boop* --- ## [1.42.0](https://github.com/googleapis/google-http-java-client/compare/v1.41.7...v1.42.0) (2022-06-09) ### Features * add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/google-http-java-client/issues/1440)) ([#1666](https://github.com/googleapis/google-http-java-client/issues/1666)) ([05d4019](https://github.com/googleapis/google-http-java-client/commit/05d40193d40097e5a793154a0951f2577fc80f04)) * next release from main branch is 1.42.0 ([#1633](https://github.com/googleapis/google-http-java-client/issues/1633)) ([9acb1ab](https://github.com/googleapis/google-http-java-client/commit/9acb1abaa97392174dd35c5e0e68346f8f653b5b)) ### Dependencies * update dependency com.fasterxml.jackson.core:jackson-core to v2.13.3 ([#1665](https://github.com/googleapis/google-http-java-client/issues/1665)) ([e4f0959](https://github.com/googleapis/google-http-java-client/commit/e4f095997050047d9a6cc20f034f5ef744aefd44)) * update dependency com.google.errorprone:error_prone_annotations to v2.13.0 ([#1630](https://github.com/googleapis/google-http-java-client/issues/1630)) ([bf777b3](https://github.com/googleapis/google-http-java-client/commit/bf777b364c8aafec09c486dc965587eae90549df)) * update dependency com.google.errorprone:error_prone_annotations to v2.13.1 ([#1632](https://github.com/googleapis/google-http-java-client/issues/1632)) ([9e46cd8](https://github.com/googleapis/google-http-java-client/commit/9e46cd85ed1c14161f6473f926802bf281edc4ad)) * update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#1667](https://github.com/googleapis/google-http-java-client/issues/1667)) ([3516e18](https://github.com/googleapis/google-http-java-client/commit/3516e185b811d1935eebce31ba65da4813f7e998)) * update dependency com.google.protobuf:protobuf-java to v3.20.1 ([#1639](https://github.com/googleapis/google-http-java-client/issues/1639)) ([90a99e2](https://github.com/googleapis/google-http-java-client/commit/90a99e27b053f5dc6078d6d8cd9bfe150237e2b4)) * update dependency com.google.protobuf:protobuf-java to v3.21.0 ([#1668](https://github.com/googleapis/google-http-java-client/issues/1668)) ([babbe94](https://github.com/googleapis/google-http-java-client/commit/babbe94104710db7b4b428756d7db6c069674ff1)) * update dependency com.google.protobuf:protobuf-java to v3.21.1 ([#1669](https://github.com/googleapis/google-http-java-client/issues/1669)) ([30ec091](https://github.com/googleapis/google-http-java-client/commit/30ec091faea7b5ec9f130cb3fdee396e9923a4b9)) * update dependency org.apache.felix:maven-bundle-plugin to v5.1.6 ([#1643](https://github.com/googleapis/google-http-java-client/issues/1643)) ([8547f5f](https://github.com/googleapis/google-http-java-client/commit/8547f5fff9b27782162b0b6f0db7445c02918a45)) * update project.appengine.version to v2.0.5 ([#1662](https://github.com/googleapis/google-http-java-client/issues/1662)) ([2c82c0d](https://github.com/googleapis/google-http-java-client/commit/2c82c0d4da1162cbc6950cdd6b2f4472b884db13)) * update project.opencensus.version to v0.31.1 ([#1644](https://github.com/googleapis/google-http-java-client/issues/1644)) ([3c65a07](https://github.com/googleapis/google-http-java-client/commit/3c65a07c14d2bf7aa6cce25122df85670955d459)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 22 +++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 75 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef6263271..0252e4b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.42.0](https://github.com/googleapis/google-http-java-client/compare/v1.41.7...v1.42.0) (2022-06-09) + + +### Features + +* add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/google-http-java-client/issues/1440)) ([#1666](https://github.com/googleapis/google-http-java-client/issues/1666)) ([05d4019](https://github.com/googleapis/google-http-java-client/commit/05d40193d40097e5a793154a0951f2577fc80f04)) +* next release from main branch is 1.42.0 ([#1633](https://github.com/googleapis/google-http-java-client/issues/1633)) ([9acb1ab](https://github.com/googleapis/google-http-java-client/commit/9acb1abaa97392174dd35c5e0e68346f8f653b5b)) + + +### Dependencies + +* update dependency com.fasterxml.jackson.core:jackson-core to v2.13.3 ([#1665](https://github.com/googleapis/google-http-java-client/issues/1665)) ([e4f0959](https://github.com/googleapis/google-http-java-client/commit/e4f095997050047d9a6cc20f034f5ef744aefd44)) +* update dependency com.google.errorprone:error_prone_annotations to v2.13.0 ([#1630](https://github.com/googleapis/google-http-java-client/issues/1630)) ([bf777b3](https://github.com/googleapis/google-http-java-client/commit/bf777b364c8aafec09c486dc965587eae90549df)) +* update dependency com.google.errorprone:error_prone_annotations to v2.13.1 ([#1632](https://github.com/googleapis/google-http-java-client/issues/1632)) ([9e46cd8](https://github.com/googleapis/google-http-java-client/commit/9e46cd85ed1c14161f6473f926802bf281edc4ad)) +* update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#1667](https://github.com/googleapis/google-http-java-client/issues/1667)) ([3516e18](https://github.com/googleapis/google-http-java-client/commit/3516e185b811d1935eebce31ba65da4813f7e998)) +* update dependency com.google.protobuf:protobuf-java to v3.20.1 ([#1639](https://github.com/googleapis/google-http-java-client/issues/1639)) ([90a99e2](https://github.com/googleapis/google-http-java-client/commit/90a99e27b053f5dc6078d6d8cd9bfe150237e2b4)) +* update dependency com.google.protobuf:protobuf-java to v3.21.0 ([#1668](https://github.com/googleapis/google-http-java-client/issues/1668)) ([babbe94](https://github.com/googleapis/google-http-java-client/commit/babbe94104710db7b4b428756d7db6c069674ff1)) +* update dependency com.google.protobuf:protobuf-java to v3.21.1 ([#1669](https://github.com/googleapis/google-http-java-client/issues/1669)) ([30ec091](https://github.com/googleapis/google-http-java-client/commit/30ec091faea7b5ec9f130cb3fdee396e9923a4b9)) +* update dependency org.apache.felix:maven-bundle-plugin to v5.1.6 ([#1643](https://github.com/googleapis/google-http-java-client/issues/1643)) ([8547f5f](https://github.com/googleapis/google-http-java-client/commit/8547f5fff9b27782162b0b6f0db7445c02918a45)) +* update project.appengine.version to v2.0.5 ([#1662](https://github.com/googleapis/google-http-java-client/issues/1662)) ([2c82c0d](https://github.com/googleapis/google-http-java-client/commit/2c82c0d4da1162cbc6950cdd6b2f4472b884db13)) +* update project.opencensus.version to v0.31.1 ([#1644](https://github.com/googleapis/google-http-java-client/issues/1644)) ([3c65a07](https://github.com/googleapis/google-http-java-client/commit/3c65a07c14d2bf7aa6cce25122df85670955d459)) + ### [1.41.7](https://github.com/googleapis/google-http-java-client/compare/v1.41.6...v1.41.7) (2022-04-11) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index e189bb1b3..89acc3f6e 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.41.8-SNAPSHOT + 1.42.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.41.8 + 1.42.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.41.8 + 1.42.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 222357aef..ce420bf1d 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-android - 1.41.8-SNAPSHOT + 1.42.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index bfb4e6ae4..7375ae208 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-apache-v2 - 1.41.8-SNAPSHOT + 1.42.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index e95102967..b4336ba6f 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-appengine - 1.41.8-SNAPSHOT + 1.42.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 2dcf18198..11626d5f4 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.41.8-SNAPSHOT + 1.42.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b00ed2189..cf5fba5c3 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.41.8-SNAPSHOT + 1.42.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.41.8 + 1.42.0 com.google.http-client google-http-client-android - 1.41.8 + 1.42.0 com.google.http-client google-http-client-apache-v2 - 1.41.8 + 1.42.0 com.google.http-client google-http-client-appengine - 1.41.8 + 1.42.0 com.google.http-client google-http-client-findbugs - 1.41.8 + 1.42.0 com.google.http-client google-http-client-gson - 1.41.8 + 1.42.0 com.google.http-client google-http-client-jackson2 - 1.41.8 + 1.42.0 com.google.http-client google-http-client-protobuf - 1.41.8 + 1.42.0 com.google.http-client google-http-client-test - 1.41.8 + 1.42.0 com.google.http-client google-http-client-xml - 1.41.8 + 1.42.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c13a58c67..34c4944c9 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-findbugs - 1.41.8-SNAPSHOT + 1.42.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 8296c8732..20ac85064 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-gson - 1.41.8-SNAPSHOT + 1.42.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index b0a15f312..bd7ab1e5a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-jackson2 - 1.41.8-SNAPSHOT + 1.42.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 8b6bf3fc3..b63f042bc 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-protobuf - 1.41.8-SNAPSHOT + 1.42.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 4e3e880d6..70fac0b91 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-test - 1.41.8-SNAPSHOT + 1.42.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index a55c2937f..8673fc4c9 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client-xml - 1.41.8-SNAPSHOT + 1.42.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 826513bf0..d2f61646d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../pom.xml google-http-client - 1.41.8-SNAPSHOT + 1.42.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index d384d4749..f4e167c0a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.41.8-SNAPSHOT + 1.42.0 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index f9710ecee..b8962dbc8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.41.8-SNAPSHOT + 1.42.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index e8042266f..eaf169252 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.41.7:1.41.8-SNAPSHOT -google-http-client-bom:1.41.7:1.41.8-SNAPSHOT -google-http-client-parent:1.41.7:1.41.8-SNAPSHOT -google-http-client-android:1.41.7:1.41.8-SNAPSHOT -google-http-client-android-test:1.41.7:1.41.8-SNAPSHOT -google-http-client-apache-v2:1.41.7:1.41.8-SNAPSHOT -google-http-client-appengine:1.41.7:1.41.8-SNAPSHOT -google-http-client-assembly:1.41.7:1.41.8-SNAPSHOT -google-http-client-findbugs:1.41.7:1.41.8-SNAPSHOT -google-http-client-gson:1.41.7:1.41.8-SNAPSHOT -google-http-client-jackson2:1.41.7:1.41.8-SNAPSHOT -google-http-client-protobuf:1.41.7:1.41.8-SNAPSHOT -google-http-client-test:1.41.7:1.41.8-SNAPSHOT -google-http-client-xml:1.41.7:1.41.8-SNAPSHOT +google-http-client:1.42.0:1.42.0 +google-http-client-bom:1.42.0:1.42.0 +google-http-client-parent:1.42.0:1.42.0 +google-http-client-android:1.42.0:1.42.0 +google-http-client-android-test:1.42.0:1.42.0 +google-http-client-apache-v2:1.42.0:1.42.0 +google-http-client-appengine:1.42.0:1.42.0 +google-http-client-assembly:1.42.0:1.42.0 +google-http-client-findbugs:1.42.0:1.42.0 +google-http-client-gson:1.42.0:1.42.0 +google-http-client-jackson2:1.42.0:1.42.0 +google-http-client-protobuf:1.42.0:1.42.0 +google-http-client-test:1.42.0:1.42.0 +google-http-client-xml:1.42.0:1.42.0 From 8a97c1ac25c59beeaae4137aabc1fa09261cd984 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 16:22:10 +0000 Subject: [PATCH 692/983] chore(main): release 1.42.1-SNAPSHOT (#1673) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 89acc3f6e..8d30ca203 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.0 + 1.42.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.0 + 1.42.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.0 + 1.42.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index ce420bf1d..0b6c338a2 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-android - 1.42.0 + 1.42.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 7375ae208..0cff86de5 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.42.0 + 1.42.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index b4336ba6f..ba87954aa 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.42.0 + 1.42.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 11626d5f4..ba558214c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.42.0 + 1.42.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index cf5fba5c3..3f7a6c1f1 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.0 + 1.42.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-android - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-test - 1.42.0 + 1.42.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.42.0 + 1.42.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 34c4944c9..a73ae2a73 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.42.0 + 1.42.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 20ac85064..59461dd9c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.42.0 + 1.42.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index bd7ab1e5a..3f98ec8da 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.42.0 + 1.42.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b63f042bc..f51685f8f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.42.0 + 1.42.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 70fac0b91..2703608b8 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-test - 1.42.0 + 1.42.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8673fc4c9..c7459ab7f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.42.0 + 1.42.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index d2f61646d..e347f9af4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../pom.xml google-http-client - 1.42.0 + 1.42.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f4e167c0a..cce159322 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.0 + 1.42.1-SNAPSHOT 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b8962dbc8..ae0a2f41f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.0 + 1.42.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index eaf169252..5ee290441 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.0:1.42.0 -google-http-client-bom:1.42.0:1.42.0 -google-http-client-parent:1.42.0:1.42.0 -google-http-client-android:1.42.0:1.42.0 -google-http-client-android-test:1.42.0:1.42.0 -google-http-client-apache-v2:1.42.0:1.42.0 -google-http-client-appengine:1.42.0:1.42.0 -google-http-client-assembly:1.42.0:1.42.0 -google-http-client-findbugs:1.42.0:1.42.0 -google-http-client-gson:1.42.0:1.42.0 -google-http-client-jackson2:1.42.0:1.42.0 -google-http-client-protobuf:1.42.0:1.42.0 -google-http-client-test:1.42.0:1.42.0 -google-http-client-xml:1.42.0:1.42.0 +google-http-client:1.42.0:1.42.1-SNAPSHOT +google-http-client-bom:1.42.0:1.42.1-SNAPSHOT +google-http-client-parent:1.42.0:1.42.1-SNAPSHOT +google-http-client-android:1.42.0:1.42.1-SNAPSHOT +google-http-client-android-test:1.42.0:1.42.1-SNAPSHOT +google-http-client-apache-v2:1.42.0:1.42.1-SNAPSHOT +google-http-client-appengine:1.42.0:1.42.1-SNAPSHOT +google-http-client-assembly:1.42.0:1.42.1-SNAPSHOT +google-http-client-findbugs:1.42.0:1.42.1-SNAPSHOT +google-http-client-gson:1.42.0:1.42.1-SNAPSHOT +google-http-client-jackson2:1.42.0:1.42.1-SNAPSHOT +google-http-client-protobuf:1.42.0:1.42.1-SNAPSHOT +google-http-client-test:1.42.0:1.42.1-SNAPSHOT +google-http-client-xml:1.42.0:1.42.1-SNAPSHOT From d99019272bfd68cc8530d3ec78748402bf417d74 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 22 Jun 2022 02:51:44 +0200 Subject: [PATCH 693/983] build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.1.0 (#1544) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cce159322..59b7a4d5d 100644 --- a/pom.xml +++ b/pom.xml @@ -375,7 +375,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.1.0 @@ -383,7 +383,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M3 + 3.1.0 enforce-maven From d7638ec8a3e626790f33f4fb04889fe4dfb31575 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 27 Jun 2022 21:06:24 +0200 Subject: [PATCH 694/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.2 (#1676) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.1` -> `3.21.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.2/compatibility-slim/3.21.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.2/confidence-slim/3.21.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.2`](https://github.com/protocolbuffers/protobuf/compare/v3.21.1...v3.21.2) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.1...v3.21.2)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 59b7a4d5d..44e39520c 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.3 - 3.21.1 + 3.21.2 30.1.1-android 1.1.4c 4.5.13 From 62a55a9c0e932567c2feb520717638ec9e643ca4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:28:11 +0000 Subject: [PATCH 695/983] chore: update dependencies for regapic (#1467) (#1677) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f06271..f0625e4d9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45a..f8f957af1 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From dcad8935aee8db66adff4f3ad91417e1f3cee7a5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:16:28 +0000 Subject: [PATCH 696/983] chore: Disable CLIRR checks on releas (#1474) (#1679) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4d9..a454a61e8 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f0..1dba8de10 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From 44700db72adce348da17538627375b3201f2c454 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 18:02:16 +0000 Subject: [PATCH 697/983] chore(main): release 1.42.1 (#1678) :robot: I have created a release *beep* *boop* --- ## [1.42.1](https://github.com/googleapis/google-http-java-client/compare/v1.42.0...v1.42.1) (2022-06-30) ### Dependencies * update dependency com.google.protobuf:protobuf-java to v3.21.2 ([#1676](https://github.com/googleapis/google-http-java-client/issues/1676)) ([d7638ec](https://github.com/googleapis/google-http-java-client/commit/d7638ec8a3e626790f33f4fb04889fe4dfb31575)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0252e4b8b..d94bc26f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.42.1](https://github.com/googleapis/google-http-java-client/compare/v1.42.0...v1.42.1) (2022-06-30) + + +### Dependencies + +* update dependency com.google.protobuf:protobuf-java to v3.21.2 ([#1676](https://github.com/googleapis/google-http-java-client/issues/1676)) ([d7638ec](https://github.com/googleapis/google-http-java-client/commit/d7638ec8a3e626790f33f4fb04889fe4dfb31575)) + ## [1.42.0](https://github.com/googleapis/google-http-java-client/compare/v1.41.7...v1.42.0) (2022-06-09) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 8d30ca203..606ea98f3 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.1-SNAPSHOT + 1.42.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.1-SNAPSHOT + 1.42.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.1-SNAPSHOT + 1.42.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 0b6c338a2..80b6a7478 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-android - 1.42.1-SNAPSHOT + 1.42.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0cff86de5..ca0a289c2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-apache-v2 - 1.42.1-SNAPSHOT + 1.42.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index ba87954aa..c98ab47ca 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-appengine - 1.42.1-SNAPSHOT + 1.42.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index ba558214c..aba49e9ce 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.42.1-SNAPSHOT + 1.42.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3f7a6c1f1..6bf9fa1e9 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.1-SNAPSHOT + 1.42.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-android - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-apache-v2 - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-appengine - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-findbugs - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-gson - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-jackson2 - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-protobuf - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-test - 1.42.1-SNAPSHOT + 1.42.1 com.google.http-client google-http-client-xml - 1.42.1-SNAPSHOT + 1.42.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index a73ae2a73..6440cbda8 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-findbugs - 1.42.1-SNAPSHOT + 1.42.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 59461dd9c..dbe481e68 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-gson - 1.42.1-SNAPSHOT + 1.42.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 3f98ec8da..85c294aa0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-jackson2 - 1.42.1-SNAPSHOT + 1.42.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index f51685f8f..dbb2edb57 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-protobuf - 1.42.1-SNAPSHOT + 1.42.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 2703608b8..dfdb1500f 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-test - 1.42.1-SNAPSHOT + 1.42.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c7459ab7f..7f6bf29b8 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client-xml - 1.42.1-SNAPSHOT + 1.42.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e347f9af4..e4769fefd 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../pom.xml google-http-client - 1.42.1-SNAPSHOT + 1.42.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 44e39520c..0b59a424a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.1-SNAPSHOT + 1.42.1 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ae0a2f41f..1bc5f4ae0 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.1-SNAPSHOT + 1.42.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 5ee290441..e100abe22 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.0:1.42.1-SNAPSHOT -google-http-client-bom:1.42.0:1.42.1-SNAPSHOT -google-http-client-parent:1.42.0:1.42.1-SNAPSHOT -google-http-client-android:1.42.0:1.42.1-SNAPSHOT -google-http-client-android-test:1.42.0:1.42.1-SNAPSHOT -google-http-client-apache-v2:1.42.0:1.42.1-SNAPSHOT -google-http-client-appengine:1.42.0:1.42.1-SNAPSHOT -google-http-client-assembly:1.42.0:1.42.1-SNAPSHOT -google-http-client-findbugs:1.42.0:1.42.1-SNAPSHOT -google-http-client-gson:1.42.0:1.42.1-SNAPSHOT -google-http-client-jackson2:1.42.0:1.42.1-SNAPSHOT -google-http-client-protobuf:1.42.0:1.42.1-SNAPSHOT -google-http-client-test:1.42.0:1.42.1-SNAPSHOT -google-http-client-xml:1.42.0:1.42.1-SNAPSHOT +google-http-client:1.42.1:1.42.1 +google-http-client-bom:1.42.1:1.42.1 +google-http-client-parent:1.42.1:1.42.1 +google-http-client-android:1.42.1:1.42.1 +google-http-client-android-test:1.42.1:1.42.1 +google-http-client-apache-v2:1.42.1:1.42.1 +google-http-client-appengine:1.42.1:1.42.1 +google-http-client-assembly:1.42.1:1.42.1 +google-http-client-findbugs:1.42.1:1.42.1 +google-http-client-gson:1.42.1:1.42.1 +google-http-client-jackson2:1.42.1:1.42.1 +google-http-client-protobuf:1.42.1:1.42.1 +google-http-client-test:1.42.1:1.42.1 +google-http-client-xml:1.42.1:1.42.1 From 56cef186a247657ed754e821cc990181c2cb8f50 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 18:08:14 +0000 Subject: [PATCH 698/983] chore(main): release 1.42.2-SNAPSHOT (#1680) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 606ea98f3..fa4265d56 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.1 + 1.42.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.1 + 1.42.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.1 + 1.42.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 80b6a7478..1cd4b7bf3 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-android - 1.42.1 + 1.42.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index ca0a289c2..968d57611 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.42.1 + 1.42.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c98ab47ca..267fd58e1 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.42.1 + 1.42.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index aba49e9ce..e196e1355 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.42.1 + 1.42.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6bf9fa1e9..75036f837 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.1 + 1.42.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-android - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-test - 1.42.1 + 1.42.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.42.1 + 1.42.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6440cbda8..af886c1cd 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.42.1 + 1.42.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index dbe481e68..5cd8aaa44 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.42.1 + 1.42.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 85c294aa0..457cd6145 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.42.1 + 1.42.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index dbb2edb57..6c72a2b0c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.42.1 + 1.42.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index dfdb1500f..c7c17c979 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-test - 1.42.1 + 1.42.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 7f6bf29b8..fdf93d669 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.42.1 + 1.42.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e4769fefd..5794596a8 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../pom.xml google-http-client - 1.42.1 + 1.42.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 0b59a424a..b6875cbf5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.1 + 1.42.2-SNAPSHOT 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 1bc5f4ae0..1a62dd0e3 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.1 + 1.42.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index e100abe22..34d10007e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.1:1.42.1 -google-http-client-bom:1.42.1:1.42.1 -google-http-client-parent:1.42.1:1.42.1 -google-http-client-android:1.42.1:1.42.1 -google-http-client-android-test:1.42.1:1.42.1 -google-http-client-apache-v2:1.42.1:1.42.1 -google-http-client-appengine:1.42.1:1.42.1 -google-http-client-assembly:1.42.1:1.42.1 -google-http-client-findbugs:1.42.1:1.42.1 -google-http-client-gson:1.42.1:1.42.1 -google-http-client-jackson2:1.42.1:1.42.1 -google-http-client-protobuf:1.42.1:1.42.1 -google-http-client-test:1.42.1:1.42.1 -google-http-client-xml:1.42.1:1.42.1 +google-http-client:1.42.1:1.42.2-SNAPSHOT +google-http-client-bom:1.42.1:1.42.2-SNAPSHOT +google-http-client-parent:1.42.1:1.42.2-SNAPSHOT +google-http-client-android:1.42.1:1.42.2-SNAPSHOT +google-http-client-android-test:1.42.1:1.42.2-SNAPSHOT +google-http-client-apache-v2:1.42.1:1.42.2-SNAPSHOT +google-http-client-appengine:1.42.1:1.42.2-SNAPSHOT +google-http-client-assembly:1.42.1:1.42.2-SNAPSHOT +google-http-client-findbugs:1.42.1:1.42.2-SNAPSHOT +google-http-client-gson:1.42.1:1.42.2-SNAPSHOT +google-http-client-jackson2:1.42.1:1.42.2-SNAPSHOT +google-http-client-protobuf:1.42.1:1.42.2-SNAPSHOT +google-http-client-test:1.42.1:1.42.2-SNAPSHOT +google-http-client-xml:1.42.1:1.42.2-SNAPSHOT From 9d789f511b907c3970ed9845a4c092fe5458755d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 19:30:30 +0000 Subject: [PATCH 699/983] fix: enable longpaths support for windows test (#1485) (#1684) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/workflows/ci.yaml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a454a61e8..de9173d95 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 -# created: 2022-06-29T23:17:33.110417661Z + digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 +# created: 2022-07-13T13:53:17.676447481Z diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83ef7f9c2..e3bb26e37 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,8 @@ jobs: windows: runs-on: windows-latest steps: + - name: Support longpaths + run: git config --system core.longpaths true - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: From f5bf84231e212a4a63b9339c87ff7d3d6c2b0280 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 13:58:16 +0000 Subject: [PATCH 700/983] chore(main): release 1.42.2 (#1685) :robot: I have created a release *beep* *boop* --- ## [1.42.2](https://github.com/googleapis/google-http-java-client/compare/v1.42.1...v1.42.2) (2022-07-13) ### Bug Fixes * enable longpaths support for windows test ([#1485](https://github.com/googleapis/google-http-java-client/issues/1485)) ([#1684](https://github.com/googleapis/google-http-java-client/issues/1684)) ([9d789f5](https://github.com/googleapis/google-http-java-client/commit/9d789f511b907c3970ed9845a4c092fe5458755d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d94bc26f2..a8f9a67c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.42.2](https://github.com/googleapis/google-http-java-client/compare/v1.42.1...v1.42.2) (2022-07-13) + + +### Bug Fixes + +* enable longpaths support for windows test ([#1485](https://github.com/googleapis/google-http-java-client/issues/1485)) ([#1684](https://github.com/googleapis/google-http-java-client/issues/1684)) ([9d789f5](https://github.com/googleapis/google-http-java-client/commit/9d789f511b907c3970ed9845a4c092fe5458755d)) + ## [1.42.1](https://github.com/googleapis/google-http-java-client/compare/v1.42.0...v1.42.1) (2022-06-30) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index fa4265d56..d8b3dcb9a 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.2-SNAPSHOT + 1.42.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.2-SNAPSHOT + 1.42.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.2-SNAPSHOT + 1.42.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 1cd4b7bf3..c4c283791 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-android - 1.42.2-SNAPSHOT + 1.42.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 968d57611..08c99b7cd 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-apache-v2 - 1.42.2-SNAPSHOT + 1.42.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 267fd58e1..b3e7e8430 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-appengine - 1.42.2-SNAPSHOT + 1.42.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index e196e1355..9d40766e5 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.42.2-SNAPSHOT + 1.42.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 75036f837..db446ba5f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.2-SNAPSHOT + 1.42.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-android - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-apache-v2 - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-appengine - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-findbugs - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-gson - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-jackson2 - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-protobuf - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-test - 1.42.2-SNAPSHOT + 1.42.2 com.google.http-client google-http-client-xml - 1.42.2-SNAPSHOT + 1.42.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index af886c1cd..4cbcc4752 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-findbugs - 1.42.2-SNAPSHOT + 1.42.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 5cd8aaa44..88d370ac1 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-gson - 1.42.2-SNAPSHOT + 1.42.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 457cd6145..66537f97c 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-jackson2 - 1.42.2-SNAPSHOT + 1.42.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 6c72a2b0c..0d8c008ac 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-protobuf - 1.42.2-SNAPSHOT + 1.42.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index c7c17c979..34fb96829 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-test - 1.42.2-SNAPSHOT + 1.42.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index fdf93d669..d467f2e5a 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client-xml - 1.42.2-SNAPSHOT + 1.42.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5794596a8..00363d549 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../pom.xml google-http-client - 1.42.2-SNAPSHOT + 1.42.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index b6875cbf5..96e751ee8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.2-SNAPSHOT + 1.42.2 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 1a62dd0e3..3731e6b27 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.2-SNAPSHOT + 1.42.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 34d10007e..644cfad9f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.1:1.42.2-SNAPSHOT -google-http-client-bom:1.42.1:1.42.2-SNAPSHOT -google-http-client-parent:1.42.1:1.42.2-SNAPSHOT -google-http-client-android:1.42.1:1.42.2-SNAPSHOT -google-http-client-android-test:1.42.1:1.42.2-SNAPSHOT -google-http-client-apache-v2:1.42.1:1.42.2-SNAPSHOT -google-http-client-appengine:1.42.1:1.42.2-SNAPSHOT -google-http-client-assembly:1.42.1:1.42.2-SNAPSHOT -google-http-client-findbugs:1.42.1:1.42.2-SNAPSHOT -google-http-client-gson:1.42.1:1.42.2-SNAPSHOT -google-http-client-jackson2:1.42.1:1.42.2-SNAPSHOT -google-http-client-protobuf:1.42.1:1.42.2-SNAPSHOT -google-http-client-test:1.42.1:1.42.2-SNAPSHOT -google-http-client-xml:1.42.1:1.42.2-SNAPSHOT +google-http-client:1.42.2:1.42.2 +google-http-client-bom:1.42.2:1.42.2 +google-http-client-parent:1.42.2:1.42.2 +google-http-client-android:1.42.2:1.42.2 +google-http-client-android-test:1.42.2:1.42.2 +google-http-client-apache-v2:1.42.2:1.42.2 +google-http-client-appengine:1.42.2:1.42.2 +google-http-client-assembly:1.42.2:1.42.2 +google-http-client-findbugs:1.42.2:1.42.2 +google-http-client-gson:1.42.2:1.42.2 +google-http-client-jackson2:1.42.2:1.42.2 +google-http-client-protobuf:1.42.2:1.42.2 +google-http-client-test:1.42.2:1.42.2 +google-http-client-xml:1.42.2:1.42.2 From a2e5ecfcac5b512bac45c6b4d7e1282a89698624 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 14:04:25 +0000 Subject: [PATCH 701/983] chore(main): release 1.42.3-SNAPSHOT (#1686) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index d8b3dcb9a..3369ab278 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.2 + 1.42.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.2 + 1.42.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.2 + 1.42.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c4c283791..c6a9e6f55 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-android - 1.42.2 + 1.42.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 08c99b7cd..aa69cff3e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.42.2 + 1.42.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index b3e7e8430..553069719 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.42.2 + 1.42.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9d40766e5..53831dcc7 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.42.2 + 1.42.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index db446ba5f..e196f7b8a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.2 + 1.42.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-android - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-test - 1.42.2 + 1.42.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.42.2 + 1.42.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 4cbcc4752..63d0a6a44 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.42.2 + 1.42.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 88d370ac1..bf6ce0d01 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.42.2 + 1.42.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 66537f97c..f1b752d7e 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.42.2 + 1.42.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 0d8c008ac..35269577b 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.42.2 + 1.42.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 34fb96829..d1e15ffea 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-test - 1.42.2 + 1.42.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index d467f2e5a..ce14d370f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.42.2 + 1.42.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 00363d549..45bd8f923 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../pom.xml google-http-client - 1.42.2 + 1.42.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 96e751ee8..24b4a16ec 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.2 + 1.42.3-SNAPSHOT 2.0.5 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 3731e6b27..e63e15d20 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.2 + 1.42.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 644cfad9f..573813965 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.2:1.42.2 -google-http-client-bom:1.42.2:1.42.2 -google-http-client-parent:1.42.2:1.42.2 -google-http-client-android:1.42.2:1.42.2 -google-http-client-android-test:1.42.2:1.42.2 -google-http-client-apache-v2:1.42.2:1.42.2 -google-http-client-appengine:1.42.2:1.42.2 -google-http-client-assembly:1.42.2:1.42.2 -google-http-client-findbugs:1.42.2:1.42.2 -google-http-client-gson:1.42.2:1.42.2 -google-http-client-jackson2:1.42.2:1.42.2 -google-http-client-protobuf:1.42.2:1.42.2 -google-http-client-test:1.42.2:1.42.2 -google-http-client-xml:1.42.2:1.42.2 +google-http-client:1.42.2:1.42.3-SNAPSHOT +google-http-client-bom:1.42.2:1.42.3-SNAPSHOT +google-http-client-parent:1.42.2:1.42.3-SNAPSHOT +google-http-client-android:1.42.2:1.42.3-SNAPSHOT +google-http-client-android-test:1.42.2:1.42.3-SNAPSHOT +google-http-client-apache-v2:1.42.2:1.42.3-SNAPSHOT +google-http-client-appengine:1.42.2:1.42.3-SNAPSHOT +google-http-client-assembly:1.42.2:1.42.3-SNAPSHOT +google-http-client-findbugs:1.42.2:1.42.3-SNAPSHOT +google-http-client-gson:1.42.2:1.42.3-SNAPSHOT +google-http-client-jackson2:1.42.2:1.42.3-SNAPSHOT +google-http-client-protobuf:1.42.2:1.42.3-SNAPSHOT +google-http-client-test:1.42.2:1.42.3-SNAPSHOT +google-http-client-xml:1.42.2:1.42.3-SNAPSHOT From dbf8ba3ac8811b41bab3a5e6182f2dfdd0d47e38 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Jul 2022 18:50:16 +0200 Subject: [PATCH 702/983] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.1.0 (#1690) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.mojo:exec-maven-plugin](https://www.mojohaus.org/exec-maven-plugin) ([source](https://github.com/mojohaus/exec-maven-plugin)) | `3.0.0` -> `3.1.0` | [![age](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:exec-maven-plugin/3.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:exec-maven-plugin/3.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:exec-maven-plugin/3.1.0/compatibility-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:exec-maven-plugin/3.1.0/confidence-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index e63e15d20..21f330dfb 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 3.0.0 + 3.1.0 From 8bea209c7b23ffb5a57f683ae21889a87f9b7f55 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Jul 2022 20:28:20 +0200 Subject: [PATCH 703/983] deps: update dependency org.apache.felix:maven-bundle-plugin to v5.1.7 (#1688) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.felix:maven-bundle-plugin](http://felix.apache.org/components/bundle-plugin/) ([source](https://gitbox.apache.org/repos/asf?p=felix-dev)) | `5.1.6` -> `5.1.7` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.7/compatibility-slim/5.1.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.7/confidence-slim/5.1.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index aa69cff3e..92c798ff4 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -68,7 +68,7 @@ org.apache.felix maven-bundle-plugin - 5.1.6 + 5.1.7 bundle-manifest diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 45bd8f923..f2e2d7bff 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -97,7 +97,7 @@ org.apache.felix maven-bundle-plugin - 5.1.6 + 5.1.7 bundle-manifest From cf90ffc05785bd14a06d49d9ba3f76358d9ce124 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Jul 2022 22:04:05 +0200 Subject: [PATCH 704/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.0 (#1692) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 24b4a16ec..540d31b86 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.3.0 + 3.4.0 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.3.0 + 3.4.0 From dd66aab28fc972e2eb056921066fdbc73ae79d74 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Jul 2022 23:27:21 +0200 Subject: [PATCH 705/983] build(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.4.1 (#1681) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 540d31b86..90c3b4be7 100644 --- a/pom.xml +++ b/pom.xml @@ -272,7 +272,7 @@ maven-assembly-plugin - 3.3.0 + 3.4.1 maven-compiler-plugin From 2650ae52d708e6e3832526c65242effd4d3d12c0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 16:21:20 +0200 Subject: [PATCH 706/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26 (#1682) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index dc3952ae2..fcae7f697 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 25.4.0 + 26.0.0 pom import From d63e369a2236475cde3c04e7bab827d3dc2599c9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 19:28:31 +0200 Subject: [PATCH 707/983] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#1693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- samples/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 90c3b4be7..561d7b44a 100644 --- a/pom.xml +++ b/pom.xml @@ -284,7 +284,7 @@ maven-deploy-plugin - 2.8.2 + 3.0.0 org.apache.maven.plugins diff --git a/samples/pom.xml b/samples/pom.xml index 7645ae91e..4c32fd537 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true From f86112d90ce138dc5cbdca6ddcc50aec3e952740 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 22 Jul 2022 16:08:26 +0200 Subject: [PATCH 708/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.3 (#1694) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.2` -> `3.21.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.3/compatibility-slim/3.21.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.3/confidence-slim/3.21.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.3`](https://github.com/protocolbuffers/protobuf/compare/v3.21.2...v3.21.3) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.2...v3.21.3)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 561d7b44a..ca8db497e 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.3 - 3.21.2 + 3.21.3 30.1.1-android 1.1.4c 4.5.13 From d8f1b0a11e00c3c164ac03426919f3542feac60a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Jul 2022 19:34:19 +0200 Subject: [PATCH 709/983] build(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.4.2 (#1695) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-assembly-plugin](https://maven.apache.org/plugins/) | `3.4.1` -> `3.4.2` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-assembly-plugin/3.4.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-assembly-plugin/3.4.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-assembly-plugin/3.4.2/compatibility-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-assembly-plugin/3.4.2/confidence-slim/3.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ca8db497e..669749ef0 100644 --- a/pom.xml +++ b/pom.xml @@ -272,7 +272,7 @@
              maven-assembly-plugin - 3.4.1 + 3.4.2 maven-compiler-plugin From fdabd5672c571c473351ac36248e365f7dd7dcf5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Jul 2022 21:22:16 +0200 Subject: [PATCH 710/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.4 (#1698) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.3` -> `3.21.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/compatibility-slim/3.21.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.4/confidence-slim/3.21.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.4`](https://github.com/protocolbuffers/protobuf/compare/v3.21.3...v3.21.4) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.3...v3.21.4)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 669749ef0..d24534378 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.0 2.13.3 - 3.21.3 + 3.21.4 30.1.1-android 1.1.4c 4.5.13 From 13565e71f1ab9de1d18e0a8f3992f1751746303a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Jul 2022 21:22:20 +0200 Subject: [PATCH 711/983] build(deps): update dependency org.apache.maven.plugins:maven-resources-plugin to v3.3.0 (#1697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-resources-plugin](https://maven.apache.org/plugins/) | `3.2.0` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-resources-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-resources-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-resources-plugin/3.3.0/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-resources-plugin/3.3.0/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d24534378..95ec0b4df 100644 --- a/pom.xml +++ b/pom.xml @@ -370,7 +370,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 org.apache.maven.plugins From 5c17e2ba56ec094a375f986f58867856ba3192cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 20:48:34 +0200 Subject: [PATCH 712/983] deps: update dependency com.google.code.gson:gson to v2.9.1 (#1700) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.code.gson:gson](https://github.com/google/gson) | `2.9.0` -> `2.9.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.1/compatibility-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.9.1/confidence-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/gson ### [`v2.9.1`](https://github.com/google/gson/blob/HEAD/CHANGELOG.md#Version-291) - Make `Object` and `JsonElement` deserialization iterative rather than recursive ([#​1912](https://github.com/google/gson/issues/1912)) - Added parsing support for enum that has overridden toString() method ([#​1950](https://github.com/google/gson/issues/1950)) - Removed support for building Gson with Gradle ([#​2081](https://github.com/google/gson/issues/2081)) - Removed obsolete `codegen` hierarchy ([#​2099](https://github.com/google/gson/issues/2099)) - Add support for reflection access filter ([#​1905](https://github.com/google/gson/issues/1905)) - Improve `TypeToken` creation validation ([#​2072](https://github.com/google/gson/issues/2072)) - Add explicit support for `float` in `JsonWriter` ([#​2130](https://github.com/google/gson/issues/2130), [#​2132](https://github.com/google/gson/issues/2132)) - Fail when parsing invalid local date ([#​2134](https://github.com/google/gson/issues/2134)) Also many small improvements to javadoc.
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 95ec0b4df..02231eaa9 100644 --- a/pom.xml +++ b/pom.xml @@ -564,7 +564,7 @@ 2.0.5 UTF-8 3.0.2 - 2.9.0 + 2.9.1 2.13.3 3.21.4 30.1.1-android From fa578e0f7ad6a6c45a0b9de54a936a16a8d345a7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 21:02:26 +0200 Subject: [PATCH 713/983] deps: update dependency org.apache.felix:maven-bundle-plugin to v5.1.8 (#1699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.felix:maven-bundle-plugin](http://felix.apache.org/components/bundle-plugin/) ([source](https://gitbox.apache.org/repos/asf?p=felix-dev)) | `5.1.7` -> `5.1.8` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.8/compatibility-slim/5.1.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.felix:maven-bundle-plugin/5.1.8/confidence-slim/5.1.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 92c798ff4..a2d67545d 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -68,7 +68,7 @@ org.apache.felix maven-bundle-plugin - 5.1.7 + 5.1.8 bundle-manifest diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f2e2d7bff..4e23f0acd 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -97,7 +97,7 @@ org.apache.felix maven-bundle-plugin - 5.1.7 + 5.1.8 bundle-manifest From 0a2e437017bec6ddf09cff99f535c012a43a5fd6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Aug 2022 07:06:33 +0200 Subject: [PATCH 714/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.15.0 (#1701) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.14.0` -> `2.15.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.15.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.15.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.15.0/compatibility-slim/2.14.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.15.0/confidence-slim/2.14.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.15.0`](https://github.com/google/error-prone/releases/tag/v2.15.0) [Compare Source](https://github.com/google/error-prone/compare/v2.14.0...v2.15.0) New Checkers: - [`BuilderReturnThis`](https://errorprone.info/bugpattern/BuilderReturnThis) - [`CanIgnoreReturnValueSuggester`](https://errorprone.info/bugpattern/CanIgnoreReturnValueSuggester) - [`CannotMockFinalClass`](https://errorprone.info/bugpattern/CannotMockFinalClass) - [`CannotMockFinalMethod`](https://errorprone.info/bugpattern/CannotMockFinalMethod) - [`DirectInvocationOnMock`](https://errorprone.info/bugpattern/DirectInvocationOnMock) - [`ExtendsObject`](https://errorprone.info/bugpattern/ExtendsObject) - [`MockNotUsedInProduction`](https://errorprone.info/bugpattern/MockNotUsedInProduction) - [`NoCanIgnoreReturnValueOnClasses`](https://errorprone.info/bugpattern/NoCanIgnoreReturnValueOnClasses) - [`NullArgumentForNonNullParameter`](https://errorprone.info/bugpattern/NullArgumentForNonNullParameter) - [`SelfAlwaysReturnsThis`](https://errorprone.info/bugpattern/SelfAlwaysReturnsThis) - [`UnsafeWildcard`](https://errorprone.info/bugpattern/UnsafeWildcard) - [`UnusedTypeParameter`](https://errorprone.info/bugpattern/UnusedTypeParameter) Fixed issues: [#​1562](https://github.com/google/error-prone/issues/1562), [#​3236](https://github.com/google/error-prone/issues/3236), [#​3245](https://github.com/google/error-prone/issues/3245), [#​3321](https://github.com/google/error-prone/issues/3321) **Full Changelog**: https://github.com/google/error-prone/compare/v2.14.0...v2.15.0
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02231eaa9..f76951457 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.14.0 + 2.15.0 com.google.appengine From bf64bead8ad1478a8303dcc6eb72bee8d2aaee63 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Aug 2022 19:12:15 +0200 Subject: [PATCH 715/983] build(deps): update dependency org.apache.maven.plugins:maven-site-plugin to v3.12.1 (#1702) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-site-plugin](https://maven.apache.org/plugins/) ([source](https://github.com/apache/maven-site-plugin)) | `3.12.0` -> `3.12.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.1/compatibility-slim/3.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-site-plugin/3.12.1/confidence-slim/3.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e196f7b8a..4b51210cb 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -136,7 +136,7 @@ org.apache.maven.plugins maven-site-plugin - 3.12.0 + 3.12.1 true diff --git a/pom.xml b/pom.xml index f76951457..d786e8f62 100644 --- a/pom.xml +++ b/pom.xml @@ -360,7 +360,7 @@ org.apache.maven.plugins maven-site-plugin - 3.12.0 + 3.12.1 org.apache.maven.plugins From 8ff306a7ea72a25413a463d75f47aa091ddbb699 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 17:42:17 +0200 Subject: [PATCH 716/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.1 (#1707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) | `3.4.0` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/compatibility-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/confidence-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 4b51210cb..a4a5c73ed 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 true diff --git a/pom.xml b/pom.xml index d786e8f62..b123b4a22 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 attach-javadocs @@ -702,7 +702,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 com.microsoft.doclet.DocFxDoclet false From bdb8cbd83e7c77454e782a7c824e37ef1d011281 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 18:04:11 +0200 Subject: [PATCH 717/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.5 (#1703) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.4` -> `3.21.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.5/compatibility-slim/3.21.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.5/confidence-slim/3.21.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.5`](https://github.com/protocolbuffers/protobuf/compare/v3.21.4...v3.21.5) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.4...v3.21.5)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b123b4a22..7464e8780 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.1 2.13.3 - 3.21.4 + 3.21.5 30.1.1-android 1.1.4c 4.5.13 From 67d08cf0bdc1ae11f7261be8f3e47a79a9a44639 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 18:52:28 +0200 Subject: [PATCH 718/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.1 (#1708) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) ([source](https://github.com/apache/maven-project-info-reports-plugin)) | `3.4.0` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/compatibility-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/confidence-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7464e8780..2be1876ac 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.0 + 3.4.1 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.4.0 + 3.4.1 From 4d663f97340cd673de9a8c505f4f9690a77876c1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 18:58:15 +0200 Subject: [PATCH 719/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.0 (#1706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.0.0` -> `26.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/compatibility-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.0/confidence-slim/26.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index fcae7f697..15bb42fcd 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.0.0 + 26.1.0 pom import From 7697a11ff767151e52ab2cbcb1488a263104cc15 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 20:24:20 +0200 Subject: [PATCH 720/983] build(deps): update dependency org.codehaus.mojo:animal-sniffer-maven-plugin to v1.22 (#1709) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.mojo:animal-sniffer-maven-plugin](https://www.mojohaus.org/animal-sniffer) ([source](https://github.com/mojohaus/animal-sniffer)) | `1.21` -> `1.22` | [![age](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.22/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.22/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.22/compatibility-slim/1.21)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:animal-sniffer-maven-plugin/1.22/confidence-slim/1.21)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2be1876ac..4e4f18c4d 100644 --- a/pom.xml +++ b/pom.xml @@ -350,7 +350,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.21 + 1.22 org.apache.maven.plugins From b33a9c173a74e631e9d7e04f51df4370f979da10 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 21:10:19 +0200 Subject: [PATCH 721/983] deps: update project.appengine.version to v2.0.6 (#1704) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.5` -> `2.0.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.6/compatibility-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.6/confidence-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.5` -> `2.0.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.6/compatibility-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.6/confidence-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.5` -> `2.0.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.6/compatibility-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.6/confidence-slim/2.0.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              GoogleCloudPlatform/appengine-java-standard ### [`v2.0.6`](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.5...v2.0.6) [Compare Source](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.5...v2.0.6)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4e4f18c4d..eb28efe5e 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.42.3-SNAPSHOT - 2.0.5 + 2.0.6 UTF-8 3.0.2 2.9.1 From 523a2609bef4b2d4a539a327d353e26f61d9a2c2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 22 Aug 2022 16:00:21 +0200 Subject: [PATCH 722/983] deps: update project.appengine.version to v2.0.7 (#1711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.6` -> `2.0.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.7/compatibility-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.7/confidence-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.6` -> `2.0.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.7/compatibility-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.7/confidence-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.6` -> `2.0.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.7/compatibility-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.7/confidence-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              GoogleCloudPlatform/appengine-java-standard ### [`v2.0.7`](https://github.com/GoogleCloudPlatform/appengine-java-standard/releases/tag/v2.0.7) [Compare Source](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.6...v2.0.7) v2.0.7
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb28efe5e..4ed0ad267 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.42.3-SNAPSHOT - 2.0.6 + 2.0.7 UTF-8 3.0.2 2.9.1 From b44e5e4a882dee6d9373ace5c2e05a107998ac4b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Aug 2022 23:52:12 +0200 Subject: [PATCH 723/983] build(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.2.0 (#1712) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-checkstyle-plugin](https://maven.apache.org/plugins/) | `3.1.2` -> `3.2.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-checkstyle-plugin/3.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-checkstyle-plugin/3.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-checkstyle-plugin/3.2.0/compatibility-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-checkstyle-plugin/3.2.0/confidence-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ed0ad267..4645fe01e 100644 --- a/pom.xml +++ b/pom.xml @@ -335,7 +335,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.2 + 3.2.0 org.codehaus.mojo From 9efcb14cc96ac6d0d2365789d1aad86c6d8a6727 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 31 Aug 2022 22:42:40 +0200 Subject: [PATCH 724/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.1 (#1715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.0` -> `26.1.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/compatibility-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.1/confidence-slim/26.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 15bb42fcd..3fb324ecd 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.0 + 26.1.1 pom import From cba2f82b8ff7f4ca44616564accd67f95f08247a Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Wed, 31 Aug 2022 19:31:03 -0700 Subject: [PATCH 725/983] fix: add @CanIgnoreReturnValue to avoid errorprone errors (#1716) In the Google monorepo, this was blocking the build from succeeding. Fixes #1710. --- google-http-client/pom.xml | 4 ++++ .../src/main/java/com/google/api/client/util/SslUtils.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4e23f0acd..b7afce45b 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -135,6 +135,10 @@ com.google.code.findbugs jsr305
              + + com.google.errorprone + error_prone_annotations + com.google.guava guava diff --git a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java index 5cb8f373c..a578c7383 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java +++ b/google-http-client/src/main/java/com/google/api/client/util/SslUtils.java @@ -14,6 +14,7 @@ package com.google.api.client.util; +import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.NoSuchAlgorithmException; @@ -101,6 +102,7 @@ public static KeyManagerFactory getPkixKeyManagerFactory() throws NoSuchAlgorith * #getPkixTrustManagerFactory()}) * @since 1.14 */ + @CanIgnoreReturnValue public static SSLContext initSslContext( SSLContext sslContext, KeyStore trustStore, TrustManagerFactory trustManagerFactory) throws GeneralSecurityException { From 394aa98271b02ac62ed35d7040194e8f9c7f41ee Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Sep 2022 22:28:28 +0200 Subject: [PATCH 726/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.13.4 (#1718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.13.3` -> `2.13.4` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.4/compatibility-slim/2.13.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.13.4/confidence-slim/2.13.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4645fe01e..969df7dc0 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.9.1 - 2.13.3 + 2.13.4 3.21.5 30.1.1-android 1.1.4c From 9bdbbd1374eccc608b6f70e3b005c2a78da8e3e6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:14:20 +0000 Subject: [PATCH 727/983] chore: Generated snippets should not be owned by samples reviewers (#1575) (#1720) Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 --- .github/.OwlBot.lock.yaml | 3 +-- .github/CODEOWNERS | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de9173d95..625929230 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 -# created: 2022-07-13T13:53:17.676447481Z + digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30fdb7b9c..db2d8ad17 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,3 +8,6 @@ # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers + +# Generated snippets should not be owned by samples reviewers +samples/snippets/generated/ @googleapis/yoshi-java From 12a455c38b4de3470033be61b06e2beafd911041 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:08:33 +0200 Subject: [PATCH 728/983] deps: update project.appengine.version to v2.0.8 (#1723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.7` -> `2.0.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.8/compatibility-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.8/confidence-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.7` -> `2.0.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.8/compatibility-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.8/confidence-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.7` -> `2.0.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.8/compatibility-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.8/confidence-slim/2.0.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              GoogleCloudPlatform/appengine-java-standard ### [`v2.0.8`](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.7...v2.0.8) [Compare Source](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.7...v2.0.8)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 969df7dc0..9c767b913 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.42.3-SNAPSHOT - 2.0.7 + 2.0.8 UTF-8 3.0.2 2.9.1 From 28ee333576e3078a0ad888ee4cc2c664eb8a60e2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:10:34 +0200 Subject: [PATCH 729/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.6 (#1722) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.5` -> `3.21.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.6/compatibility-slim/3.21.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.6/confidence-slim/3.21.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.6`](https://github.com/protocolbuffers/protobuf/compare/v3.21.5...v3.21.6) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.5...v3.21.6)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9c767b913..aa04f3bf7 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.1 2.13.4 - 3.21.5 + 3.21.6 30.1.1-android 1.1.4c 4.5.13 From f9c454777ab32612ec91bfa117d51bdd0fa1d8e5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:46:17 +0200 Subject: [PATCH 730/983] build(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.3.0 (#1724) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-jar-plugin](https://maven.apache.org/plugins/) | `3.2.2` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-jar-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-jar-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-jar-plugin/3.3.0/compatibility-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-jar-plugin/3.3.0/confidence-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index ad36ce907..80a99e38e 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -19,7 +19,7 @@
              maven-jar-plugin - 3.2.2 + 3.3.0 diff --git a/pom.xml b/pom.xml index aa04f3bf7..16b094ef4 100644 --- a/pom.xml +++ b/pom.xml @@ -315,7 +315,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.3.0 From f952f0e0ffc8f72e0c80b7ec0e71cd865f035b6f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 17:30:18 +0200 Subject: [PATCH 731/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.2 (#1725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.1` -> `26.1.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/compatibility-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.2/confidence-slim/26.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 3fb324ecd..1600eda18 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.1 + 26.1.2 pom import From 7776fc687716d96b47c92917abfcda785ebe7f4c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 10:08:03 -0400 Subject: [PATCH 732/983] chore: exclude requirements.txt file from renovate-bot (#1594) (#1727) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: exclude requirements.txt file from renovate-bot (#1594) Source-Link: https://github.com/googleapis/synthtool/commit/f58d3135a2fab20e225d98741dbc06d57459b816 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 * fix(lint): linted files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: diego92sigma6 --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 3 +- .kokoro/requirements.in | 31 ++ .kokoro/requirements.txt | 452 +++++++++++++++++++++++++++ renovate.json | 1 + 7 files changed, 489 insertions(+), 4 deletions(-) create mode 100644 .kokoro/requirements.in create mode 100644 .kokoro/requirements.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 625929230..42327db5e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 + digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index c131d1542..02f2c7e06 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 62ffd0776..f7a291b2d 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 1dba8de10..61e714d6b 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,7 +16,8 @@ set -eo pipefail # Start the releasetool reporter -python3 -m pip install gcp-releasetool +requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) +python3 -m pip install --require-hashes -r $requirementsFile python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in new file mode 100644 index 000000000..cfdc2e7ed --- /dev/null +++ b/.kokoro/requirements.in @@ -0,0 +1,31 @@ +gcp-docuploader==0.6.3 +google-crc32c==1.3.0 +googleapis-common-protos==1.56.3 +gcp-releasetool==1.8.7 +cachetools==4.2.4 +cffi==1.15.1 +jeepney==0.7.1 +jinja2==3.0.3 +markupsafe==2.0.1 +keyring==23.4.1 +packaging==21.3 +protobuf==3.19.5 +pyjwt==2.4.0 +pyparsing==3.0.9 +pycparser==2.21 +pyperclip==1.8.2 +python-dateutil==2.8.2 +requests==2.27.1 +importlib-metadata==4.8.3 +zipp==3.6.0 +google_api_core==2.8.2 +google-cloud-storage==2.0.0 +google-cloud-core==2.3.1 +typing-extensions==4.1.1 +urllib3==1.26.12 +zipp==3.6.0 +rsa==4.9 +six==1.16.0 +attrs==22.1.0 +google-auth==2.11.0 +idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt new file mode 100644 index 000000000..170f1c63a --- /dev/null +++ b/.kokoro/requirements.txt @@ -0,0 +1,452 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile --allow-unsafe --generate-hashes requirements.in +# +attrs==22.1.0 \ + --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ + --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c + # via + # -r requirements.in + # gcp-releasetool +cachetools==4.2.4 \ + --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ + --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 + # via + # -r requirements.in + # google-auth +certifi==2022.9.14 \ + --hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \ + --hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516 + # via requests +cffi==1.15.1 \ + --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ + --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ + --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ + --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ + --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ + --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ + --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ + --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ + --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ + --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ + --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ + --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ + --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ + --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ + --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ + --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ + --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ + --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ + --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ + --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ + --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ + --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ + --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ + --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ + --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ + --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ + --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ + --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ + --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ + --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ + --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ + --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ + --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ + --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ + --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ + --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ + --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ + --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ + --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ + --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ + --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ + --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ + --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ + --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ + --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ + --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ + --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ + --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ + --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ + --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ + --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ + --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ + --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ + --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ + --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ + --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ + --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ + --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ + --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ + --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ + --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ + --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ + --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ + --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 + # via + # -r requirements.in + # cryptography +charset-normalizer==2.0.12 \ + --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ + --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df + # via requests +click==8.0.4 \ + --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ + --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb + # via + # gcp-docuploader + # gcp-releasetool +colorlog==6.7.0 \ + --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ + --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 + # via gcp-docuploader +cryptography==38.0.1 \ + --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ + --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ + --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ + --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ + --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ + --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ + --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ + --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ + --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ + --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ + --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ + --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ + --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ + --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ + --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ + --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ + --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ + --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ + --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ + --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ + --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ + --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ + --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ + --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ + --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ + --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 + # via + # gcp-releasetool + # secretstorage +gcp-docuploader==0.6.3 \ + --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ + --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b + # via -r requirements.in +gcp-releasetool==1.8.7 \ + --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ + --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d + # via -r requirements.in +google-api-core==2.8.2 \ + --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ + --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 + # via + # -r requirements.in + # google-cloud-core + # google-cloud-storage +google-auth==2.11.0 \ + --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ + --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-core + # google-cloud-storage +google-cloud-core==2.3.1 \ + --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ + --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 + # via + # -r requirements.in + # google-cloud-storage +google-cloud-storage==2.0.0 \ + --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ + --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 + # via + # -r requirements.in + # gcp-docuploader +google-crc32c==1.3.0 \ + --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ + --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ + --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ + --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ + --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ + --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ + --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ + --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ + --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ + --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ + --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ + --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ + --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ + --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ + --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ + --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ + --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ + --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ + --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ + --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ + --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ + --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ + --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ + --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ + --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ + --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ + --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ + --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ + --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ + --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ + --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ + --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ + --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ + --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ + --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ + --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ + --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ + --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ + --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ + --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ + --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ + --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ + --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 + # via + # -r requirements.in + # google-resumable-media +google-resumable-media==2.3.3 \ + --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ + --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 + # via google-cloud-storage +googleapis-common-protos==1.56.3 \ + --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ + --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 + # via + # -r requirements.in + # google-api-core +idna==3.4 \ + --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ + --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 + # via + # -r requirements.in + # requests +importlib-metadata==4.8.3 \ + --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ + --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 + # via + # -r requirements.in + # keyring +jeepney==0.7.1 \ + --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ + --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f + # via + # -r requirements.in + # keyring + # secretstorage +jinja2==3.0.3 \ + --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ + --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 + # via + # -r requirements.in + # gcp-releasetool +keyring==23.4.1 \ + --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ + --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 + # via + # -r requirements.in + # gcp-releasetool +markupsafe==2.0.1 \ + --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ + --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ + --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ + --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ + --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ + --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ + --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ + --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ + --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ + --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ + --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ + --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ + --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ + --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ + --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ + --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ + --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ + --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ + --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ + --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ + --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ + --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ + --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ + --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ + --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ + --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ + --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ + --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ + --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ + --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ + --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ + --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ + --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ + --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ + --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ + --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ + --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ + --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ + --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ + --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ + --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ + --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ + --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ + --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ + --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ + --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ + --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ + --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ + --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ + --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ + --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ + --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ + --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ + --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ + --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ + --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ + --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ + --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ + --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ + --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ + --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ + --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ + --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ + --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ + --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ + --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ + --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ + --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ + --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 + # via + # -r requirements.in + # jinja2 +packaging==21.3 \ + --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ + --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 + # via + # -r requirements.in + # gcp-releasetool +protobuf==3.19.5 \ + --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ + --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ + --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ + --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ + --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ + --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ + --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ + --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ + --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ + --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ + --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ + --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ + --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ + --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ + --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ + --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ + --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ + --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ + --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ + --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ + --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ + --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ + --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ + --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ + --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ + --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de + # via + # -r requirements.in + # gcp-docuploader + # gcp-releasetool + # google-api-core + # google-cloud-storage + # googleapis-common-protos +pyasn1==0.4.8 \ + --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ + --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.2.8 \ + --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ + --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 + # via google-auth +pycparser==2.21 \ + --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ + --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 + # via + # -r requirements.in + # cffi +pyjwt==2.4.0 \ + --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ + --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba + # via + # -r requirements.in + # gcp-releasetool +pyparsing==3.0.9 \ + --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ + --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc + # via + # -r requirements.in + # packaging +pyperclip==1.8.2 \ + --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 + # via + # -r requirements.in + # gcp-releasetool +python-dateutil==2.8.2 \ + --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ + --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 + # via + # -r requirements.in + # gcp-releasetool +requests==2.27.1 \ + --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ + --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-storage +rsa==4.9 \ + --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ + --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 + # via + # -r requirements.in + # google-auth +secretstorage==3.3.3 \ + --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ + --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 + # via keyring +six==1.16.0 \ + --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ + --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 + # via + # -r requirements.in + # gcp-docuploader + # google-auth + # python-dateutil +typing-extensions==4.1.1 \ + --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ + --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 + # via -r requirements.in +urllib3==1.26.12 \ + --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ + --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 + # via + # -r requirements.in + # requests +zipp==3.6.0 \ + --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ + --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc + # via + # -r requirements.in + # importlib-metadata diff --git a/renovate.json b/renovate.json index 93a8a717a..29a66a6b6 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From 244e2f1a296ba9f93277e79a8ece78dde688ad91 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 18:47:37 -0400 Subject: [PATCH 733/983] chore: pin versions of dependencies for compatibility with Python 3.6 (#1588) (#1726) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: pin versions of dependencies for compatibility with Python 3.6 (#1588) * chore: pin versions of dependencies for compatibility with Python 3.6 * fix path of requirements file in synthtool Source-Link: https://github.com/googleapis/synthtool/commit/69cdb47824170d0b02bf694649ce66613c889040 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Diego Alonso Marquez Palacios --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 42327db5e..791e842d2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 + digest: sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 diff --git a/renovate.json b/renovate.json index 29a66a6b6..93a8a717a 100644 --- a/renovate.json +++ b/renovate.json @@ -10,7 +10,6 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], - "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From 1507e04d99f6d160f7b0c070d63e2d42dab76c2c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:04:17 +0200 Subject: [PATCH 734/983] deps: update dependency jinja2 to v3.1.2 (#1748) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jinja2](https://palletsprojects.com/p/jinja/) ([changelog](https://jinja.palletsprojects.com/changes/)) | `==3.0.3` -> `==3.1.2` | [![age](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 465860164392085b5cfb8d355529565e3f53721a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:04:30 +0200 Subject: [PATCH 735/983] deps: update dependency importlib-metadata to v4.12.0 (#1746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [importlib-metadata](https://github.com/python/importlib_metadata) | `==4.8.3` -> `==4.12.0` | [![age](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/compatibility-slim/4.8.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/confidence-slim/4.8.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 0866e4dbd882de6385df56ef47e03d56c2c102b1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:06:29 +0200 Subject: [PATCH 736/983] deps: update dependency jeepney to v0.8.0 (#1747) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jeepney](https://gitlab.com/takluyver/jeepney) | `==0.7.1` -> `==0.8.0` | [![age](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/compatibility-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/confidence-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From a333e1f2a2517bcfa51f945d65781fe8a0579676 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:06:33 +0200 Subject: [PATCH 737/983] deps: update dependency google-cloud-core to v2.3.2 (#1736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-core](https://github.com/googleapis/python-cloud-core) | `==2.3.1` -> `==2.3.2` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/compatibility-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/confidence-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 51afe8f498ebcbae5ec914838e14b72c981f8c8f Mon Sep 17 00:00:00 2001 From: Diego Alonso Marquez Palacios Date: Thu, 29 Sep 2022 18:08:13 -0400 Subject: [PATCH 738/983] Revert "chore: pin versions of dependencies for compatibility with Python 3.6 (#1588)" (#1750) Reverts googleapis/google-http-java-client#1726 --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 791e842d2..42327db5e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 + digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 diff --git a/renovate.json b/renovate.json index 93a8a717a..29a66a6b6 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From 55bcbd7ede201e3a7ed9ee8b8c43510905fd61c5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:08:21 +0200 Subject: [PATCH 739/983] deps: update dependency keyring to v23.9.3 (#1749) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [keyring](https://github.com/jaraco/keyring) | `==23.4.1` -> `==23.9.3` | [![age](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/compatibility-slim/23.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/confidence-slim/23.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From f24c98454f46081eb8c9af8809341ebd605b7915 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:08:35 +0200 Subject: [PATCH 740/983] deps: update dependency gcp-releasetool to v1.8.8 (#1735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | gcp-releasetool | `==1.8.7` -> `==1.8.8` | [![age](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/compatibility-slim/1.8.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/confidence-slim/1.8.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 3b345df3be561bae1e2e4ac4229ab5b66e9b7176 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:10:17 +0200 Subject: [PATCH 741/983] deps: update dependency certifi to v2022.9.24 (#1734) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [certifi](https://github.com/certifi/python-certifi) | `==2022.9.14` -> `==2022.9.24` | [![age](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/compatibility-slim/2022.9.14)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/confidence-slim/2022.9.14)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 8335e66f8d175d1669dd02c8ce9007cf6d26eaeb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:10:21 +0200 Subject: [PATCH 742/983] deps: update dependency google-cloud-storage to v2.5.0 (#1742) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://github.com/googleapis/python-storage) | `==2.0.0` -> `==2.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/compatibility-slim/2.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/confidence-slim/2.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From a3cbf66737a166942c3ac499cae85686fdecd512 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:14:13 +0200 Subject: [PATCH 743/983] deps: update dependency charset-normalizer to v2.1.1 (#1738) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [charset-normalizer](https://github.com/ousret/charset_normalizer) | `==2.0.12` -> `==2.1.1` | [![age](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/compatibility-slim/2.0.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/confidence-slim/2.0.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 49477d4207d07bb6dfb00666201f219a01d87d72 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:18:40 +0200 Subject: [PATCH 744/983] deps: update dependency zipp to v3.8.1 (#1731) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zipp](https://github.com/jaraco/zipp) | `==3.6.0` -> `==3.8.1` | [![age](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/compatibility-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/confidence-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 7d153d3c5e92375bb933f6f12d3a2c5df391b34f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:24:18 +0200 Subject: [PATCH 745/983] deps: update dependency cachetools to v5 (#1732) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [cachetools](https://github.com/tkem/cachetools) | `==4.2.4` -> `==5.2.0` | [![age](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/compatibility-slim/4.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/confidence-slim/4.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From c285b9a36bb8b07942f2b7d616b3653465fc2ae2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:24:22 +0200 Subject: [PATCH 746/983] deps: update dependency pyjwt to v2.5.0 (#1728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pyjwt](https://github.com/jpadilla/pyjwt) | `==2.4.0` -> `==2.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From f8980a41fc77eabeba76326fee5553520a95861d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:26:21 +0200 Subject: [PATCH 747/983] deps: update dependency typing-extensions to v4.3.0 (#1730) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [typing-extensions](https://github.com/python/typing_extensions) ([changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md)) | `==4.1.1` -> `==4.3.0` | [![age](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/compatibility-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/confidence-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From bfea196499c8989e17c7f90ee025a6a840d75aeb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:36:21 +0200 Subject: [PATCH 748/983] deps: update dependency google-auth to v2.12.0 (#1741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-auth](https://github.com/googleapis/google-auth-library-python) | `==2.11.0` -> `==2.12.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/compatibility-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/confidence-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 0b2c204bb1e16575c82f165803af5f84d46c5c8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:36:26 +0200 Subject: [PATCH 749/983] deps: update dependency click to v8.1.3 (#1739) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [click](https://palletsprojects.com/p/click/) ([changelog](https://click.palletsprojects.com/changes/)) | `==8.0.4` -> `==8.1.3` | [![age](https://badges.renovateapi.com/packages/pypi/click/8.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/click/8.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/click/8.1.3/compatibility-slim/8.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/click/8.1.3/confidence-slim/8.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 3b0fc8567e55c26676524d81927feb7a6bd82a2f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:42:28 +0200 Subject: [PATCH 750/983] deps: update dependency protobuf to v3.20.2 (#1745) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [protobuf](https://developers.google.com/protocol-buffers/) | `==3.19.5` -> `==3.20.2` | [![age](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/compatibility-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/confidence-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 99457dddbd56e7d284d99227990a5a74fdb6e2e9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:50:19 +0200 Subject: [PATCH 751/983] deps: update dependency protobuf to v4 (#1733) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [protobuf](https://developers.google.com/protocol-buffers/) | `==3.19.5` -> `==4.21.7` | [![age](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.7/compatibility-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.7/confidence-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From eacf9834fcaa807c891eb6f9bb7957f1830b0b72 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:52:24 +0200 Subject: [PATCH 752/983] deps: update dependency google-api-core to v2.10.1 (#1740) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-api-core](https://github.com/googleapis/python-api-core) | `==2.8.2` -> `==2.10.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From 3fd32925fcd3464de74e02a4c7ead5f7469fed8e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 00:54:21 +0200 Subject: [PATCH 753/983] deps: update dependency google-crc32c to v1.5.0 (#1743) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-crc32c](https://github.com/googleapis/python-crc32c) | `==1.3.0` -> `==1.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From ee9fc81d759f2ebb8a36e0eb36c58f7f634b893f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 01:10:19 +0200 Subject: [PATCH 754/983] deps: update dependency requests to v2.28.1 (#1729) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [requests](https://requests.readthedocs.io) ([source](https://github.com/psf/requests), [changelog](https://github.com/psf/requests/blob/master/HISTORY.md)) | `==2.27.1` -> `==2.28.1` | [![age](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/compatibility-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/confidence-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From a62cace610211ca6e9470e5b8e77e42a005733f0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 01:44:18 +0200 Subject: [PATCH 755/983] deps: update dependency markupsafe to v2.1.1 (#1744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [markupsafe](https://palletsprojects.com/p/markupsafe/) ([changelog](https://markupsafe.palletsprojects.com/changes/)) | `==2.0.1` -> `==2.1.1` | [![age](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/compatibility-slim/2.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/confidence-slim/2.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). From af1620620af90f29b12790166b21c9cbb7086ca6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 22:53:57 +0200 Subject: [PATCH 756/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.7 (#1751) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 16b094ef4..d34c13916 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.1 2.13.4 - 3.21.6 + 3.21.7 30.1.1-android 1.1.4c 4.5.13 From d047334616c9a88b00b20e749d2033fc1a6ca6ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 23:04:23 +0200 Subject: [PATCH 757/983] deps: update project.appengine.version to v2.0.9 (#1753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.8` -> `2.0.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.9/compatibility-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.9/confidence-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.8` -> `2.0.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.9/compatibility-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.9/confidence-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.8` -> `2.0.9` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.9/compatibility-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.9/confidence-slim/2.0.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d34c13916..72195df2d 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.42.3-SNAPSHOT - 2.0.8 + 2.0.9 UTF-8 3.0.2 2.9.1 From 6b9585b0539af6b4631d005a61bb2af60804453a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 23:19:32 +0200 Subject: [PATCH 758/983] deps: update actions/checkout action to v3 (#1719) --- .github/workflows/downstream.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 1366d24df..c4be85eaa 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -133,7 +133,7 @@ jobs: - workflow-executions - workflows steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: distribution: zulu From 19c9091af1ae53e52a493c6298b06923bc56bd22 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Oct 2022 16:14:23 +0200 Subject: [PATCH 759/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.3 (#1754) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1600eda18..78af064c9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.2 + 26.1.3 pom import From 1126e53cf6cbcd1170e5ae5a54da31d245115713 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Oct 2022 16:42:30 +0200 Subject: [PATCH 760/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.16 (#1755) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.15.0` -> `2.16` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.16/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.16/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.16/compatibility-slim/2.15.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.16/confidence-slim/2.15.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.16`](https://github.com/google/error-prone/releases/tag/v2.16) [Compare Source](https://github.com/google/error-prone/compare/v2.15.0...v2.16) New Checkers: - [`ASTHelpersSuggestions`](https://errorprone.info/bugpattern/ASTHelpersSuggestions) - [`CanIgnoreReturnValueSuggester`](https://errorprone.info/bugpattern/CanIgnoreReturnValueSuggester) - [`LenientFormatStringValidation`](https://errorprone.info/bugpattern/LenientFormatStringValidation) - [`UnnecessarilyUsedValue`](https://errorprone.info/bugpattern/UnnecessarilyUsedValue) Fixed issues: [#​3092](https://github.com/google/error-prone/issues/3092), [#​3220](https://github.com/google/error-prone/issues/3220), [#​3225](https://github.com/google/error-prone/issues/3225), [#​3267](https://github.com/google/error-prone/issues/3267), [#​3441](https://github.com/google/error-prone/issues/3441) **Full Changelog**: https://github.com/google/error-prone/compare/v2.15.0...v2.16.0
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 72195df2d..bd01d133d 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.15.0 + 2.16 com.google.appengine From 9119d85b2911747358684b6f8ef83374a44734d7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 24 Oct 2022 23:14:28 +0200 Subject: [PATCH 761/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.8 (#1756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.7` -> `3.21.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.8/compatibility-slim/3.21.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.8/confidence-slim/3.21.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.8`](https://github.com/protocolbuffers/protobuf/compare/v3.21.7...v3.21.8) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.7...v3.21.8)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bd01d133d..6c55ed078 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.9.1 2.13.4 - 3.21.7 + 3.21.8 30.1.1-android 1.1.4c 4.5.13 From c5ad57e1f9beeba710fedcfb0e58f2e53db9ac22 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 21:16:28 +0000 Subject: [PATCH 762/983] chore: [java] remove flatten plugin dependency check (#1663) (#1759) chore: remove check for flatten plugin We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check is going to be added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version. Source-Link: https://github.com/googleapis/synthtool/commit/9266ddc3b17fc15f34d2fb88ce8c5f1a4bfe64b0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/dependencies.sh | 51 --------------------------------------- .kokoro/requirements.in | 2 ++ .kokoro/requirements.txt | 14 +++++++---- 4 files changed, 12 insertions(+), 57 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 42327db5e..459487d38 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 + digest: sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index d7476cfe9..bd8960246 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -57,54 +57,3 @@ retry_with_backoff 3 10 \ -Dclirr.skip=true mvn -B dependency:analyze -DfailOnWarning=true - -echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" -## Run dependency list completeness check -function completenessCheck() { - # Output dep list with compile scope generated using the original pom - # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. - # This is stripped from the output as it is not present in the flattened pom. - # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. - msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt - - # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) - msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt - - # Compare two dependency lists - msg "Comparing dependency lists..." - diff .org-list.txt .new-list.txt >.diff.txt - if [[ $? == 0 ]] - then - msg "Success. No diff!" - else - msg "Diff found. See below: " - msg "You can also check .diff.txt file located in $1." - cat .diff.txt - return 1 - fi -} - -# Allow failures to continue running the script -set +e - -error_count=0 -for path in **/.flattened-pom.xml -do - # Check flattened pom in each dir that contains it for completeness - dir=$(dirname "$path") - pushd "$dir" - completenessCheck "$dir" - error_count=$(($error_count + $?)) - popd -done - -if [[ $error_count == 0 ]] -then - msg "All checks passed." - exit 0 -else - msg "Errors found. See log statements above." - exit 1 -fi diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index cfdc2e7ed..6aa7cf2b5 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -16,10 +16,12 @@ pycparser==2.21 pyperclip==1.8.2 python-dateutil==2.8.2 requests==2.27.1 +certifi==2022.9.24 importlib-metadata==4.8.3 zipp==3.6.0 google_api_core==2.8.2 google-cloud-storage==2.0.0 +google-resumable-media==2.3.3 google-cloud-core==2.3.1 typing-extensions==4.1.1 urllib3==1.26.12 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 170f1c63a..02ae42bb4 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -16,10 +16,12 @@ cachetools==4.2.4 \ # via # -r requirements.in # google-auth -certifi==2022.9.14 \ - --hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \ - --hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516 - # via requests +certifi==2022.9.24 \ + --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ + --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 + # via + # -r requirements.in + # requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ @@ -218,7 +220,9 @@ google-crc32c==1.3.0 \ google-resumable-media==2.3.3 \ --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 - # via google-cloud-storage + # via + # -r requirements.in + # google-cloud-storage googleapis-common-protos==1.56.3 \ --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 From 7d15ad6a38e5338c42d972d6bacbd8849c35d851 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Oct 2022 15:34:25 +0200 Subject: [PATCH 763/983] deps: update dependency com.google.code.gson:gson to v2.10 (#1761) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c55ed078..29d4db9a4 100644 --- a/pom.xml +++ b/pom.xml @@ -564,7 +564,7 @@ 2.0.9 UTF-8 3.0.2 - 2.9.1 + 2.10 2.13.4 3.21.8 30.1.1-android From 02581b8d06d781f6349e6a6d963e20cf66769ef7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 27 Oct 2022 21:45:02 +0200 Subject: [PATCH 764/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.9 (#1762) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29d4db9a4..8ba37fc11 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.10 2.13.4 - 3.21.8 + 3.21.9 30.1.1-android 1.1.4c 4.5.13 From 5801d1e9ab778d91d8f13b1ff23bf208a0e6a919 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 16:27:01 -0400 Subject: [PATCH 765/983] chore(main): release 1.42.3 (#1691) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 51 +++++++++++++++++++ google-http-client-android-test/pom.xml | 6 +-- google-http-client-android/pom.xml | 4 +- google-http-client-apache-v2/pom.xml | 4 +- google-http-client-appengine/pom.xml | 4 +- google-http-client-assembly/pom.xml | 4 +- google-http-client-bom/pom.xml | 22 ++++---- google-http-client-findbugs/pom.xml | 4 +- google-http-client-gson/pom.xml | 4 +- google-http-client-jackson2/pom.xml | 4 +- google-http-client-protobuf/pom.xml | 4 +- google-http-client-test/pom.xml | 4 +- google-http-client-xml/pom.xml | 4 +- google-http-client/pom.xml | 4 +- pom.xml | 4 +- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++----- 17 files changed, 104 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8f9a67c0..8f31b29f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## [1.42.3](https://github.com/googleapis/google-http-java-client/compare/v1.42.2...v1.42.3) (2022-10-27) + + +### Bug Fixes + +* Add @CanIgnoreReturnValue to avoid errorprone errors ([#1716](https://github.com/googleapis/google-http-java-client/issues/1716)) ([cba2f82](https://github.com/googleapis/google-http-java-client/commit/cba2f82b8ff7f4ca44616564accd67f95f08247a)) + + +### Dependencies + +* Update actions/checkout action to v3 ([#1719](https://github.com/googleapis/google-http-java-client/issues/1719)) ([6b9585b](https://github.com/googleapis/google-http-java-client/commit/6b9585b0539af6b4631d005a61bb2af60804453a)) +* Update dependency cachetools to v5 ([#1732](https://github.com/googleapis/google-http-java-client/issues/1732)) ([7d153d3](https://github.com/googleapis/google-http-java-client/commit/7d153d3c5e92375bb933f6f12d3a2c5df391b34f)) +* Update dependency certifi to v2022.9.24 ([#1734](https://github.com/googleapis/google-http-java-client/issues/1734)) ([3b345df](https://github.com/googleapis/google-http-java-client/commit/3b345df3be561bae1e2e4ac4229ab5b66e9b7176)) +* Update dependency charset-normalizer to v2.1.1 ([#1738](https://github.com/googleapis/google-http-java-client/issues/1738)) ([a3cbf66](https://github.com/googleapis/google-http-java-client/commit/a3cbf66737a166942c3ac499cae85686fdecd512)) +* Update dependency click to v8.1.3 ([#1739](https://github.com/googleapis/google-http-java-client/issues/1739)) ([0b2c204](https://github.com/googleapis/google-http-java-client/commit/0b2c204bb1e16575c82f165803af5f84d46c5c8a)) +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.13.4 ([#1718](https://github.com/googleapis/google-http-java-client/issues/1718)) ([394aa98](https://github.com/googleapis/google-http-java-client/commit/394aa98271b02ac62ed35d7040194e8f9c7f41ee)) +* Update dependency com.google.code.gson:gson to v2.10 ([#1761](https://github.com/googleapis/google-http-java-client/issues/1761)) ([7d15ad6](https://github.com/googleapis/google-http-java-client/commit/7d15ad6a38e5338c42d972d6bacbd8849c35d851)) +* Update dependency com.google.code.gson:gson to v2.9.1 ([#1700](https://github.com/googleapis/google-http-java-client/issues/1700)) ([5c17e2b](https://github.com/googleapis/google-http-java-client/commit/5c17e2ba56ec094a375f986f58867856ba3192cf)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.15.0 ([#1701](https://github.com/googleapis/google-http-java-client/issues/1701)) ([0a2e437](https://github.com/googleapis/google-http-java-client/commit/0a2e437017bec6ddf09cff99f535c012a43a5fd6)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.16 ([#1755](https://github.com/googleapis/google-http-java-client/issues/1755)) ([1126e53](https://github.com/googleapis/google-http-java-client/commit/1126e53cf6cbcd1170e5ae5a54da31d245115713)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.3 ([#1694](https://github.com/googleapis/google-http-java-client/issues/1694)) ([f86112d](https://github.com/googleapis/google-http-java-client/commit/f86112d90ce138dc5cbdca6ddcc50aec3e952740)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.4 ([#1698](https://github.com/googleapis/google-http-java-client/issues/1698)) ([fdabd56](https://github.com/googleapis/google-http-java-client/commit/fdabd5672c571c473351ac36248e365f7dd7dcf5)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.5 ([#1703](https://github.com/googleapis/google-http-java-client/issues/1703)) ([bdb8cbd](https://github.com/googleapis/google-http-java-client/commit/bdb8cbd83e7c77454e782a7c824e37ef1d011281)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.6 ([#1722](https://github.com/googleapis/google-http-java-client/issues/1722)) ([28ee333](https://github.com/googleapis/google-http-java-client/commit/28ee333576e3078a0ad888ee4cc2c664eb8a60e2)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.7 ([#1751](https://github.com/googleapis/google-http-java-client/issues/1751)) ([af16206](https://github.com/googleapis/google-http-java-client/commit/af1620620af90f29b12790166b21c9cbb7086ca6)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.8 ([#1756](https://github.com/googleapis/google-http-java-client/issues/1756)) ([9119d85](https://github.com/googleapis/google-http-java-client/commit/9119d85b2911747358684b6f8ef83374a44734d7)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.9 ([#1762](https://github.com/googleapis/google-http-java-client/issues/1762)) ([02581b8](https://github.com/googleapis/google-http-java-client/commit/02581b8d06d781f6349e6a6d963e20cf66769ef7)) +* Update dependency gcp-releasetool to v1.8.8 ([#1735](https://github.com/googleapis/google-http-java-client/issues/1735)) ([f24c984](https://github.com/googleapis/google-http-java-client/commit/f24c98454f46081eb8c9af8809341ebd605b7915)) +* Update dependency google-api-core to v2.10.1 ([#1740](https://github.com/googleapis/google-http-java-client/issues/1740)) ([eacf983](https://github.com/googleapis/google-http-java-client/commit/eacf9834fcaa807c891eb6f9bb7957f1830b0b72)) +* Update dependency google-auth to v2.12.0 ([#1741](https://github.com/googleapis/google-http-java-client/issues/1741)) ([bfea196](https://github.com/googleapis/google-http-java-client/commit/bfea196499c8989e17c7f90ee025a6a840d75aeb)) +* Update dependency google-cloud-core to v2.3.2 ([#1736](https://github.com/googleapis/google-http-java-client/issues/1736)) ([a333e1f](https://github.com/googleapis/google-http-java-client/commit/a333e1f2a2517bcfa51f945d65781fe8a0579676)) +* Update dependency google-cloud-storage to v2.5.0 ([#1742](https://github.com/googleapis/google-http-java-client/issues/1742)) ([8335e66](https://github.com/googleapis/google-http-java-client/commit/8335e66f8d175d1669dd02c8ce9007cf6d26eaeb)) +* Update dependency google-crc32c to v1.5.0 ([#1743](https://github.com/googleapis/google-http-java-client/issues/1743)) ([3fd3292](https://github.com/googleapis/google-http-java-client/commit/3fd32925fcd3464de74e02a4c7ead5f7469fed8e)) +* Update dependency importlib-metadata to v4.12.0 ([#1746](https://github.com/googleapis/google-http-java-client/issues/1746)) ([4658601](https://github.com/googleapis/google-http-java-client/commit/465860164392085b5cfb8d355529565e3f53721a)) +* Update dependency jeepney to v0.8.0 ([#1747](https://github.com/googleapis/google-http-java-client/issues/1747)) ([0866e4d](https://github.com/googleapis/google-http-java-client/commit/0866e4dbd882de6385df56ef47e03d56c2c102b1)) +* Update dependency jinja2 to v3.1.2 ([#1748](https://github.com/googleapis/google-http-java-client/issues/1748)) ([1507e04](https://github.com/googleapis/google-http-java-client/commit/1507e04d99f6d160f7b0c070d63e2d42dab76c2c)) +* Update dependency keyring to v23.9.3 ([#1749](https://github.com/googleapis/google-http-java-client/issues/1749)) ([55bcbd7](https://github.com/googleapis/google-http-java-client/commit/55bcbd7ede201e3a7ed9ee8b8c43510905fd61c5)) +* Update dependency markupsafe to v2.1.1 ([#1744](https://github.com/googleapis/google-http-java-client/issues/1744)) ([a62cace](https://github.com/googleapis/google-http-java-client/commit/a62cace610211ca6e9470e5b8e77e42a005733f0)) +* Update dependency org.apache.felix:maven-bundle-plugin to v5.1.7 ([#1688](https://github.com/googleapis/google-http-java-client/issues/1688)) ([8bea209](https://github.com/googleapis/google-http-java-client/commit/8bea209c7b23ffb5a57f683ae21889a87f9b7f55)) +* Update dependency org.apache.felix:maven-bundle-plugin to v5.1.8 ([#1699](https://github.com/googleapis/google-http-java-client/issues/1699)) ([fa578e0](https://github.com/googleapis/google-http-java-client/commit/fa578e0f7ad6a6c45a0b9de54a936a16a8d345a7)) +* Update dependency protobuf to v3.20.2 ([#1745](https://github.com/googleapis/google-http-java-client/issues/1745)) ([3b0fc85](https://github.com/googleapis/google-http-java-client/commit/3b0fc8567e55c26676524d81927feb7a6bd82a2f)) +* Update dependency protobuf to v4 ([#1733](https://github.com/googleapis/google-http-java-client/issues/1733)) ([99457dd](https://github.com/googleapis/google-http-java-client/commit/99457dddbd56e7d284d99227990a5a74fdb6e2e9)) +* Update dependency pyjwt to v2.5.0 ([#1728](https://github.com/googleapis/google-http-java-client/issues/1728)) ([c285b9a](https://github.com/googleapis/google-http-java-client/commit/c285b9a36bb8b07942f2b7d616b3653465fc2ae2)) +* Update dependency requests to v2.28.1 ([#1729](https://github.com/googleapis/google-http-java-client/issues/1729)) ([ee9fc81](https://github.com/googleapis/google-http-java-client/commit/ee9fc81d759f2ebb8a36e0eb36c58f7f634b893f)) +* Update dependency typing-extensions to v4.3.0 ([#1730](https://github.com/googleapis/google-http-java-client/issues/1730)) ([f8980a4](https://github.com/googleapis/google-http-java-client/commit/f8980a41fc77eabeba76326fee5553520a95861d)) +* Update dependency zipp to v3.8.1 ([#1731](https://github.com/googleapis/google-http-java-client/issues/1731)) ([49477d4](https://github.com/googleapis/google-http-java-client/commit/49477d4207d07bb6dfb00666201f219a01d87d72)) +* Update project.appengine.version to v2.0.6 ([#1704](https://github.com/googleapis/google-http-java-client/issues/1704)) ([b33a9c1](https://github.com/googleapis/google-http-java-client/commit/b33a9c173a74e631e9d7e04f51df4370f979da10)) +* Update project.appengine.version to v2.0.7 ([#1711](https://github.com/googleapis/google-http-java-client/issues/1711)) ([523a260](https://github.com/googleapis/google-http-java-client/commit/523a2609bef4b2d4a539a327d353e26f61d9a2c2)) +* Update project.appengine.version to v2.0.8 ([#1723](https://github.com/googleapis/google-http-java-client/issues/1723)) ([12a455c](https://github.com/googleapis/google-http-java-client/commit/12a455c38b4de3470033be61b06e2beafd911041)) +* Update project.appengine.version to v2.0.9 ([#1753](https://github.com/googleapis/google-http-java-client/issues/1753)) ([d047334](https://github.com/googleapis/google-http-java-client/commit/d047334616c9a88b00b20e749d2033fc1a6ca6ca)) + ## [1.42.2](https://github.com/googleapis/google-http-java-client/compare/v1.42.1...v1.42.2) (2022-07-13) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 3369ab278..1f8855022 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.3-SNAPSHOT + 1.42.3 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.3-SNAPSHOT + 1.42.3 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.3-SNAPSHOT + 1.42.3 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c6a9e6f55..7bf9104fc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-android - 1.42.3-SNAPSHOT + 1.42.3 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a2d67545d..c5021b35b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-apache-v2 - 1.42.3-SNAPSHOT + 1.42.3 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 553069719..5f658692d 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-appengine - 1.42.3-SNAPSHOT + 1.42.3 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 53831dcc7..ff622b7c4 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml com.google.http-client google-http-client-assembly - 1.42.3-SNAPSHOT + 1.42.3 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index a4a5c73ed..15e0a429d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.3-SNAPSHOT + 1.42.3 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-android - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-apache-v2 - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-appengine - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-findbugs - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-gson - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-jackson2 - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-protobuf - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-test - 1.42.3-SNAPSHOT + 1.42.3 com.google.http-client google-http-client-xml - 1.42.3-SNAPSHOT + 1.42.3 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 63d0a6a44..2434963c9 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-findbugs - 1.42.3-SNAPSHOT + 1.42.3 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index bf6ce0d01..f4df59c55 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-gson - 1.42.3-SNAPSHOT + 1.42.3 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index f1b752d7e..f7c477de1 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-jackson2 - 1.42.3-SNAPSHOT + 1.42.3 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 35269577b..238dcd7be 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-protobuf - 1.42.3-SNAPSHOT + 1.42.3 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d1e15ffea..8a5eb16bf 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-test - 1.42.3-SNAPSHOT + 1.42.3 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index ce14d370f..f9f445b4f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client-xml - 1.42.3-SNAPSHOT + 1.42.3 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index b7afce45b..0110dcaca 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../pom.xml google-http-client - 1.42.3-SNAPSHOT + 1.42.3 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 8ba37fc11..7f6354b74 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.3-SNAPSHOT + 1.42.3 2.0.9 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 21f330dfb..eddceeb32 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.3-SNAPSHOT + 1.42.3 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 573813965..d094bce43 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.2:1.42.3-SNAPSHOT -google-http-client-bom:1.42.2:1.42.3-SNAPSHOT -google-http-client-parent:1.42.2:1.42.3-SNAPSHOT -google-http-client-android:1.42.2:1.42.3-SNAPSHOT -google-http-client-android-test:1.42.2:1.42.3-SNAPSHOT -google-http-client-apache-v2:1.42.2:1.42.3-SNAPSHOT -google-http-client-appengine:1.42.2:1.42.3-SNAPSHOT -google-http-client-assembly:1.42.2:1.42.3-SNAPSHOT -google-http-client-findbugs:1.42.2:1.42.3-SNAPSHOT -google-http-client-gson:1.42.2:1.42.3-SNAPSHOT -google-http-client-jackson2:1.42.2:1.42.3-SNAPSHOT -google-http-client-protobuf:1.42.2:1.42.3-SNAPSHOT -google-http-client-test:1.42.2:1.42.3-SNAPSHOT -google-http-client-xml:1.42.2:1.42.3-SNAPSHOT +google-http-client:1.42.3:1.42.3 +google-http-client-bom:1.42.3:1.42.3 +google-http-client-parent:1.42.3:1.42.3 +google-http-client-android:1.42.3:1.42.3 +google-http-client-android-test:1.42.3:1.42.3 +google-http-client-apache-v2:1.42.3:1.42.3 +google-http-client-appengine:1.42.3:1.42.3 +google-http-client-assembly:1.42.3:1.42.3 +google-http-client-findbugs:1.42.3:1.42.3 +google-http-client-gson:1.42.3:1.42.3 +google-http-client-jackson2:1.42.3:1.42.3 +google-http-client-protobuf:1.42.3:1.42.3 +google-http-client-test:1.42.3:1.42.3 +google-http-client-xml:1.42.3:1.42.3 From cca0d4eedd4b676e79ac2874d785ba939750592c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 Oct 2022 20:32:13 +0000 Subject: [PATCH 766/983] chore(main): release 1.42.4-SNAPSHOT (#1763) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 1f8855022..137810b6f 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.3 + 1.42.4-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.3 + 1.42.4-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.3 + 1.42.4-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 7bf9104fc..fb6870cbc 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-android - 1.42.3 + 1.42.4-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index c5021b35b..0b7f99b32 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.42.3 + 1.42.4-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 5f658692d..e5b741893 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-appengine - 1.42.3 + 1.42.4-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index ff622b7c4..31834a71b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.42.3 + 1.42.4-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 15e0a429d..72f352de6 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.3 + 1.42.4-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-android - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-appengine - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-gson - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-test - 1.42.3 + 1.42.4-SNAPSHOT com.google.http-client google-http-client-xml - 1.42.3 + 1.42.4-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 2434963c9..6dc8b0582 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.42.3 + 1.42.4-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index f4df59c55..22176b5d5 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-gson - 1.42.3 + 1.42.4-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index f7c477de1..6a86e9097 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.42.3 + 1.42.4-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 238dcd7be..a90e0a212 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.42.3 + 1.42.4-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 8a5eb16bf..413b0f1d8 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-test - 1.42.3 + 1.42.4-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index f9f445b4f..7ce66759e 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client-xml - 1.42.3 + 1.42.4-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0110dcaca..f49eb38a3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../pom.xml google-http-client - 1.42.3 + 1.42.4-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 7f6354b74..420727f47 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.3 + 1.42.4-SNAPSHOT 2.0.9 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index eddceeb32..80f11fec2 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.3 + 1.42.4-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d094bce43..468500899 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.3:1.42.3 -google-http-client-bom:1.42.3:1.42.3 -google-http-client-parent:1.42.3:1.42.3 -google-http-client-android:1.42.3:1.42.3 -google-http-client-android-test:1.42.3:1.42.3 -google-http-client-apache-v2:1.42.3:1.42.3 -google-http-client-appengine:1.42.3:1.42.3 -google-http-client-assembly:1.42.3:1.42.3 -google-http-client-findbugs:1.42.3:1.42.3 -google-http-client-gson:1.42.3:1.42.3 -google-http-client-jackson2:1.42.3:1.42.3 -google-http-client-protobuf:1.42.3:1.42.3 -google-http-client-test:1.42.3:1.42.3 -google-http-client-xml:1.42.3:1.42.3 +google-http-client:1.42.3:1.42.4-SNAPSHOT +google-http-client-bom:1.42.3:1.42.4-SNAPSHOT +google-http-client-parent:1.42.3:1.42.4-SNAPSHOT +google-http-client-android:1.42.3:1.42.4-SNAPSHOT +google-http-client-android-test:1.42.3:1.42.4-SNAPSHOT +google-http-client-apache-v2:1.42.3:1.42.4-SNAPSHOT +google-http-client-appengine:1.42.3:1.42.4-SNAPSHOT +google-http-client-assembly:1.42.3:1.42.4-SNAPSHOT +google-http-client-findbugs:1.42.3:1.42.4-SNAPSHOT +google-http-client-gson:1.42.3:1.42.4-SNAPSHOT +google-http-client-jackson2:1.42.3:1.42.4-SNAPSHOT +google-http-client-protobuf:1.42.3:1.42.4-SNAPSHOT +google-http-client-test:1.42.3:1.42.4-SNAPSHOT +google-http-client-xml:1.42.3:1.42.4-SNAPSHOT From 9fbae6c0721cce7cb4a9042f8fed4823ce291e80 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 27 Oct 2022 17:46:17 -0400 Subject: [PATCH 767/983] feat: next release from main branch is 1.43.0 (#1764) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index c72276e92..86046bc1e 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -14,3 +14,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.41.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.42.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a6cf56cbb..aed3a5713 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -56,6 +56,19 @@ branchProtectionRules: - dependencies (11) - clirr - cla/google + - pattern: 1.42.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From ce8e2e7c6cda7cce13c92e3f60b3e0906f27dd9d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 28 Oct 2022 22:18:13 +0000 Subject: [PATCH 768/983] chore(deps): update dependency protobuf to v3.20.2 (#1659) (#1766) Co-authored-by: Jeffrey Rennie Co-authored-by: Tomo Suzuki Source-Link: https://github.com/googleapis/synthtool/commit/b59cf7b5a91ecab29e21fdfbb7e3b81066229be4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/requirements.txt | 50 ++++++++++++++++++--------------------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 459487d38..82b5a1a2e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa + digest: sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 02ae42bb4..4a16dfadf 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -339,33 +339,29 @@ packaging==21.3 \ # via # -r requirements.in # gcp-releasetool -protobuf==3.19.5 \ - --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ - --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ - --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ - --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ - --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ - --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ - --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ - --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ - --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ - --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ - --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ - --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ - --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ - --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ - --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ - --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ - --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ - --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ - --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ - --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ - --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ - --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ - --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ - --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ - --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ - --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de +protobuf==3.20.2 \ + --hash=sha256:03d76b7bd42ac4a6e109742a4edf81ffe26ffd87c5993126d894fe48a120396a \ + --hash=sha256:09e25909c4297d71d97612f04f41cea8fa8510096864f2835ad2f3b3df5a5559 \ + --hash=sha256:18e34a10ae10d458b027d7638a599c964b030c1739ebd035a1dfc0e22baa3bfe \ + --hash=sha256:291fb4307094bf5ccc29f424b42268640e00d5240bf0d9b86bf3079f7576474d \ + --hash=sha256:2c0b040d0b5d5d207936ca2d02f00f765906622c07d3fa19c23a16a8ca71873f \ + --hash=sha256:384164994727f274cc34b8abd41a9e7e0562801361ee77437099ff6dfedd024b \ + --hash=sha256:3cb608e5a0eb61b8e00fe641d9f0282cd0eedb603be372f91f163cbfbca0ded0 \ + --hash=sha256:5d9402bf27d11e37801d1743eada54372f986a372ec9679673bfcc5c60441151 \ + --hash=sha256:712dca319eee507a1e7df3591e639a2b112a2f4a62d40fe7832a16fd19151750 \ + --hash=sha256:7a5037af4e76c975b88c3becdf53922b5ffa3f2cddf657574a4920a3b33b80f3 \ + --hash=sha256:8228e56a865c27163d5d1d1771d94b98194aa6917bcfb6ce139cbfa8e3c27334 \ + --hash=sha256:84a1544252a933ef07bb0b5ef13afe7c36232a774affa673fc3636f7cee1db6c \ + --hash=sha256:84fe5953b18a383fd4495d375fe16e1e55e0a3afe7b4f7b4d01a3a0649fcda9d \ + --hash=sha256:9c673c8bfdf52f903081816b9e0e612186684f4eb4c17eeb729133022d6032e3 \ + --hash=sha256:a9e5ae5a8e8985c67e8944c23035a0dff2c26b0f5070b2f55b217a1c33bbe8b1 \ + --hash=sha256:b4fdb29c5a7406e3f7ef176b2a7079baa68b5b854f364c21abe327bbeec01cdb \ + --hash=sha256:c184485e0dfba4dfd451c3bd348c2e685d6523543a0f91b9fd4ae90eb09e8422 \ + --hash=sha256:c9cdf251c582c16fd6a9f5e95836c90828d51b0069ad22f463761d27c6c19019 \ + --hash=sha256:e39cf61bb8582bda88cdfebc0db163b774e7e03364bbf9ce1ead13863e81e359 \ + --hash=sha256:e8fbc522303e09036c752a0afcc5c0603e917222d8bedc02813fd73b4b4ed804 \ + --hash=sha256:f34464ab1207114e73bba0794d1257c150a2b89b7a9faf504e00af7c9fd58978 \ + --hash=sha256:f52dabc96ca99ebd2169dadbe018824ebda08a795c7684a0b7d203a290f3adb0 # via # -r requirements.in # gcp-docuploader From 4ea172c69851369b159f337c36b3d5ef98c7267f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:42:36 +0000 Subject: [PATCH 769/983] chore(java): add a note in README for migrated split repos (#1687) (#1775) * chore(java): add a note in README for migrated split repos Disable renovate bot and flaky bot for split repositories that have moved to the Java monorepo. The Java monorepo will pass the "monorepo=True" parameter to java.common_templates method in its owlbot.py files so that the migration note will not appear in the README in the monorepo. Co-authored-by: Jeff Ching Source-Link: https://github.com/googleapis/synthtool/commit/d4b291604f148cde065838c498bc8aa79b8dc10e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/requirements.txt | 50 +++++++++++++++++++++------------------ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 82b5a1a2e..77cf60878 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:894d56f45fc3f4f0d5f3bcf790846419ee2d8e44715eae8917d6a1bba2b7283d + digest: sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 4a16dfadf..02ae42bb4 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -339,29 +339,33 @@ packaging==21.3 \ # via # -r requirements.in # gcp-releasetool -protobuf==3.20.2 \ - --hash=sha256:03d76b7bd42ac4a6e109742a4edf81ffe26ffd87c5993126d894fe48a120396a \ - --hash=sha256:09e25909c4297d71d97612f04f41cea8fa8510096864f2835ad2f3b3df5a5559 \ - --hash=sha256:18e34a10ae10d458b027d7638a599c964b030c1739ebd035a1dfc0e22baa3bfe \ - --hash=sha256:291fb4307094bf5ccc29f424b42268640e00d5240bf0d9b86bf3079f7576474d \ - --hash=sha256:2c0b040d0b5d5d207936ca2d02f00f765906622c07d3fa19c23a16a8ca71873f \ - --hash=sha256:384164994727f274cc34b8abd41a9e7e0562801361ee77437099ff6dfedd024b \ - --hash=sha256:3cb608e5a0eb61b8e00fe641d9f0282cd0eedb603be372f91f163cbfbca0ded0 \ - --hash=sha256:5d9402bf27d11e37801d1743eada54372f986a372ec9679673bfcc5c60441151 \ - --hash=sha256:712dca319eee507a1e7df3591e639a2b112a2f4a62d40fe7832a16fd19151750 \ - --hash=sha256:7a5037af4e76c975b88c3becdf53922b5ffa3f2cddf657574a4920a3b33b80f3 \ - --hash=sha256:8228e56a865c27163d5d1d1771d94b98194aa6917bcfb6ce139cbfa8e3c27334 \ - --hash=sha256:84a1544252a933ef07bb0b5ef13afe7c36232a774affa673fc3636f7cee1db6c \ - --hash=sha256:84fe5953b18a383fd4495d375fe16e1e55e0a3afe7b4f7b4d01a3a0649fcda9d \ - --hash=sha256:9c673c8bfdf52f903081816b9e0e612186684f4eb4c17eeb729133022d6032e3 \ - --hash=sha256:a9e5ae5a8e8985c67e8944c23035a0dff2c26b0f5070b2f55b217a1c33bbe8b1 \ - --hash=sha256:b4fdb29c5a7406e3f7ef176b2a7079baa68b5b854f364c21abe327bbeec01cdb \ - --hash=sha256:c184485e0dfba4dfd451c3bd348c2e685d6523543a0f91b9fd4ae90eb09e8422 \ - --hash=sha256:c9cdf251c582c16fd6a9f5e95836c90828d51b0069ad22f463761d27c6c19019 \ - --hash=sha256:e39cf61bb8582bda88cdfebc0db163b774e7e03364bbf9ce1ead13863e81e359 \ - --hash=sha256:e8fbc522303e09036c752a0afcc5c0603e917222d8bedc02813fd73b4b4ed804 \ - --hash=sha256:f34464ab1207114e73bba0794d1257c150a2b89b7a9faf504e00af7c9fd58978 \ - --hash=sha256:f52dabc96ca99ebd2169dadbe018824ebda08a795c7684a0b7d203a290f3adb0 +protobuf==3.19.5 \ + --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ + --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ + --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ + --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ + --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ + --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ + --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ + --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ + --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ + --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ + --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ + --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ + --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ + --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ + --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ + --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ + --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ + --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ + --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ + --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ + --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ + --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ + --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ + --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ + --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ + --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de # via # -r requirements.in # gcp-docuploader From 3f318f44305d9b59aecbdd980abdad525ca47bf3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 8 Nov 2022 17:08:16 +0100 Subject: [PATCH 770/983] deps: update dependency kr.motd.maven:os-maven-plugin to v1.7.1 (#1777) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [kr.motd.maven:os-maven-plugin](https://github.com/trustin/os-maven-plugin) | `1.7.0` -> `1.7.1` | [![age](https://badges.renovateapi.com/packages/maven/kr.motd.maven:os-maven-plugin/1.7.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/kr.motd.maven:os-maven-plugin/1.7.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/kr.motd.maven:os-maven-plugin/1.7.1/compatibility-slim/1.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/kr.motd.maven:os-maven-plugin/1.7.1/confidence-slim/1.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client-protobuf/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index a90e0a212..60729ba9f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -16,7 +16,7 @@ kr.motd.maven os-maven-plugin - 1.7.0 + 1.7.1 From dc410107c98e06531021e5a44ac68ff7621dc47f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 8 Nov 2022 17:12:19 +0100 Subject: [PATCH 771/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.14.0 (#1774) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.13.4` -> `2.14.0` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.0/compatibility-slim/2.13.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.0/confidence-slim/2.13.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 420727f47..b81d7dccf 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.10 - 2.13.4 + 2.14.0 3.21.9 30.1.1-android 1.1.4c From 60ce573ad8f815224b8eea22fab689da05f93462 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 8 Nov 2022 18:24:26 +0100 Subject: [PATCH 772/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.4 (#1770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.3` -> `26.1.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/compatibility-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.4/confidence-slim/26.1.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 78af064c9..354548d16 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.3 + 26.1.4 pom import From 5ddb634887601bfad64ac482643f65c820b55fd4 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 8 Nov 2022 21:34:21 +0100 Subject: [PATCH 773/983] deps: update project.appengine.version to v2.0.10 (#1773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.appengine:appengine-api-stubs](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.9` -> `2.0.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.10/compatibility-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-stubs/2.0.10/confidence-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-testing](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.9` -> `2.0.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.10/compatibility-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-testing/2.0.10/confidence-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | | [com.google.appengine:appengine-api-1.0-sdk](https://github.com/GoogleCloudPlatform/appengine-java-standard) | `2.0.9` -> `2.0.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.10/compatibility-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.appengine:appengine-api-1.0-sdk/2.0.10/confidence-slim/2.0.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              GoogleCloudPlatform/appengine-java-standard ### [`v2.0.10`](https://github.com/GoogleCloudPlatform/appengine-java-standard/releases/tag/v2.0.10) [Compare Source](https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.9...v2.0.10) **Full Changelog**: https://github.com/GoogleCloudPlatform/appengine-java-standard/compare/v2.0.9...v2.0.10
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b81d7dccf..d75fdeded 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ - Internally, update the default features.json file --> 1.42.4-SNAPSHOT - 2.0.9 + 2.0.10 UTF-8 3.0.2 2.10 From 0a911afa3f4c4b646fec6b225e0c09c9a995e9bc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:19:17 -0500 Subject: [PATCH 774/983] chore(java): pom generation to look at root versions.txt (#1706) (#1783) * chore(java): pom generation to look at root versions.txt * not to include irrelevant modules in monorepo Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com> Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com> Source-Link: https://github.com/googleapis/synthtool/commit/909f3c8707c331ef181941fa45ad4c90c9368e85 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:a57d2ea6d1a77aa96c17ad0850b779ec6295f88b6c1da3d214b2095d140a2066 Co-authored-by: Owl Bot Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com> --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/requirements.in | 5 +-- .kokoro/requirements.txt | 68 +++++++++++++++++++-------------------- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 77cf60878..c1e4d2da2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a + digest: sha256:a57d2ea6d1a77aa96c17ad0850b779ec6295f88b6c1da3d214b2095d140a2066 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index 6aa7cf2b5..924f94ae6 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -1,7 +1,8 @@ gcp-docuploader==0.6.3 google-crc32c==1.3.0 googleapis-common-protos==1.56.3 -gcp-releasetool==1.8.7 +gcp-releasetool==1.9.1 +cryptography==38.0.3 cachetools==4.2.4 cffi==1.15.1 jeepney==0.7.1 @@ -29,5 +30,5 @@ zipp==3.6.0 rsa==4.9 six==1.16.0 attrs==22.1.0 -google-auth==2.11.0 +google-auth==2.14.1 idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 02ae42bb4..71fcafc70 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with python 3.10 # To update, run: # -# pip-compile --allow-unsafe --generate-hashes requirements.in +# pip-compile --generate-hashes requirements.in # attrs==22.1.0 \ --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ @@ -104,43 +104,44 @@ colorlog==6.7.0 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 # via gcp-docuploader -cryptography==38.0.1 \ - --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ - --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ - --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ - --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ - --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ - --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ - --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ - --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ - --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ - --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ - --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ - --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ - --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ - --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ - --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ - --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ - --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ - --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ - --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ - --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ - --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ - --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ - --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ - --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ - --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ - --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 +cryptography==38.0.3 \ + --hash=sha256:068147f32fa662c81aebab95c74679b401b12b57494872886eb5c1139250ec5d \ + --hash=sha256:06fc3cc7b6f6cca87bd56ec80a580c88f1da5306f505876a71c8cfa7050257dd \ + --hash=sha256:25c1d1f19729fb09d42e06b4bf9895212292cb27bb50229f5aa64d039ab29146 \ + --hash=sha256:402852a0aea73833d982cabb6d0c3bb582c15483d29fb7085ef2c42bfa7e38d7 \ + --hash=sha256:4e269dcd9b102c5a3d72be3c45d8ce20377b8076a43cbed6f660a1afe365e436 \ + --hash=sha256:5419a127426084933076132d317911e3c6eb77568a1ce23c3ac1e12d111e61e0 \ + --hash=sha256:554bec92ee7d1e9d10ded2f7e92a5d70c1f74ba9524947c0ba0c850c7b011828 \ + --hash=sha256:5e89468fbd2fcd733b5899333bc54d0d06c80e04cd23d8c6f3e0542358c6060b \ + --hash=sha256:65535bc550b70bd6271984d9863a37741352b4aad6fb1b3344a54e6950249b55 \ + --hash=sha256:6ab9516b85bebe7aa83f309bacc5f44a61eeb90d0b4ec125d2d003ce41932d36 \ + --hash=sha256:6addc3b6d593cd980989261dc1cce38263c76954d758c3c94de51f1e010c9a50 \ + --hash=sha256:728f2694fa743a996d7784a6194da430f197d5c58e2f4e278612b359f455e4a2 \ + --hash=sha256:785e4056b5a8b28f05a533fab69febf5004458e20dad7e2e13a3120d8ecec75a \ + --hash=sha256:78cf5eefac2b52c10398a42765bfa981ce2372cbc0457e6bf9658f41ec3c41d8 \ + --hash=sha256:7f836217000342d448e1c9a342e9163149e45d5b5eca76a30e84503a5a96cab0 \ + --hash=sha256:8d41a46251bf0634e21fac50ffd643216ccecfaf3701a063257fe0b2be1b6548 \ + --hash=sha256:984fe150f350a3c91e84de405fe49e688aa6092b3525f407a18b9646f6612320 \ + --hash=sha256:9b24bcff7853ed18a63cfb0c2b008936a9554af24af2fb146e16d8e1aed75748 \ + --hash=sha256:b1b35d9d3a65542ed2e9d90115dfd16bbc027b3f07ee3304fc83580f26e43249 \ + --hash=sha256:b1b52c9e5f8aa2b802d48bd693190341fae201ea51c7a167d69fc48b60e8a959 \ + --hash=sha256:bbf203f1a814007ce24bd4d51362991d5cb90ba0c177a9c08825f2cc304d871f \ + --hash=sha256:be243c7e2bfcf6cc4cb350c0d5cdf15ca6383bbcb2a8ef51d3c9411a9d4386f0 \ + --hash=sha256:bfbe6ee19615b07a98b1d2287d6a6073f734735b49ee45b11324d85efc4d5cbd \ + --hash=sha256:c46837ea467ed1efea562bbeb543994c2d1f6e800785bd5a2c98bc096f5cb220 \ + --hash=sha256:dfb4f4dd568de1b6af9f4cda334adf7d72cf5bc052516e1b2608b683375dd95c \ + --hash=sha256:ed7b00096790213e09eb11c97cc6e2b757f15f3d2f85833cd2d3ec3fe37c1722 # via + # -r requirements.in # gcp-releasetool # secretstorage gcp-docuploader==0.6.3 \ --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b # via -r requirements.in -gcp-releasetool==1.8.7 \ - --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ - --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d +gcp-releasetool==1.9.1 \ + --hash=sha256:952f4055d5d986b070ae2a71c4410b250000f9cc5a1e26398fcd55a5bbc5a15f \ + --hash=sha256:d0d3c814a97c1a237517e837d8cfa668ced8df4b882452578ecef4a4e79c583b # via -r requirements.in google-api-core==2.8.2 \ --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ @@ -149,9 +150,8 @@ google-api-core==2.8.2 \ # -r requirements.in # google-cloud-core # google-cloud-storage -google-auth==2.11.0 \ - --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ - --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb +google-auth==2.14.1 \ + --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016 # via # -r requirements.in # gcp-releasetool From 6e3d3743f6ddb24edd73ebd826e8e3026d06c605 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Nov 2022 16:45:26 -0500 Subject: [PATCH 775/983] chore: require hashes when installing dependencies in owlbot postprocessor job (#1691) (#1771) * chore: install dependencies through requirements file Source-Link: https://github.com/googleapis/synthtool/commit/35f4cbaf1295a726cb43fd4471129ec74b48e04e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:821ab7aba89af2c7907e29297bba024d4cd5366d0684e5eb463391cdf4edc9ee Co-authored-by: Owl Bot Co-authored-by: Diego Alonso Marquez Palacios --- .github/.OwlBot.lock.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index c1e4d2da2..202e7084c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -14,3 +14,4 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest digest: sha256:a57d2ea6d1a77aa96c17ad0850b779ec6295f88b6c1da3d214b2095d140a2066 + From edb8cf358373182ce4020d770c22bae05215b19c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 18 Nov 2022 23:12:33 +0100 Subject: [PATCH 776/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.1.5 (#1784) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.4` -> `26.1.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.5/compatibility-slim/26.1.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.5/confidence-slim/26.1.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 354548d16..7ba7c5a85 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.4 + 26.1.5 pom import From 234e7b53a1fc2f3b8a8b7a80a4c9fa9118dcbc37 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 22 Nov 2022 16:10:19 +0100 Subject: [PATCH 777/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.14.1 (#1785) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.fasterxml.jackson.core:jackson-core](https://github.com/FasterXML/jackson-core) | `2.14.0` -> `2.14.1` | [![age](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.1/compatibility-slim/2.14.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.fasterxml.jackson.core:jackson-core/2.14.1/confidence-slim/2.14.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d75fdeded..ea356951b 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.10 - 2.14.0 + 2.14.1 3.21.9 30.1.1-android 1.1.4c From a114c7ed815216dccf165fc8763a768892a58723 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:14:13 +0000 Subject: [PATCH 778/983] deps: update dependency com.google.code.gson:gson to v2.10.1 (#1799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.code.gson:gson](https://github.com/google/gson) | `2.10` -> `2.10.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.10.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.10.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.10.1/compatibility-slim/2.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.code.gson:gson/2.10.1/confidence-slim/2.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea356951b..2493b9d30 100644 --- a/pom.xml +++ b/pom.xml @@ -564,7 +564,7 @@ 2.0.10 UTF-8 3.0.2 - 2.10 + 2.10.1 2.14.1 3.21.9 30.1.1-android From 09f360775001c035d4d26d29f9e28e5f47fb5bd5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:14:18 +0000 Subject: [PATCH 779/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.18.0 (#1797) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.errorprone:error_prone_annotations](https://errorprone.info) ([source](https://github.com/google/error-prone)) | `2.16` -> `2.18.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.18.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.18.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.18.0/compatibility-slim/2.16)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.errorprone:error_prone_annotations/2.18.0/confidence-slim/2.16)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              google/error-prone ### [`v2.18.0`](https://github.com/google/error-prone/releases/tag/v2.18.0): Error Prone 2.18.0 New Checkers: - [`InjectOnBugCheckers`](https://errorprone.info/bugpattern/InjectOnBugCheckers) - [`LabelledBreakTarget`](https://errorprone.info/bugpattern/LabelledBreakTarget) - [`UnusedLabel`](https://errorprone.info/bugpattern/UnusedLabel) - [`YodaCondition`](https://errorprone.info/bugpattern/YodaCondition) Fixes issues: [#​1650](https://github.com/google/error-prone/issues/1650), [#​2706](https://github.com/google/error-prone/issues/2706), [#​3404](https://github.com/google/error-prone/issues/3404), [#​3493](https://github.com/google/error-prone/issues/3493), [#​3504](https://github.com/google/error-prone/issues/3504), [#​3519](https://github.com/google/error-prone/issues/3519), [#​3579](https://github.com/google/error-prone/issues/3579), [#​3610](https://github.com/google/error-prone/issues/3610), [#​3632](https://github.com/google/error-prone/issues/3632), [#​3638](https://github.com/google/error-prone/issues/3638), [#​3645](https://github.com/google/error-prone/issues/3645), [#​3646](https://github.com/google/error-prone/issues/3646), [#​3652](https://github.com/google/error-prone/issues/3652), [#​3690](https://github.com/google/error-prone/issues/3690) **Full Changelog**: https://github.com/google/error-prone/compare/v2.17.0...v2.18.0 ### [`v2.17.0`](https://github.com/google/error-prone/releases/tag/v2.17.0): Error Prone 2.17.0 [Compare Source](https://github.com/google/error-prone/compare/v2.16...v2.17.0) New Checkers: - [`AvoidObjectArrays`](https://errorprone.info/bugpattern/AvoidObjectArrays) - [`Finalize`](https://errorprone.info/bugpattern/Finalize) - [`IgnoredPureGetter`](https://errorprone.info/bugpattern/IgnoredPureGetter) - [`ImpossibleNullComparison`](https://errorprone.info/bugpattern/ProtoFieldNullComparison) - [`MathAbsoluteNegative`](https://errorprone.info/bugpattern/MathAbsoluteNegative) - [`NewFileSystem`](https://errorprone.info/bugpattern/NewFileSystem) - [`StatementSwitchToExpressionSwitch`](https://errorprone.info/bugpattern/StatementSwitchToExpressionSwitch) - [`UnqualifiedYield`](https://errorprone.info/bugpattern/UnqualifiedYield) Fixed issues: [#​2321](https://github.com/google/error-prone/issues/2321), [#​3144](https://github.com/google/error-prone/issues/3144), [#​3297](https://github.com/google/error-prone/issues/3297), [#​3428](https://github.com/google/error-prone/issues/3428), [#​3437](https://github.com/google/error-prone/issues/3437), [#​3462](https://github.com/google/error-prone/issues/3462), [#​3482](https://github.com/google/error-prone/issues/3482), [#​3494](https://github.com/google/error-prone/issues/3494) **Full Changelog**: https://github.com/google/error-prone/compare/v2.16...v2.17.0
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2493b9d30..2dab90ea2 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.16 + 2.18.0 com.google.appengine From d7e7cf8617a370a0e042f5ba6dc494242b28d304 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:14:24 +0000 Subject: [PATCH 780/983] build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.4.0 (#1788) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-dependency-plugin](https://maven.apache.org/plugins/) | `3.3.0` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-dependency-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-dependency-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-dependency-plugin/3.4.0/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-dependency-plugin/3.4.0/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- google-http-client/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f49eb38a3..9778f5136 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -21,7 +21,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.4.0 io.opencensus:opencensus-impl diff --git a/pom.xml b/pom.xml index 2dab90ea2..158087c10 100644 --- a/pom.xml +++ b/pom.xml @@ -365,7 +365,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.4.0 org.apache.maven.plugins From 8a13e0205b9d4971cdb53d29476b4da0ced2a55a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jan 2023 15:16:17 +0000 Subject: [PATCH 781/983] build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /.kokoro (#1792) Bumps [certifi](https://github.com/certifi/python-certifi) from 2022.9.24 to 2022.12.7.
              Commits

              [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=certifi&package-manager=pip&previous-version=2022.9.24&new-version=2022.12.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
              Dependabot commands and options
              You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/googleapis/google-http-java-client/network/alerts).
              From 512aa2398adf64b89e27b505de03b6e3f2a32875 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:16:24 +0000 Subject: [PATCH 782/983] deps: update dependency org.apache.httpcomponents:httpcore to v4.4.16 (#1787) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.httpcomponents:httpcore](http://hc.apache.org/httpcomponents-core-ga) | `4.4.15` -> `4.4.16` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpcore/4.4.16/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpcore/4.4.16/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpcore/4.4.16/compatibility-slim/4.4.15)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpcore/4.4.16/confidence-slim/4.4.15)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 158087c10..9f865b232 100644 --- a/pom.xml +++ b/pom.xml @@ -570,7 +570,7 @@ 30.1.1-android 1.1.4c 4.5.13 - 4.4.15 + 4.4.16 0.31.1 .. false From 03b5b321f20543c354447f52669f05a9d1bd00b1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:18:14 +0000 Subject: [PATCH 783/983] deps: update dependency com.google.protobuf:protobuf-java to v3.21.12 (#1789) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.protobuf:protobuf-java](https://developers.google.com/protocol-buffers/) ([source](https://github.com/protocolbuffers/protobuf)) | `3.21.9` -> `3.21.12` | [![age](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.12/compatibility-slim/3.21.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.protobuf:protobuf-java/3.21.12/confidence-slim/3.21.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              protocolbuffers/protobuf ### [`v3.21.12`](https://github.com/protocolbuffers/protobuf/compare/v3.21.11...v3.21.12) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.11...v3.21.12) ### [`v3.21.11`](https://github.com/protocolbuffers/protobuf/compare/v3.21.10...v3.21.11) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.10...v3.21.11) ### [`v3.21.10`](https://github.com/protocolbuffers/protobuf/compare/v3.21.9...v3.21.10) [Compare Source](https://github.com/protocolbuffers/protobuf/compare/v3.21.9...v3.21.10)
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9f865b232..4deb95007 100644 --- a/pom.xml +++ b/pom.xml @@ -566,7 +566,7 @@ 3.0.2 2.10.1 2.14.1 - 3.21.9 + 3.21.12 30.1.1-android 1.1.4c 4.5.13 From b9b6322196b82a0b54d34535dbbddc423ff165ec Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:20:14 +0000 Subject: [PATCH 784/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.4.0 (#1796) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://github.com/googleapis/java-cloud-bom)) | `26.1.5` -> `26.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.4.0/compatibility-slim/26.1.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.4.0/confidence-slim/26.1.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 7ba7c5a85..69e1a25b1 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.1.5 + 26.4.0 pom import From 0664e1744e0885a1cb8787481ccfbab0de845fe9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Jan 2023 15:22:17 +0000 Subject: [PATCH 785/983] deps: update dependency org.apache.httpcomponents:httpclient to v4.5.14 (#1790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.httpcomponents:httpclient](http://hc.apache.org/httpcomponents-client-ga) | `4.5.13` -> `4.5.14` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpclient/4.5.14/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpclient/4.5.14/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpclient/4.5.14/compatibility-slim/4.5.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.httpcomponents:httpclient/4.5.14/confidence-slim/4.5.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4deb95007..bb41ebf07 100644 --- a/pom.xml +++ b/pom.xml @@ -569,7 +569,7 @@ 3.21.12 30.1.1-android 1.1.4c - 4.5.13 + 4.5.14 4.4.16 0.31.1 .. From 00d61b96dff050ec4b061bead047239b21a48764 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Feb 2023 21:27:50 -0500 Subject: [PATCH 786/983] feat: GsonFactory to have read leniency option (#1819) * feat: GsonFactory to have read leniency option --- .../api/client/json/gson/GsonFactory.java | 43 +++++++++++++++++++ .../api/client/json/gson/GsonParser.java | 2 +- .../api/client/json/gson/GsonFactoryTest.java | 32 ++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java index f02ba0f30..6c89dd16e 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonFactory.java @@ -52,12 +52,23 @@ public static GsonFactory getDefaultInstance() { return InstanceHolder.INSTANCE; } + /** Controls the behavior of leniency in reading JSON value */ + private boolean readLeniency = false; + /** Holder for the result of {@link #getDefaultInstance()}. */ @Beta static class InstanceHolder { static final GsonFactory INSTANCE = new GsonFactory(); } + // Keeping the default, non-arg constructor for backward compatibility. Users should use + // getDefaultInstance() or builder() instead. + public GsonFactory() {} + + private GsonFactory(Builder builder) { + readLeniency = builder.readLeniency; + } + @Override public JsonParser createJsonParser(InputStream in) { return createJsonParser(new InputStreamReader(in, StandardCharsets.UTF_8)); @@ -90,4 +101,36 @@ public JsonGenerator createJsonGenerator(OutputStream out, Charset enc) { public JsonGenerator createJsonGenerator(Writer writer) { return new GsonGenerator(this, new JsonWriter(writer)); } + + /** Returns true if it is lenient to input JSON value. */ + boolean getReadLeniency() { + return readLeniency; + } + + /** Returns the builder * */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for GsonFactory. */ + public static final class Builder { + // Do not directly call this constructor + private Builder() {} + + private boolean readLeniency = false; + + /** + * Set to {@code true} when you want to the JSON parser to be lenient to reading JSON value. By + * default, it is {@code false}. + */ + public Builder setReadLeniency(boolean readLeniency) { + this.readLeniency = readLeniency; + return this; + } + + /** Builds GsonFactory instance. */ + public GsonFactory build() { + return new GsonFactory(this); + } + } } diff --git a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java index dc90369c7..cee6fadc4 100644 --- a/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java +++ b/google-http-client-gson/src/main/java/com/google/api/client/json/gson/GsonParser.java @@ -43,7 +43,7 @@ class GsonParser extends JsonParser { GsonParser(GsonFactory factory, JsonReader reader) { this.factory = factory; this.reader = reader; - reader.setLenient(false); + reader.setLenient(factory.getReadLeniency()); } @Override diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java index 05ab5bf04..5d166e689 100644 --- a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java @@ -14,10 +14,16 @@ package com.google.api.client.json.gson; +import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; +import com.google.api.client.json.JsonObjectParser; import com.google.api.client.json.JsonParser; import com.google.api.client.test.json.AbstractJsonFactoryTest; +import com.google.gson.stream.MalformedJsonException; +import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; /** @@ -94,4 +100,30 @@ public final void testGetByteValue() throws IOException { assertNotNull(ex.getMessage()); } } + + public final void testReaderLeniency_lenient() throws IOException { + JsonObjectParser parser = + new JsonObjectParser(GsonFactory.builder().setReadLeniency(true).build()); + + // This prefix in JSON body is used to prevent Cross-site script inclusion (XSSI). + InputStream inputStream = + new ByteArrayInputStream((")]}'\n" + JSON_ENTRY_PRETTY).getBytes(StandardCharsets.UTF_8)); + GenericJson json = parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + + assertEquals("foo", json.get("title")); + } + + public final void testReaderLeniency_not_lenient_by_default() throws IOException { + JsonObjectParser parser = new JsonObjectParser(GsonFactory.getDefaultInstance()); + + try { + // This prefix in JSON body is used to prevent Cross-site script inclusion (XSSI). + InputStream inputStream = + new ByteArrayInputStream((")]}'\n" + JSON_ENTRY_PRETTY).getBytes(StandardCharsets.UTF_8)); + parser.parseAndClose(inputStream, StandardCharsets.UTF_8, GenericJson.class); + fail("The read leniency should fail the JSON input with XSSI prefix."); + } catch (MalformedJsonException ex) { + assertNotNull(ex.getMessage()); + } + } } From 23094ffa028acdee63ed868ea070d877f2c5ea95 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 24 Feb 2023 03:26:32 +0000 Subject: [PATCH 787/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.14.2 (#1810) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb41ebf07..203ea0334 100644 --- a/pom.xml +++ b/pom.xml @@ -565,7 +565,7 @@ UTF-8 3.0.2 2.10.1 - 2.14.1 + 2.14.2 3.21.12 30.1.1-android 1.1.4c From 02e2bedf1cc16ea37a217254c65a3cb11a23452a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 22:30:24 -0500 Subject: [PATCH 788/983] build(deps): update releasetool version for release scripts (#1768) (#1820) This should fix release script reporting back to the release PRs Source-Link: https://github.com/googleapis/synthtool/commit/4c15ec0960687db8e6da43535fa1ee0e92fbb817 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:e62f3ea524b11c1cd6ff7f80362736d86c0056631346b5b106a421686fce2726 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 5 +- .github/dependabot.yml | 14 ++ .kokoro/build.sh | 4 +- .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- .kokoro/requirements.in | 40 +--- .kokoro/requirements.txt | 245 ++++++++++-------------- 7 files changed, 122 insertions(+), 190 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 202e7084c..a5361a30a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a57d2ea6d1a77aa96c17ad0850b779ec6295f88b6c1da3d214b2095d140a2066 - + digest: sha256:e62f3ea524b11c1cd6ff7f80362736d86c0056631346b5b106a421686fce2726 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..c8f413b0d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "daily" + # Disable version updates for Maven dependencies + open-pull-requests-limit: 0 + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + # Disable version updates for pip dependencies + open-pull-requests-limit: 0 \ No newline at end of file diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a68837b7a..f9cf38f48 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,12 +71,12 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test RETURN_CODE=$? ;; graalvm17) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test RETURN_CODE=$? ;; samples) diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index a3f7fb9d4..e20330c3c 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 4c7225ec9..0fd6ba2fa 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0" } env_vars: { diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index 924f94ae6..2092cc741 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -1,34 +1,6 @@ -gcp-docuploader==0.6.3 -google-crc32c==1.3.0 -googleapis-common-protos==1.56.3 -gcp-releasetool==1.9.1 -cryptography==38.0.3 -cachetools==4.2.4 -cffi==1.15.1 -jeepney==0.7.1 -jinja2==3.0.3 -markupsafe==2.0.1 -keyring==23.4.1 -packaging==21.3 -protobuf==3.19.5 -pyjwt==2.4.0 -pyparsing==3.0.9 -pycparser==2.21 -pyperclip==1.8.2 -python-dateutil==2.8.2 -requests==2.27.1 -certifi==2022.9.24 -importlib-metadata==4.8.3 -zipp==3.6.0 -google_api_core==2.8.2 -google-cloud-storage==2.0.0 -google-resumable-media==2.3.3 -google-cloud-core==2.3.1 -typing-extensions==4.1.1 -urllib3==1.26.12 -zipp==3.6.0 -rsa==4.9 -six==1.16.0 -attrs==22.1.0 -google-auth==2.14.1 -idna==3.4 \ No newline at end of file +gcp-docuploader +gcp-releasetool>=1.10.5 # required for compatibility with cryptography>=39.x +wheel +setuptools +typing-extensions +click<8.1.0 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 71fcafc70..c80f0a87c 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,27 +1,21 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: # -# pip-compile --generate-hashes requirements.in +# pip-compile --allow-unsafe --generate-hashes requirements.in # attrs==22.1.0 \ --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool cachetools==4.2.4 \ --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 - # via - # -r requirements.in - # google-auth -certifi==2022.9.24 \ - --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ - --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 - # via - # -r requirements.in - # requests + # via google-auth +certifi==2022.12.7 \ + --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ + --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 + # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ @@ -87,9 +81,7 @@ cffi==1.15.1 \ --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 - # via - # -r requirements.in - # cryptography + # via cryptography charset-normalizer==2.0.12 \ --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df @@ -98,62 +90,56 @@ click==8.0.4 \ --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb # via + # -r requirements.in # gcp-docuploader # gcp-releasetool colorlog==6.7.0 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 # via gcp-docuploader -cryptography==38.0.3 \ - --hash=sha256:068147f32fa662c81aebab95c74679b401b12b57494872886eb5c1139250ec5d \ - --hash=sha256:06fc3cc7b6f6cca87bd56ec80a580c88f1da5306f505876a71c8cfa7050257dd \ - --hash=sha256:25c1d1f19729fb09d42e06b4bf9895212292cb27bb50229f5aa64d039ab29146 \ - --hash=sha256:402852a0aea73833d982cabb6d0c3bb582c15483d29fb7085ef2c42bfa7e38d7 \ - --hash=sha256:4e269dcd9b102c5a3d72be3c45d8ce20377b8076a43cbed6f660a1afe365e436 \ - --hash=sha256:5419a127426084933076132d317911e3c6eb77568a1ce23c3ac1e12d111e61e0 \ - --hash=sha256:554bec92ee7d1e9d10ded2f7e92a5d70c1f74ba9524947c0ba0c850c7b011828 \ - --hash=sha256:5e89468fbd2fcd733b5899333bc54d0d06c80e04cd23d8c6f3e0542358c6060b \ - --hash=sha256:65535bc550b70bd6271984d9863a37741352b4aad6fb1b3344a54e6950249b55 \ - --hash=sha256:6ab9516b85bebe7aa83f309bacc5f44a61eeb90d0b4ec125d2d003ce41932d36 \ - --hash=sha256:6addc3b6d593cd980989261dc1cce38263c76954d758c3c94de51f1e010c9a50 \ - --hash=sha256:728f2694fa743a996d7784a6194da430f197d5c58e2f4e278612b359f455e4a2 \ - --hash=sha256:785e4056b5a8b28f05a533fab69febf5004458e20dad7e2e13a3120d8ecec75a \ - --hash=sha256:78cf5eefac2b52c10398a42765bfa981ce2372cbc0457e6bf9658f41ec3c41d8 \ - --hash=sha256:7f836217000342d448e1c9a342e9163149e45d5b5eca76a30e84503a5a96cab0 \ - --hash=sha256:8d41a46251bf0634e21fac50ffd643216ccecfaf3701a063257fe0b2be1b6548 \ - --hash=sha256:984fe150f350a3c91e84de405fe49e688aa6092b3525f407a18b9646f6612320 \ - --hash=sha256:9b24bcff7853ed18a63cfb0c2b008936a9554af24af2fb146e16d8e1aed75748 \ - --hash=sha256:b1b35d9d3a65542ed2e9d90115dfd16bbc027b3f07ee3304fc83580f26e43249 \ - --hash=sha256:b1b52c9e5f8aa2b802d48bd693190341fae201ea51c7a167d69fc48b60e8a959 \ - --hash=sha256:bbf203f1a814007ce24bd4d51362991d5cb90ba0c177a9c08825f2cc304d871f \ - --hash=sha256:be243c7e2bfcf6cc4cb350c0d5cdf15ca6383bbcb2a8ef51d3c9411a9d4386f0 \ - --hash=sha256:bfbe6ee19615b07a98b1d2287d6a6073f734735b49ee45b11324d85efc4d5cbd \ - --hash=sha256:c46837ea467ed1efea562bbeb543994c2d1f6e800785bd5a2c98bc096f5cb220 \ - --hash=sha256:dfb4f4dd568de1b6af9f4cda334adf7d72cf5bc052516e1b2608b683375dd95c \ - --hash=sha256:ed7b00096790213e09eb11c97cc6e2b757f15f3d2f85833cd2d3ec3fe37c1722 +cryptography==39.0.1 \ + --hash=sha256:0f8da300b5c8af9f98111ffd512910bc792b4c77392a9523624680f7956a99d4 \ + --hash=sha256:35f7c7d015d474f4011e859e93e789c87d21f6f4880ebdc29896a60403328f1f \ + --hash=sha256:5aa67414fcdfa22cf052e640cb5ddc461924a045cacf325cd164e65312d99502 \ + --hash=sha256:5d2d8b87a490bfcd407ed9d49093793d0f75198a35e6eb1a923ce1ee86c62b41 \ + --hash=sha256:6687ef6d0a6497e2b58e7c5b852b53f62142cfa7cd1555795758934da363a965 \ + --hash=sha256:6f8ba7f0328b79f08bdacc3e4e66fb4d7aab0c3584e0bd41328dce5262e26b2e \ + --hash=sha256:706843b48f9a3f9b9911979761c91541e3d90db1ca905fd63fee540a217698bc \ + --hash=sha256:807ce09d4434881ca3a7594733669bd834f5b2c6d5c7e36f8c00f691887042ad \ + --hash=sha256:83e17b26de248c33f3acffb922748151d71827d6021d98c70e6c1a25ddd78505 \ + --hash=sha256:96f1157a7c08b5b189b16b47bc9db2332269d6680a196341bf30046330d15388 \ + --hash=sha256:aec5a6c9864be7df2240c382740fcf3b96928c46604eaa7f3091f58b878c0bb6 \ + --hash=sha256:b0afd054cd42f3d213bf82c629efb1ee5f22eba35bf0eec88ea9ea7304f511a2 \ + --hash=sha256:ced4e447ae29ca194449a3f1ce132ded8fcab06971ef5f618605aacaa612beac \ + --hash=sha256:d1f6198ee6d9148405e49887803907fe8962a23e6c6f83ea7d98f1c0de375695 \ + --hash=sha256:e124352fd3db36a9d4a21c1aa27fd5d051e621845cb87fb851c08f4f75ce8be6 \ + --hash=sha256:e422abdec8b5fa8462aa016786680720d78bdce7a30c652b7fadf83a4ba35336 \ + --hash=sha256:ef8b72fa70b348724ff1218267e7f7375b8de4e8194d1636ee60510aae104cd0 \ + --hash=sha256:f0c64d1bd842ca2633e74a1a28033d139368ad959872533b1bab8c80e8240a0c \ + --hash=sha256:f24077a3b5298a5a06a8e0536e3ea9ec60e4c7ac486755e5fb6e6ea9b3500106 \ + --hash=sha256:fdd188c8a6ef8769f148f88f859884507b954cc64db6b52f66ef199bb9ad660a \ + --hash=sha256:fe913f20024eb2cb2f323e42a64bdf2911bb9738a15dba7d3cce48151034e3a8 # via - # -r requirements.in # gcp-releasetool # secretstorage -gcp-docuploader==0.6.3 \ - --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ - --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b +gcp-docuploader==0.6.4 \ + --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \ + --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf # via -r requirements.in -gcp-releasetool==1.9.1 \ - --hash=sha256:952f4055d5d986b070ae2a71c4410b250000f9cc5a1e26398fcd55a5bbc5a15f \ - --hash=sha256:d0d3c814a97c1a237517e837d8cfa668ced8df4b882452578ecef4a4e79c583b +gcp-releasetool==1.10.5 \ + --hash=sha256:174b7b102d704b254f2a26a3eda2c684fd3543320ec239baf771542a2e58e109 \ + --hash=sha256:e29d29927fe2ca493105a82958c6873bb2b90d503acac56be2c229e74de0eec9 # via -r requirements.in google-api-core==2.8.2 \ --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 # via - # -r requirements.in # google-cloud-core # google-cloud-storage google-auth==2.14.1 \ + --hash=sha256:ccaa901f31ad5cbb562615eb8b664b3dd0bf5404a67618e642307f00613eda4d \ --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016 # via - # -r requirements.in # gcp-releasetool # google-api-core # google-cloud-core @@ -161,15 +147,11 @@ google-auth==2.14.1 \ google-cloud-core==2.3.1 \ --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 - # via - # -r requirements.in - # google-cloud-storage + # via google-cloud-storage google-cloud-storage==2.0.0 \ --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 - # via - # -r requirements.in - # gcp-docuploader + # via gcp-docuploader google-crc32c==1.3.0 \ --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ @@ -214,52 +196,37 @@ google-crc32c==1.3.0 \ --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 - # via - # -r requirements.in - # google-resumable-media + # via google-resumable-media google-resumable-media==2.3.3 \ --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 - # via - # -r requirements.in - # google-cloud-storage + # via google-cloud-storage googleapis-common-protos==1.56.3 \ --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 - # via - # -r requirements.in - # google-api-core + # via google-api-core idna==3.4 \ --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 - # via - # -r requirements.in - # requests + # via requests importlib-metadata==4.8.3 \ --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 + # via keyring +jeepney==0.8.0 \ + --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ + --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755 # via - # -r requirements.in - # keyring -jeepney==0.7.1 \ - --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ - --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f - # via - # -r requirements.in # keyring # secretstorage jinja2==3.0.3 \ --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool keyring==23.4.1 \ --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool markupsafe==2.0.1 \ --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ @@ -330,49 +297,39 @@ markupsafe==2.0.1 \ --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 - # via - # -r requirements.in - # jinja2 + # via jinja2 packaging==21.3 \ --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 + # via gcp-releasetool +protobuf==3.20.2 \ + --hash=sha256:03d76b7bd42ac4a6e109742a4edf81ffe26ffd87c5993126d894fe48a120396a \ + --hash=sha256:09e25909c4297d71d97612f04f41cea8fa8510096864f2835ad2f3b3df5a5559 \ + --hash=sha256:18e34a10ae10d458b027d7638a599c964b030c1739ebd035a1dfc0e22baa3bfe \ + --hash=sha256:291fb4307094bf5ccc29f424b42268640e00d5240bf0d9b86bf3079f7576474d \ + --hash=sha256:2c0b040d0b5d5d207936ca2d02f00f765906622c07d3fa19c23a16a8ca71873f \ + --hash=sha256:384164994727f274cc34b8abd41a9e7e0562801361ee77437099ff6dfedd024b \ + --hash=sha256:3cb608e5a0eb61b8e00fe641d9f0282cd0eedb603be372f91f163cbfbca0ded0 \ + --hash=sha256:5d9402bf27d11e37801d1743eada54372f986a372ec9679673bfcc5c60441151 \ + --hash=sha256:712dca319eee507a1e7df3591e639a2b112a2f4a62d40fe7832a16fd19151750 \ + --hash=sha256:7a5037af4e76c975b88c3becdf53922b5ffa3f2cddf657574a4920a3b33b80f3 \ + --hash=sha256:8228e56a865c27163d5d1d1771d94b98194aa6917bcfb6ce139cbfa8e3c27334 \ + --hash=sha256:84a1544252a933ef07bb0b5ef13afe7c36232a774affa673fc3636f7cee1db6c \ + --hash=sha256:84fe5953b18a383fd4495d375fe16e1e55e0a3afe7b4f7b4d01a3a0649fcda9d \ + --hash=sha256:9c673c8bfdf52f903081816b9e0e612186684f4eb4c17eeb729133022d6032e3 \ + --hash=sha256:a9e5ae5a8e8985c67e8944c23035a0dff2c26b0f5070b2f55b217a1c33bbe8b1 \ + --hash=sha256:b4fdb29c5a7406e3f7ef176b2a7079baa68b5b854f364c21abe327bbeec01cdb \ + --hash=sha256:c184485e0dfba4dfd451c3bd348c2e685d6523543a0f91b9fd4ae90eb09e8422 \ + --hash=sha256:c9cdf251c582c16fd6a9f5e95836c90828d51b0069ad22f463761d27c6c19019 \ + --hash=sha256:e39cf61bb8582bda88cdfebc0db163b774e7e03364bbf9ce1ead13863e81e359 \ + --hash=sha256:e8fbc522303e09036c752a0afcc5c0603e917222d8bedc02813fd73b4b4ed804 \ + --hash=sha256:f34464ab1207114e73bba0794d1257c150a2b89b7a9faf504e00af7c9fd58978 \ + --hash=sha256:f52dabc96ca99ebd2169dadbe018824ebda08a795c7684a0b7d203a290f3adb0 # via - # -r requirements.in - # gcp-releasetool -protobuf==3.19.5 \ - --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ - --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ - --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ - --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ - --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ - --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ - --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ - --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ - --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ - --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ - --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ - --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ - --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ - --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ - --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ - --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ - --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ - --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ - --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ - --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ - --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ - --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ - --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ - --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ - --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ - --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de - # via - # -r requirements.in # gcp-docuploader # gcp-releasetool # google-api-core # google-cloud-storage - # googleapis-common-protos pyasn1==0.4.8 \ --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba @@ -386,71 +343,61 @@ pyasn1-modules==0.2.8 \ pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 - # via - # -r requirements.in - # cffi + # via cffi pyjwt==2.4.0 \ --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool pyparsing==3.0.9 \ --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc - # via - # -r requirements.in - # packaging + # via packaging pyperclip==1.8.2 \ --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool python-dateutil==2.8.2 \ --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 - # via - # -r requirements.in - # gcp-releasetool + # via gcp-releasetool requests==2.27.1 \ --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d # via - # -r requirements.in # gcp-releasetool # google-api-core # google-cloud-storage rsa==4.9 \ --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 - # via - # -r requirements.in - # google-auth + # via google-auth secretstorage==3.3.3 \ --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 # via keyring +setuptools==67.3.2 \ + --hash=sha256:95f00380ef2ffa41d9bba85d95b27689d923c93dfbafed4aecd7cf988a25e012 \ + --hash=sha256:bb6d8e508de562768f2027902929f8523932fcd1fb784e6d573d2cafac995a48 + # via -r requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 # via - # -r requirements.in # gcp-docuploader # google-auth # python-dateutil -typing-extensions==4.1.1 \ - --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ - --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 +typing-extensions==4.4.0 \ + --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ + --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e # via -r requirements.in urllib3==1.26.12 \ --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 - # via - # -r requirements.in - # requests + # via requests +wheel==0.38.4 \ + --hash=sha256:965f5259b566725405b05e7cf774052044b1ed30119b5d586b2703aafe8719ac \ + --hash=sha256:b60533f3f5d530e971d6737ca6d58681ee434818fab630c83a734bb10c083ce8 + # via -r requirements.in zipp==3.6.0 \ --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc - # via - # -r requirements.in - # importlib-metadata + # via importlib-metadata From 75921a6c0b3ec2d6cd7e92d082de0f1cf8afb829 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 10:24:10 -0500 Subject: [PATCH 789/983] chore(main): release 1.43.0 (#1768) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 22 +++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 75 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f31b29f6..e070ef6f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.43.0](https://github.com/googleapis/google-http-java-client/compare/v1.42.3...v1.43.0) (2023-02-24) + + +### Features + +* GsonFactory to have read leniency option via `GsonFactory.builder().setReadLeniency(true).build()` ([00d61b9](https://github.com/googleapis/google-http-java-client/commit/00d61b96dff050ec4b061bead047239b21a48764)) +* Next release from main branch is 1.43.0 ([#1764](https://github.com/googleapis/google-http-java-client/issues/1764)) ([9fbae6c](https://github.com/googleapis/google-http-java-client/commit/9fbae6c0721cce7cb4a9042f8fed4823ce291e80)) + + +### Dependencies + +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.14.0 ([#1774](https://github.com/googleapis/google-http-java-client/issues/1774)) ([dc41010](https://github.com/googleapis/google-http-java-client/commit/dc410107c98e06531021e5a44ac68ff7621dc47f)) +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.14.1 ([#1785](https://github.com/googleapis/google-http-java-client/issues/1785)) ([234e7b5](https://github.com/googleapis/google-http-java-client/commit/234e7b53a1fc2f3b8a8b7a80a4c9fa9118dcbc37)) +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.14.2 ([#1810](https://github.com/googleapis/google-http-java-client/issues/1810)) ([23094ff](https://github.com/googleapis/google-http-java-client/commit/23094ffa028acdee63ed868ea070d877f2c5ea95)) +* Update dependency com.google.code.gson:gson to v2.10.1 ([#1799](https://github.com/googleapis/google-http-java-client/issues/1799)) ([a114c7e](https://github.com/googleapis/google-http-java-client/commit/a114c7ed815216dccf165fc8763a768892a58723)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.18.0 ([#1797](https://github.com/googleapis/google-http-java-client/issues/1797)) ([09f3607](https://github.com/googleapis/google-http-java-client/commit/09f360775001c035d4d26d29f9e28e5f47fb5bd5)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.12 ([#1789](https://github.com/googleapis/google-http-java-client/issues/1789)) ([03b5b32](https://github.com/googleapis/google-http-java-client/commit/03b5b321f20543c354447f52669f05a9d1bd00b1)) +* Update dependency kr.motd.maven:os-maven-plugin to v1.7.1 ([#1777](https://github.com/googleapis/google-http-java-client/issues/1777)) ([3f318f4](https://github.com/googleapis/google-http-java-client/commit/3f318f44305d9b59aecbdd980abdad525ca47bf3)) +* Update dependency org.apache.httpcomponents:httpclient to v4.5.14 ([#1790](https://github.com/googleapis/google-http-java-client/issues/1790)) ([0664e17](https://github.com/googleapis/google-http-java-client/commit/0664e1744e0885a1cb8787481ccfbab0de845fe9)) +* Update dependency org.apache.httpcomponents:httpcore to v4.4.16 ([#1787](https://github.com/googleapis/google-http-java-client/issues/1787)) ([512aa23](https://github.com/googleapis/google-http-java-client/commit/512aa2398adf64b89e27b505de03b6e3f2a32875)) +* Update project.appengine.version to v2.0.10 ([#1773](https://github.com/googleapis/google-http-java-client/issues/1773)) ([5ddb634](https://github.com/googleapis/google-http-java-client/commit/5ddb634887601bfad64ac482643f65c820b55fd4)) + ## [1.42.3](https://github.com/googleapis/google-http-java-client/compare/v1.42.2...v1.42.3) (2022-10-27) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 137810b6f..14caccdde 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.42.4-SNAPSHOT + 1.43.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.42.4-SNAPSHOT + 1.43.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.42.4-SNAPSHOT + 1.43.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index fb6870cbc..5d0cb4a69 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-android - 1.42.4-SNAPSHOT + 1.43.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0b7f99b32..71885365d 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-apache-v2 - 1.42.4-SNAPSHOT + 1.43.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index e5b741893..b9e4ba269 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-appengine - 1.42.4-SNAPSHOT + 1.43.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 31834a71b..10c4014e2 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.42.4-SNAPSHOT + 1.43.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 72f352de6..d9e840f15 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.42.4-SNAPSHOT + 1.43.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-android - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-apache-v2 - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-appengine - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-findbugs - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-gson - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-jackson2 - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-protobuf - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-test - 1.42.4-SNAPSHOT + 1.43.0 com.google.http-client google-http-client-xml - 1.42.4-SNAPSHOT + 1.43.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 6dc8b0582..ce04566a8 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-findbugs - 1.42.4-SNAPSHOT + 1.43.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 22176b5d5..b3fefd434 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-gson - 1.42.4-SNAPSHOT + 1.43.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 6a86e9097..3b8628b6a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-jackson2 - 1.42.4-SNAPSHOT + 1.43.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 60729ba9f..77518f991 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-protobuf - 1.42.4-SNAPSHOT + 1.43.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 413b0f1d8..df3f3dfd9 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-test - 1.42.4-SNAPSHOT + 1.43.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 7ce66759e..3fa713104 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client-xml - 1.42.4-SNAPSHOT + 1.43.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9778f5136..0f8c2024a 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../pom.xml google-http-client - 1.42.4-SNAPSHOT + 1.43.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 203ea0334..254a18b20 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.42.4-SNAPSHOT + 1.43.0 2.0.10 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 80f11fec2..664d8bdbd 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.42.4-SNAPSHOT + 1.43.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 468500899..7cd99cfff 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.42.3:1.42.4-SNAPSHOT -google-http-client-bom:1.42.3:1.42.4-SNAPSHOT -google-http-client-parent:1.42.3:1.42.4-SNAPSHOT -google-http-client-android:1.42.3:1.42.4-SNAPSHOT -google-http-client-android-test:1.42.3:1.42.4-SNAPSHOT -google-http-client-apache-v2:1.42.3:1.42.4-SNAPSHOT -google-http-client-appengine:1.42.3:1.42.4-SNAPSHOT -google-http-client-assembly:1.42.3:1.42.4-SNAPSHOT -google-http-client-findbugs:1.42.3:1.42.4-SNAPSHOT -google-http-client-gson:1.42.3:1.42.4-SNAPSHOT -google-http-client-jackson2:1.42.3:1.42.4-SNAPSHOT -google-http-client-protobuf:1.42.3:1.42.4-SNAPSHOT -google-http-client-test:1.42.3:1.42.4-SNAPSHOT -google-http-client-xml:1.42.3:1.42.4-SNAPSHOT +google-http-client:1.43.0:1.43.0 +google-http-client-bom:1.43.0:1.43.0 +google-http-client-parent:1.43.0:1.43.0 +google-http-client-android:1.43.0:1.43.0 +google-http-client-android-test:1.43.0:1.43.0 +google-http-client-apache-v2:1.43.0:1.43.0 +google-http-client-appengine:1.43.0:1.43.0 +google-http-client-assembly:1.43.0:1.43.0 +google-http-client-findbugs:1.43.0:1.43.0 +google-http-client-gson:1.43.0:1.43.0 +google-http-client-jackson2:1.43.0:1.43.0 +google-http-client-protobuf:1.43.0:1.43.0 +google-http-client-test:1.43.0:1.43.0 +google-http-client-xml:1.43.0:1.43.0 From c9d45995ad95feb0526661521516c2ba8eaf4fa3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 15:28:12 +0000 Subject: [PATCH 790/983] chore(main): release 1.43.1-SNAPSHOT (#1822) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 14caccdde..ab2b16695 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.0 + 1.43.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.0 + 1.43.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.0 + 1.43.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 5d0cb4a69..e1f5c0d4f 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-android - 1.43.0 + 1.43.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 71885365d..fde5352a1 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.43.0 + 1.43.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index b9e4ba269..331c3a85a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.43.0 + 1.43.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 10c4014e2..e93a6c5b7 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.43.0 + 1.43.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index d9e840f15..b5ef17d27 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.0 + 1.43.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-android - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-test - 1.43.0 + 1.43.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.43.0 + 1.43.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index ce04566a8..c6826c024 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.43.0 + 1.43.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index b3fefd434..0e61f6ace 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.43.0 + 1.43.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 3b8628b6a..61cfd53a0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.43.0 + 1.43.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 77518f991..0c20c9db3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.43.0 + 1.43.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index df3f3dfd9..4fcfa0a45 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-test - 1.43.0 + 1.43.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 3fa713104..060264380 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.43.0 + 1.43.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0f8c2024a..f710b292d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../pom.xml google-http-client - 1.43.0 + 1.43.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 254a18b20..6cd370153 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -560,7 +560,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.0 + 1.43.1-SNAPSHOT 2.0.10 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 664d8bdbd..44302f97e 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.0 + 1.43.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 7cd99cfff..2aceff245 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.0:1.43.0 -google-http-client-bom:1.43.0:1.43.0 -google-http-client-parent:1.43.0:1.43.0 -google-http-client-android:1.43.0:1.43.0 -google-http-client-android-test:1.43.0:1.43.0 -google-http-client-apache-v2:1.43.0:1.43.0 -google-http-client-appengine:1.43.0:1.43.0 -google-http-client-assembly:1.43.0:1.43.0 -google-http-client-findbugs:1.43.0:1.43.0 -google-http-client-gson:1.43.0:1.43.0 -google-http-client-jackson2:1.43.0:1.43.0 -google-http-client-protobuf:1.43.0:1.43.0 -google-http-client-test:1.43.0:1.43.0 -google-http-client-xml:1.43.0:1.43.0 +google-http-client:1.43.0:1.43.1-SNAPSHOT +google-http-client-bom:1.43.0:1.43.1-SNAPSHOT +google-http-client-parent:1.43.0:1.43.1-SNAPSHOT +google-http-client-android:1.43.0:1.43.1-SNAPSHOT +google-http-client-android-test:1.43.0:1.43.1-SNAPSHOT +google-http-client-apache-v2:1.43.0:1.43.1-SNAPSHOT +google-http-client-appengine:1.43.0:1.43.1-SNAPSHOT +google-http-client-assembly:1.43.0:1.43.1-SNAPSHOT +google-http-client-findbugs:1.43.0:1.43.1-SNAPSHOT +google-http-client-gson:1.43.0:1.43.1-SNAPSHOT +google-http-client-jackson2:1.43.0:1.43.1-SNAPSHOT +google-http-client-protobuf:1.43.0:1.43.1-SNAPSHOT +google-http-client-test:1.43.0:1.43.1-SNAPSHOT +google-http-client-xml:1.43.0:1.43.1-SNAPSHOT From d333351c97e043aae94f91fc79f9f1269792a9d0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 27 Feb 2023 13:50:23 +0000 Subject: [PATCH 791/983] build(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.11.0 (#1823) --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index 80a99e38e..bc97d5de0 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -11,7 +11,7 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 1.7 1.7 diff --git a/pom.xml b/pom.xml index 6cd370153..66a5655c9 100644 --- a/pom.xml +++ b/pom.xml @@ -276,7 +276,7 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 1.7 1.7 From 2f1cecc6f91934982bd16ff1719ba9f8a9790670 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 27 Feb 2023 13:50:48 +0000 Subject: [PATCH 792/983] build(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.5.0 (#1821) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66a5655c9..966b8b31f 100644 --- a/pom.xml +++ b/pom.xml @@ -272,7 +272,7 @@ maven-assembly-plugin - 3.4.2 + 3.5.0 maven-compiler-plugin From 327b6b11b2cc538bda30339b518a662079d94858 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 27 Feb 2023 13:51:18 +0000 Subject: [PATCH 793/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.5.0 (#1817) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b5ef17d27..2d46e7fbc 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.5.0 true diff --git a/pom.xml b/pom.xml index 966b8b31f..7aa83b892 100644 --- a/pom.xml +++ b/pom.xml @@ -302,7 +302,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.5.0 attach-javadocs @@ -702,7 +702,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + 3.5.0 com.microsoft.doclet.DocFxDoclet false From 84216c5cfe2f1600464d34661a208cf165e11b9b Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 27 Feb 2023 18:19:20 -0500 Subject: [PATCH 794/983] ci: fmt-maven-plugin 2.9 with google-java-format 1.7 (#1825) This matches OwlBot Java post procesosr https://github.com/googleapis/synthtool/blob/5f2a6089f73abf06238fe4310f6a14d6f6d1eed3/docker/owlbot/java/Dockerfile#L22 --- pom.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7aa83b892..66e1a27d3 100644 --- a/pom.xml +++ b/pom.xml @@ -542,10 +542,18 @@ com.coveo fmt-maven-plugin - 2.13 + 2.9 + true + + + com.google.googlejavaformat + google-java-format + 1.7 + + From 30182e13e7b294b8a0771e47a84b0ed45a628a1f Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Tue, 14 Mar 2023 03:19:41 +0000 Subject: [PATCH 795/983] fix: JSON deserialization setter case priority (#1831) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: JSON deserialization setter case priority Fixes the problem of JSON deserialization ignoring the case of setters. Now case-sensitive setter method matches are considered first. Fixes: #1830. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../com/google/api/client/util/FieldInfo.java | 32 ++++++++++-------- .../google/api/client/util/FieldInfoTest.java | 33 +++++++++++++++++++ 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java index 3830a8664..36d0dc9dc 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java +++ b/google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java @@ -134,12 +134,20 @@ public static FieldInfo of(Field field) { } /** Creates list of setter methods for a field only in declaring class. */ - private Method[] settersMethodForField(Field field) { + private Method[] settersMethodForField(final Field field) { List methods = new ArrayList<>(); + String fieldSetter = "set" + Ascii.toUpperCase(field.getName().substring(0, 1)); + if (field.getName().length() > 1) { + fieldSetter += field.getName().substring(1); + } for (Method method : field.getDeclaringClass().getDeclaredMethods()) { - if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName())) - && method.getParameterTypes().length == 1) { - methods.add(method); + if (method.getParameterTypes().length == 1) { + // add case-sensitive matches first in the list + if (method.getName().equals(fieldSetter)) { + methods.add(0, method); + } else if (Ascii.toLowerCase(method.getName()).equals(Ascii.toLowerCase(fieldSetter))) { + methods.add(method); + } } } return methods.toArray(new Method[0]); @@ -216,15 +224,13 @@ public Object getValue(Object obj) { * value. */ public void setValue(Object obj, Object value) { - if (setters.length > 0) { - for (Method method : setters) { - if (value == null || method.getParameterTypes()[0].isAssignableFrom(value.getClass())) { - try { - method.invoke(obj, value); - return; - } catch (IllegalAccessException | InvocationTargetException e) { - // try to set field directly - } + for (Method method : setters) { + if (value == null || method.getParameterTypes()[0].isAssignableFrom(value.getClass())) { + try { + method.invoke(obj, value); + return; + } catch (IllegalAccessException | InvocationTargetException e) { + // try to set field directly } } } diff --git a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java index c000a90dd..0cd1c17de 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java @@ -14,6 +14,7 @@ package com.google.api.client.util; +import com.google.api.client.json.GenericJson; import junit.framework.TestCase; /** @@ -49,4 +50,36 @@ public void testEnumValue() { assertEquals(E.OTHER_VALUE, FieldInfo.of(E.OTHER_VALUE).enumValue()); assertEquals(E.NULL, FieldInfo.of(E.NULL).enumValue()); } + + public static final class Data extends GenericJson { + @Key String passcode; + @Key String passCode; + + public Data setPasscode(String passcode) { + this.passcode = passcode; + return this; + } + + public Data setPassCode(String passCode) { + this.passCode = passCode; + return this; + } + } + + public void testSetValueCaseSensitivityPriority() { + Data data = new Data(); + data.setPasscode("pass1"); + data.setPassCode("pass2"); + data.set("passCode", "passX"); + + assertEquals(data.passcode, "pass1"); + assertEquals(data.passCode, "passX"); + + data.setPasscode("pass1"); + data.setPassCode("pass2"); + data.set("passcode", "passX"); + + assertEquals(data.passcode, "passX"); + assertEquals(data.passCode, "pass2"); + } } From ba8406642c47045378153e5687667dda6c37c7be Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 14 Mar 2023 03:20:39 +0000 Subject: [PATCH 796/983] deps: update project.appengine.version to v2.0.12 (#1816) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66e1a27d3..fb17f6b1a 100644 --- a/pom.xml +++ b/pom.xml @@ -569,7 +569,7 @@ - Internally, update the default features.json file --> 1.43.1-SNAPSHOT - 2.0.10 + 2.0.12 UTF-8 3.0.2 2.10.1 From 50d0fafb506c10d3b3bba65cbde1bc866bda1aa3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 14 Mar 2023 03:21:28 +0000 Subject: [PATCH 797/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.10.0 (#1809) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 69e1a25b1..c269830a9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.4.0 + 26.10.0 pom import From de1b5f79b793ef86beb1d49f24559e02b6ef7708 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 23:39:06 -0400 Subject: [PATCH 798/983] chore(main): release 1.43.1 (#1833) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 65 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e070ef6f8..c981336d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.43.1](https://github.com/googleapis/google-http-java-client/compare/v1.43.0...v1.43.1) (2023-03-14) + + +### Bug Fixes + +* JSON deserialization setter case priority ([#1831](https://github.com/googleapis/google-http-java-client/issues/1831)) ([30182e1](https://github.com/googleapis/google-http-java-client/commit/30182e13e7b294b8a0771e47a84b0ed45a628a1f)) + + +### Dependencies + +* Update project.appengine.version to v2.0.12 ([#1816](https://github.com/googleapis/google-http-java-client/issues/1816)) ([ba84066](https://github.com/googleapis/google-http-java-client/commit/ba8406642c47045378153e5687667dda6c37c7be)) + ## [1.43.0](https://github.com/googleapis/google-http-java-client/compare/v1.42.3...v1.43.0) (2023-02-24) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index ab2b16695..e93992041 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.1-SNAPSHOT + 1.43.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.1-SNAPSHOT + 1.43.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.1-SNAPSHOT + 1.43.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index e1f5c0d4f..018d87c19 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-android - 1.43.1-SNAPSHOT + 1.43.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index fde5352a1..e03822626 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-apache-v2 - 1.43.1-SNAPSHOT + 1.43.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 331c3a85a..bbb6c6e56 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-appengine - 1.43.1-SNAPSHOT + 1.43.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index e93a6c5b7..437c173c7 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.43.1-SNAPSHOT + 1.43.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 2d46e7fbc..27ab6c2b0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.1-SNAPSHOT + 1.43.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-android - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-apache-v2 - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-appengine - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-findbugs - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-gson - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-jackson2 - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-protobuf - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-test - 1.43.1-SNAPSHOT + 1.43.1 com.google.http-client google-http-client-xml - 1.43.1-SNAPSHOT + 1.43.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c6826c024..2f6511c9e 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-findbugs - 1.43.1-SNAPSHOT + 1.43.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 0e61f6ace..a5b1dceed 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-gson - 1.43.1-SNAPSHOT + 1.43.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 61cfd53a0..06a095475 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-jackson2 - 1.43.1-SNAPSHOT + 1.43.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 0c20c9db3..d39bf44ca 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-protobuf - 1.43.1-SNAPSHOT + 1.43.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 4fcfa0a45..1894277d7 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-test - 1.43.1-SNAPSHOT + 1.43.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 060264380..681b9cdbd 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client-xml - 1.43.1-SNAPSHOT + 1.43.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f710b292d..4579a0c8c 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../pom.xml google-http-client - 1.43.1-SNAPSHOT + 1.43.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index fb17f6b1a..648d95228 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.1-SNAPSHOT + 1.43.1 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 44302f97e..b2b80d0a8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.1-SNAPSHOT + 1.43.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2aceff245..c8133569f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.0:1.43.1-SNAPSHOT -google-http-client-bom:1.43.0:1.43.1-SNAPSHOT -google-http-client-parent:1.43.0:1.43.1-SNAPSHOT -google-http-client-android:1.43.0:1.43.1-SNAPSHOT -google-http-client-android-test:1.43.0:1.43.1-SNAPSHOT -google-http-client-apache-v2:1.43.0:1.43.1-SNAPSHOT -google-http-client-appengine:1.43.0:1.43.1-SNAPSHOT -google-http-client-assembly:1.43.0:1.43.1-SNAPSHOT -google-http-client-findbugs:1.43.0:1.43.1-SNAPSHOT -google-http-client-gson:1.43.0:1.43.1-SNAPSHOT -google-http-client-jackson2:1.43.0:1.43.1-SNAPSHOT -google-http-client-protobuf:1.43.0:1.43.1-SNAPSHOT -google-http-client-test:1.43.0:1.43.1-SNAPSHOT -google-http-client-xml:1.43.0:1.43.1-SNAPSHOT +google-http-client:1.43.1:1.43.1 +google-http-client-bom:1.43.1:1.43.1 +google-http-client-parent:1.43.1:1.43.1 +google-http-client-android:1.43.1:1.43.1 +google-http-client-android-test:1.43.1:1.43.1 +google-http-client-apache-v2:1.43.1:1.43.1 +google-http-client-appengine:1.43.1:1.43.1 +google-http-client-assembly:1.43.1:1.43.1 +google-http-client-findbugs:1.43.1:1.43.1 +google-http-client-gson:1.43.1:1.43.1 +google-http-client-jackson2:1.43.1:1.43.1 +google-http-client-protobuf:1.43.1:1.43.1 +google-http-client-test:1.43.1:1.43.1 +google-http-client-xml:1.43.1:1.43.1 From 12620821ce559fd07a8fe02c56c6890171bb1aa3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 03:44:12 +0000 Subject: [PATCH 799/983] chore(main): release 1.43.2-SNAPSHOT (#1834) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index e93992041..b89558927 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.1 + 1.43.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.1 + 1.43.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.1 + 1.43.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 018d87c19..5eba85c1d 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-android - 1.43.1 + 1.43.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index e03822626..35bb6f482 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.43.1 + 1.43.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index bbb6c6e56..668232100 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.43.1 + 1.43.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 437c173c7..574399935 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.43.1 + 1.43.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 27ab6c2b0..dbde7bb8f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.1 + 1.43.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-android - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-test - 1.43.1 + 1.43.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.43.1 + 1.43.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 2f6511c9e..5b25104bd 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.43.1 + 1.43.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a5b1dceed..74db72b36 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.43.1 + 1.43.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 06a095475..5fe81ade0 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.43.1 + 1.43.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d39bf44ca..4e882cfe8 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.43.1 + 1.43.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 1894277d7..78d1f6e47 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-test - 1.43.1 + 1.43.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 681b9cdbd..6c76db7f8 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.43.1 + 1.43.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4579a0c8c..d2dda1382 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../pom.xml google-http-client - 1.43.1 + 1.43.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 648d95228..6e2a49048 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.1 + 1.43.2-SNAPSHOT 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b2b80d0a8..ee27e3fb8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.1 + 1.43.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index c8133569f..480e33bf6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.1:1.43.1 -google-http-client-bom:1.43.1:1.43.1 -google-http-client-parent:1.43.1:1.43.1 -google-http-client-android:1.43.1:1.43.1 -google-http-client-android-test:1.43.1:1.43.1 -google-http-client-apache-v2:1.43.1:1.43.1 -google-http-client-appengine:1.43.1:1.43.1 -google-http-client-assembly:1.43.1:1.43.1 -google-http-client-findbugs:1.43.1:1.43.1 -google-http-client-gson:1.43.1:1.43.1 -google-http-client-jackson2:1.43.1:1.43.1 -google-http-client-protobuf:1.43.1:1.43.1 -google-http-client-test:1.43.1:1.43.1 -google-http-client-xml:1.43.1:1.43.1 +google-http-client:1.43.1:1.43.2-SNAPSHOT +google-http-client-bom:1.43.1:1.43.2-SNAPSHOT +google-http-client-parent:1.43.1:1.43.2-SNAPSHOT +google-http-client-android:1.43.1:1.43.2-SNAPSHOT +google-http-client-android-test:1.43.1:1.43.2-SNAPSHOT +google-http-client-apache-v2:1.43.1:1.43.2-SNAPSHOT +google-http-client-appengine:1.43.1:1.43.2-SNAPSHOT +google-http-client-assembly:1.43.1:1.43.2-SNAPSHOT +google-http-client-findbugs:1.43.1:1.43.2-SNAPSHOT +google-http-client-gson:1.43.1:1.43.2-SNAPSHOT +google-http-client-jackson2:1.43.1:1.43.2-SNAPSHOT +google-http-client-protobuf:1.43.1:1.43.2-SNAPSHOT +google-http-client-test:1.43.1:1.43.2-SNAPSHOT +google-http-client-xml:1.43.1:1.43.2-SNAPSHOT From f191d3314139b4137b2649f7f0fe76b20b54dd73 Mon Sep 17 00:00:00 2001 From: Burke Davison <40617934+burkedavison@users.noreply.github.com> Date: Thu, 16 Mar 2023 11:20:56 -0400 Subject: [PATCH 800/983] chore: fix URL to ApacheHttpTransport connection management tutorial (#1824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix URL to ApacheHttpTransport connection management tutorial * chore: formatting * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/api/client/http/apache/v2/ApacheHttpTransport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java index fcbbecf2d..ccf736f84 100644 --- a/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java +++ b/google-http-client-apache-v2/src/main/java/com/google/api/client/http/apache/v2/ApacheHttpTransport.java @@ -46,8 +46,8 @@ *

              Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link * #ApacheHttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. Please * read the Apache HTTP - * Client connection management tutorial for more complex configuration options. + * href="https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/pdf/httpclient-tutorial.pdf"> + * Apache HTTP Client connection management tutorial for more complex configuration options. * * @since 1.30 * @author Yaniv Inbar From f1da9e79c9c006938835e6a4bf0a8a184d0a10e7 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 4 Apr 2023 13:26:37 -0400 Subject: [PATCH 801/983] ci: setting up OSSF Scorecard workflow (#1839) Part of b/275589993 --- .github/workflows/scorecard.yml | 72 +++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/scorecard.yml diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 000000000..fa7beedc3 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,72 @@ +# This workflow uses actions that are not certified by GitHub. They are provided +# by a third-party and are governed by separate terms of service, privacy +# policy, and support documentation. + +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '15 0 * * 4' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Needed to publish results and get a badge (see publish_results below). + id-token: write + # Uncomment the permissions below if installing in a private repository. + # contents: read + # actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 + with: + results_file: results.sarif + results_format: sarif + # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: + # - you want to enable the Branch-Protection check on a *public* repository, or + # - you are installing Scorecard on a *private* repository + # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + + # Public repositories: + # - Publish results to OpenSSF REST API for easy access by consumers + # - Allows the repository to include the Scorecard badge. + # - See https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories: + # - `publish_results` will always be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4 + with: + sarif_file: results.sarif From 91c46a99b0b9464d01b5aca2116bbe073b878725 Mon Sep 17 00:00:00 2001 From: cHengstler <69518287+cHengstler@users.noreply.github.com> Date: Fri, 5 May 2023 19:30:13 +0200 Subject: [PATCH 802/983] fix: UriTemplate reserved expansion does not escape reserved chars (#1844) When using UriTemplate.expand with a reserved expansion "{+var}", a set of allowed characters must not be encoded. According to section of [3.2.3 Reserved Expansion: {+var}](https://www.rfc-editor.org/rfc/rfc6570#section-3.2.3), unreserved and reserved character should not be escaped. This fix adds the missing characters `#[]` that must not be percent encoded when using reserved expansion. - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) Fixes #1838 --- .../client/util/escape/PercentEscaper.java | 11 +++++--- .../api/client/http/UriTemplateTest.java | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java index 3866265a3..601b52c14 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEscaper.java @@ -64,10 +64,15 @@ public class PercentEscaper extends UnicodeEscaper { public static final String SAFEPATHCHARS_URLENCODER = "-_.!~*'()@:$&,;=+"; /** - * Contains the safe characters plus all reserved characters. This happens to be the safe path - * characters plus those characters which are reserved for URI segments, namely '/' and '?'. + * A string of characters that do not need to be encoded when used in URI Templates reserved + * expansion, as specified in RFC 6570. This includes the safe characters plus all reserved + * characters. + * + *

              For details on escaping URI Templates using the reserved expansion, see RFC 6570 - section 3.2.3. */ - public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = SAFEPATHCHARS_URLENCODER + "/?"; + public static final String SAFE_PLUS_RESERVED_CHARS_URLENCODER = + SAFEPATHCHARS_URLENCODER + "/?#[]"; /** * A string of characters that do not need to be encoded when used in URI user info part, as diff --git a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java index 1a38eeafa..14ebc61b6 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java @@ -322,4 +322,30 @@ public void testExpandSeveralTemplatesNoParametersUsed() { SortedMap map = Maps.newTreeMap(); assertEquals("", UriTemplate.expand("{?id,uid}", map, false)); } + + public void testExpandTemplates_reservedExpansion_mustNotEscapeReservedCharSet() { + + String reservedSet = ":/?#[]@!$&'()*+,;="; + + SortedMap requestMap = Maps.newTreeMap(); + requestMap.put("var", reservedSet); + + assertEquals( + "Reserved expansion must not escape chars from reserved set according to rfc6570#section-3.2.3", + reservedSet, + UriTemplate.expand("{+var}", requestMap, false)); + } + + public void testExpandTemplates_reservedExpansion_mustNotEscapeUnreservedCharSet() { + + String unReservedSet = "-._~"; + + SortedMap requestMap = Maps.newTreeMap(); + requestMap.put("var", unReservedSet); + + assertEquals( + "Reserved expansion must not escape chars from unreserved set according to rfc6570#section-3.2.3", + unReservedSet, + UriTemplate.expand("{+var}", requestMap, false)); + } } From 98625f69ff5eae0456d771f0f54dc33197133e8e Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 9 May 2023 12:04:00 -0400 Subject: [PATCH 803/983] test: adding java 7 check (#1847) * test: adding java 7 build * required check config --- .github/sync-repo-settings.yaml | 1 + .github/workflows/ci-java7.yaml | 62 +++++++++++++++++++++++++++++++++ README.md | 2 ++ pom.xml | 3 +- 4 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-java7.yaml diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index aed3a5713..8d21f4666 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -8,6 +8,7 @@ branchProtectionRules: requiresCodeOwnerReviews: true requiresStrictStatusChecks: false requiredStatusCheckContexts: + - units (7) - units (8) - units (11) - windows diff --git a/.github/workflows/ci-java7.yaml b/.github/workflows/ci-java7.yaml new file mode 100644 index 000000000..2c8257d45 --- /dev/null +++ b/.github/workflows/ci-java7.yaml @@ -0,0 +1,62 @@ +# Copyright 2022 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. +# Github action job to test core java library features on +# downstream client libraries before they are released. +on: + push: + branches: + - main + pull_request: +name: ci-java7 +jobs: + units: + name: "units (7)" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v1 + # setup-java v2 or higher does not have version 1.7 + with: + version: 1.7 + architecture: x64 + - run: | + java -version + # This value is used in "-Djvm=" later + echo "JAVA7_HOME=${JAVA_HOME}" >> $GITHUB_ENV + - uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.8.8 + - name: Build + shell: bash + run: | + # Leveraging surefire's jvm option, running the test on Java 7. + # Surefire plugin 2.22.2 is the last version for Java 7. Newer version would fail with + # "UnsupportedClassVersionError: org/apache/maven/surefire/booter/ForkedBooter" error. + + # Why are these modules are skipped? + # google-http-client-jackson2 and google-http-client-appengine do not work with Java 7 + # any more because of Jackson and appengine library are compiled for Java 8. + # dailymotion-simple-cmdline-sample and google-http-client-assembly depend on + # google-http-client-jackson2 + mvn --batch-mode --show-version -ntp test \ + --projects '!google-http-client-jackson2,!google-http-client-appengine,!samples/dailymotion-simple-cmdline-sample,!google-http-client-assembly' \ + -Dclirr.skip=true -Denforcer.skip=true -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true -T 1C \ + -Dproject.surefire.version=2.22.2 \ + -Djvm=${JAVA7_HOME}/bin/java diff --git a/README.md b/README.md index b9aa0f867..ab51e6e53 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ content. The JSON and XML libraries are also fully pluggable, and they include s The library supports the following Java environments: - Java 7 or higher + - The google-http-client-jackson2 and google-http-client-appengine modules require Java 8 or + higher due to their dependencies. - Android 4.4 (Kit Kat) - GoogleAppEngine Google App Engine diff --git a/pom.xml b/pom.xml index 6e2a49048..e48f69f06 100644 --- a/pom.xml +++ b/pom.xml @@ -326,7 +326,7 @@ maven-surefire-plugin - 3.0.0-M7 + ${project.surefire.version} -Xmx1024m sponge_log @@ -581,6 +581,7 @@ 4.4.16 0.31.1 .. + 3.0.0-M7 false From 02e285fc3ddced1873e2a238b42535225375e983 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 12:25:04 -0400 Subject: [PATCH 804/983] chore(main): release 1.43.2 (#1845) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c981336d5..ee6e5c0e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.43.2](https://github.com/googleapis/google-http-java-client/compare/v1.43.1...v1.43.2) (2023-05-09) + + +### Bug Fixes + +* UriTemplate reserved expansion does not escape reserved chars ([#1844](https://github.com/googleapis/google-http-java-client/issues/1844)) ([91c46a9](https://github.com/googleapis/google-http-java-client/commit/91c46a99b0b9464d01b5aca2116bbe073b878725)), closes [#1838](https://github.com/googleapis/google-http-java-client/issues/1838) + ## [1.43.1](https://github.com/googleapis/google-http-java-client/compare/v1.43.0...v1.43.1) (2023-03-14) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index b89558927..8025ba083 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.2-SNAPSHOT + 1.43.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.2-SNAPSHOT + 1.43.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.2-SNAPSHOT + 1.43.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 5eba85c1d..2d6901e40 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-android - 1.43.2-SNAPSHOT + 1.43.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 35bb6f482..685d5788b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-apache-v2 - 1.43.2-SNAPSHOT + 1.43.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 668232100..3a3eaed3e 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-appengine - 1.43.2-SNAPSHOT + 1.43.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 574399935..6e1715903 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.43.2-SNAPSHOT + 1.43.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index dbde7bb8f..6a66d5943 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.2-SNAPSHOT + 1.43.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-android - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-apache-v2 - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-appengine - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-findbugs - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-gson - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-jackson2 - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-protobuf - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-test - 1.43.2-SNAPSHOT + 1.43.2 com.google.http-client google-http-client-xml - 1.43.2-SNAPSHOT + 1.43.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 5b25104bd..32e4848dd 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-findbugs - 1.43.2-SNAPSHOT + 1.43.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 74db72b36..09135e7a6 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-gson - 1.43.2-SNAPSHOT + 1.43.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 5fe81ade0..ccbebf555 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-jackson2 - 1.43.2-SNAPSHOT + 1.43.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 4e882cfe8..2b5d64fb0 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-protobuf - 1.43.2-SNAPSHOT + 1.43.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 78d1f6e47..c74b04f95 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-test - 1.43.2-SNAPSHOT + 1.43.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 6c76db7f8..e0ea47073 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client-xml - 1.43.2-SNAPSHOT + 1.43.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index d2dda1382..649d36236 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../pom.xml google-http-client - 1.43.2-SNAPSHOT + 1.43.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index e48f69f06..d02488ed9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.2-SNAPSHOT + 1.43.2 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ee27e3fb8..700067495 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.2-SNAPSHOT + 1.43.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 480e33bf6..a6f6401b9 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.1:1.43.2-SNAPSHOT -google-http-client-bom:1.43.1:1.43.2-SNAPSHOT -google-http-client-parent:1.43.1:1.43.2-SNAPSHOT -google-http-client-android:1.43.1:1.43.2-SNAPSHOT -google-http-client-android-test:1.43.1:1.43.2-SNAPSHOT -google-http-client-apache-v2:1.43.1:1.43.2-SNAPSHOT -google-http-client-appengine:1.43.1:1.43.2-SNAPSHOT -google-http-client-assembly:1.43.1:1.43.2-SNAPSHOT -google-http-client-findbugs:1.43.1:1.43.2-SNAPSHOT -google-http-client-gson:1.43.1:1.43.2-SNAPSHOT -google-http-client-jackson2:1.43.1:1.43.2-SNAPSHOT -google-http-client-protobuf:1.43.1:1.43.2-SNAPSHOT -google-http-client-test:1.43.1:1.43.2-SNAPSHOT -google-http-client-xml:1.43.1:1.43.2-SNAPSHOT +google-http-client:1.43.2:1.43.2 +google-http-client-bom:1.43.2:1.43.2 +google-http-client-parent:1.43.2:1.43.2 +google-http-client-android:1.43.2:1.43.2 +google-http-client-android-test:1.43.2:1.43.2 +google-http-client-apache-v2:1.43.2:1.43.2 +google-http-client-appengine:1.43.2:1.43.2 +google-http-client-assembly:1.43.2:1.43.2 +google-http-client-findbugs:1.43.2:1.43.2 +google-http-client-gson:1.43.2:1.43.2 +google-http-client-jackson2:1.43.2:1.43.2 +google-http-client-protobuf:1.43.2:1.43.2 +google-http-client-test:1.43.2:1.43.2 +google-http-client-xml:1.43.2:1.43.2 From 6b195272749e2ea1466fa83d7d021dbf71b5d8a6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 16:30:13 +0000 Subject: [PATCH 805/983] chore(main): release 1.43.3-SNAPSHOT (#1849) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 8025ba083..f6355fbc3 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.2 + 1.43.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.2 + 1.43.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.2 + 1.43.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 2d6901e40..7acee1f83 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-android - 1.43.2 + 1.43.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 685d5788b..81528a38a 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.43.2 + 1.43.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3a3eaed3e..b790a6682 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.43.2 + 1.43.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6e1715903..cee90e84c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.43.2 + 1.43.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6a66d5943..71535d321 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.2 + 1.43.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-android - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-test - 1.43.2 + 1.43.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.43.2 + 1.43.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 32e4848dd..bea2dbc0a 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.43.2 + 1.43.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 09135e7a6..e2befe4eb 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.43.2 + 1.43.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index ccbebf555..e2eb696e2 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.43.2 + 1.43.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 2b5d64fb0..2a3f8ea5f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.43.2 + 1.43.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index c74b04f95..14190bc74 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-test - 1.43.2 + 1.43.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e0ea47073..21fc60d80 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.43.2 + 1.43.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 649d36236..52c298a18 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../pom.xml google-http-client - 1.43.2 + 1.43.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index d02488ed9..e2e3702ee 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.2 + 1.43.3-SNAPSHOT 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 700067495..b156cc352 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.2 + 1.43.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index a6f6401b9..d00f1fee3 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.2:1.43.2 -google-http-client-bom:1.43.2:1.43.2 -google-http-client-parent:1.43.2:1.43.2 -google-http-client-android:1.43.2:1.43.2 -google-http-client-android-test:1.43.2:1.43.2 -google-http-client-apache-v2:1.43.2:1.43.2 -google-http-client-appengine:1.43.2:1.43.2 -google-http-client-assembly:1.43.2:1.43.2 -google-http-client-findbugs:1.43.2:1.43.2 -google-http-client-gson:1.43.2:1.43.2 -google-http-client-jackson2:1.43.2:1.43.2 -google-http-client-protobuf:1.43.2:1.43.2 -google-http-client-test:1.43.2:1.43.2 -google-http-client-xml:1.43.2:1.43.2 +google-http-client:1.43.2:1.43.3-SNAPSHOT +google-http-client-bom:1.43.2:1.43.3-SNAPSHOT +google-http-client-parent:1.43.2:1.43.3-SNAPSHOT +google-http-client-android:1.43.2:1.43.3-SNAPSHOT +google-http-client-android-test:1.43.2:1.43.3-SNAPSHOT +google-http-client-apache-v2:1.43.2:1.43.3-SNAPSHOT +google-http-client-appengine:1.43.2:1.43.3-SNAPSHOT +google-http-client-assembly:1.43.2:1.43.3-SNAPSHOT +google-http-client-findbugs:1.43.2:1.43.3-SNAPSHOT +google-http-client-gson:1.43.2:1.43.3-SNAPSHOT +google-http-client-jackson2:1.43.2:1.43.3-SNAPSHOT +google-http-client-protobuf:1.43.2:1.43.3-SNAPSHOT +google-http-client-test:1.43.2:1.43.3-SNAPSHOT +google-http-client-xml:1.43.2:1.43.3-SNAPSHOT From 114e9fb973638ca523f42b17e11e598ba04cad50 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 17:04:54 -0400 Subject: [PATCH 806/983] build: migrate release scripts (#1799) (#1851) Source-Link: https://github.com/googleapis/synthtool/commit/1fd6dff029bb3d873a4780e616388f802f086907 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ad9cabee4c022f1aab04a71332369e0c23841062124818a4490f73337f790337 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- .github/release-trigger.yml | 1 + .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a5361a30a..aadf54f64 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:e62f3ea524b11c1cd6ff7f80362736d86c0056631346b5b106a421686fce2726 + digest: sha256:ad9cabee4c022f1aab04a71332369e0c23841062124818a4490f73337f790337 diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml index d4ca94189..91997d697 100644 --- a/.github/release-trigger.yml +++ b/.github/release-trigger.yml @@ -1 +1,2 @@ enabled: true +multiScmName: google-http-java-client diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index e20330c3c..f52533545 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.0" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 0fd6ba2fa..44b100487 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.0" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2" } env_vars: { From eeea739f855cdeaef2dd6c38246660723656dc36 Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Thu, 25 May 2023 10:22:46 -0400 Subject: [PATCH 807/983] deps: update doclet version to v1.9.0 (#1853) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e2e3702ee..baf9cb325 100644 --- a/pom.xml +++ b/pom.xml @@ -698,7 +698,7 @@ - java-docfx-doclet-1.5.0 + java-docfx-doclet-1.9.0 ${project.build.directory}/docfx-yml ${project.artifactId} From 00eb7b1d6b29148ee76b4cf59be7bf8288cc5152 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Jun 2023 19:42:34 +0200 Subject: [PATCH 808/983] deps: update dependency com.google.j2objc:j2objc-annotations to v2 (#1805) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index baf9cb325..f89bf778a 100644 --- a/pom.xml +++ b/pom.xml @@ -230,7 +230,7 @@ com.google.j2objc j2objc-annotations - 1.3 + 2.8 io.opencensus From 99518417969f34b3205f605506bbb716befc6e7c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:43:07 -0400 Subject: [PATCH 809/983] chore: Update `dependabot.yml` template (#1813) (#1858) * chore: Update `dependabot.yml` template not to touch pip dependencies Source-Link: https://github.com/googleapis/synthtool/commit/f961eb0fe51109238128055897ccba1b70dbd804 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:af2eda87a54601ae7b7b2be5055c17b43ac98a7805b586772db314de8a7d4a1d Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 3 ++- .github/dependabot.yml | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index aadf54f64..73568a1e9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:ad9cabee4c022f1aab04a71332369e0c23841062124818a4490f73337f790337 + digest: sha256:af2eda87a54601ae7b7b2be5055c17b43ac98a7805b586772db314de8a7d4a1d +# created: 2023-06-16T02:10:09.149325782Z diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c8f413b0d..fde1ced49 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,13 @@ updates: schedule: interval: "daily" # Disable version updates for Maven dependencies - open-pull-requests-limit: 0 + # we use renovate-bot as well as shared-dependencies BOM to update maven dependencies. + ignore: "*" - package-ecosystem: "pip" directory: "/" schedule: interval: "daily" # Disable version updates for pip dependencies - open-pull-requests-limit: 0 \ No newline at end of file + # If a security vulnerability comes in, we will be notified about + # it via template in the synthtool repository. + ignore: "*" From 794354216463fc1945a3e8848e6b6459e469adf7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 14:30:00 -0400 Subject: [PATCH 810/983] chore(main): release 1.43.3 (#1854) --- CHANGELOG.md | 8 ++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 61 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6e5c0e7..edf452f73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.43.3](https://github.com/googleapis/google-http-java-client/compare/v1.43.2...v1.43.3) (2023-06-21) + + +### Dependencies + +* Update dependency com.google.j2objc:j2objc-annotations to v2 ([#1805](https://github.com/googleapis/google-http-java-client/issues/1805)) ([00eb7b1](https://github.com/googleapis/google-http-java-client/commit/00eb7b1d6b29148ee76b4cf59be7bf8288cc5152)) +* Update doclet version to v1.9.0 ([#1853](https://github.com/googleapis/google-http-java-client/issues/1853)) ([eeea739](https://github.com/googleapis/google-http-java-client/commit/eeea739f855cdeaef2dd6c38246660723656dc36)) + ## [1.43.2](https://github.com/googleapis/google-http-java-client/compare/v1.43.1...v1.43.2) (2023-05-09) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index f6355fbc3..977ad3142 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.3-SNAPSHOT + 1.43.3 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.3-SNAPSHOT + 1.43.3 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.3-SNAPSHOT + 1.43.3 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 7acee1f83..8c31f6392 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-android - 1.43.3-SNAPSHOT + 1.43.3 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 81528a38a..47e54b571 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-apache-v2 - 1.43.3-SNAPSHOT + 1.43.3 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index b790a6682..7ceaf3a36 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-appengine - 1.43.3-SNAPSHOT + 1.43.3 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index cee90e84c..ea2e01983 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml com.google.http-client google-http-client-assembly - 1.43.3-SNAPSHOT + 1.43.3 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 71535d321..b9c12cd3d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.3-SNAPSHOT + 1.43.3 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-android - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-apache-v2 - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-appengine - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-findbugs - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-gson - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-jackson2 - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-protobuf - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-test - 1.43.3-SNAPSHOT + 1.43.3 com.google.http-client google-http-client-xml - 1.43.3-SNAPSHOT + 1.43.3 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index bea2dbc0a..f5574d5d0 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-findbugs - 1.43.3-SNAPSHOT + 1.43.3 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index e2befe4eb..feb3d8721 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-gson - 1.43.3-SNAPSHOT + 1.43.3 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index e2eb696e2..97794db8a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-jackson2 - 1.43.3-SNAPSHOT + 1.43.3 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 2a3f8ea5f..6ff5c78e9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-protobuf - 1.43.3-SNAPSHOT + 1.43.3 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 14190bc74..61d68e254 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-test - 1.43.3-SNAPSHOT + 1.43.3 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 21fc60d80..fa1ba8810 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client-xml - 1.43.3-SNAPSHOT + 1.43.3 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 52c298a18..885f516d0 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../pom.xml google-http-client - 1.43.3-SNAPSHOT + 1.43.3 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f89bf778a..341cf41d8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.3-SNAPSHOT + 1.43.3 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b156cc352..77cee8281 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.3-SNAPSHOT + 1.43.3 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d00f1fee3..f9dc07705 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.2:1.43.3-SNAPSHOT -google-http-client-bom:1.43.2:1.43.3-SNAPSHOT -google-http-client-parent:1.43.2:1.43.3-SNAPSHOT -google-http-client-android:1.43.2:1.43.3-SNAPSHOT -google-http-client-android-test:1.43.2:1.43.3-SNAPSHOT -google-http-client-apache-v2:1.43.2:1.43.3-SNAPSHOT -google-http-client-appengine:1.43.2:1.43.3-SNAPSHOT -google-http-client-assembly:1.43.2:1.43.3-SNAPSHOT -google-http-client-findbugs:1.43.2:1.43.3-SNAPSHOT -google-http-client-gson:1.43.2:1.43.3-SNAPSHOT -google-http-client-jackson2:1.43.2:1.43.3-SNAPSHOT -google-http-client-protobuf:1.43.2:1.43.3-SNAPSHOT -google-http-client-test:1.43.2:1.43.3-SNAPSHOT -google-http-client-xml:1.43.2:1.43.3-SNAPSHOT +google-http-client:1.43.3:1.43.3 +google-http-client-bom:1.43.3:1.43.3 +google-http-client-parent:1.43.3:1.43.3 +google-http-client-android:1.43.3:1.43.3 +google-http-client-android-test:1.43.3:1.43.3 +google-http-client-apache-v2:1.43.3:1.43.3 +google-http-client-appengine:1.43.3:1.43.3 +google-http-client-assembly:1.43.3:1.43.3 +google-http-client-findbugs:1.43.3:1.43.3 +google-http-client-gson:1.43.3:1.43.3 +google-http-client-jackson2:1.43.3:1.43.3 +google-http-client-protobuf:1.43.3:1.43.3 +google-http-client-test:1.43.3:1.43.3 +google-http-client-xml:1.43.3:1.43.3 From 5c4c61e7b4ac6066fbcb6850d41d2174498d337a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 18:36:13 +0000 Subject: [PATCH 811/983] chore(main): release 1.43.4-SNAPSHOT (#1862) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 977ad3142..491108b12 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.3 + 1.43.4-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.3 + 1.43.4-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.3 + 1.43.4-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 8c31f6392..9a598666b 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-android - 1.43.3 + 1.43.4-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 47e54b571..654f3de9e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.43.3 + 1.43.4-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 7ceaf3a36..16d872f59 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-appengine - 1.43.3 + 1.43.4-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index ea2e01983..f8f11bb39 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.43.3 + 1.43.4-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b9c12cd3d..f991ef8cd 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.3 + 1.43.4-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-android - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-appengine - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-gson - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-test - 1.43.3 + 1.43.4-SNAPSHOT com.google.http-client google-http-client-xml - 1.43.3 + 1.43.4-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index f5574d5d0..d3db2594b 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.43.3 + 1.43.4-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index feb3d8721..7065d13c2 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-gson - 1.43.3 + 1.43.4-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 97794db8a..3d65a2046 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.43.3 + 1.43.4-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 6ff5c78e9..e341d4c9c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.43.3 + 1.43.4-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 61d68e254..f8d5474f5 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-test - 1.43.3 + 1.43.4-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index fa1ba8810..ea84b12ee 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client-xml - 1.43.3 + 1.43.4-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 885f516d0..a2f1a5ccf 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../pom.xml google-http-client - 1.43.3 + 1.43.4-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 341cf41d8..4069a98f4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -568,7 +568,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.3 + 1.43.4-SNAPSHOT 2.0.12 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 77cee8281..65e8e36ca 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.3 + 1.43.4-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index f9dc07705..ec8f500d1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.3:1.43.3 -google-http-client-bom:1.43.3:1.43.3 -google-http-client-parent:1.43.3:1.43.3 -google-http-client-android:1.43.3:1.43.3 -google-http-client-android-test:1.43.3:1.43.3 -google-http-client-apache-v2:1.43.3:1.43.3 -google-http-client-appengine:1.43.3:1.43.3 -google-http-client-assembly:1.43.3:1.43.3 -google-http-client-findbugs:1.43.3:1.43.3 -google-http-client-gson:1.43.3:1.43.3 -google-http-client-jackson2:1.43.3:1.43.3 -google-http-client-protobuf:1.43.3:1.43.3 -google-http-client-test:1.43.3:1.43.3 -google-http-client-xml:1.43.3:1.43.3 +google-http-client:1.43.3:1.43.4-SNAPSHOT +google-http-client-bom:1.43.3:1.43.4-SNAPSHOT +google-http-client-parent:1.43.3:1.43.4-SNAPSHOT +google-http-client-android:1.43.3:1.43.4-SNAPSHOT +google-http-client-android-test:1.43.3:1.43.4-SNAPSHOT +google-http-client-apache-v2:1.43.3:1.43.4-SNAPSHOT +google-http-client-appengine:1.43.3:1.43.4-SNAPSHOT +google-http-client-assembly:1.43.3:1.43.4-SNAPSHOT +google-http-client-findbugs:1.43.3:1.43.4-SNAPSHOT +google-http-client-gson:1.43.3:1.43.4-SNAPSHOT +google-http-client-jackson2:1.43.3:1.43.4-SNAPSHOT +google-http-client-protobuf:1.43.3:1.43.4-SNAPSHOT +google-http-client-test:1.43.3:1.43.4-SNAPSHOT +google-http-client-xml:1.43.3:1.43.4-SNAPSHOT From 223dfef05114bd64acaba5424ee6d6c44f9223b9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:02:57 -0400 Subject: [PATCH 812/983] chore: Update dependabot.yml (#1814) (#1863) * chore: Update dependabot.yml Source-Link: https://github.com/googleapis/synthtool/commit/9ad18b66e75ca08d6a7779f56c7ee0595d3e1203 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:c33bd13e1eab022b0499a3afbfb4b93ae10cb8ad89d8203a6343a88b1b78400f Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .github/dependabot.yml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 73568a1e9..b8ef92bef 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:af2eda87a54601ae7b7b2be5055c17b43ac98a7805b586772db314de8a7d4a1d -# created: 2023-06-16T02:10:09.149325782Z + digest: sha256:c33bd13e1eab022b0499a3afbfb4b93ae10cb8ad89d8203a6343a88b1b78400f +# created: 2023-06-21T18:48:32.287298785Z diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fde1ced49..203f9eacc 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,8 @@ updates: interval: "daily" # Disable version updates for Maven dependencies # we use renovate-bot as well as shared-dependencies BOM to update maven dependencies. - ignore: "*" + ignore: + - dependency-name: "*" - package-ecosystem: "pip" directory: "/" schedule: @@ -14,4 +15,5 @@ updates: # Disable version updates for pip dependencies # If a security vulnerability comes in, we will be notified about # it via template in the synthtool repository. - ignore: "*" + ignore: + - dependency-name: "*" From 13edd1357eb79535d943f5288ab3adf4d9dfb52a Mon Sep 17 00:00:00 2001 From: Burke Davison <40617934+burkedavison@users.noreply.github.com> Date: Mon, 24 Jul 2023 19:19:45 +0000 Subject: [PATCH 813/983] feat: setup 1.43.x lts branch (#1869) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 86046bc1e..eb0e905a5 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -18,3 +18,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.42.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.43.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 8d21f4666..3faf69390 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -70,6 +70,20 @@ branchProtectionRules: - dependencies (11) - clirr - cla/google + - pattern: 1.43.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (7) + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From 399f92ac46807f01609d8048d2ddb63c49bd693e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 22:52:19 +0200 Subject: [PATCH 814/983] build(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.3.0 (#1801) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4069a98f4..217ab3552 100644 --- a/pom.xml +++ b/pom.xml @@ -335,7 +335,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.2.0 + 3.3.0 org.codehaus.mojo From cb4c560e6a514c249defb9d0d1c5083646e6751b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 22:52:43 +0200 Subject: [PATCH 815/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.5 (#1802) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 217ab3552..80434df6e 100644 --- a/pom.xml +++ b/pom.xml @@ -355,7 +355,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.1 + 3.4.5 org.apache.maven.plugins @@ -525,7 +525,7 @@ maven-project-info-reports-plugin - 3.4.1 + 3.4.5 From a76d1968b3b93def772e20141b1fea016193b2ab Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 22:53:00 +0200 Subject: [PATCH 816/983] build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.6.0 (#1804) --- google-http-client/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index a2f1a5ccf..ff9bb0e76 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -21,7 +21,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.4.0 + 3.6.0 io.opencensus:opencensus-impl diff --git a/pom.xml b/pom.xml index 80434df6e..17b034818 100644 --- a/pom.xml +++ b/pom.xml @@ -365,7 +365,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.4.0 + 3.6.0 org.apache.maven.plugins From fe5887c9f9eb5048fed18850c796fa0263a6ec2f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 22:53:23 +0200 Subject: [PATCH 817/983] build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.4.1 (#1811) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 17b034818..517ec4ab2 100644 --- a/pom.xml +++ b/pom.xml @@ -375,7 +375,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.4.1 @@ -383,7 +383,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.4.1 enforce-maven From ce5dbfc68c2cca989f57468a5a915cf9411267bb Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 18 Oct 2023 22:54:02 +0200 Subject: [PATCH 818/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.23.0 (#1887) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 517ec4ab2..63a370131 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ com.google.errorprone error_prone_annotations - 2.18.0 + 2.23.0 com.google.appengine From 1d37fa3c2b61b616a975c2c4dfa55ea56d56055a Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 7 Nov 2023 14:35:29 +0000 Subject: [PATCH 819/983] build: add native image kokoro cfgs (#1896) --- .kokoro/build.sh | 10 ++++++++ .kokoro/presubmit/graalvm-native-a.cfg | 33 ++++++++++++++++++++++++++ .kokoro/presubmit/graalvm-native-b.cfg | 33 ++++++++++++++++++++++++++ owlbot.py | 1 + 4 files changed, 77 insertions(+) create mode 100644 .kokoro/presubmit/graalvm-native-a.cfg create mode 100644 .kokoro/presubmit/graalvm-native-b.cfg diff --git a/.kokoro/build.sh b/.kokoro/build.sh index f9cf38f48..a1462f60d 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -79,6 +79,16 @@ graalvm17) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test RETURN_CODE=$? ;; +graalvmA) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + RETURN_CODE=$? + ;; +graalvmB) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg new file mode 100644 index 000000000..f8c3c4488 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmA" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg new file mode 100644 index 000000000..9ae343c8b --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvmB" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} \ No newline at end of file diff --git a/owlbot.py b/owlbot.py index 8a64e3837..6f2484f03 100644 --- a/owlbot.py +++ b/owlbot.py @@ -28,5 +28,6 @@ "checkstyle.xml", "license-checks.xml", ".github/workflows/samples.yaml", + ".kokoro/build.sh" ] ) From 1acedf75368f11ab03e5f84dd2c58a8a8a662d41 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Thu, 9 Nov 2023 18:15:16 +0000 Subject: [PATCH 820/983] fix: native image configs for google-http-java-client (#1893) * fix: native image configs for google-http-java-client --- .kokoro/build.sh | 4 +- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .../reflect-config.json | 59 ++ .../reflect-config.json | 22 + .../reflect-config.json | 52 ++ .../native-image.properties | 7 + .../reflect-config.json | 12 + google-http-client-test/pom.xml | 12 + .../reflect-config.json | 432 +++++++++++ .../serialization-config.json | 12 + .../reflect-config.json | 12 + .../reflect-config.json | 674 ++++++++++++++++++ .../resource-config.json | 5 + .../native-image.properties | 1 + .../google-http-client/reflect-config.json | 114 +++ .../google-http-client/resource-config.json | 5 + .../serialization-config.json | 16 + .../native-image.properties | 6 + .../google-http-client/reflect-config.json | 244 +++++++ .../google-http-client/resource-config.json | 10 + pom.xml | 54 ++ 21 files changed, 1752 insertions(+), 3 deletions(-) create mode 100644 google-http-client-apache-v2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-apache-v2/reflect-config.json create mode 100644 google-http-client-gson/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/reflect-config.json create mode 100644 google-http-client-jackson2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/reflect-config.json create mode 100644 google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties create mode 100644 google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/reflect-config.json create mode 100644 google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/reflect-config.json create mode 100644 google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/serialization-config.json create mode 100644 google-http-client-xml/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json create mode 100644 google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json create mode 100644 google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/resource-config.json create mode 100644 google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties create mode 100644 google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json create mode 100644 google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json create mode 100644 google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/serialization-config.json create mode 100644 google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties create mode 100644 google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json create mode 100644 google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a1462f60d..5b146924c 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -81,12 +81,12 @@ graalvm17) ;; graalvmA) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine' RETURN_CODE=$? ;; graalvmB) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine' RETURN_CODE=$? ;; samples) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index f8c3c4488..07344aef2 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -30,4 +30,4 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" -} \ No newline at end of file +} diff --git a/google-http-client-apache-v2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-apache-v2/reflect-config.json b/google-http-client-apache-v2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-apache-v2/reflect-config.json new file mode 100644 index 000000000..97a9fba46 --- /dev/null +++ b/google-http-client-apache-v2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-apache-v2/reflect-config.json @@ -0,0 +1,59 @@ +[ + { + "name": "org.apache.commons.logging.impl.LogFactoryImpl", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "org.apache.commons.logging.impl.Log4JLogger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "org.apache.commons.logging.impl.Jdk14Logger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "org.apache.commons.logging.impl.SimpleLog", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "org.apache.commons.logging.impl.Jdk13LumberjackLogger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "org.apache.commons.logging.LogFactory", + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/google-http-client-gson/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/reflect-config.json b/google-http-client-gson/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/reflect-config.json new file mode 100644 index 000000000..8bb0eb474 --- /dev/null +++ b/google-http-client-gson/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/reflect-config.json @@ -0,0 +1,22 @@ +[ + { + "name": "com.google.api.client.json.GenericJson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ArrayMap", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-jackson2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/reflect-config.json b/google-http-client-jackson2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/reflect-config.json new file mode 100644 index 000000000..3531bc889 --- /dev/null +++ b/google-http-client-jackson2/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/reflect-config.json @@ -0,0 +1,52 @@ +[ + { + "name": "com.google.api.client.json.GenericJson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "java.util.HashMap", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "java.util.LinkedList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "java.lang.Object", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ArrayMap", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties b/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties new file mode 100644 index 000000000..b6b626175 --- /dev/null +++ b/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties @@ -0,0 +1,7 @@ +Args=--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonFactoryTest \ +--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonGeneratorTest \ +--initialize-at-build-time=com.fasterxml.jackson.core.io.SerializedString \ +--initialize-at-build-time=com.fasterxml.jackson.core.io.CharTypes \ +--initialize-at-build-time=com.fasterxml.jackson.core.JsonFactory \ +--initialize-at-build-time=com.fasterxml.jackson.core.io.JsonStringEncoder \ +--initialize-at-build-time=com.google.api.client.util.StringUtils \ No newline at end of file diff --git a/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/reflect-config.json b/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/reflect-config.json new file mode 100644 index 000000000..ab2deb4fd --- /dev/null +++ b/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/reflect-config.json @@ -0,0 +1,12 @@ +[ + { + "name": "com.google.api.client.protobuf.SimpleProto$TestMessage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index f8d5474f5..577606012 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -71,4 +71,16 @@ provided + + + + native-deps + + + com.google.guava + guava + + + + diff --git a/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/reflect-config.json b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/reflect-config.json new file mode 100644 index 000000000..b86a6e7b3 --- /dev/null +++ b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/reflect-config.json @@ -0,0 +1,432 @@ +[ + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Animal", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$WildCardTypes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Simple", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$StringNullValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$DogWithFamily", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$ExtendsGenericJson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$MapOfMapType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$PolymorphicWithNumericValueType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$AnimalGenericJson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$EnumValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumberTypes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$TypeVariablesPassedAround", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$FloatMapTypeVariableType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Feed", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$V", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$PolymorphicSelfReferencing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$DoubleListTypeVariableType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$TypeVariableType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "java.util.ArrayList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$TestClass", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Dog", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$A", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumericValueTypedSubclass1", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$DogGenericJson", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumberTypesAsString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$PolymorphicWithNumericType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Centipede", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$AnyType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$IntArrayTypeVariableType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$CollectionOfCollectionType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$ArrayType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumericValueTypedSubclass2", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumericTypedSubclass1", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$BooleanTypes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Human", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$HumanWithPets", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$NumericTypedSubclass2", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$IntegerTypeVariableType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$X", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Y", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.test.json.AbstractJsonFactoryTest$Z", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/serialization-config.json b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/serialization-config.json new file mode 100644 index 000000000..03d931127 --- /dev/null +++ b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/serialization-config.json @@ -0,0 +1,12 @@ +{ + "types":[ + {"name":"java.lang.String" + }, + {"name":"java.lang.Boolean"}, + {"name":"java.util.HashMap"} + ], + "lambdaCapturingTypes":[ + ], + "proxies":[ + ] +} \ No newline at end of file diff --git a/google-http-client-xml/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json b/google-http-client-xml/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json new file mode 100644 index 000000000..52ad6a97b --- /dev/null +++ b/google-http-client-xml/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json @@ -0,0 +1,12 @@ +[ + { + "name": "com.google.api.client.xml.GenericXml", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json new file mode 100644 index 000000000..ce1fa5588 --- /dev/null +++ b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/reflect-config.json @@ -0,0 +1,674 @@ +[ + { + "name": "com.google.api.client.xml.GenericXmlListTest$CollectionOfArrayMapsTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayOfArrayMapsTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayWithClassTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$CollectionWithClassTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$MultiGenericWithClassType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$MultiGenericWithClassTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + + { + "name": "com.google.api.client.xml.GenericXmlListTest$CollectionTypeStringGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayTypeStringGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$CollectionTypeIntegerGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayTypeIntegerGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayTypeIntGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$CollectionTypeEnumGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.GenericXmlListTest$ArrayTypeEnumGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlNamespaceDictionaryTest$Entry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlNamespaceDictionaryTest$Feed", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.AtomTest$Feed", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.AtomTest$Author", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.AtomTest$Link", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.AtomTest$FeedEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$AnyEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$AnyType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$AnyTypeEnumElementOnly", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$AnyTypeEnumAttributeOnly", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ValueType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$CollectionOfArrayMapsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayOfArrayMapsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayWithClassType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$CollectionTypeString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayTypeString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$AnyTypeWithCollectionString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$CollectionTypeInteger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayTypeInteger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayTypeInt", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$CollectionTypeEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlEnumTest$ArrayTypeEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$SimpleTypeString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$SimpleTypeNumeric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyTypeMissingField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyTypeAdditionalField", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$ValueType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyTypePrimitiveInt", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyTypePrimitiveString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AnyTypeInf", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlTest$AllType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$CollectionOfArrayMapsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$ArrayOfArrayMapsType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$ArrayWithClassType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$CollectionWithClassType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$CollectionTypeString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$ArrayTypeString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.xml.XmlListTest$AnyTypeWithCollectionString", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.XmlListTest$CollectionTypeInteger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.XmlListTest$ArrayTypeInteger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.XmlListTest$ArrayTypeInt", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.XmlListTest$CollectionTypeEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.XmlListTest$ArrayTypeEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyGenericType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$SimpleTypeStringGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$SimpleTypeNumericGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyTypeMissingFieldGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyTypeAdditionalFieldGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$ValueTypeGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyTypePrimitiveIntGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name":"com.google.api.client.xml.GenericXmlTest$AnyTypePrimitiveStringGeneric", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredConstructors": true, + "allPublicConstructors": true, + "allPublicMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/resource-config.json b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/resource-config.json new file mode 100644 index 000000000..29b0c76b1 --- /dev/null +++ b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/resource-config.json @@ -0,0 +1,5 @@ +{ + "resources":[ + {"pattern":"\\Qsample-atom.xml\\E"}], + "bundles":[] +} \ No newline at end of file diff --git a/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties new file mode 100644 index 000000000..a90ef2471 --- /dev/null +++ b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties @@ -0,0 +1 @@ +Args=--enable-url-protocols=http,https \ No newline at end of file diff --git a/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json new file mode 100644 index 000000000..69783d263 --- /dev/null +++ b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json @@ -0,0 +1,114 @@ +[ + { + "name": "com.google.api.client.http.HttpHeaders", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.api.client.testing.http.MockLowLevelHttpRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.api.client.http.HttpRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true, + "allDeclaredClasses" : true, + "allPublicClasses": true + }, + { + "name": "io.opencensus.trace.Tracing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.api.client.http.OpenCensusUtils", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name":"io.opencensus.impl.trace.TraceComponentImpl", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name":"io.opencensus.impl.metrics.MetricsComponentImpl", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "java.util.LinkedList", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "java.util.ArrayList", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + {"name": "java.util.HashMap", + "methods": [ + { "name": "", "parameterTypes": [] }, + { "name": "", "parameterTypes": ["int", "float"] }, + { "name": "", "parameterTypes": ["int"] }, + { "name": "", "parameterTypes": ["java.util.Map"] }, + { "name" : "writeObject", "parameterTypes" : ["java.io.ObjectOutputStream"] } + + ] + } +] \ No newline at end of file diff --git a/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json new file mode 100644 index 000000000..482eb4389 --- /dev/null +++ b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json @@ -0,0 +1,5 @@ +{ + "resources":[ + {"pattern":"\\Qcom/google/api/client/http/google-http-client.properties\\E"}], + "bundles":[] +} \ No newline at end of file diff --git a/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/serialization-config.json b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/serialization-config.json new file mode 100644 index 000000000..6b75b6c19 --- /dev/null +++ b/google-http-client/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client/serialization-config.json @@ -0,0 +1,16 @@ +{ + "types":[ + {"name": "com.google.api.client.http.HttpResponseException"}, + {"name": "java.lang.StackTraceElement"}, + {"name":"java.lang.String"}, + {"name": "java.lang.Throwable"}, + {"name": "java.lang.Exception"}, + {"name": "java.io.IOException"}, + {"name": "java.lang.Object"}, + {"name": "java.util.Collections$EmptyList"} + ], + "lambdaCapturingTypes":[ + ], + "proxies":[ + ] +} \ No newline at end of file diff --git a/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties new file mode 100644 index 000000000..7bc87751b --- /dev/null +++ b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties @@ -0,0 +1,6 @@ +Args=--initialize-at-build-time=com.google.api.client.util.StringUtils \ +--initialize-at-build-time=com.google.api.client.http.HttpRequestTest \ +--initialize-at-build-time=com.google.api.client.http.ByteArrayContentTest \ +--initialize-at-build-time=com.google.api.client.http.MultipartContentTest \ +--initialize-at-build-time=com.google.api.client.util.LoggingStreamingContentTest \ +--initialize-at-build-time=com.google.api.client.util.SecurityUtilsTest \ No newline at end of file diff --git a/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json new file mode 100644 index 000000000..41fade5e2 --- /dev/null +++ b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/reflect-config.json @@ -0,0 +1,244 @@ +[ + { + "name": "com.google.api.client.util.FieldInfoTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.FieldInfoTest$Data", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.DataMapTest$A", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ClassInfoTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.UrlEncodedParserTest$Generic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.UrlEncodedParserTest$Simple", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.UrlEncodedParserTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.UrlEncodedParserTest$EnumValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpRequestTest$MyHeaders", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpHeadersTest$SlugHeaders", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpHeadersTest$V", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpHeadersTest$MyHeaders", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.javanet.NetHttpRequestTest$SleepingOutputWriter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ClassInfoTest$A", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ClassInfoTest$B", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ClassInfoTest$C", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.ClassInfoTest$A1", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true +}, + { + "name": "com.google.api.client.util.ClassInfoTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.GenericUrlTest$FieldTypesUrl", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.GenericUrlTest$TestUrl", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.UriTemplateTest$testEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.GenericDataTest$MyData", + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredFields": true, + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ], + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.GenericDataTest$GenericData1", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.GenericDataTest$GenericData2", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.TypesTest$WildcardBounds", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.TypesTest$Foo", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.api.client.util.TypesTest$IntegerList", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.TypesTest$Resolve", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.TypesTest$IntegerResolve", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.util.TypesTest$IntegerResolve", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpRequestTest$E", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.HttpResponseTest$MyHeaders", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + }, + { + "name": "com.google.api.client.http.javanet.NetHttpTransportTest$FakeServer", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allDeclaredFields": true + } +] \ No newline at end of file diff --git a/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json new file mode 100644 index 000000000..2d7f5b77c --- /dev/null +++ b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/resource-config.json @@ -0,0 +1,10 @@ +{ + "resources":[ + {"pattern":"\\Qcom/google/api/client/util/privateKey.pem\\E"}, + {"pattern":"\\Qcom/google/api/client/util/cert.pem\\E"}, + {"pattern":"\\Qcom/google/api/client/util/mtlsCertAndKey.pem\\E"}, + {"pattern": "\\Qfile.txt\\E"}, + {"pattern": "\\Qcom/google/api/client/util/secret.pem\\E"}, + {"pattern": "\\Qcom/google/api/client/util/secret.p12\\E"}], + "bundles":[] +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 63a370131..55df0e556 100644 --- a/pom.xml +++ b/pom.xml @@ -586,6 +586,60 @@ + + + native + + + org.junit.vintage + junit-vintage-engine + 5.10.0 + test + + + org.graalvm.buildtools + junit-platform-native + 0.9.23 + test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + 2.22.2 + + + + + + + org.graalvm.buildtools + native-maven-plugin + 0.9.23 + true + + + test-native + + test + + test + + + + + --no-fallback + --no-server + + + + + + + Windows From be00ce1ef1873d3b80830966ddb83097e460601d Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Mon, 27 Nov 2023 16:29:14 +0000 Subject: [PATCH 821/983] feat: add isShutdown in HttpTransport (#1901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add isShutdown in HttpTransport * fix lint * add comment * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * refactor according to code review * restore comment changes * change year * change default implementation --------- Co-authored-by: Owl Bot --- .../com/google/api/client/http/HttpTransport.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java index d70d7fb5f..9a2d04220 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java +++ b/google-http-client/src/main/java/com/google/api/client/http/HttpTransport.java @@ -21,7 +21,7 @@ /** * Thread-safe abstract HTTP transport. * - *

              Implementation is thread-safe, and sub-classes must be thread-safe. For maximum efficiency, + *

              Implementation is thread-safe, and subclasses must be thread-safe. For maximum efficiency, * applications should use a single globally-shared instance of the HTTP transport. * *

              The recommended concrete implementation HTTP transport library to use depends on what @@ -158,4 +158,14 @@ public boolean isMtls() { * @since 1.4 */ public void shutdown() throws IOException {} + + /** + * Returns whether the transport is shutdown or not. + * + * @return true if the transport is shutdown. + * @since 1.44.0 + */ + public boolean isShutdown() { + return true; + } } From eece941f0345f2d4d1e78a61453211d16651b759 Mon Sep 17 00:00:00 2001 From: Deepankar Dixit <90280028+ddixit14@users.noreply.github.com> Date: Mon, 11 Dec 2023 17:29:46 +0000 Subject: [PATCH 822/983] chore: Update owlbot.py to exclude `ci.yaml` (#1909) Need owlbot to ignore `ci.yaml` so that changes in https://github.com/googleapis/google-http-java-client/pull/1907 can persist. --- owlbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owlbot.py b/owlbot.py index 6f2484f03..841976c3b 100644 --- a/owlbot.py +++ b/owlbot.py @@ -28,6 +28,7 @@ "checkstyle.xml", "license-checks.xml", ".github/workflows/samples.yaml", - ".kokoro/build.sh" + ".kokoro/build.sh", + ".github/workflows/ci.yaml" ] ) From 61fb53c81bd30eb20b721ecd51eac94bf5d60865 Mon Sep 17 00:00:00 2001 From: Deepankar Dixit <90280028+ddixit14@users.noreply.github.com> Date: Mon, 11 Dec 2023 18:08:14 +0000 Subject: [PATCH 823/983] chore: Update ci.yaml to setup Java 21 unit testing. (#1910) * chore: Update ci.yaml to setup Java 21 unit testing. --- .github/workflows/ci.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3bb26e37..55bd57aa9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -87,3 +87,27 @@ jobs: - run: .kokoro/build.sh env: JOB_TYPE: clirr + # compilation failure for sub-modules using source and target options 7 (this setting cannot be upgraded to Java 21 because some modules support max of Java 8) + # Hence compile in Java 8 and test in Java 21. + units-java21: + # Building using Java 8 and run the tests with Java 21 runtime + name: "units (21)" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + - name: "Set jvm system property environment variable for surefire plugin (unit tests)" + # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests. + # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm + run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV + shell: bash + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + - run: .kokoro/build.sh + env: + JOB_TYPE: test From 0ade9156d4d1435ab3b4a4a0ef816584a234c559 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:01:04 +0000 Subject: [PATCH 824/983] chore: add native-image-shared-config as parent (#1908) * chore: add native-image-shared-config as the parent and managed image tag with renovate bot --- .kokoro/build.sh | 4 +- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- owlbot.py | 1 + pom.xml | 52 ++++++-------------------- renovate.json | 11 ++++++ 6 files changed, 27 insertions(+), 45 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 5b146924c..f8a1754b6 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -81,12 +81,12 @@ graalvm17) ;; graalvmA) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine' + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative,native-tests,native-deps test -pl '!google-http-client-appengine' RETURN_CODE=$? ;; graalvmB) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Pnative-deps test -pl '!google-http-client-appengine' + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative,native-tests,native-deps test -pl '!google-http-client-appengine' RETURN_CODE=$? ;; samples) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 07344aef2..14faa3fda 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.1" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 9ae343c8b..9ac140948 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.1" } env_vars: { diff --git a/owlbot.py b/owlbot.py index 841976c3b..6c8dbbb8a 100644 --- a/owlbot.py +++ b/owlbot.py @@ -29,6 +29,7 @@ "license-checks.xml", ".github/workflows/samples.yaml", ".kokoro/build.sh", + "renovate.json", ".github/workflows/ci.yaml" ] ) diff --git a/pom.xml b/pom.xml index 55df0e556..c7c2f5c53 100644 --- a/pom.xml +++ b/pom.xml @@ -89,6 +89,12 @@ + + com.google.cloud + native-image-shared-config + 1.7.1 + + - native - - - org.junit.vintage - junit-vintage-engine - 5.10.0 - test - - - org.graalvm.buildtools - junit-platform-native - 0.9.23 - test - - + native-tests org.apache.maven.plugins maven-surefire-plugin - - 2.22.2 + ${surefire.version} - - - - - org.graalvm.buildtools - native-maven-plugin - 0.9.23 - true - - - test-native - - test - - test - - - - - --no-fallback - --no-server - + + **/*Test + - Windows diff --git a/renovate.json b/renovate.json index 29a66a6b6..cd7d2400b 100644 --- a/renovate.json +++ b/renovate.json @@ -11,6 +11,17 @@ ":autodetectPinVersions" ], "ignorePaths": [".kokoro/requirements.txt"], + "customManagers": [ + { + "customType": "regex", + "fileMatch": [ + "^.kokoro/presubmit/graalvm-native.*.cfg$" + ], + "matchStrings": ["value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\""], + "depNameTemplate": "com.google.cloud:native-image-shared-config", + "datasourceTemplate": "maven" + } + ], "packageRules": [ { "packagePatterns": [ From 436f11fb42ca570eacab13559f26c8e9bfc0ee72 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 11:10:40 -0500 Subject: [PATCH 825/983] chore: Create renovate_config_check.yaml (#1920) (#1914) * chore: Create renovate_config_check.yaml Source-Link: https://github.com/googleapis/synthtool/commit/6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:a6aa751984f1e905c3ae5a3aac78fc7b68210626ce91487dc7ff4f0a06f010cc Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 6 +- .github/workflows/renovate_config_check.yaml | 25 + .kokoro/nightly/integration.cfg | 1 + .kokoro/nightly/java11-integration.cfg | 1 + .kokoro/presubmit/graalvm-native-17.cfg | 2 +- .kokoro/presubmit/graalvm-native.cfg | 2 +- .kokoro/presubmit/integration.cfg | 1 + .kokoro/requirements.txt | 574 +++++++++++-------- 8 files changed, 364 insertions(+), 248 deletions(-) create mode 100644 .github/workflows/renovate_config_check.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index b8ef92bef..dc05a7276 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2023 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:c33bd13e1eab022b0499a3afbfb4b93ae10cb8ad89d8203a6343a88b1b78400f -# created: 2023-06-21T18:48:32.287298785Z + digest: sha256:a6aa751984f1e905c3ae5a3aac78fc7b68210626ce91487dc7ff4f0a06f010cc +# created: 2024-01-22T14:14:20.913785597Z diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml new file mode 100644 index 000000000..87d8eb2be --- /dev/null +++ b/.github/workflows/renovate_config_check.yaml @@ -0,0 +1,25 @@ +name: Renovate Bot Config Validation + +on: + pull_request: + paths: + - 'renovate.json' + +jobs: + renovate_bot_config_validation: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install Renovate and Config Validator + run: | + npm install -g npm@latest + npm install --global renovate + renovate-config-validator diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index a2907a257..5a95c6828 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -35,3 +35,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg index 58049cc38..6a6ef94ef 100644 --- a/.kokoro/nightly/java11-integration.cfg +++ b/.kokoro/nightly/java11-integration.cfg @@ -35,3 +35,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg index f52533545..fb5bb678f 100644 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.2" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17:22.3.3" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg index 44b100487..59efee340 100644 --- a/.kokoro/presubmit/graalvm-native.cfg +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.2" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm:22.3.3" } env_vars: { diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg index dded67a9d..5864c603e 100644 --- a/.kokoro/presubmit/integration.cfg +++ b/.kokoro/presubmit/integration.cfg @@ -31,3 +31,4 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index c80f0a87c..445c5c1f0 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -1,20 +1,20 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile --allow-unsafe --generate-hashes requirements.in +# pip-compile requirements.in --generate-hashes --upgrade # -attrs==22.1.0 \ - --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ - --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c +attrs==23.1.0 \ + --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ + --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 # via gcp-releasetool -cachetools==4.2.4 \ - --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ - --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 +cachetools==5.3.1 \ + --hash=sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590 \ + --hash=sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b # via google-auth -certifi==2022.12.7 \ - --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ - --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 +certifi==2023.7.22 \ + --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ + --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # via requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ @@ -82,9 +82,82 @@ cffi==1.15.1 \ --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 # via cryptography -charset-normalizer==2.0.12 \ - --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ - --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df +charset-normalizer==3.2.0 \ + --hash=sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96 \ + --hash=sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c \ + --hash=sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710 \ + --hash=sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706 \ + --hash=sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020 \ + --hash=sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252 \ + --hash=sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad \ + --hash=sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329 \ + --hash=sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a \ + --hash=sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f \ + --hash=sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6 \ + --hash=sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4 \ + --hash=sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a \ + --hash=sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46 \ + --hash=sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2 \ + --hash=sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23 \ + --hash=sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace \ + --hash=sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd \ + --hash=sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982 \ + --hash=sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10 \ + --hash=sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2 \ + --hash=sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea \ + --hash=sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09 \ + --hash=sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5 \ + --hash=sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149 \ + --hash=sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489 \ + --hash=sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9 \ + --hash=sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80 \ + --hash=sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592 \ + --hash=sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3 \ + --hash=sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6 \ + --hash=sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed \ + --hash=sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c \ + --hash=sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200 \ + --hash=sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a \ + --hash=sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e \ + --hash=sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d \ + --hash=sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6 \ + --hash=sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623 \ + --hash=sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669 \ + --hash=sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3 \ + --hash=sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa \ + --hash=sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9 \ + --hash=sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2 \ + --hash=sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f \ + --hash=sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1 \ + --hash=sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4 \ + --hash=sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a \ + --hash=sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8 \ + --hash=sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3 \ + --hash=sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029 \ + --hash=sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f \ + --hash=sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959 \ + --hash=sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22 \ + --hash=sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7 \ + --hash=sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952 \ + --hash=sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346 \ + --hash=sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e \ + --hash=sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d \ + --hash=sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299 \ + --hash=sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd \ + --hash=sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a \ + --hash=sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3 \ + --hash=sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037 \ + --hash=sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94 \ + --hash=sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c \ + --hash=sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858 \ + --hash=sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a \ + --hash=sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449 \ + --hash=sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c \ + --hash=sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918 \ + --hash=sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1 \ + --hash=sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c \ + --hash=sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac \ + --hash=sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa # via requests click==8.0.4 \ --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ @@ -97,121 +170,152 @@ colorlog==6.7.0 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 # via gcp-docuploader -cryptography==39.0.1 \ - --hash=sha256:0f8da300b5c8af9f98111ffd512910bc792b4c77392a9523624680f7956a99d4 \ - --hash=sha256:35f7c7d015d474f4011e859e93e789c87d21f6f4880ebdc29896a60403328f1f \ - --hash=sha256:5aa67414fcdfa22cf052e640cb5ddc461924a045cacf325cd164e65312d99502 \ - --hash=sha256:5d2d8b87a490bfcd407ed9d49093793d0f75198a35e6eb1a923ce1ee86c62b41 \ - --hash=sha256:6687ef6d0a6497e2b58e7c5b852b53f62142cfa7cd1555795758934da363a965 \ - --hash=sha256:6f8ba7f0328b79f08bdacc3e4e66fb4d7aab0c3584e0bd41328dce5262e26b2e \ - --hash=sha256:706843b48f9a3f9b9911979761c91541e3d90db1ca905fd63fee540a217698bc \ - --hash=sha256:807ce09d4434881ca3a7594733669bd834f5b2c6d5c7e36f8c00f691887042ad \ - --hash=sha256:83e17b26de248c33f3acffb922748151d71827d6021d98c70e6c1a25ddd78505 \ - --hash=sha256:96f1157a7c08b5b189b16b47bc9db2332269d6680a196341bf30046330d15388 \ - --hash=sha256:aec5a6c9864be7df2240c382740fcf3b96928c46604eaa7f3091f58b878c0bb6 \ - --hash=sha256:b0afd054cd42f3d213bf82c629efb1ee5f22eba35bf0eec88ea9ea7304f511a2 \ - --hash=sha256:ced4e447ae29ca194449a3f1ce132ded8fcab06971ef5f618605aacaa612beac \ - --hash=sha256:d1f6198ee6d9148405e49887803907fe8962a23e6c6f83ea7d98f1c0de375695 \ - --hash=sha256:e124352fd3db36a9d4a21c1aa27fd5d051e621845cb87fb851c08f4f75ce8be6 \ - --hash=sha256:e422abdec8b5fa8462aa016786680720d78bdce7a30c652b7fadf83a4ba35336 \ - --hash=sha256:ef8b72fa70b348724ff1218267e7f7375b8de4e8194d1636ee60510aae104cd0 \ - --hash=sha256:f0c64d1bd842ca2633e74a1a28033d139368ad959872533b1bab8c80e8240a0c \ - --hash=sha256:f24077a3b5298a5a06a8e0536e3ea9ec60e4c7ac486755e5fb6e6ea9b3500106 \ - --hash=sha256:fdd188c8a6ef8769f148f88f859884507b954cc64db6b52f66ef199bb9ad660a \ - --hash=sha256:fe913f20024eb2cb2f323e42a64bdf2911bb9738a15dba7d3cce48151034e3a8 +cryptography==41.0.6 \ + --hash=sha256:068bc551698c234742c40049e46840843f3d98ad7ce265fd2bd4ec0d11306596 \ + --hash=sha256:0f27acb55a4e77b9be8d550d762b0513ef3fc658cd3eb15110ebbcbd626db12c \ + --hash=sha256:2132d5865eea673fe6712c2ed5fb4fa49dba10768bb4cc798345748380ee3660 \ + --hash=sha256:3288acccef021e3c3c10d58933f44e8602cf04dba96d9796d70d537bb2f4bbc4 \ + --hash=sha256:35f3f288e83c3f6f10752467c48919a7a94b7d88cc00b0668372a0d2ad4f8ead \ + --hash=sha256:398ae1fc711b5eb78e977daa3cbf47cec20f2c08c5da129b7a296055fbb22aed \ + --hash=sha256:422e3e31d63743855e43e5a6fcc8b4acab860f560f9321b0ee6269cc7ed70cc3 \ + --hash=sha256:48783b7e2bef51224020efb61b42704207dde583d7e371ef8fc2a5fb6c0aabc7 \ + --hash=sha256:4d03186af98b1c01a4eda396b137f29e4e3fb0173e30f885e27acec8823c1b09 \ + --hash=sha256:5daeb18e7886a358064a68dbcaf441c036cbdb7da52ae744e7b9207b04d3908c \ + --hash=sha256:60e746b11b937911dc70d164060d28d273e31853bb359e2b2033c9e93e6f3c43 \ + --hash=sha256:742ae5e9a2310e9dade7932f9576606836ed174da3c7d26bc3d3ab4bd49b9f65 \ + --hash=sha256:7e00fb556bda398b99b0da289ce7053639d33b572847181d6483ad89835115f6 \ + --hash=sha256:85abd057699b98fce40b41737afb234fef05c67e116f6f3650782c10862c43da \ + --hash=sha256:8efb2af8d4ba9dbc9c9dd8f04d19a7abb5b49eab1f3694e7b5a16a5fc2856f5c \ + --hash=sha256:ae236bb8760c1e55b7a39b6d4d32d2279bc6c7c8500b7d5a13b6fb9fc97be35b \ + --hash=sha256:afda76d84b053923c27ede5edc1ed7d53e3c9f475ebaf63c68e69f1403c405a8 \ + --hash=sha256:b27a7fd4229abef715e064269d98a7e2909ebf92eb6912a9603c7e14c181928c \ + --hash=sha256:b648fe2a45e426aaee684ddca2632f62ec4613ef362f4d681a9a6283d10e079d \ + --hash=sha256:c5a550dc7a3b50b116323e3d376241829fd326ac47bc195e04eb33a8170902a9 \ + --hash=sha256:da46e2b5df770070412c46f87bac0849b8d685c5f2679771de277a422c7d0b86 \ + --hash=sha256:f39812f70fc5c71a15aa3c97b2bbe213c3f2a460b79bd21c40d033bb34a9bf36 \ + --hash=sha256:ff369dd19e8fe0528b02e8df9f2aeb2479f89b1270d90f96a63500afe9af5cae # via # gcp-releasetool # secretstorage -gcp-docuploader==0.6.4 \ - --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \ - --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf +gcp-docuploader==0.6.5 \ + --hash=sha256:30221d4ac3e5a2b9c69aa52fdbef68cc3f27d0e6d0d90e220fc024584b8d2318 \ + --hash=sha256:b7458ef93f605b9d46a4bf3a8dc1755dad1f31d030c8679edf304e343b347eea # via -r requirements.in -gcp-releasetool==1.10.5 \ - --hash=sha256:174b7b102d704b254f2a26a3eda2c684fd3543320ec239baf771542a2e58e109 \ - --hash=sha256:e29d29927fe2ca493105a82958c6873bb2b90d503acac56be2c229e74de0eec9 +gcp-releasetool==1.16.0 \ + --hash=sha256:27bf19d2e87aaa884096ff941aa3c592c482be3d6a2bfe6f06afafa6af2353e3 \ + --hash=sha256:a316b197a543fd036209d0caba7a8eb4d236d8e65381c80cbc6d7efaa7606d63 # via -r requirements.in -google-api-core==2.8.2 \ - --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ - --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 +google-api-core==2.11.1 \ + --hash=sha256:25d29e05a0058ed5f19c61c0a78b1b53adea4d9364b464d014fbda941f6d1c9a \ + --hash=sha256:d92a5a92dc36dd4f4b9ee4e55528a90e432b059f93aee6ad857f9de8cc7ae94a # via # google-cloud-core # google-cloud-storage -google-auth==2.14.1 \ - --hash=sha256:ccaa901f31ad5cbb562615eb8b664b3dd0bf5404a67618e642307f00613eda4d \ - --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016 +google-auth==2.22.0 \ + --hash=sha256:164cba9af4e6e4e40c3a4f90a1a6c12ee56f14c0b4868d1ca91b32826ab334ce \ + --hash=sha256:d61d1b40897407b574da67da1a833bdc10d5a11642566e506565d1b1a46ba873 # via # gcp-releasetool # google-api-core # google-cloud-core # google-cloud-storage -google-cloud-core==2.3.1 \ - --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ - --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 +google-cloud-core==2.3.3 \ + --hash=sha256:37b80273c8d7eee1ae816b3a20ae43585ea50506cb0e60f3cf5be5f87f1373cb \ + --hash=sha256:fbd11cad3e98a7e5b0343dc07cb1039a5ffd7a5bb96e1f1e27cee4bda4a90863 # via google-cloud-storage -google-cloud-storage==2.0.0 \ - --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ - --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 +google-cloud-storage==2.10.0 \ + --hash=sha256:934b31ead5f3994e5360f9ff5750982c5b6b11604dc072bc452c25965e076dc7 \ + --hash=sha256:9433cf28801671de1c80434238fb1e7e4a1ba3087470e90f70c928ea77c2b9d7 # via gcp-docuploader -google-crc32c==1.3.0 \ - --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ - --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ - --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ - --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ - --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ - --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ - --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ - --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ - --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ - --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ - --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ - --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ - --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ - --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ - --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ - --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ - --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ - --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ - --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ - --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ - --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ - --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ - --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ - --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ - --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ - --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ - --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ - --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ - --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ - --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ - --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ - --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ - --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ - --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ - --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ - --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ - --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ - --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ - --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ - --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ - --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ - --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ - --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 +google-crc32c==1.5.0 \ + --hash=sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a \ + --hash=sha256:02c65b9817512edc6a4ae7c7e987fea799d2e0ee40c53ec573a692bee24de876 \ + --hash=sha256:02ebb8bf46c13e36998aeaad1de9b48f4caf545e91d14041270d9dca767b780c \ + --hash=sha256:07eb3c611ce363c51a933bf6bd7f8e3878a51d124acfc89452a75120bc436289 \ + --hash=sha256:1034d91442ead5a95b5aaef90dbfaca8633b0247d1e41621d1e9f9db88c36298 \ + --hash=sha256:116a7c3c616dd14a3de8c64a965828b197e5f2d121fedd2f8c5585c547e87b02 \ + --hash=sha256:19e0a019d2c4dcc5e598cd4a4bc7b008546b0358bd322537c74ad47a5386884f \ + --hash=sha256:1c7abdac90433b09bad6c43a43af253e688c9cfc1c86d332aed13f9a7c7f65e2 \ + --hash=sha256:1e986b206dae4476f41bcec1faa057851f3889503a70e1bdb2378d406223994a \ + --hash=sha256:272d3892a1e1a2dbc39cc5cde96834c236d5327e2122d3aaa19f6614531bb6eb \ + --hash=sha256:278d2ed7c16cfc075c91378c4f47924c0625f5fc84b2d50d921b18b7975bd210 \ + --hash=sha256:2ad40e31093a4af319dadf503b2467ccdc8f67c72e4bcba97f8c10cb078207b5 \ + --hash=sha256:2e920d506ec85eb4ba50cd4228c2bec05642894d4c73c59b3a2fe20346bd00ee \ + --hash=sha256:3359fc442a743e870f4588fcf5dcbc1bf929df1fad8fb9905cd94e5edb02e84c \ + --hash=sha256:37933ec6e693e51a5b07505bd05de57eee12f3e8c32b07da7e73669398e6630a \ + --hash=sha256:398af5e3ba9cf768787eef45c803ff9614cc3e22a5b2f7d7ae116df8b11e3314 \ + --hash=sha256:3b747a674c20a67343cb61d43fdd9207ce5da6a99f629c6e2541aa0e89215bcd \ + --hash=sha256:461665ff58895f508e2866824a47bdee72497b091c730071f2b7575d5762ab65 \ + --hash=sha256:4c6fdd4fccbec90cc8a01fc00773fcd5fa28db683c116ee3cb35cd5da9ef6c37 \ + --hash=sha256:5829b792bf5822fd0a6f6eb34c5f81dd074f01d570ed7f36aa101d6fc7a0a6e4 \ + --hash=sha256:596d1f98fc70232fcb6590c439f43b350cb762fb5d61ce7b0e9db4539654cc13 \ + --hash=sha256:5ae44e10a8e3407dbe138984f21e536583f2bba1be9491239f942c2464ac0894 \ + --hash=sha256:635f5d4dd18758a1fbd1049a8e8d2fee4ffed124462d837d1a02a0e009c3ab31 \ + --hash=sha256:64e52e2b3970bd891309c113b54cf0e4384762c934d5ae56e283f9a0afcd953e \ + --hash=sha256:66741ef4ee08ea0b2cc3c86916ab66b6aef03768525627fd6a1b34968b4e3709 \ + --hash=sha256:67b741654b851abafb7bc625b6d1cdd520a379074e64b6a128e3b688c3c04740 \ + --hash=sha256:6ac08d24c1f16bd2bf5eca8eaf8304812f44af5cfe5062006ec676e7e1d50afc \ + --hash=sha256:6f998db4e71b645350b9ac28a2167e6632c239963ca9da411523bb439c5c514d \ + --hash=sha256:72218785ce41b9cfd2fc1d6a017dc1ff7acfc4c17d01053265c41a2c0cc39b8c \ + --hash=sha256:74dea7751d98034887dbd821b7aae3e1d36eda111d6ca36c206c44478035709c \ + --hash=sha256:759ce4851a4bb15ecabae28f4d2e18983c244eddd767f560165563bf9aefbc8d \ + --hash=sha256:77e2fd3057c9d78e225fa0a2160f96b64a824de17840351b26825b0848022906 \ + --hash=sha256:7c074fece789b5034b9b1404a1f8208fc2d4c6ce9decdd16e8220c5a793e6f61 \ + --hash=sha256:7c42c70cd1d362284289c6273adda4c6af8039a8ae12dc451dcd61cdabb8ab57 \ + --hash=sha256:7f57f14606cd1dd0f0de396e1e53824c371e9544a822648cd76c034d209b559c \ + --hash=sha256:83c681c526a3439b5cf94f7420471705bbf96262f49a6fe546a6db5f687a3d4a \ + --hash=sha256:8485b340a6a9e76c62a7dce3c98e5f102c9219f4cfbf896a00cf48caf078d438 \ + --hash=sha256:84e6e8cd997930fc66d5bb4fde61e2b62ba19d62b7abd7a69920406f9ecca946 \ + --hash=sha256:89284716bc6a5a415d4eaa11b1726d2d60a0cd12aadf5439828353662ede9dd7 \ + --hash=sha256:8b87e1a59c38f275c0e3676fc2ab6d59eccecfd460be267ac360cc31f7bcde96 \ + --hash=sha256:8f24ed114432de109aa9fd317278518a5af2d31ac2ea6b952b2f7782b43da091 \ + --hash=sha256:98cb4d057f285bd80d8778ebc4fde6b4d509ac3f331758fb1528b733215443ae \ + --hash=sha256:998679bf62b7fb599d2878aa3ed06b9ce688b8974893e7223c60db155f26bd8d \ + --hash=sha256:9ba053c5f50430a3fcfd36f75aff9caeba0440b2d076afdb79a318d6ca245f88 \ + --hash=sha256:9c99616c853bb585301df6de07ca2cadad344fd1ada6d62bb30aec05219c45d2 \ + --hash=sha256:a1fd716e7a01f8e717490fbe2e431d2905ab8aa598b9b12f8d10abebb36b04dd \ + --hash=sha256:a2355cba1f4ad8b6988a4ca3feed5bff33f6af2d7f134852cf279c2aebfde541 \ + --hash=sha256:b1f8133c9a275df5613a451e73f36c2aea4fe13c5c8997e22cf355ebd7bd0728 \ + --hash=sha256:b8667b48e7a7ef66afba2c81e1094ef526388d35b873966d8a9a447974ed9178 \ + --hash=sha256:ba1eb1843304b1e5537e1fca632fa894d6f6deca8d6389636ee5b4797affb968 \ + --hash=sha256:be82c3c8cfb15b30f36768797a640e800513793d6ae1724aaaafe5bf86f8f346 \ + --hash=sha256:c02ec1c5856179f171e032a31d6f8bf84e5a75c45c33b2e20a3de353b266ebd8 \ + --hash=sha256:c672d99a345849301784604bfeaeba4db0c7aae50b95be04dd651fd2a7310b93 \ + --hash=sha256:c6c777a480337ac14f38564ac88ae82d4cd238bf293f0a22295b66eb89ffced7 \ + --hash=sha256:cae0274952c079886567f3f4f685bcaf5708f0a23a5f5216fdab71f81a6c0273 \ + --hash=sha256:cd67cf24a553339d5062eff51013780a00d6f97a39ca062781d06b3a73b15462 \ + --hash=sha256:d3515f198eaa2f0ed49f8819d5732d70698c3fa37384146079b3799b97667a94 \ + --hash=sha256:d5280312b9af0976231f9e317c20e4a61cd2f9629b7bfea6a693d1878a264ebd \ + --hash=sha256:de06adc872bcd8c2a4e0dc51250e9e65ef2ca91be023b9d13ebd67c2ba552e1e \ + --hash=sha256:e1674e4307fa3024fc897ca774e9c7562c957af85df55efe2988ed9056dc4e57 \ + --hash=sha256:e2096eddb4e7c7bdae4bd69ad364e55e07b8316653234a56552d9c988bd2d61b \ + --hash=sha256:e560628513ed34759456a416bf86b54b2476c59144a9138165c9a1575801d0d9 \ + --hash=sha256:edfedb64740750e1a3b16152620220f51d58ff1b4abceb339ca92e934775c27a \ + --hash=sha256:f13cae8cc389a440def0c8c52057f37359014ccbc9dc1f0827936bcd367c6100 \ + --hash=sha256:f314013e7dcd5cf45ab1945d92e713eec788166262ae8deb2cfacd53def27325 \ + --hash=sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183 \ + --hash=sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556 \ + --hash=sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4 # via google-resumable-media -google-resumable-media==2.3.3 \ - --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ - --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 +google-resumable-media==2.5.0 \ + --hash=sha256:218931e8e2b2a73a58eb354a288e03a0fd5fb1c4583261ac6e4c078666468c93 \ + --hash=sha256:da1bd943e2e114a56d85d6848497ebf9be6a14d3db23e9fc57581e7c3e8170ec # via google-cloud-storage -googleapis-common-protos==1.56.3 \ - --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ - --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 +googleapis-common-protos==1.59.1 \ + --hash=sha256:0cbedb6fb68f1c07e18eb4c48256320777707e7d0c55063ae56c15db3224a61e \ + --hash=sha256:b35d530fe825fb4227857bc47ad84c33c809ac96f312e13182bdeaa2abe1178a # via google-api-core idna==3.4 \ --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 # via requests -importlib-metadata==4.8.3 \ - --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ - --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 +importlib-metadata==6.8.0 \ + --hash=sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb \ + --hash=sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743 + # via keyring +jaraco-classes==3.3.0 \ + --hash=sha256:10afa92b6743f25c0cf5f37c6bb6e18e2c5bb84a16527ccfc0040ea377e7aaeb \ + --hash=sha256:c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621 # via keyring jeepney==0.8.0 \ --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ @@ -219,139 +323,120 @@ jeepney==0.8.0 \ # via # keyring # secretstorage -jinja2==3.0.3 \ - --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ - --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 +jinja2==3.1.2 \ + --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ + --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 # via gcp-releasetool -keyring==23.4.1 \ - --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ - --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 +keyring==24.2.0 \ + --hash=sha256:4901caaf597bfd3bbd78c9a0c7c4c29fcd8310dab2cffefe749e916b6527acd6 \ + --hash=sha256:ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509 # via gcp-releasetool -markupsafe==2.0.1 \ - --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ - --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ - --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ - --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ - --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ - --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ - --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ - --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ - --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ - --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ - --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ - --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ - --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ - --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ - --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ - --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ - --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ - --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ - --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ - --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ - --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ - --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ - --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ - --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ - --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ - --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ - --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ - --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ - --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ - --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ - --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ - --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ - --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ - --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ - --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ - --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ - --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ - --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ - --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ - --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ - --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ - --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ - --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ - --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ - --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ - --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ - --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ - --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ - --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ - --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ - --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ - --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ - --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ - --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ - --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ - --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ - --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ - --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ - --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ - --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ - --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ - --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ - --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ - --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ - --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ - --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ - --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ - --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ - --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 +markupsafe==2.1.3 \ + --hash=sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e \ + --hash=sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e \ + --hash=sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431 \ + --hash=sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686 \ + --hash=sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559 \ + --hash=sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc \ + --hash=sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c \ + --hash=sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0 \ + --hash=sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4 \ + --hash=sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9 \ + --hash=sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575 \ + --hash=sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba \ + --hash=sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d \ + --hash=sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3 \ + --hash=sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00 \ + --hash=sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155 \ + --hash=sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac \ + --hash=sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52 \ + --hash=sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f \ + --hash=sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8 \ + --hash=sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b \ + --hash=sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24 \ + --hash=sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea \ + --hash=sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198 \ + --hash=sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0 \ + --hash=sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee \ + --hash=sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be \ + --hash=sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2 \ + --hash=sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707 \ + --hash=sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6 \ + --hash=sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58 \ + --hash=sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779 \ + --hash=sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636 \ + --hash=sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c \ + --hash=sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad \ + --hash=sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee \ + --hash=sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc \ + --hash=sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2 \ + --hash=sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48 \ + --hash=sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7 \ + --hash=sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e \ + --hash=sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b \ + --hash=sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa \ + --hash=sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5 \ + --hash=sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e \ + --hash=sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb \ + --hash=sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9 \ + --hash=sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57 \ + --hash=sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc \ + --hash=sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2 # via jinja2 -packaging==21.3 \ - --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ - --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 +more-itertools==9.1.0 \ + --hash=sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d \ + --hash=sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3 + # via jaraco-classes +packaging==23.1 \ + --hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \ + --hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f # via gcp-releasetool -protobuf==3.20.2 \ - --hash=sha256:03d76b7bd42ac4a6e109742a4edf81ffe26ffd87c5993126d894fe48a120396a \ - --hash=sha256:09e25909c4297d71d97612f04f41cea8fa8510096864f2835ad2f3b3df5a5559 \ - --hash=sha256:18e34a10ae10d458b027d7638a599c964b030c1739ebd035a1dfc0e22baa3bfe \ - --hash=sha256:291fb4307094bf5ccc29f424b42268640e00d5240bf0d9b86bf3079f7576474d \ - --hash=sha256:2c0b040d0b5d5d207936ca2d02f00f765906622c07d3fa19c23a16a8ca71873f \ - --hash=sha256:384164994727f274cc34b8abd41a9e7e0562801361ee77437099ff6dfedd024b \ - --hash=sha256:3cb608e5a0eb61b8e00fe641d9f0282cd0eedb603be372f91f163cbfbca0ded0 \ - --hash=sha256:5d9402bf27d11e37801d1743eada54372f986a372ec9679673bfcc5c60441151 \ - --hash=sha256:712dca319eee507a1e7df3591e639a2b112a2f4a62d40fe7832a16fd19151750 \ - --hash=sha256:7a5037af4e76c975b88c3becdf53922b5ffa3f2cddf657574a4920a3b33b80f3 \ - --hash=sha256:8228e56a865c27163d5d1d1771d94b98194aa6917bcfb6ce139cbfa8e3c27334 \ - --hash=sha256:84a1544252a933ef07bb0b5ef13afe7c36232a774affa673fc3636f7cee1db6c \ - --hash=sha256:84fe5953b18a383fd4495d375fe16e1e55e0a3afe7b4f7b4d01a3a0649fcda9d \ - --hash=sha256:9c673c8bfdf52f903081816b9e0e612186684f4eb4c17eeb729133022d6032e3 \ - --hash=sha256:a9e5ae5a8e8985c67e8944c23035a0dff2c26b0f5070b2f55b217a1c33bbe8b1 \ - --hash=sha256:b4fdb29c5a7406e3f7ef176b2a7079baa68b5b854f364c21abe327bbeec01cdb \ - --hash=sha256:c184485e0dfba4dfd451c3bd348c2e685d6523543a0f91b9fd4ae90eb09e8422 \ - --hash=sha256:c9cdf251c582c16fd6a9f5e95836c90828d51b0069ad22f463761d27c6c19019 \ - --hash=sha256:e39cf61bb8582bda88cdfebc0db163b774e7e03364bbf9ce1ead13863e81e359 \ - --hash=sha256:e8fbc522303e09036c752a0afcc5c0603e917222d8bedc02813fd73b4b4ed804 \ - --hash=sha256:f34464ab1207114e73bba0794d1257c150a2b89b7a9faf504e00af7c9fd58978 \ - --hash=sha256:f52dabc96ca99ebd2169dadbe018824ebda08a795c7684a0b7d203a290f3adb0 +protobuf==3.20.3 \ + --hash=sha256:03038ac1cfbc41aa21f6afcbcd357281d7521b4157926f30ebecc8d4ea59dcb7 \ + --hash=sha256:28545383d61f55b57cf4df63eebd9827754fd2dc25f80c5253f9184235db242c \ + --hash=sha256:2e3427429c9cffebf259491be0af70189607f365c2f41c7c3764af6f337105f2 \ + --hash=sha256:398a9e0c3eaceb34ec1aee71894ca3299605fa8e761544934378bbc6c97de23b \ + --hash=sha256:44246bab5dd4b7fbd3c0c80b6f16686808fab0e4aca819ade6e8d294a29c7050 \ + --hash=sha256:447d43819997825d4e71bf5769d869b968ce96848b6479397e29fc24c4a5dfe9 \ + --hash=sha256:67a3598f0a2dcbc58d02dd1928544e7d88f764b47d4a286202913f0b2801c2e7 \ + --hash=sha256:74480f79a023f90dc6e18febbf7b8bac7508420f2006fabd512013c0c238f454 \ + --hash=sha256:819559cafa1a373b7096a482b504ae8a857c89593cf3a25af743ac9ecbd23480 \ + --hash=sha256:899dc660cd599d7352d6f10d83c95df430a38b410c1b66b407a6b29265d66469 \ + --hash=sha256:8c0c984a1b8fef4086329ff8dd19ac77576b384079247c770f29cc8ce3afa06c \ + --hash=sha256:9aae4406ea63d825636cc11ffb34ad3379335803216ee3a856787bcf5ccc751e \ + --hash=sha256:a7ca6d488aa8ff7f329d4c545b2dbad8ac31464f1d8b1c87ad1346717731e4db \ + --hash=sha256:b6cc7ba72a8850621bfec987cb72623e703b7fe2b9127a161ce61e61558ad905 \ + --hash=sha256:bf01b5720be110540be4286e791db73f84a2b721072a3711efff6c324cdf074b \ + --hash=sha256:c02ce36ec760252242a33967d51c289fd0e1c0e6e5cc9397e2279177716add86 \ + --hash=sha256:d9e4432ff660d67d775c66ac42a67cf2453c27cb4d738fc22cb53b5d84c135d4 \ + --hash=sha256:daa564862dd0d39c00f8086f88700fdbe8bc717e993a21e90711acfed02f2402 \ + --hash=sha256:de78575669dddf6099a8a0f46a27e82a1783c557ccc38ee620ed8cc96d3be7d7 \ + --hash=sha256:e64857f395505ebf3d2569935506ae0dfc4a15cb80dc25261176c784662cdcc4 \ + --hash=sha256:f4bd856d702e5b0d96a00ec6b307b0f51c1982c2bf9c0052cf9019e9a544ba99 \ + --hash=sha256:f4c42102bc82a51108e449cbb32b19b180022941c727bac0cfd50170341f16ee # via # gcp-docuploader # gcp-releasetool # google-api-core - # google-cloud-storage -pyasn1==0.4.8 \ - --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ - --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # googleapis-common-protos +pyasn1==0.5.0 \ + --hash=sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57 \ + --hash=sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde # via # pyasn1-modules # rsa -pyasn1-modules==0.2.8 \ - --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ - --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 +pyasn1-modules==0.3.0 \ + --hash=sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c \ + --hash=sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d # via google-auth pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pyjwt==2.4.0 \ - --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ - --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba +pyjwt==2.7.0 \ + --hash=sha256:ba2b425b15ad5ef12f200dc67dd56af4e26de2331f965c5439994dad075876e1 \ + --hash=sha256:bd6ca4a3c4285c1a2d4349e5a035fdf8fb94e04ccd0fcbe6ba289dae9cc3e074 # via gcp-releasetool -pyparsing==3.0.9 \ - --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ - --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc - # via packaging pyperclip==1.8.2 \ --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 # via gcp-releasetool @@ -359,9 +444,9 @@ python-dateutil==2.8.2 \ --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 # via gcp-releasetool -requests==2.27.1 \ - --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ - --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d +requests==2.31.0 \ + --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ + --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 # via # gcp-releasetool # google-api-core @@ -374,10 +459,6 @@ secretstorage==3.3.3 \ --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 # via keyring -setuptools==67.3.2 \ - --hash=sha256:95f00380ef2ffa41d9bba85d95b27689d923c93dfbafed4aecd7cf988a25e012 \ - --hash=sha256:bb6d8e508de562768f2027902929f8523932fcd1fb784e6d573d2cafac995a48 - # via -r requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 @@ -385,19 +466,26 @@ six==1.16.0 \ # gcp-docuploader # google-auth # python-dateutil -typing-extensions==4.4.0 \ - --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ - --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e +typing-extensions==4.7.1 \ + --hash=sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36 \ + --hash=sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2 # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 - # via requests -wheel==0.38.4 \ - --hash=sha256:965f5259b566725405b05e7cf774052044b1ed30119b5d586b2703aafe8719ac \ - --hash=sha256:b60533f3f5d530e971d6737ca6d58681ee434818fab630c83a734bb10c083ce8 +urllib3==1.26.18 \ + --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ + --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 + # via + # google-auth + # requests +wheel==0.40.0 \ + --hash=sha256:cd1196f3faee2b31968d626e1731c94f99cbdb67cf5a46e4f5656cbee7738873 \ + --hash=sha256:d236b20e7cb522daf2390fa84c55eea81c5c30190f90f29ae2ca1ad8355bf247 # via -r requirements.in -zipp==3.6.0 \ - --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ - --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc +zipp==3.16.1 \ + --hash=sha256:0b37c326d826d5ca35f2b9685cd750292740774ef16190008b00a0227c256fe0 \ + --hash=sha256:857b158da2cbf427b376da1c24fd11faecbac5a4ac7523c3607f8a01f94c2ec0 # via importlib-metadata + +# WARNING: The following packages were not pinned, but pip requires them to be +# pinned when the requirements file includes hashes and the requirement is not +# satisfied by a package already installed. Consider using the --allow-unsafe flag. +# setuptools From 8e3f4d50fbaa93bfada9e20c67293a63a64e68f9 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 23 Jan 2024 11:54:08 -0500 Subject: [PATCH 826/983] deps: testing exlcusing commons-logging (#1905) --- google-http-client/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ff9bb0e76..4d45affa1 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -126,6 +126,12 @@ org.apache.httpcomponents httpclient + + + commons-logging + commons-logging + + org.apache.httpcomponents From f23e9b1c549b0a0668f433729eea846385ea822c Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Tue, 23 Jan 2024 15:40:26 -0500 Subject: [PATCH 827/983] deps: newer grpc-context to override old one (#1916) * deps: newer grpc-context to override old one * chore: ignoredUnusedDeclaredDependencies --- google-http-client/pom.xml | 15 +++++++++++++-- pom.xml | 5 +++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 4d45affa1..ddfdf170d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -21,9 +21,11 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.0 - io.opencensus:opencensus-impl + + io.opencensus:opencensus-impl + io.grpc:grpc-context + @@ -153,6 +155,15 @@ com.google.j2objc j2objc-annotations + + + io.grpc + grpc-context + io.opencensus opencensus-api diff --git a/pom.xml b/pom.xml index c7c2f5c53..1e4b733be 100644 --- a/pom.xml +++ b/pom.xml @@ -238,6 +238,11 @@ j2objc-annotations 2.8 + + io.grpc + grpc-context + 1.60.1 + io.opencensus opencensus-api From 00914131afe5b12c14e472ee0a88ff298374965b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 23 Jan 2024 21:41:00 +0100 Subject: [PATCH 828/983] deps: update project.appengine.version to v2.0.24 (#1889) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e4b733be..323463bd4 100644 --- a/pom.xml +++ b/pom.xml @@ -580,7 +580,7 @@ - Internally, update the default features.json file --> 1.43.4-SNAPSHOT - 2.0.12 + 2.0.24 UTF-8 3.0.2 2.10.1 From f39002001bd666cb1eb839d54454aa742638f642 Mon Sep 17 00:00:00 2001 From: Al Arafat Tanin <140037180+rng70-or@users.noreply.github.com> Date: Wed, 24 Jan 2024 03:17:23 +0600 Subject: [PATCH 829/983] fix: serialVersionUID fix for Serializable Classes (#1883) --- .../src/main/java/com/google/api/client/util/DateTime.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java index 4caf768ce..2aa914e9c 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/DateTime.java +++ b/google-http-client/src/main/java/com/google/api/client/util/DateTime.java @@ -292,6 +292,8 @@ public static SecondsAndNanos parseRfc3339ToSecondsAndNanos(String str) { /** A timestamp represented as the number of seconds and nanoseconds since Epoch. */ public static final class SecondsAndNanos implements Serializable { + private static long serialVersionUID = 1L; + private final long seconds; private final int nanos; @@ -337,6 +339,8 @@ public String toString() { /** Result of parsing an RFC 3339 string. */ private static class Rfc3339ParseResult implements Serializable { + private static final long serialVersionUID = 1L; + private final long seconds; private final int nanos; private final boolean timeGiven; From 7d7ace9d18b1dcec9ac4c326571d146540cbd31d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:57:12 -0500 Subject: [PATCH 830/983] chore(main): release 1.44.0 (#1872) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 22 +++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 75 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edf452f73..70f9be750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [1.44.0](https://github.com/googleapis/google-http-java-client/compare/v1.43.3...v1.44.0) (2024-01-23) + + +### Features + +* Add isShutdown in HttpTransport ([#1901](https://github.com/googleapis/google-http-java-client/issues/1901)) ([be00ce1](https://github.com/googleapis/google-http-java-client/commit/be00ce1ef1873d3b80830966ddb83097e460601d)) +* Setup 1.43.x lts branch ([#1869](https://github.com/googleapis/google-http-java-client/issues/1869)) ([13edd13](https://github.com/googleapis/google-http-java-client/commit/13edd1357eb79535d943f5288ab3adf4d9dfb52a)) + + +### Bug Fixes + +* Native image configs for google-http-java-client ([#1893](https://github.com/googleapis/google-http-java-client/issues/1893)) ([1acedf7](https://github.com/googleapis/google-http-java-client/commit/1acedf75368f11ab03e5f84dd2c58a8a8a662d41)) +* SerialVersionUID fix for Serializable Classes ([#1883](https://github.com/googleapis/google-http-java-client/issues/1883)) ([f390020](https://github.com/googleapis/google-http-java-client/commit/f39002001bd666cb1eb839d54454aa742638f642)) + + +### Dependencies + +* Newer grpc-context to override old one ([#1916](https://github.com/googleapis/google-http-java-client/issues/1916)) ([f23e9b1](https://github.com/googleapis/google-http-java-client/commit/f23e9b1c549b0a0668f433729eea846385ea822c)) +* Testing exlcusing commons-logging ([#1905](https://github.com/googleapis/google-http-java-client/issues/1905)) ([8e3f4d5](https://github.com/googleapis/google-http-java-client/commit/8e3f4d50fbaa93bfada9e20c67293a63a64e68f9)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.23.0 ([#1887](https://github.com/googleapis/google-http-java-client/issues/1887)) ([ce5dbfc](https://github.com/googleapis/google-http-java-client/commit/ce5dbfc68c2cca989f57468a5a915cf9411267bb)) +* Update project.appengine.version to v2.0.24 ([#1889](https://github.com/googleapis/google-http-java-client/issues/1889)) ([0091413](https://github.com/googleapis/google-http-java-client/commit/00914131afe5b12c14e472ee0a88ff298374965b)) + ## [1.43.3](https://github.com/googleapis/google-http-java-client/compare/v1.43.2...v1.43.3) (2023-06-21) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 491108b12..a9f67cba0 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.43.4-SNAPSHOT + 1.44.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.43.4-SNAPSHOT + 1.44.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.43.4-SNAPSHOT + 1.44.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 9a598666b..6dfcd1daf 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-android - 1.43.4-SNAPSHOT + 1.44.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 654f3de9e..4c9a9cf90 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-apache-v2 - 1.43.4-SNAPSHOT + 1.44.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 16d872f59..3899d52b0 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-appengine - 1.43.4-SNAPSHOT + 1.44.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f8f11bb39..da704e88e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.43.4-SNAPSHOT + 1.44.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index f991ef8cd..94bcc5674 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.43.4-SNAPSHOT + 1.44.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-android - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-apache-v2 - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-appengine - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-findbugs - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-gson - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-jackson2 - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-protobuf - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-test - 1.43.4-SNAPSHOT + 1.44.0 com.google.http-client google-http-client-xml - 1.43.4-SNAPSHOT + 1.44.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index d3db2594b..0141b7b99 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-findbugs - 1.43.4-SNAPSHOT + 1.44.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 7065d13c2..38c014beb 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-gson - 1.43.4-SNAPSHOT + 1.44.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 3d65a2046..3ffe04466 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-jackson2 - 1.43.4-SNAPSHOT + 1.44.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index e341d4c9c..1c79dd9a9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-protobuf - 1.43.4-SNAPSHOT + 1.44.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 577606012..d654e2aa8 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-test - 1.43.4-SNAPSHOT + 1.44.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index ea84b12ee..61c097239 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client-xml - 1.43.4-SNAPSHOT + 1.44.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ddfdf170d..14b1058fa 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../pom.xml google-http-client - 1.43.4-SNAPSHOT + 1.44.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 323463bd4..620400a1f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -579,7 +579,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.43.4-SNAPSHOT + 1.44.0 2.0.24 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 65e8e36ca..39d02f737 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.43.4-SNAPSHOT + 1.44.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index ec8f500d1..e7e9d0636 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.43.3:1.43.4-SNAPSHOT -google-http-client-bom:1.43.3:1.43.4-SNAPSHOT -google-http-client-parent:1.43.3:1.43.4-SNAPSHOT -google-http-client-android:1.43.3:1.43.4-SNAPSHOT -google-http-client-android-test:1.43.3:1.43.4-SNAPSHOT -google-http-client-apache-v2:1.43.3:1.43.4-SNAPSHOT -google-http-client-appengine:1.43.3:1.43.4-SNAPSHOT -google-http-client-assembly:1.43.3:1.43.4-SNAPSHOT -google-http-client-findbugs:1.43.3:1.43.4-SNAPSHOT -google-http-client-gson:1.43.3:1.43.4-SNAPSHOT -google-http-client-jackson2:1.43.3:1.43.4-SNAPSHOT -google-http-client-protobuf:1.43.3:1.43.4-SNAPSHOT -google-http-client-test:1.43.3:1.43.4-SNAPSHOT -google-http-client-xml:1.43.3:1.43.4-SNAPSHOT +google-http-client:1.44.0:1.44.0 +google-http-client-bom:1.44.0:1.44.0 +google-http-client-parent:1.44.0:1.44.0 +google-http-client-android:1.44.0:1.44.0 +google-http-client-android-test:1.44.0:1.44.0 +google-http-client-apache-v2:1.44.0:1.44.0 +google-http-client-appengine:1.44.0:1.44.0 +google-http-client-assembly:1.44.0:1.44.0 +google-http-client-findbugs:1.44.0:1.44.0 +google-http-client-gson:1.44.0:1.44.0 +google-http-client-jackson2:1.44.0:1.44.0 +google-http-client-protobuf:1.44.0:1.44.0 +google-http-client-test:1.44.0:1.44.0 +google-http-client-xml:1.44.0:1.44.0 From f0b1b4ea6b57a81781ec9171b5fb62d53eb1ec18 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 22:00:21 +0000 Subject: [PATCH 831/983] chore(main): release 1.44.1-SNAPSHOT (#1917) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index a9f67cba0..e94d06a8c 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.0 + 1.44.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.0 + 1.44.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.0 + 1.44.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 6dfcd1daf..bf4267512 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-android - 1.44.0 + 1.44.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 4c9a9cf90..cbb1e9421 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.44.0 + 1.44.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3899d52b0..2839c448c 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.44.0 + 1.44.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index da704e88e..74c66e123 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.44.0 + 1.44.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 94bcc5674..85160b68d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.0 + 1.44.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-android - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-test - 1.44.0 + 1.44.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.44.0 + 1.44.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 0141b7b99..470fca132 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.44.0 + 1.44.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 38c014beb..6f1373977 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.44.0 + 1.44.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 3ffe04466..42178b61b 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.44.0 + 1.44.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 1c79dd9a9..0c598b1d5 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.44.0 + 1.44.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d654e2aa8..696efb20b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-test - 1.44.0 + 1.44.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 61c097239..cf7e7a5b5 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.44.0 + 1.44.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 14b1058fa..83b10d732 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../pom.xml google-http-client - 1.44.0 + 1.44.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 620400a1f..9e99fd796 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -579,7 +579,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.0 + 1.44.1-SNAPSHOT 2.0.24 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 39d02f737..ec8d07450 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.0 + 1.44.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index e7e9d0636..a42776652 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.44.0:1.44.0 -google-http-client-bom:1.44.0:1.44.0 -google-http-client-parent:1.44.0:1.44.0 -google-http-client-android:1.44.0:1.44.0 -google-http-client-android-test:1.44.0:1.44.0 -google-http-client-apache-v2:1.44.0:1.44.0 -google-http-client-appengine:1.44.0:1.44.0 -google-http-client-assembly:1.44.0:1.44.0 -google-http-client-findbugs:1.44.0:1.44.0 -google-http-client-gson:1.44.0:1.44.0 -google-http-client-jackson2:1.44.0:1.44.0 -google-http-client-protobuf:1.44.0:1.44.0 -google-http-client-test:1.44.0:1.44.0 -google-http-client-xml:1.44.0:1.44.0 +google-http-client:1.44.0:1.44.1-SNAPSHOT +google-http-client-bom:1.44.0:1.44.1-SNAPSHOT +google-http-client-parent:1.44.0:1.44.1-SNAPSHOT +google-http-client-android:1.44.0:1.44.1-SNAPSHOT +google-http-client-android-test:1.44.0:1.44.1-SNAPSHOT +google-http-client-apache-v2:1.44.0:1.44.1-SNAPSHOT +google-http-client-appengine:1.44.0:1.44.1-SNAPSHOT +google-http-client-assembly:1.44.0:1.44.1-SNAPSHOT +google-http-client-findbugs:1.44.0:1.44.1-SNAPSHOT +google-http-client-gson:1.44.0:1.44.1-SNAPSHOT +google-http-client-jackson2:1.44.0:1.44.1-SNAPSHOT +google-http-client-protobuf:1.44.0:1.44.1-SNAPSHOT +google-http-client-test:1.44.0:1.44.1-SNAPSHOT +google-http-client-xml:1.44.0:1.44.1-SNAPSHOT From f555f562d44ab83b2cb672fa351c665336043880 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Fri, 26 Jan 2024 19:22:16 +0000 Subject: [PATCH 832/983] chore: fix declaration of maven-source-plugin for v3.3.0 (#1922) * chore: fix declaration of maven-source-plugin for v3.3.0 --- google-http-client-android/pom.xml | 17 ++++------------- google-http-client-apache-v2/pom.xml | 9 --------- google-http-client-appengine/pom.xml | 9 --------- google-http-client-findbugs/pom.xml | 9 --------- google-http-client-gson/pom.xml | 9 --------- google-http-client-jackson2/pom.xml | 9 --------- google-http-client-protobuf/pom.xml | 9 --------- google-http-client-test/pom.xml | 9 --------- google-http-client-xml/pom.xml | 9 --------- google-http-client/pom.xml | 9 --------- pom.xml | 13 +++++++++++++ 11 files changed, 17 insertions(+), 94 deletions(-) diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index bf4267512..941231afa 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -23,18 +23,6 @@ ${project.artifactId} ${project.version} - - maven-source-plugin - - - source-jar - compile - - jar - - - - maven-jar-plugin @@ -44,7 +32,10 @@ - + + + maven-source-plugin + diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index cbb1e9421..b52e69ad3 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -25,15 +25,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 2839c448c..6e7ea0456 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -26,15 +26,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 470fca132..9a8b237d5 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -15,15 +15,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 6f1373977..fe6a7975c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -26,15 +26,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 42178b61b..c67d7e44d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -25,15 +25,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 0c598b1d5..481498714 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -32,15 +32,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.xolstice.maven.plugins diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 696efb20b..3a5c40548 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -25,15 +25,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index cf7e7a5b5..8cc1252c7 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -25,15 +25,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - org.codehaus.mojo diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 83b10d732..30353b399 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -72,15 +72,6 @@ maven-source-plugin - - - source-jar - compile - - jar - - - maven-jar-plugin diff --git a/pom.xml b/pom.xml index 9e99fd796..622298806 100644 --- a/pom.xml +++ b/pom.xml @@ -388,6 +388,19 @@ maven-enforcer-plugin 3.4.1 + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + From 973ee6726bcbcd6ef460eb86396d472f37d6f953 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 19:34:17 +0000 Subject: [PATCH 833/983] chore(main): release 1.44.1 (#1923) :robot: I have created a release *beep* *boop* --- ## [1.44.1](https://github.com/googleapis/google-http-java-client/compare/v1.44.0...v1.44.1) (2024-01-26) ### Bug Fixes * Fixing declaration of maven-source-plugin for release job ([f555f56](https://github.com/googleapis/google-http-java-client/commit/f555f562d44ab83b2cb672fa351c665336043880)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 60 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70f9be750..9d6cf6ea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.44.1](https://github.com/googleapis/google-http-java-client/compare/v1.44.0...v1.44.1) (2024-01-26) + + +### Bug Fixes + +* Fixing declaration of maven-source-plugin for release job ([f555f56](https://github.com/googleapis/google-http-java-client/commit/f555f562d44ab83b2cb672fa351c665336043880)) + ## [1.44.0](https://github.com/googleapis/google-http-java-client/compare/v1.43.3...v1.44.0) (2024-01-23) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index e94d06a8c..dae86cc1f 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.1-SNAPSHOT + 1.44.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.1-SNAPSHOT + 1.44.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.1-SNAPSHOT + 1.44.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 941231afa..511537e92 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-android - 1.44.1-SNAPSHOT + 1.44.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index b52e69ad3..c73c7203e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-apache-v2 - 1.44.1-SNAPSHOT + 1.44.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 6e7ea0456..e126ddfcd 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-appengine - 1.44.1-SNAPSHOT + 1.44.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 74c66e123..00ad6078b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.44.1-SNAPSHOT + 1.44.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 85160b68d..f03fd703e 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.1-SNAPSHOT + 1.44.1 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-android - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-apache-v2 - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-appengine - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-findbugs - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-gson - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-jackson2 - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-protobuf - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-test - 1.44.1-SNAPSHOT + 1.44.1 com.google.http-client google-http-client-xml - 1.44.1-SNAPSHOT + 1.44.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9a8b237d5..b3240e9c1 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-findbugs - 1.44.1-SNAPSHOT + 1.44.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index fe6a7975c..84596adc1 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-gson - 1.44.1-SNAPSHOT + 1.44.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c67d7e44d..d7c728ba8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-jackson2 - 1.44.1-SNAPSHOT + 1.44.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 481498714..4c2665d2f 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-protobuf - 1.44.1-SNAPSHOT + 1.44.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 3a5c40548..68ae883bf 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-test - 1.44.1-SNAPSHOT + 1.44.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 8cc1252c7..cc26d5707 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client-xml - 1.44.1-SNAPSHOT + 1.44.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 30353b399..5f558527f 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../pom.xml google-http-client - 1.44.1-SNAPSHOT + 1.44.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 622298806..da7a239bc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -592,7 +592,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.1-SNAPSHOT + 1.44.1 2.0.24 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ec8d07450..5ec375875 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.1-SNAPSHOT + 1.44.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index a42776652..60c91aaef 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.44.0:1.44.1-SNAPSHOT -google-http-client-bom:1.44.0:1.44.1-SNAPSHOT -google-http-client-parent:1.44.0:1.44.1-SNAPSHOT -google-http-client-android:1.44.0:1.44.1-SNAPSHOT -google-http-client-android-test:1.44.0:1.44.1-SNAPSHOT -google-http-client-apache-v2:1.44.0:1.44.1-SNAPSHOT -google-http-client-appengine:1.44.0:1.44.1-SNAPSHOT -google-http-client-assembly:1.44.0:1.44.1-SNAPSHOT -google-http-client-findbugs:1.44.0:1.44.1-SNAPSHOT -google-http-client-gson:1.44.0:1.44.1-SNAPSHOT -google-http-client-jackson2:1.44.0:1.44.1-SNAPSHOT -google-http-client-protobuf:1.44.0:1.44.1-SNAPSHOT -google-http-client-test:1.44.0:1.44.1-SNAPSHOT -google-http-client-xml:1.44.0:1.44.1-SNAPSHOT +google-http-client:1.44.1:1.44.1 +google-http-client-bom:1.44.1:1.44.1 +google-http-client-parent:1.44.1:1.44.1 +google-http-client-android:1.44.1:1.44.1 +google-http-client-android-test:1.44.1:1.44.1 +google-http-client-apache-v2:1.44.1:1.44.1 +google-http-client-appengine:1.44.1:1.44.1 +google-http-client-assembly:1.44.1:1.44.1 +google-http-client-findbugs:1.44.1:1.44.1 +google-http-client-gson:1.44.1:1.44.1 +google-http-client-jackson2:1.44.1:1.44.1 +google-http-client-protobuf:1.44.1:1.44.1 +google-http-client-test:1.44.1:1.44.1 +google-http-client-xml:1.44.1:1.44.1 From 5fefb3649a42dc0ef8b88bc2600e5b93561cf7fc Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Jan 2024 19:38:17 +0000 Subject: [PATCH 834/983] chore(main): release 1.44.2-SNAPSHOT (#1924) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index dae86cc1f..866d2f1bd 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.1 + 1.44.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.1 + 1.44.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.1 + 1.44.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 511537e92..720c3c91e 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-android - 1.44.1 + 1.44.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index c73c7203e..c54593ebb 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.44.1 + 1.44.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index e126ddfcd..91bc10bf4 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.44.1 + 1.44.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 00ad6078b..21c266f23 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.44.1 + 1.44.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index f03fd703e..108ac5e9f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.1 + 1.44.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-android - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-test - 1.44.1 + 1.44.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.44.1 + 1.44.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index b3240e9c1..c6ef961ae 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.44.1 + 1.44.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 84596adc1..15fc1d51a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.44.1 + 1.44.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d7c728ba8..05a06c4fd 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.44.1 + 1.44.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 4c2665d2f..de94f1eb6 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.44.1 + 1.44.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 68ae883bf..595e690cb 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-test - 1.44.1 + 1.44.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index cc26d5707..744a83e52 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.44.1 + 1.44.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5f558527f..22d6395a3 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../pom.xml google-http-client - 1.44.1 + 1.44.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index da7a239bc..3994eb72b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -592,7 +592,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.1 + 1.44.2-SNAPSHOT 2.0.24 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 5ec375875..25021bca0 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.1 + 1.44.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 60c91aaef..59ea2f4a7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.44.1:1.44.1 -google-http-client-bom:1.44.1:1.44.1 -google-http-client-parent:1.44.1:1.44.1 -google-http-client-android:1.44.1:1.44.1 -google-http-client-android-test:1.44.1:1.44.1 -google-http-client-apache-v2:1.44.1:1.44.1 -google-http-client-appengine:1.44.1:1.44.1 -google-http-client-assembly:1.44.1:1.44.1 -google-http-client-findbugs:1.44.1:1.44.1 -google-http-client-gson:1.44.1:1.44.1 -google-http-client-jackson2:1.44.1:1.44.1 -google-http-client-protobuf:1.44.1:1.44.1 -google-http-client-test:1.44.1:1.44.1 -google-http-client-xml:1.44.1:1.44.1 +google-http-client:1.44.1:1.44.2-SNAPSHOT +google-http-client-bom:1.44.1:1.44.2-SNAPSHOT +google-http-client-parent:1.44.1:1.44.2-SNAPSHOT +google-http-client-android:1.44.1:1.44.2-SNAPSHOT +google-http-client-android-test:1.44.1:1.44.2-SNAPSHOT +google-http-client-apache-v2:1.44.1:1.44.2-SNAPSHOT +google-http-client-appengine:1.44.1:1.44.2-SNAPSHOT +google-http-client-assembly:1.44.1:1.44.2-SNAPSHOT +google-http-client-findbugs:1.44.1:1.44.2-SNAPSHOT +google-http-client-gson:1.44.1:1.44.2-SNAPSHOT +google-http-client-jackson2:1.44.1:1.44.2-SNAPSHOT +google-http-client-protobuf:1.44.1:1.44.2-SNAPSHOT +google-http-client-test:1.44.1:1.44.2-SNAPSHOT +google-http-client-xml:1.44.1:1.44.2-SNAPSHOT From 9c47ab68b41353b2331568f5b3ef5610ea4b9feb Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 16 Feb 2024 13:24:15 -0500 Subject: [PATCH 835/983] chore: updating CONTRIBUTING.md (#1925) * chore: updating CONTRIBUTING.md Updating CONTRIBUTING.md as per go/java-repos-contrib-guidelines b/323273913 * owlbot.py to ignore CONTRIBUTING.md --- CONTRIBUTING.md | 10 +++++++--- owlbot.py | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b65dd279c..a0dc4050d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,11 @@ # How to Contribute -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. +Please follow the guidelines below before opening an issue or a PR: +1. Ensure the issue was not already reported. +2. Open a new issue if you are unable to find an existing issue addressing your problem. Make sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring. +3. Discuss the priority and potential solutions with the maintainers in the issue. The maintainers would review the issue and add a label "Accepting Contributions" once the issue is ready for accepting contributions. +4. Open a PR only if the issue is labeled with "Accepting Contributions", ensure the PR description clearly describes the problem and solution. Note that an open PR without an issues labeled with "Accepting Contributions" will not be accepted. + ## Contributor License Agreement @@ -89,4 +93,4 @@ mvn com.coveo:fmt-maven-plugin:format [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md diff --git a/owlbot.py b/owlbot.py index 6c8dbbb8a..7a5bfba1a 100644 --- a/owlbot.py +++ b/owlbot.py @@ -24,6 +24,7 @@ java.common_templates( excludes=[ "README.md", + "CONTRIBUTING.md", "java.header", "checkstyle.xml", "license-checks.xml", From e42a15521b2779899a2c36a3b88e85f102b1cbdb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 14:53:18 -0400 Subject: [PATCH 836/983] build(deps): bump jinja2 from 3.0.3 to 3.1.3 in /.kokoro (#1911) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): bump jinja2 from 3.0.3 to 3.1.3 in /.kokoro Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.3 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.0.3...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot From 3dd6b79368dd31efaf293009e8f424c905e9cc38 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 15 Mar 2024 21:05:18 +0100 Subject: [PATCH 837/983] deps: update dependency com.google.cloud:native-image-shared-config to v1.7.6 (#1928) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 14faa3fda..0b14fb23d 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.1" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.6" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 9ac140948..799c80594 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.1" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.6" } env_vars: { diff --git a/pom.xml b/pom.xml index 3994eb72b..b4aaf5af4 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud native-image-shared-config - 1.7.1 + 1.7.6 1.44.2-SNAPSHOT - 2.0.24 + 2.0.25 UTF-8 3.0.2 2.10.1 From 9fe11d9ee6a72967b4c6e147bd6c7fd3bd93f350 Mon Sep 17 00:00:00 2001 From: Alice <65933803+alicejli@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:14:16 -0400 Subject: [PATCH 841/983] chore: remove obsolete kokoro configs and update DocFX profile (#1934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update DocFx profile * remove obsolete kokoro configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove ci.yaml from owlbot post-processing * remove 21 from matrix * fix dependencies script * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update dependencies * fix major version format * remove 21 from testing --------- Co-authored-by: Owl Bot --- .github/workflows/ci.yaml | 48 +-- .kokoro/dependencies.sh | 5 +- .kokoro/release/bump_snapshot.cfg | 53 --- .kokoro/release/bump_snapshot.sh | 30 -- .kokoro/release/common.cfg | 49 --- .kokoro/release/common.sh | 50 --- .kokoro/release/drop.cfg | 6 - .kokoro/release/drop.sh | 32 -- .kokoro/release/promote.cfg | 6 - .kokoro/release/promote.sh | 34 -- .kokoro/release/publish_javadoc.cfg | 23 -- .kokoro/release/publish_javadoc.sh | 53 --- .kokoro/release/publish_javadoc11.cfg | 30 -- .kokoro/release/publish_javadoc11.sh | 63 ---- .kokoro/release/snapshot.cfg | 6 - .kokoro/release/snapshot.sh | 33 -- .kokoro/release/stage.cfg | 19 - .kokoro/release/stage.sh | 47 --- .kokoro/requirements.in | 6 - .kokoro/requirements.txt | 499 -------------------------- owlbot.py | 5 +- pom.xml | 14 +- 22 files changed, 35 insertions(+), 1076 deletions(-) delete mode 100644 .kokoro/release/bump_snapshot.cfg delete mode 100755 .kokoro/release/bump_snapshot.sh delete mode 100644 .kokoro/release/common.cfg delete mode 100755 .kokoro/release/common.sh delete mode 100644 .kokoro/release/drop.cfg delete mode 100755 .kokoro/release/drop.sh delete mode 100644 .kokoro/release/promote.cfg delete mode 100755 .kokoro/release/promote.sh delete mode 100644 .kokoro/release/publish_javadoc.cfg delete mode 100755 .kokoro/release/publish_javadoc.sh delete mode 100644 .kokoro/release/publish_javadoc11.cfg delete mode 100755 .kokoro/release/publish_javadoc11.sh delete mode 100644 .kokoro/release/snapshot.cfg delete mode 100755 .kokoro/release/snapshot.sh delete mode 100644 .kokoro/release/stage.cfg delete mode 100755 .kokoro/release/stage.sh delete mode 100644 .kokoro/requirements.in delete mode 100644 .kokoro/requirements.txt diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 55bd57aa9..32feef7d1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -59,7 +59,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -69,7 +69,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: 11 - run: java -version - run: .kokoro/build.sh @@ -81,33 +81,33 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: 8 - run: java -version - run: .kokoro/build.sh env: JOB_TYPE: clirr - # compilation failure for sub-modules using source and target options 7 (this setting cannot be upgraded to Java 21 because some modules support max of Java 8) - # Hence compile in Java 8 and test in Java 21. + # compilation failure for sub-modules using source and target options 7 (this setting cannot be upgraded to Java 21 because some modules support max of Java 8) + # Hence compile in Java 8 and test in Java 21. units-java21: # Building using Java 8 and run the tests with Java 21 runtime name: "units (21)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - name: "Set jvm system property environment variable for surefire plugin (unit tests)" - # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests. - # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm - run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV - shell: bash - - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: temurin - - run: .kokoro/build.sh - env: - JOB_TYPE: test + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 21 + distribution: temurin + - name: "Set jvm system property environment variable for surefire plugin (unit tests)" + # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests. + # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm + run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV + shell: bash + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: temurin + - run: .kokoro/build.sh + env: + JOB_TYPE: test \ No newline at end of file diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index bd8960246..a66c44c5e 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,7 +38,10 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - if [[ $javaVersion == 17* ]] + # Extract the major version for simple comparison + local javaMajorVersion=$(echo $javaVersion | cut -d'.' -f1) + + if [[ $javaMajorVersion -ge 17 ]] then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg deleted file mode 100644 index aac26b203..000000000 --- a/.kokoro/release/bump_snapshot.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "google-http-java-client/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/bump_snapshot.sh" -} - -# tokens used by release-please to keep an up-to-date release PR. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-key-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-token-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-url-release-please" - } - } -} diff --git a/.kokoro/release/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh deleted file mode 100755 index 43226e25a..000000000 --- a/.kokoro/release/bump_snapshot.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# 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 -# -# https://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. - -set -eo pipefail - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then - # Groom the snapshot release PR immediately after publishing a release - npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ - --repo-url=googleapis/google-http-java-client \ - --package-name="google-http-client" \ - --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ - --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ - --snapshot \ - --release-type=java-auth-yoshi -fi diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg deleted file mode 100644 index cbcd33991..000000000 --- a/.kokoro/release/common.cfg +++ /dev/null @@ -1,49 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "google-http-java-client/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-keyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-passphrase" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-pubkeyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "sonatype-credentials" - } - } -} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh deleted file mode 100755 index 7f78ee414..000000000 --- a/.kokoro/release/common.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2018 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. - -set -eo pipefail - -# Get secrets from keystore and set and environment variables -setup_environment_secrets() { - export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_TTY=$(tty) - export GPG_HOMEDIR=/gpg - mkdir $GPG_HOMEDIR - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg - export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') - export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') -} - -create_settings_xml_file() { - echo " - - - ossrh - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-staging - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-snapshots - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - -" > $1 -} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg deleted file mode 100644 index d3aa1e160..000000000 --- a/.kokoro/release/drop.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/drop.sh" -} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh deleted file mode 100755 index 742ec1a88..000000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2018 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. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:drop -B \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg deleted file mode 100644 index 603f45172..000000000 --- a/.kokoro/release/promote.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/promote.sh" -} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh deleted file mode 100755 index 3cac3d8a9..000000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright 2018 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. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh - -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg deleted file mode 100644 index e57d3dc96..000000000 --- a/.kokoro/release/publish_javadoc.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" - -env_vars: { - key: "STAGING_BUCKET" - value: "docs-staging" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/publish_javadoc.sh" -} - - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh deleted file mode 100755 index 02f2c7e06..000000000 --- a/.kokoro/release/publish_javadoc.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# 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. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET}" ]]; then - echo "Need to set STAGING_BUCKET environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-http-client -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# build the docs -mvn site -B -q - -pushd target/site/apidocs - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --language java - -# upload docs -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg deleted file mode 100644 index 7ee197247..000000000 --- a/.kokoro/release/publish_javadoc11.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# cloud-rad production -env_vars: { - key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" -} - -# Configure the docker image for kokoro-trampoline -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/publish_javadoc11.sh" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh deleted file mode 100755 index f7a291b2d..000000000 --- a/.kokoro/release/publish_javadoc11.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# Copyright 2021 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. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET_V2}" ]]; then - echo "Need to set STAGING_BUCKET_V2 environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-http-client -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# cloud RAD generation -mvn clean javadoc:aggregate -B -q -P docFX -# include CHANGELOG -cp CHANGELOG.md target/docfx-yml/history.md - -pushd target/docfx-yml - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --xrefs devsite://java/gax \ - --xrefs devsite://java/google-cloud-core \ - --xrefs devsite://java/api-common \ - --xrefs devsite://java/proto-google-common-protos \ - --xrefs devsite://java/google-api-client \ - --xrefs devsite://java/google-http-client \ - --xrefs devsite://java/protobuf \ - --language java - -# upload yml to production bucket -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET_V2} \ - --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg deleted file mode 100644 index 865cff806..000000000 --- a/.kokoro/release/snapshot.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/snapshot.sh" -} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh deleted file mode 100755 index 1f55b7702..000000000 --- a/.kokoro/release/snapshot.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# 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. - -set -eo pipefail - -source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -# ensure we're trying to push a snapshot (no-result returns non-zero exit code) -grep SNAPSHOT versions.txt - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn clean deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg deleted file mode 100644 index 103381c4f..000000000 --- a/.kokoro/release/stage.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/google-http-java-client/.kokoro/release/stage.sh" -} - -# Need to save the properties file -action { - define_artifacts { - regex: "github/google-http-java-client/target/nexus-staging/staging/*.properties" - strip_prefix: "github/google-http-java-client" - } -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" -} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh deleted file mode 100755 index 61e714d6b..000000000 --- a/.kokoro/release/stage.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright 2018 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. - -set -eo pipefail - -# Start the releasetool reporter -requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) -python3 -m pip install --require-hashes -r $requirementsFile -python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script - -source $(dirname "$0")/common.sh -source $(dirname "$0")/../common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -# attempt to stage 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn clean deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DskipTests=true \ - -Dclirr.skip=true \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} - -if [[ -n "${AUTORELEASE_PR}" ]] -then - mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml -fi diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in deleted file mode 100644 index 2092cc741..000000000 --- a/.kokoro/requirements.in +++ /dev/null @@ -1,6 +0,0 @@ -gcp-docuploader -gcp-releasetool>=1.10.5 # required for compatibility with cryptography>=39.x -wheel -setuptools -typing-extensions -click<8.1.0 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt deleted file mode 100644 index a213b53fb..000000000 --- a/.kokoro/requirements.txt +++ /dev/null @@ -1,499 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: -# -# pip-compile --generate-hashes requirements.in -# -attrs==23.2.0 \ - --hash=sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30 \ - --hash=sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1 - # via gcp-releasetool -cachetools==5.3.3 \ - --hash=sha256:0abad1021d3f8325b2fc1d2e9c8b9c9d57b04c3932657a72465447332c24d945 \ - --hash=sha256:ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105 - # via google-auth -certifi==2024.2.2 \ - --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ - --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 - # via requests -cffi==1.16.0 \ - --hash=sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc \ - --hash=sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a \ - --hash=sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417 \ - --hash=sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab \ - --hash=sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520 \ - --hash=sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36 \ - --hash=sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743 \ - --hash=sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8 \ - --hash=sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed \ - --hash=sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684 \ - --hash=sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56 \ - --hash=sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324 \ - --hash=sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d \ - --hash=sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235 \ - --hash=sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e \ - --hash=sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088 \ - --hash=sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000 \ - --hash=sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7 \ - --hash=sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e \ - --hash=sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673 \ - --hash=sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c \ - --hash=sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe \ - --hash=sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2 \ - --hash=sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098 \ - --hash=sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8 \ - --hash=sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a \ - --hash=sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0 \ - --hash=sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b \ - --hash=sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896 \ - --hash=sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e \ - --hash=sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9 \ - --hash=sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2 \ - --hash=sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b \ - --hash=sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6 \ - --hash=sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404 \ - --hash=sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f \ - --hash=sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0 \ - --hash=sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4 \ - --hash=sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc \ - --hash=sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936 \ - --hash=sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba \ - --hash=sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872 \ - --hash=sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb \ - --hash=sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614 \ - --hash=sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1 \ - --hash=sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d \ - --hash=sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969 \ - --hash=sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b \ - --hash=sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4 \ - --hash=sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627 \ - --hash=sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956 \ - --hash=sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357 - # via cryptography -charset-normalizer==3.3.2 \ - --hash=sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027 \ - --hash=sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087 \ - --hash=sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786 \ - --hash=sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8 \ - --hash=sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09 \ - --hash=sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185 \ - --hash=sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574 \ - --hash=sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e \ - --hash=sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519 \ - --hash=sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898 \ - --hash=sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269 \ - --hash=sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3 \ - --hash=sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f \ - --hash=sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6 \ - --hash=sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8 \ - --hash=sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a \ - --hash=sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73 \ - --hash=sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc \ - --hash=sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714 \ - --hash=sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2 \ - --hash=sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc \ - --hash=sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce \ - --hash=sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d \ - --hash=sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e \ - --hash=sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6 \ - --hash=sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269 \ - --hash=sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96 \ - --hash=sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d \ - --hash=sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a \ - --hash=sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4 \ - --hash=sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77 \ - --hash=sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d \ - --hash=sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0 \ - --hash=sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed \ - --hash=sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068 \ - --hash=sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac \ - --hash=sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25 \ - --hash=sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8 \ - --hash=sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab \ - --hash=sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26 \ - --hash=sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2 \ - --hash=sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db \ - --hash=sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f \ - --hash=sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5 \ - --hash=sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99 \ - --hash=sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c \ - --hash=sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d \ - --hash=sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811 \ - --hash=sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa \ - --hash=sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a \ - --hash=sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03 \ - --hash=sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b \ - --hash=sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04 \ - --hash=sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c \ - --hash=sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001 \ - --hash=sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458 \ - --hash=sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389 \ - --hash=sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99 \ - --hash=sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985 \ - --hash=sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537 \ - --hash=sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238 \ - --hash=sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f \ - --hash=sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d \ - --hash=sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796 \ - --hash=sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a \ - --hash=sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143 \ - --hash=sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8 \ - --hash=sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c \ - --hash=sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5 \ - --hash=sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5 \ - --hash=sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711 \ - --hash=sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4 \ - --hash=sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6 \ - --hash=sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c \ - --hash=sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7 \ - --hash=sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4 \ - --hash=sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b \ - --hash=sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae \ - --hash=sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12 \ - --hash=sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c \ - --hash=sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae \ - --hash=sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8 \ - --hash=sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887 \ - --hash=sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b \ - --hash=sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4 \ - --hash=sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f \ - --hash=sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5 \ - --hash=sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33 \ - --hash=sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519 \ - --hash=sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561 - # via requests -click==8.0.4 \ - --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ - --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb - # via - # -r requirements.in - # gcp-docuploader - # gcp-releasetool -colorlog==6.8.2 \ - --hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \ - --hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33 - # via gcp-docuploader -cryptography==42.0.5 \ - --hash=sha256:0270572b8bd2c833c3981724b8ee9747b3ec96f699a9665470018594301439ee \ - --hash=sha256:111a0d8553afcf8eb02a4fea6ca4f59d48ddb34497aa8706a6cf536f1a5ec576 \ - --hash=sha256:16a48c23a62a2f4a285699dba2e4ff2d1cff3115b9df052cdd976a18856d8e3d \ - --hash=sha256:1b95b98b0d2af784078fa69f637135e3c317091b615cd0905f8b8a087e86fa30 \ - --hash=sha256:1f71c10d1e88467126f0efd484bd44bca5e14c664ec2ede64c32f20875c0d413 \ - --hash=sha256:2424ff4c4ac7f6b8177b53c17ed5d8fa74ae5955656867f5a8affaca36a27abb \ - --hash=sha256:2bce03af1ce5a5567ab89bd90d11e7bbdff56b8af3acbbec1faded8f44cb06da \ - --hash=sha256:329906dcc7b20ff3cad13c069a78124ed8247adcac44b10bea1130e36caae0b4 \ - --hash=sha256:37dd623507659e08be98eec89323469e8c7b4c1407c85112634ae3dbdb926fdd \ - --hash=sha256:3eaafe47ec0d0ffcc9349e1708be2aaea4c6dd4978d76bf6eb0cb2c13636c6fc \ - --hash=sha256:5e6275c09d2badf57aea3afa80d975444f4be8d3bc58f7f80d2a484c6f9485c8 \ - --hash=sha256:6fe07eec95dfd477eb9530aef5bead34fec819b3aaf6c5bd6d20565da607bfe1 \ - --hash=sha256:7367d7b2eca6513681127ebad53b2582911d1736dc2ffc19f2c3ae49997496bc \ - --hash=sha256:7cde5f38e614f55e28d831754e8a3bacf9ace5d1566235e39d91b35502d6936e \ - --hash=sha256:9481ffe3cf013b71b2428b905c4f7a9a4f76ec03065b05ff499bb5682a8d9ad8 \ - --hash=sha256:98d8dc6d012b82287f2c3d26ce1d2dd130ec200c8679b6213b3c73c08b2b7940 \ - --hash=sha256:a011a644f6d7d03736214d38832e030d8268bcff4a41f728e6030325fea3e400 \ - --hash=sha256:a2913c5375154b6ef2e91c10b5720ea6e21007412f6437504ffea2109b5a33d7 \ - --hash=sha256:a30596bae9403a342c978fb47d9b0ee277699fa53bbafad14706af51fe543d16 \ - --hash=sha256:b03c2ae5d2f0fc05f9a2c0c997e1bc18c8229f392234e8a0194f202169ccd278 \ - --hash=sha256:b6cd2203306b63e41acdf39aa93b86fb566049aeb6dc489b70e34bcd07adca74 \ - --hash=sha256:b7ffe927ee6531c78f81aa17e684e2ff617daeba7f189f911065b2ea2d526dec \ - --hash=sha256:b8cac287fafc4ad485b8a9b67d0ee80c66bf3574f655d3b97ef2e1082360faf1 \ - --hash=sha256:ba334e6e4b1d92442b75ddacc615c5476d4ad55cc29b15d590cc6b86efa487e2 \ - --hash=sha256:ba3e4a42397c25b7ff88cdec6e2a16c2be18720f317506ee25210f6d31925f9c \ - --hash=sha256:c41fb5e6a5fe9ebcd58ca3abfeb51dffb5d83d6775405305bfa8715b76521922 \ - --hash=sha256:cd2030f6650c089aeb304cf093f3244d34745ce0cfcc39f20c6fbfe030102e2a \ - --hash=sha256:cd65d75953847815962c84a4654a84850b2bb4aed3f26fadcc1c13892e1e29f6 \ - --hash=sha256:e4985a790f921508f36f81831817cbc03b102d643b5fcb81cd33df3fa291a1a1 \ - --hash=sha256:e807b3188f9eb0eaa7bbb579b462c5ace579f1cedb28107ce8b48a9f7ad3679e \ - --hash=sha256:f12764b8fffc7a123f641d7d049d382b73f96a34117e0b637b80643169cec8ac \ - --hash=sha256:f8837fe1d6ac4a8052a9a8ddab256bc006242696f03368a4009be7ee3075cdb7 - # via - # gcp-releasetool - # secretstorage -gcp-docuploader==0.6.5 \ - --hash=sha256:30221d4ac3e5a2b9c69aa52fdbef68cc3f27d0e6d0d90e220fc024584b8d2318 \ - --hash=sha256:b7458ef93f605b9d46a4bf3a8dc1755dad1f31d030c8679edf304e343b347eea - # via -r requirements.in -gcp-releasetool==2.0.0 \ - --hash=sha256:3d73480b50ba243f22d7c7ec08b115a30e1c7817c4899781840c26f9c55b8277 \ - --hash=sha256:7aa9fd935ec61e581eb8458ad00823786d91756c25e492f372b2b30962f3c28f - # via -r requirements.in -google-api-core==2.17.1 \ - --hash=sha256:610c5b90092c360736baccf17bd3efbcb30dd380e7a6dc28a71059edb8bd0d8e \ - --hash=sha256:9df18a1f87ee0df0bc4eea2770ebc4228392d8cc4066655b320e2cfccb15db95 - # via - # google-cloud-core - # google-cloud-storage -google-auth==2.28.2 \ - --hash=sha256:80b8b4969aa9ed5938c7828308f20f035bc79f9d8fb8120bf9dc8db20b41ba30 \ - --hash=sha256:9fd67bbcd40f16d9d42f950228e9cf02a2ded4ae49198b27432d0cded5a74c38 - # via - # gcp-releasetool - # google-api-core - # google-cloud-core - # google-cloud-storage -google-cloud-core==2.4.1 \ - --hash=sha256:9b7749272a812bde58fff28868d0c5e2f585b82f37e09a1f6ed2d4d10f134073 \ - --hash=sha256:a9e6a4422b9ac5c29f79a0ede9485473338e2ce78d91f2370c01e730eab22e61 - # via google-cloud-storage -google-cloud-storage==2.15.0 \ - --hash=sha256:5d9237f88b648e1d724a0f20b5cde65996a37fe51d75d17660b1404097327dd2 \ - --hash=sha256:7560a3c48a03d66c553dc55215d35883c680fe0ab44c23aa4832800ccc855c74 - # via gcp-docuploader -google-crc32c==1.5.0 \ - --hash=sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a \ - --hash=sha256:02c65b9817512edc6a4ae7c7e987fea799d2e0ee40c53ec573a692bee24de876 \ - --hash=sha256:02ebb8bf46c13e36998aeaad1de9b48f4caf545e91d14041270d9dca767b780c \ - --hash=sha256:07eb3c611ce363c51a933bf6bd7f8e3878a51d124acfc89452a75120bc436289 \ - --hash=sha256:1034d91442ead5a95b5aaef90dbfaca8633b0247d1e41621d1e9f9db88c36298 \ - --hash=sha256:116a7c3c616dd14a3de8c64a965828b197e5f2d121fedd2f8c5585c547e87b02 \ - --hash=sha256:19e0a019d2c4dcc5e598cd4a4bc7b008546b0358bd322537c74ad47a5386884f \ - --hash=sha256:1c7abdac90433b09bad6c43a43af253e688c9cfc1c86d332aed13f9a7c7f65e2 \ - --hash=sha256:1e986b206dae4476f41bcec1faa057851f3889503a70e1bdb2378d406223994a \ - --hash=sha256:272d3892a1e1a2dbc39cc5cde96834c236d5327e2122d3aaa19f6614531bb6eb \ - --hash=sha256:278d2ed7c16cfc075c91378c4f47924c0625f5fc84b2d50d921b18b7975bd210 \ - --hash=sha256:2ad40e31093a4af319dadf503b2467ccdc8f67c72e4bcba97f8c10cb078207b5 \ - --hash=sha256:2e920d506ec85eb4ba50cd4228c2bec05642894d4c73c59b3a2fe20346bd00ee \ - --hash=sha256:3359fc442a743e870f4588fcf5dcbc1bf929df1fad8fb9905cd94e5edb02e84c \ - --hash=sha256:37933ec6e693e51a5b07505bd05de57eee12f3e8c32b07da7e73669398e6630a \ - --hash=sha256:398af5e3ba9cf768787eef45c803ff9614cc3e22a5b2f7d7ae116df8b11e3314 \ - --hash=sha256:3b747a674c20a67343cb61d43fdd9207ce5da6a99f629c6e2541aa0e89215bcd \ - --hash=sha256:461665ff58895f508e2866824a47bdee72497b091c730071f2b7575d5762ab65 \ - --hash=sha256:4c6fdd4fccbec90cc8a01fc00773fcd5fa28db683c116ee3cb35cd5da9ef6c37 \ - --hash=sha256:5829b792bf5822fd0a6f6eb34c5f81dd074f01d570ed7f36aa101d6fc7a0a6e4 \ - --hash=sha256:596d1f98fc70232fcb6590c439f43b350cb762fb5d61ce7b0e9db4539654cc13 \ - --hash=sha256:5ae44e10a8e3407dbe138984f21e536583f2bba1be9491239f942c2464ac0894 \ - --hash=sha256:635f5d4dd18758a1fbd1049a8e8d2fee4ffed124462d837d1a02a0e009c3ab31 \ - --hash=sha256:64e52e2b3970bd891309c113b54cf0e4384762c934d5ae56e283f9a0afcd953e \ - --hash=sha256:66741ef4ee08ea0b2cc3c86916ab66b6aef03768525627fd6a1b34968b4e3709 \ - --hash=sha256:67b741654b851abafb7bc625b6d1cdd520a379074e64b6a128e3b688c3c04740 \ - --hash=sha256:6ac08d24c1f16bd2bf5eca8eaf8304812f44af5cfe5062006ec676e7e1d50afc \ - --hash=sha256:6f998db4e71b645350b9ac28a2167e6632c239963ca9da411523bb439c5c514d \ - --hash=sha256:72218785ce41b9cfd2fc1d6a017dc1ff7acfc4c17d01053265c41a2c0cc39b8c \ - --hash=sha256:74dea7751d98034887dbd821b7aae3e1d36eda111d6ca36c206c44478035709c \ - --hash=sha256:759ce4851a4bb15ecabae28f4d2e18983c244eddd767f560165563bf9aefbc8d \ - --hash=sha256:77e2fd3057c9d78e225fa0a2160f96b64a824de17840351b26825b0848022906 \ - --hash=sha256:7c074fece789b5034b9b1404a1f8208fc2d4c6ce9decdd16e8220c5a793e6f61 \ - --hash=sha256:7c42c70cd1d362284289c6273adda4c6af8039a8ae12dc451dcd61cdabb8ab57 \ - --hash=sha256:7f57f14606cd1dd0f0de396e1e53824c371e9544a822648cd76c034d209b559c \ - --hash=sha256:83c681c526a3439b5cf94f7420471705bbf96262f49a6fe546a6db5f687a3d4a \ - --hash=sha256:8485b340a6a9e76c62a7dce3c98e5f102c9219f4cfbf896a00cf48caf078d438 \ - --hash=sha256:84e6e8cd997930fc66d5bb4fde61e2b62ba19d62b7abd7a69920406f9ecca946 \ - --hash=sha256:89284716bc6a5a415d4eaa11b1726d2d60a0cd12aadf5439828353662ede9dd7 \ - --hash=sha256:8b87e1a59c38f275c0e3676fc2ab6d59eccecfd460be267ac360cc31f7bcde96 \ - --hash=sha256:8f24ed114432de109aa9fd317278518a5af2d31ac2ea6b952b2f7782b43da091 \ - --hash=sha256:98cb4d057f285bd80d8778ebc4fde6b4d509ac3f331758fb1528b733215443ae \ - --hash=sha256:998679bf62b7fb599d2878aa3ed06b9ce688b8974893e7223c60db155f26bd8d \ - --hash=sha256:9ba053c5f50430a3fcfd36f75aff9caeba0440b2d076afdb79a318d6ca245f88 \ - --hash=sha256:9c99616c853bb585301df6de07ca2cadad344fd1ada6d62bb30aec05219c45d2 \ - --hash=sha256:a1fd716e7a01f8e717490fbe2e431d2905ab8aa598b9b12f8d10abebb36b04dd \ - --hash=sha256:a2355cba1f4ad8b6988a4ca3feed5bff33f6af2d7f134852cf279c2aebfde541 \ - --hash=sha256:b1f8133c9a275df5613a451e73f36c2aea4fe13c5c8997e22cf355ebd7bd0728 \ - --hash=sha256:b8667b48e7a7ef66afba2c81e1094ef526388d35b873966d8a9a447974ed9178 \ - --hash=sha256:ba1eb1843304b1e5537e1fca632fa894d6f6deca8d6389636ee5b4797affb968 \ - --hash=sha256:be82c3c8cfb15b30f36768797a640e800513793d6ae1724aaaafe5bf86f8f346 \ - --hash=sha256:c02ec1c5856179f171e032a31d6f8bf84e5a75c45c33b2e20a3de353b266ebd8 \ - --hash=sha256:c672d99a345849301784604bfeaeba4db0c7aae50b95be04dd651fd2a7310b93 \ - --hash=sha256:c6c777a480337ac14f38564ac88ae82d4cd238bf293f0a22295b66eb89ffced7 \ - --hash=sha256:cae0274952c079886567f3f4f685bcaf5708f0a23a5f5216fdab71f81a6c0273 \ - --hash=sha256:cd67cf24a553339d5062eff51013780a00d6f97a39ca062781d06b3a73b15462 \ - --hash=sha256:d3515f198eaa2f0ed49f8819d5732d70698c3fa37384146079b3799b97667a94 \ - --hash=sha256:d5280312b9af0976231f9e317c20e4a61cd2f9629b7bfea6a693d1878a264ebd \ - --hash=sha256:de06adc872bcd8c2a4e0dc51250e9e65ef2ca91be023b9d13ebd67c2ba552e1e \ - --hash=sha256:e1674e4307fa3024fc897ca774e9c7562c957af85df55efe2988ed9056dc4e57 \ - --hash=sha256:e2096eddb4e7c7bdae4bd69ad364e55e07b8316653234a56552d9c988bd2d61b \ - --hash=sha256:e560628513ed34759456a416bf86b54b2476c59144a9138165c9a1575801d0d9 \ - --hash=sha256:edfedb64740750e1a3b16152620220f51d58ff1b4abceb339ca92e934775c27a \ - --hash=sha256:f13cae8cc389a440def0c8c52057f37359014ccbc9dc1f0827936bcd367c6100 \ - --hash=sha256:f314013e7dcd5cf45ab1945d92e713eec788166262ae8deb2cfacd53def27325 \ - --hash=sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183 \ - --hash=sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556 \ - --hash=sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4 - # via - # google-cloud-storage - # google-resumable-media -google-resumable-media==2.7.0 \ - --hash=sha256:5f18f5fa9836f4b083162064a1c2c98c17239bfda9ca50ad970ccf905f3e625b \ - --hash=sha256:79543cfe433b63fd81c0844b7803aba1bb8950b47bedf7d980c38fa123937e08 - # via google-cloud-storage -googleapis-common-protos==1.63.0 \ - --hash=sha256:17ad01b11d5f1d0171c06d3ba5c04c54474e883b66b949722b4938ee2694ef4e \ - --hash=sha256:ae45f75702f7c08b541f750854a678bd8f534a1a6bace6afe975f1d0a82d6632 - # via google-api-core -idna==3.6 \ - --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ - --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f - # via requests -importlib-metadata==7.0.2 \ - --hash=sha256:198f568f3230878cb1b44fbd7975f87906c22336dba2e4a7f05278c281fbd792 \ - --hash=sha256:f4bc4c0c070c490abf4ce96d715f68e95923320370efb66143df00199bb6c100 - # via keyring -jaraco-classes==3.3.1 \ - --hash=sha256:86b534de565381f6b3c1c830d13f931d7be1a75f0081c57dff615578676e2206 \ - --hash=sha256:cb28a5ebda8bc47d8c8015307d93163464f9f2b91ab4006e09ff0ce07e8bfb30 - # via keyring -jeepney==0.8.0 \ - --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ - --hash=sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755 - # via - # keyring - # secretstorage -jinja2==3.1.3 \ - --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ - --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 - # via gcp-releasetool -keyring==24.3.1 \ - --hash=sha256:c3327b6ffafc0e8befbdb597cacdb4928ffe5c1212f7645f186e6d9957a898db \ - --hash=sha256:df38a4d7419a6a60fea5cef1e45a948a3e8430dd12ad88b0f423c5c143906218 - # via gcp-releasetool -markupsafe==2.1.5 \ - --hash=sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf \ - --hash=sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff \ - --hash=sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f \ - --hash=sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3 \ - --hash=sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532 \ - --hash=sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f \ - --hash=sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617 \ - --hash=sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df \ - --hash=sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4 \ - --hash=sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906 \ - --hash=sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f \ - --hash=sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4 \ - --hash=sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8 \ - --hash=sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371 \ - --hash=sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2 \ - --hash=sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465 \ - --hash=sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52 \ - --hash=sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6 \ - --hash=sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169 \ - --hash=sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad \ - --hash=sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2 \ - --hash=sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0 \ - --hash=sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029 \ - --hash=sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f \ - --hash=sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a \ - --hash=sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced \ - --hash=sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5 \ - --hash=sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c \ - --hash=sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf \ - --hash=sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9 \ - --hash=sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb \ - --hash=sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad \ - --hash=sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3 \ - --hash=sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1 \ - --hash=sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46 \ - --hash=sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc \ - --hash=sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a \ - --hash=sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee \ - --hash=sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900 \ - --hash=sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5 \ - --hash=sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea \ - --hash=sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f \ - --hash=sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5 \ - --hash=sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e \ - --hash=sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a \ - --hash=sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f \ - --hash=sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50 \ - --hash=sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a \ - --hash=sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b \ - --hash=sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4 \ - --hash=sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff \ - --hash=sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2 \ - --hash=sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46 \ - --hash=sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b \ - --hash=sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf \ - --hash=sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5 \ - --hash=sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5 \ - --hash=sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab \ - --hash=sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd \ - --hash=sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68 - # via jinja2 -more-itertools==10.2.0 \ - --hash=sha256:686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684 \ - --hash=sha256:8fccb480c43d3e99a00087634c06dd02b0d50fbf088b380de5a41a015ec239e1 - # via jaraco-classes -packaging==24.0 \ - --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ - --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 - # via gcp-releasetool -protobuf==4.25.3 \ - --hash=sha256:19b270aeaa0099f16d3ca02628546b8baefe2955bbe23224aaf856134eccf1e4 \ - --hash=sha256:209ba4cc916bab46f64e56b85b090607a676f66b473e6b762e6f1d9d591eb2e8 \ - --hash=sha256:25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c \ - --hash=sha256:7c8daa26095f82482307bc717364e7c13f4f1c99659be82890dcfc215194554d \ - --hash=sha256:c053062984e61144385022e53678fbded7aea14ebb3e0305ae3592fb219ccfa4 \ - --hash=sha256:d4198877797a83cbfe9bffa3803602bbe1625dc30d8a097365dbc762e5790faa \ - --hash=sha256:e3c97a1555fd6388f857770ff8b9703083de6bf1f9274a002a332d65fbb56c8c \ - --hash=sha256:e7cb0ae90dd83727f0c0718634ed56837bfeeee29a5f82a7514c03ee1364c019 \ - --hash=sha256:f0700d54bcf45424477e46a9f0944155b46fb0639d69728739c0e47bab83f2b9 \ - --hash=sha256:f1279ab38ecbfae7e456a108c5c0681e4956d5b1090027c1de0f934dfdb4b35c \ - --hash=sha256:f4f118245c4a087776e0a8408be33cf09f6c547442c00395fbfb116fac2f8ac2 - # via - # gcp-docuploader - # gcp-releasetool - # google-api-core -pyasn1==0.5.1 \ - --hash=sha256:4439847c58d40b1d0a573d07e3856e95333f1976294494c325775aeca506eb58 \ - --hash=sha256:6d391a96e59b23130a5cfa74d6fd7f388dbbe26cc8f1edf39fdddf08d9d6676c - # via - # pyasn1-modules - # rsa -pyasn1-modules==0.3.0 \ - --hash=sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c \ - --hash=sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d - # via google-auth -pycparser==2.21 \ - --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ - --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 - # via cffi -pyjwt==2.8.0 \ - --hash=sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de \ - --hash=sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320 - # via gcp-releasetool -pyperclip==1.8.2 \ - --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 - # via gcp-releasetool -python-dateutil==2.9.0.post0 \ - --hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \ - --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 - # via gcp-releasetool -requests==2.31.0 \ - --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ - --hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1 - # via - # gcp-releasetool - # google-api-core - # google-cloud-storage -rsa==4.9 \ - --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ - --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 - # via google-auth -secretstorage==3.3.3 \ - --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ - --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 - # via keyring -six==1.16.0 \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via - # gcp-docuploader - # python-dateutil -typing-extensions==4.10.0 \ - --hash=sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475 \ - --hash=sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb - # via -r requirements.in -urllib3==2.2.1 \ - --hash=sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d \ - --hash=sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19 - # via requests -wheel==0.43.0 \ - --hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \ - --hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81 - # via -r requirements.in -zipp==3.18.0 \ - --hash=sha256:c1bb803ed69d2cce2373152797064f7e79bc43f0a3748eb494096a867e0ebf79 \ - --hash=sha256:df8d042b02765029a09b157efd8e820451045890acc30f8e37dd2f94a060221f - # via importlib-metadata - -# WARNING: The following packages were not pinned, but pip requires them to be -# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag. -# setuptools diff --git a/owlbot.py b/owlbot.py index 7a5bfba1a..cfc9ba444 100644 --- a/owlbot.py +++ b/owlbot.py @@ -31,6 +31,9 @@ ".github/workflows/samples.yaml", ".kokoro/build.sh", "renovate.json", - ".github/workflows/ci.yaml" + ".github/workflows/ci.yaml", + ".kokoro/requirements.in", + ".kokoro/requirements.txt", + ".kokoro/dependencies.sh" # Remove this once updated in synthtool ] ) diff --git a/pom.xml b/pom.xml index a5ec06e27..bb77d2d4c 100644 --- a/pom.xml +++ b/pom.xml @@ -740,38 +740,30 @@ - java-docfx-doclet-1.9.0 ${project.build.directory}/docfx-yml ${project.artifactId} - com\.google\.api\.client\.findbugs:com\.google\.api\.client\.test:com\.google\.api\.services - 8 - + 8 org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.3 com.microsoft.doclet.DocFxDoclet false - ${env.KOKORO_GFILE_DIR}/${docletName}.jar -outputpath ${outputpath} - -projectname ${projectname} - -excludeclasses ${excludeclasses}: + -projectname ${projectname} -excludepackages ${excludePackages}: none protected true ${source} - - ${sourceFileExclude} - From 7f58bd58e49cb823cf84c4efea99c43f0234f54f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 17 Apr 2024 21:37:43 +0200 Subject: [PATCH 842/983] build(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.3.1 (#1932) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb77d2d4c..4dd34385f 100644 --- a/pom.xml +++ b/pom.xml @@ -346,7 +346,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.0 + 3.3.1 org.codehaus.mojo From 97ac85c847aa7d4d1bfbb714c1134d5ebcbaeb9c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 May 2024 17:18:22 +0200 Subject: [PATCH 843/983] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.1.2 (#1814) --- pom.xml | 2 +- samples/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4dd34385f..fdfa2a6db 100644 --- a/pom.xml +++ b/pom.xml @@ -295,7 +295,7 @@ maven-deploy-plugin - 3.0.0 + 3.1.2 org.apache.maven.plugins diff --git a/samples/pom.xml b/samples/pom.xml index 4c32fd537..88fe18cea 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.0.0 + 3.1.2 true From a56b73f76689e964ab3c625cdb94a62a797f2c15 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 May 2024 17:31:16 +0200 Subject: [PATCH 844/983] build(deps): update dependency org.apache.maven.plugins:maven-resources-plugin to v3.3.1 (#1848) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fdfa2a6db..44b35b133 100644 --- a/pom.xml +++ b/pom.xml @@ -381,7 +381,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.3.0 + 3.3.1 org.apache.maven.plugins From 60deab2fc93c70f4f37733a90a07b11e19b9f508 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 May 2024 17:32:26 +0200 Subject: [PATCH 845/983] deps: update actions/upload-artifact action to v3.1.3 (#1860) --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index fa7beedc3..7dd91434a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: name: SARIF file path: results.sarif From 31e847a86967da664311482546e151ed04e62262 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 May 2024 17:38:21 +0200 Subject: [PATCH 846/983] build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.6.1 (#1935) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 44b35b133..495ecf2fb 100644 --- a/pom.xml +++ b/pom.xml @@ -376,7 +376,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.0 + 3.6.1 org.apache.maven.plugins From 4e153db9443832dbe6ca56b6fe10dcea26921b6f Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 16 May 2024 13:21:24 -0400 Subject: [PATCH 847/983] fix: Base64 decoding to discard newline characters (#1941) * fix: Base64 decoding to discard newline characters * adding test case for "+" character and new line character * test case with the slash character --- .../com/google/api/client/util/Base64.java | 14 +++- .../google/api/client/util/Base64Test.java | 71 +++++++++++++++++++ 2 files changed, 83 insertions(+), 2 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/util/Base64.java b/google-http-client/src/main/java/com/google/api/client/util/Base64.java index 9225cd5dd..178bc4829 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/Base64.java +++ b/google-http-client/src/main/java/com/google/api/client/util/Base64.java @@ -26,6 +26,13 @@ */ @Deprecated public class Base64 { + // Guava's Base64 (https://datatracker.ietf.org/doc/html/rfc4648#section-4) decoders. When + // decoding, they discard the new line character so that the behavior matches what we had with + // Apache Commons Codec's decodeBase64. + // The 2nd argument of the withSeparator method, "64", does not have any effect in decoding. + private static final BaseEncoding BASE64_DECODER = BaseEncoding.base64().withSeparator("\n", 64); + private static final BaseEncoding BASE64URL_DECODER = + BaseEncoding.base64Url().withSeparator("\n", 64); /** * Encodes binary data using the base64 algorithm but does not chunk the output. @@ -92,6 +99,9 @@ public static byte[] decodeBase64(byte[] base64Data) { * Decodes a Base64 String into octets. Note that this method handles both URL-safe and * non-URL-safe base 64 encoded strings. * + *

              For the compatibility with the old version that used Apache Commons Coded's decodeBase64, + * this method discards new line characters and trailing whitespaces. + * * @param base64String String containing Base64 data or {@code null} for {@code null} result * @return Array containing decoded data or {@code null} for {@code null} input */ @@ -100,10 +110,10 @@ public static byte[] decodeBase64(String base64String) { return null; } try { - return BaseEncoding.base64().decode(base64String); + return BASE64_DECODER.decode(base64String); } catch (IllegalArgumentException e) { if (e.getCause() instanceof DecodingException) { - return BaseEncoding.base64Url().decode(base64String.trim()); + return BASE64URL_DECODER.decode(base64String.trim()); } throw e; } diff --git a/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java index 0ee174f9f..218dd1f1b 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java +++ b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java @@ -14,6 +14,8 @@ package com.google.api.client.util; +import static com.google.common.truth.Truth.assertThat; + import java.nio.charset.StandardCharsets; import junit.framework.TestCase; @@ -62,4 +64,73 @@ public void test_encodeBase64URLSafe_withNull_shouldReturnNull() { public void test_encodeBase64_withNull_shouldReturnNull() { assertNull(Base64.encodeBase64(null)); } + + public void test_decodeBase64_newline_character_invalid_length() { + // The RFC 4648 (https://datatracker.ietf.org/doc/html/rfc4648#section-3.3) states that a + // specification referring to the Base64 encoding may state that it ignores characters outside + // the base alphabet. + + // In Base64 encoding, 3 characters (24 bits) are converted to 4 of 6-bits, each of which is + // converted to a byte (a character). + // Base64encode("abc") => "YWJj" (4 characters) + // Base64encode("def") => "ZGVm" (4 characters) + // Adding a new line character between them. This should be discarded. + String encodedString = "YWJj\nZGVm"; + + // This is a reference implementation by Apache Commons Codec. It discards the new line + // characters. + // assertEquals( + // "abcdef", + // new String( + // org.apache.commons.codec.binary.Base64.decodeBase64(encodedString), + // StandardCharsets.UTF_8)); + + // This is our implementation. Before the + // https://github.com/googleapis/google-http-java-client/pull/1941/, it was throwing + // IllegalArgumentException("Invalid length 9"). + assertEquals("abcdef", new String(Base64.decodeBase64(encodedString), StandardCharsets.UTF_8)); + } + + public void test_decodeBase64_newline_character() { + // In Base64 encoding, 2 characters (16 bits) are converted to 3 of 6-bits plus the padding + // character ('="). + // Base64encode("ab") => "YWI=" (3 characters + padding character) + // Adding a new line character that should be discarded between them + String encodedString = "YW\nI="; + + // This is a reference implementation by Apache Commons Codec. It discards the new line + // characters. + // assertEquals( + // "ab", + // new String( + // org.apache.commons.codec.binary.Base64.decodeBase64(encodedString), + // StandardCharsets.UTF_8)); + + // This is our implementation. Before the fix + // https://github.com/googleapis/google-http-java-client/pull/1941/, it was throwing + // IllegalArgumentException("Unrecognized character: 0xa"). + assertEquals("ab", new String(Base64.decodeBase64(encodedString), StandardCharsets.UTF_8)); + } + + public void test_decodeBase64_plus_and_newline_characters() { + // The plus sign is 62 in the Base64 table. So it's a valid character in encoded strings. + // https://datatracker.ietf.org/doc/html/rfc4648#section-4 + String encodedString = "+\nw=="; + + byte[] actual = Base64.decodeBase64(encodedString); + // Before the fix https://github.com/googleapis/google-http-java-client/pull/1941/, it was + // throwing IllegalArgumentException("Unrecognized character: +"). + assertThat(actual).isEqualTo(new byte[] {(byte) 0xfb}); + } + + public void test_decodeBase64_slash_and_newline_characters() { + // The slash sign is 63 in the Base64 table. So it's a valid character in encoded strings. + // https://datatracker.ietf.org/doc/html/rfc4648#section-4 + String encodedString = "/\nw=="; + + byte[] actual = Base64.decodeBase64(encodedString); + // Before the fix https://github.com/googleapis/google-http-java-client/pull/1941/, it was + // throwing IllegalArgumentException("Unrecognized character: /"). + assertThat(actual).isEqualTo(new byte[] {(byte) 0xff}); + } } From 1538b9df467fc2c31188a9988d3aa6a87068dc0b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:06:06 -0400 Subject: [PATCH 848/983] chore: update dependency versions in java templates (#1964) (#1940) * chore: update dependency versions in java templates * update other templates Source-Link: https://github.com/googleapis/synthtool/commit/0b86c72fe652dd7e52ba05a63f61bc1399ad5d65 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:68ba5f5164a4b55529d358bb262feaa000536a0c62980727dd05a91bbb47ea5e Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/renovate_config_check.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index db1099bec..5db36a5f7 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:084ad4c60551b075846bcb2405ec1c14b0d00ec1eb5503d4dd0d2a92cdc2d3e2 -# created: 2024-03-15T14:33:32.257974519Z + digest: sha256:68ba5f5164a4b55529d358bb262feaa000536a0c62980727dd05a91bbb47ea5e +# created: 2024-05-09T16:31:37.168667071Z diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index f5fc7d516..59f00b8eb 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 87d8eb2be..7c5ec7865 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '20' From a82b18e46ff85eaf5ca8b6dada01ace70c5655e2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 15:08:43 -0400 Subject: [PATCH 849/983] chore(main): release 1.44.2 (#1930) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 15 ++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 17 files changed, 68 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d6cf6ea4..4cb4c04d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [1.44.2](https://github.com/googleapis/google-http-java-client/compare/v1.44.1...v1.44.2) (2024-05-16) + + +### Bug Fixes + +* Base64 decoding to discard newline characters ([#1941](https://github.com/googleapis/google-http-java-client/issues/1941)) ([4e153db](https://github.com/googleapis/google-http-java-client/commit/4e153db9443832dbe6ca56b6fe10dcea26921b6f)) + + +### Dependencies + +* Update actions/upload-artifact action to v3.1.3 ([#1860](https://github.com/googleapis/google-http-java-client/issues/1860)) ([60deab2](https://github.com/googleapis/google-http-java-client/commit/60deab2fc93c70f4f37733a90a07b11e19b9f508)) +* Update dependency com.google.cloud:native-image-shared-config to v1.7.6 ([#1928](https://github.com/googleapis/google-http-java-client/issues/1928)) ([3dd6b79](https://github.com/googleapis/google-http-java-client/commit/3dd6b79368dd31efaf293009e8f424c905e9cc38)) +* Update dependency org.apache.felix:maven-bundle-plugin to v5.1.9 ([#1888](https://github.com/googleapis/google-http-java-client/issues/1888)) ([41c16b9](https://github.com/googleapis/google-http-java-client/commit/41c16b9334e218412826c1c07cdd303611bc7dbf)) +* Update project.appengine.version to v2.0.25 ([#1931](https://github.com/googleapis/google-http-java-client/issues/1931)) ([53eb6a1](https://github.com/googleapis/google-http-java-client/commit/53eb6a1f62d106190cc75af1e6b6eebec481f874)) + ## [1.44.1](https://github.com/googleapis/google-http-java-client/compare/v1.44.0...v1.44.1) (2024-01-26) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 866d2f1bd..372af1f53 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.2-SNAPSHOT + 1.44.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.2-SNAPSHOT + 1.44.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.2-SNAPSHOT + 1.44.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 720c3c91e..fadc64cb6 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-android - 1.44.2-SNAPSHOT + 1.44.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0338037f9..55676873b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-apache-v2 - 1.44.2-SNAPSHOT + 1.44.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 91bc10bf4..20ebf8f84 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-appengine - 1.44.2-SNAPSHOT + 1.44.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 21c266f23..f2cc29862 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.44.2-SNAPSHOT + 1.44.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 108ac5e9f..92ba7375c 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.2-SNAPSHOT + 1.44.2 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-android - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-apache-v2 - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-appengine - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-findbugs - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-gson - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-jackson2 - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-protobuf - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-test - 1.44.2-SNAPSHOT + 1.44.2 com.google.http-client google-http-client-xml - 1.44.2-SNAPSHOT + 1.44.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c6ef961ae..320dd3d38 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-findbugs - 1.44.2-SNAPSHOT + 1.44.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 15fc1d51a..9aec75be0 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-gson - 1.44.2-SNAPSHOT + 1.44.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 05a06c4fd..62b449911 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-jackson2 - 1.44.2-SNAPSHOT + 1.44.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index de94f1eb6..01bba38f4 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-protobuf - 1.44.2-SNAPSHOT + 1.44.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 595e690cb..1fc9bd0db 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-test - 1.44.2-SNAPSHOT + 1.44.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 744a83e52..b5b5358c5 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client-xml - 1.44.2-SNAPSHOT + 1.44.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0c941e940..f5995ab1d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../pom.xml google-http-client - 1.44.2-SNAPSHOT + 1.44.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 495ecf2fb..5d1bcaca9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -592,7 +592,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.2-SNAPSHOT + 1.44.2 2.0.25 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 25021bca0..58722fcdd 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.2-SNAPSHOT + 1.44.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 59ea2f4a7..cad4285a1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.44.1:1.44.2-SNAPSHOT -google-http-client-bom:1.44.1:1.44.2-SNAPSHOT -google-http-client-parent:1.44.1:1.44.2-SNAPSHOT -google-http-client-android:1.44.1:1.44.2-SNAPSHOT -google-http-client-android-test:1.44.1:1.44.2-SNAPSHOT -google-http-client-apache-v2:1.44.1:1.44.2-SNAPSHOT -google-http-client-appengine:1.44.1:1.44.2-SNAPSHOT -google-http-client-assembly:1.44.1:1.44.2-SNAPSHOT -google-http-client-findbugs:1.44.1:1.44.2-SNAPSHOT -google-http-client-gson:1.44.1:1.44.2-SNAPSHOT -google-http-client-jackson2:1.44.1:1.44.2-SNAPSHOT -google-http-client-protobuf:1.44.1:1.44.2-SNAPSHOT -google-http-client-test:1.44.1:1.44.2-SNAPSHOT -google-http-client-xml:1.44.1:1.44.2-SNAPSHOT +google-http-client:1.44.2:1.44.2 +google-http-client-bom:1.44.2:1.44.2 +google-http-client-parent:1.44.2:1.44.2 +google-http-client-android:1.44.2:1.44.2 +google-http-client-android-test:1.44.2:1.44.2 +google-http-client-apache-v2:1.44.2:1.44.2 +google-http-client-appengine:1.44.2:1.44.2 +google-http-client-assembly:1.44.2:1.44.2 +google-http-client-findbugs:1.44.2:1.44.2 +google-http-client-gson:1.44.2:1.44.2 +google-http-client-jackson2:1.44.2:1.44.2 +google-http-client-protobuf:1.44.2:1.44.2 +google-http-client-test:1.44.2:1.44.2 +google-http-client-xml:1.44.2:1.44.2 From 5172e33637c5cf9e3534b6aa63665a3e26f659a2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 19:14:18 +0000 Subject: [PATCH 850/983] chore(main): release 1.44.3-SNAPSHOT (#1943) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 372af1f53..500725541 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.2 + 1.44.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.2 + 1.44.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.2 + 1.44.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index fadc64cb6..bedac6c25 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-android - 1.44.2 + 1.44.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 55676873b..4541ae527 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.44.2 + 1.44.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 20ebf8f84..a61580b85 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.44.2 + 1.44.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f2cc29862..3f82074e3 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.44.2 + 1.44.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 92ba7375c..9e9075bb7 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.2 + 1.44.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-android - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-test - 1.44.2 + 1.44.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.44.2 + 1.44.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 320dd3d38..812f9f8de 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.44.2 + 1.44.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 9aec75be0..2db8272b3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.44.2 + 1.44.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 62b449911..def789878 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.44.2 + 1.44.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 01bba38f4..f5b9a87b8 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.44.2 + 1.44.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 1fc9bd0db..7c0feeb27 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-test - 1.44.2 + 1.44.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index b5b5358c5..7851bbab1 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.44.2 + 1.44.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index f5995ab1d..e787ec4ec 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../pom.xml google-http-client - 1.44.2 + 1.44.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 5d1bcaca9..075679758 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -592,7 +592,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.2 + 1.44.3-SNAPSHOT 2.0.25 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 58722fcdd..99053176b 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.2 + 1.44.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index cad4285a1..963efeb8d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -google-http-client:1.44.2:1.44.2 -google-http-client-bom:1.44.2:1.44.2 -google-http-client-parent:1.44.2:1.44.2 -google-http-client-android:1.44.2:1.44.2 -google-http-client-android-test:1.44.2:1.44.2 -google-http-client-apache-v2:1.44.2:1.44.2 -google-http-client-appengine:1.44.2:1.44.2 -google-http-client-assembly:1.44.2:1.44.2 -google-http-client-findbugs:1.44.2:1.44.2 -google-http-client-gson:1.44.2:1.44.2 -google-http-client-jackson2:1.44.2:1.44.2 -google-http-client-protobuf:1.44.2:1.44.2 -google-http-client-test:1.44.2:1.44.2 -google-http-client-xml:1.44.2:1.44.2 +google-http-client:1.44.2:1.44.3-SNAPSHOT +google-http-client-bom:1.44.2:1.44.3-SNAPSHOT +google-http-client-parent:1.44.2:1.44.3-SNAPSHOT +google-http-client-android:1.44.2:1.44.3-SNAPSHOT +google-http-client-android-test:1.44.2:1.44.3-SNAPSHOT +google-http-client-apache-v2:1.44.2:1.44.3-SNAPSHOT +google-http-client-appengine:1.44.2:1.44.3-SNAPSHOT +google-http-client-assembly:1.44.2:1.44.3-SNAPSHOT +google-http-client-findbugs:1.44.2:1.44.3-SNAPSHOT +google-http-client-gson:1.44.2:1.44.3-SNAPSHOT +google-http-client-jackson2:1.44.2:1.44.3-SNAPSHOT +google-http-client-protobuf:1.44.2:1.44.3-SNAPSHOT +google-http-client-test:1.44.2:1.44.3-SNAPSHOT +google-http-client-xml:1.44.2:1.44.3-SNAPSHOT From b224a1d64cae44878f1bb0af83fb8e33e2e12d63 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 29 May 2024 21:05:53 +0200 Subject: [PATCH 851/983] deps: update dependency com.google.cloud:native-image-shared-config to v1.7.7 (#1937) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 0b14fb23d..b7c2b9dca 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.6" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.7" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 799c80594..5a92b8122 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.6" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.7" } env_vars: { diff --git a/pom.xml b/pom.xml index 075679758..b08760552 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud native-image-shared-config - 1.7.6 + 1.7.7 1.44.3-SNAPSHOT - 2.0.25 + 2.0.27 UTF-8 3.0.2 2.10.1 From 1d2e66bd4babbe8ffd82cf85371e1faace14dd3c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 29 May 2024 21:06:11 +0200 Subject: [PATCH 853/983] build(deps): update dependency org.apache.maven.plugins:maven-assembly-plugin to v3.7.1 (#1939) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index be9265239..1e2c4afaf 100644 --- a/pom.xml +++ b/pom.xml @@ -283,7 +283,7 @@ maven-assembly-plugin - 3.5.0 + 3.7.1 maven-compiler-plugin From 9aca8cada5f2c3563fee44999c72f72fc95d56f3 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 29 May 2024 21:06:20 +0200 Subject: [PATCH 854/983] build(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.13.0 (#1942) --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index bc97d5de0..2686d203f 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -11,7 +11,7 @@ maven-compiler-plugin - 3.11.0 + 3.13.0 1.7 1.7 diff --git a/pom.xml b/pom.xml index 1e2c4afaf..e665571e1 100644 --- a/pom.xml +++ b/pom.xml @@ -287,7 +287,7 @@ maven-compiler-plugin - 3.11.0 + 3.13.0 1.7 1.7 From 4ad226c8b5adacf6399d84305e3b14f5ad236612 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 29 May 2024 21:06:40 +0200 Subject: [PATCH 855/983] build(deps): update dependency org.apache.maven.plugins:maven-source-plugin to v3.3.1 (#1936) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e665571e1..b74c3948c 100644 --- a/pom.xml +++ b/pom.xml @@ -300,7 +300,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.1 attach-sources @@ -391,7 +391,7 @@ org.apache.maven.plugins maven-source-plugin - 3.3.0 + 3.3.1 attach-sources From 571f8a81be5b3a357ab6d3fa1ff817fe7be2b317 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 20:33:01 +0200 Subject: [PATCH 856/983] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.5 (#1950) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b74c3948c..a570b3949 100644 --- a/pom.xml +++ b/pom.xml @@ -605,7 +605,7 @@ 4.4.16 0.31.1 .. - 3.0.0-M7 + 3.2.5 false From 0de3985b0b213271fc7e89abd0b8aa488fcdfa39 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 20:33:17 +0200 Subject: [PATCH 857/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.5.0 (#1949) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index a570b3949..16cd32e04 100644 --- a/pom.xml +++ b/pom.xml @@ -366,7 +366,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.5 + 3.5.0 org.apache.maven.plugins @@ -549,7 +549,7 @@ maven-project-info-reports-plugin - 3.4.5 + 3.5.0 From 84f8c6b97b19afc96bffc58ad2e4544992b31dac Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 20:33:31 +0200 Subject: [PATCH 858/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.6.3 (#1948) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9e9075bb7..aef043c2a 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.3 true diff --git a/pom.xml b/pom.xml index 16cd32e04..c213c5e7f 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.3 attach-javadocs From 664ab8bf280fde4ad2cf2c5af7d8128a20837469 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 20:33:44 +0200 Subject: [PATCH 859/983] build(deps): update dependency org.apache.maven.plugins:maven-jar-plugin to v3.4.1 (#1947) --- .../google-http-client-findbugs-test/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml index 2686d203f..c1947e232 100644 --- a/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml +++ b/google-http-client-findbugs/google-http-client-findbugs-test/pom.xml @@ -19,7 +19,7 @@ maven-jar-plugin - 3.3.0 + 3.4.1 diff --git a/pom.xml b/pom.xml index c213c5e7f..888341b32 100644 --- a/pom.xml +++ b/pom.xml @@ -326,7 +326,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.1 From 9fabb1e70b684c84424982e2cbe070ae051e1679 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 20:33:58 +0200 Subject: [PATCH 860/983] build(deps): update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.4 (#1945) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index aef043c2a..165129c31 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -166,7 +166,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.4 sign-artifacts diff --git a/pom.xml b/pom.xml index 888341b32..77266714e 100644 --- a/pom.xml +++ b/pom.xml @@ -661,7 +661,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.2.4 sign-artifacts From 96fd52cb9421198cd53b5e48df688c1a3a500c04 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 31 May 2024 21:03:17 +0200 Subject: [PATCH 861/983] build(deps): update dependency org.apache.maven.plugins:maven-enforcer-plugin to v3.5.0 (#1951) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 77266714e..cdc778f9f 100644 --- a/pom.xml +++ b/pom.xml @@ -386,7 +386,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.4.1 + 3.5.0 org.apache.maven.plugins @@ -407,7 +407,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.4.1 + 3.5.0 enforce-maven From 9732b83f5903318733316e7066b5eeae5cedbe0b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 15:58:42 +0200 Subject: [PATCH 862/983] build(deps): update dependency org.codehaus.mojo:animal-sniffer-maven-plugin to v1.23 (#1953) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cdc778f9f..dd819ab46 100644 --- a/pom.xml +++ b/pom.xml @@ -361,7 +361,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.22 + 1.23 org.apache.maven.plugins From 3ec9fdf0a27084e322e54b36baced9db405db9ab Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 15:59:44 +0200 Subject: [PATCH 863/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.7.0 (#1955) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 165129c31..0ca6764c4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.7.0 true diff --git a/pom.xml b/pom.xml index dd819ab46..2d09551fa 100644 --- a/pom.xml +++ b/pom.xml @@ -313,7 +313,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.7.0 attach-javadocs @@ -750,7 +750,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.7.0 com.microsoft.doclet.DocFxDoclet false From 97a6cf001dd4389fc4888341f304c0bda42e6fcd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 16:15:58 +0200 Subject: [PATCH 864/983] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.7.0 (#1957) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- samples/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0ca6764c4..4f00e6f03 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -117,7 +117,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true sonatype-nexus-staging diff --git a/pom.xml b/pom.xml index 2d09551fa..258e85db2 100644 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true ossrh diff --git a/samples/pom.xml b/samples/pom.xml index 88fe18cea..d116730e8 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true From ee976415832500fd4498d737f1e0421d4eec61fa Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 16:41:13 +0200 Subject: [PATCH 865/983] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.3.0 (#1956) --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 99053176b..ba5e2efc8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 3.1.0 + 3.3.0 From 38f711edb24b2d8423b3db52b059335e03b47de0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 9 Jul 2024 16:41:43 +0200 Subject: [PATCH 866/983] build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.6.0 (#1954) --- google-http-client-apache-v2/pom.xml | 2 +- google-http-client-gson/pom.xml | 2 +- google-http-client-jackson2/pom.xml | 2 +- google-http-client-test/pom.xml | 2 +- google-http-client-xml/pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 4541ae527..10307d3bb 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -29,7 +29,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-test-source diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 2db8272b3..bb7dc31b5 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -30,7 +30,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-test-source diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index def789878..d8afee4f6 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -29,7 +29,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-test-source diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 7c0feeb27..89648a188 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -29,7 +29,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-test-source diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 7851bbab1..c3acca5f0 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -29,7 +29,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-test-source diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 5891c62c8..b14c176e5 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-snippets-source diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index cc6cb1fa8..b8adb0e8e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.3.0 + 3.6.0 add-snippets-source From f65d8fcfcb380c3c407fc1aaf152ea512871a61f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:03:44 -0400 Subject: [PATCH 867/983] ci: [java] automatic kokoro label in and /gcbrun comment (#1965) (#1958) Source-Link: https://github.com/googleapis/synthtool/commit/bd2bae89f70bad380da47fab9ec25985dfb87d67 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:72f0d373307d128b2cb720c5cb4d90b31f0e86529dd138c632710ae0c69efae3 Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 4 ++-- .github/trusted-contribution.yml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5db36a5f7..359fe71c1 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:68ba5f5164a4b55529d358bb262feaa000536a0c62980727dd05a91bbb47ea5e -# created: 2024-05-09T16:31:37.168667071Z + digest: sha256:72f0d373307d128b2cb720c5cb4d90b31f0e86529dd138c632710ae0c69efae3 +# created: 2024-06-05T18:32:21.724930324Z diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml index a0ba1f7d9..88d3ac9bf 100644 --- a/.github/trusted-contribution.yml +++ b/.github/trusted-contribution.yml @@ -1,3 +1,9 @@ trustedContributors: - renovate-bot - gcf-owl-bot[bot] + +annotations: +- type: comment + text: "/gcbrun" +- type: label + text: "kokoro:force-run" From 792e44f6a2b7678fef30c3bdfc0955be533a7613 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Tue, 23 Jul 2024 14:04:32 -0400 Subject: [PATCH 868/983] deps: update dependency com.google.cloud:native-image-shared-config to v1.9.0 (#1961) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 4 ++-- pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index b7c2b9dca..ad1099684 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.7.7" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.9.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 5a92b8122..e5229b14e 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.7.7" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.9.0" } env_vars: { @@ -30,4 +30,4 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index 258e85db2..a73175e30 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud native-image-shared-config - 1.7.7 + 1.9.0 + ../pom.xml + + google-http-client-apache-v5 + 1.44.3-SNAPSHOT + Apache HTTP transport v5 for the Google HTTP Client Library for Java. + + + + + maven-javadoc-plugin + + + https://download.oracle.com/javase/7/docs/api/ + + ${project.name} ${project.version} + ${project.artifactId} ${project.version} + + + + maven-source-plugin + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add-test-source + generate-test-sources + + add-test-source + + + + target/generated-test-sources + + + + + + + maven-jar-plugin + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + com.google.api.client.http.apache.v5 + + + + + + org.apache.felix + maven-bundle-plugin + 5.1.9 + + + bundle-manifest + process-classes + + manifest + + + + + + maven-compiler-plugin + 3.13.0 + + 1.8 + 1.8 + + + + + + + com.google.http-client + google-http-client + + + org.apache.httpcomponents + httpcore + + + org.apache.httpcomponents + httpclient + + + + + com.google.guava + guava + + + org.apache.httpcomponents.client5 + httpclient5 + + + org.apache.httpcomponents.core5 + httpcore5 + + + junit + junit + test + + + diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ContentEntity.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ContentEntity.java new file mode 100644 index 000000000..4a5ab84e6 --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ContentEntity.java @@ -0,0 +1,79 @@ +/* + * Copyright 2024 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.apache.v5; + +import com.google.api.client.util.Preconditions; +import com.google.api.client.util.StreamingContent; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import org.apache.hc.core5.http.io.entity.AbstractHttpEntity; + +/** + * Translation class to make google-http-client entity conform with Apache 5.x {@link + * AbstractHttpEntity} + */ +final class Apache5ContentEntity extends AbstractHttpEntity { + + /** Content length or less than zero if not known. */ + private final long contentLength; + + /** Streaming content. */ + private final StreamingContent streamingContent; + + /** + * @param contentLength content length or less than zero if not known + * @param streamingContent streaming content + */ + Apache5ContentEntity( + long contentLength, + StreamingContent streamingContent, + String contentType, + String contentEncoding) { + super(contentType, contentEncoding, contentLength == -1); + this.contentLength = contentLength; + this.streamingContent = Preconditions.checkNotNull(streamingContent); + } + + @Override + public InputStream getContent() { + throw new UnsupportedOperationException(); + } + + @Override + public long getContentLength() { + return contentLength; + } + + @Override + public boolean isRepeatable() { + return false; + } + + @Override + public boolean isStreaming() { + return true; + } + + @Override + public void writeTo(OutputStream out) throws IOException { + if (contentLength != 0) { + streamingContent.writeTo(out); + } + } + + @Override + public void close() throws IOException {} +} diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpRequest.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpRequest.java new file mode 100644 index 000000000..99d6eca8e --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpRequest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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.apache.v5; + +import com.google.api.client.http.LowLevelHttpRequest; +import com.google.api.client.http.LowLevelHttpResponse; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import org.apache.hc.client5.http.ClientProtocolException; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.routing.RoutingSupport; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.util.Timeout; + +public final class Apache5HttpRequest extends LowLevelHttpRequest { + + private final HttpUriRequestBase request; + + private final RequestConfig.Builder requestConfig; + + private final HttpClient httpClient; + + Apache5HttpRequest(HttpClient httpClient, HttpUriRequestBase request) { + this.httpClient = httpClient; + this.request = request; + // disable redirects as google-http-client handles redirects + this.requestConfig = RequestConfig.custom().setRedirectsEnabled(false); + } + + @Override + public void addHeader(String name, String value) { + request.addHeader(name, value); + } + + @Override + public void setTimeout(int connectTimeout, int readTimeout) throws IOException { + requestConfig + .setConnectTimeout(Timeout.of(connectTimeout, TimeUnit.MILLISECONDS)) + // ResponseTimeout behaves the same as 4.x's SocketTimeout + .setResponseTimeout(Timeout.of(readTimeout, TimeUnit.MILLISECONDS)); + } + + @Override + public LowLevelHttpResponse execute() throws IOException { + if (getStreamingContent() != null) { + Apache5ContentEntity entity = + new Apache5ContentEntity( + getContentLength(), getStreamingContent(), getContentType(), getContentEncoding()); + request.setEntity(entity); + } + request.setConfig(requestConfig.build()); + HttpHost target; + try { + target = RoutingSupport.determineHost(request); + } catch (HttpException e) { + throw new ClientProtocolException("The request's host is invalid.", e); + } + // we use a null context so the client creates the default one internally + ClassicHttpResponse httpResponse = httpClient.executeOpen(target, request, null); + return new Apache5HttpResponse(request, httpResponse); + } +} diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java new file mode 100644 index 000000000..1574c8c89 --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java @@ -0,0 +1,102 @@ +/* + * Copyright 2024 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.apache.v5; + +import com.google.api.client.http.LowLevelHttpResponse; +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Logger; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.message.StatusLine; + +final class Apache5HttpResponse extends LowLevelHttpResponse { + + private static final Logger LOGGER = Logger.getLogger(Apache5HttpResponse.class.getName()); + private final HttpUriRequestBase request; + private final ClassicHttpResponse response; + private final Header[] allHeaders; + private final HttpEntity entity; + + Apache5HttpResponse(HttpUriRequestBase request, ClassicHttpResponse response) { + this.request = request; + this.response = response; + this.allHeaders = response.getHeaders(); + this.entity = response.getEntity(); + } + + @Override + public int getStatusCode() { + return response.getCode(); + } + + @Override + public InputStream getContent() throws IOException { + return new Apache5ResponseContent(entity.getContent(), response); + } + + @Override + public String getContentEncoding() { + return entity != null ? entity.getContentEncoding() : null; + } + + @Override + public long getContentLength() { + return entity == null ? -1 : entity.getContentLength(); + } + + @Override + public String getContentType() { + return entity == null ? null : entity.getContentType(); + } + + @Override + public String getReasonPhrase() { + return response.getReasonPhrase(); + } + + @Override + public String getStatusLine() { + return new StatusLine(response).toString(); + } + + public String getHeaderValue(String name) { + return response.getLastHeader(name).getValue(); + } + + @Override + public int getHeaderCount() { + return allHeaders.length; + } + + @Override + public String getHeaderName(int index) { + return allHeaders[index].getName(); + } + + @Override + public String getHeaderValue(int index) { + return allHeaders[index].getValue(); + } + + /** Aborts execution of the request. */ + @Override + public void disconnect() throws IOException { + request.abort(); + response.close(); + } +} diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpTransport.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpTransport.java new file mode 100644 index 000000000..868a2cf93 --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpTransport.java @@ -0,0 +1,221 @@ +/* + * Copyright 2024 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.apache.v5; + +import com.google.api.client.http.HttpMethods; +import com.google.api.client.http.HttpTransport; +import com.google.common.annotations.Beta; +import com.google.common.base.Preconditions; +import java.io.IOException; +import java.net.ProxySelector; +import java.net.URI; +import java.util.concurrent.TimeUnit; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpHead; +import org.apache.hc.client5.http.classic.methods.HttpOptions; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpTrace; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.ConnectionConfig; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.impl.routing.SystemDefaultRoutePlanner; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.core5.io.CloseMode; +import org.apache.hc.core5.io.ModalCloseable; + +/** + * Thread-safe HTTP transport based on the Apache HTTP Client library. + * + *

              Implementation is thread-safe, as long as any parameter modification to the {@link + * #getHttpClient() Apache HTTP Client} is only done at initialization time. For maximum efficiency, + * applications should use a single globally-shared instance of the HTTP transport. + * + *

              Default settings are specified in {@link #newDefaultHttpClient()}. Use the {@link + * #Apache5HttpTransport(HttpClient)} constructor to override the Apache HTTP Client used. Please + * read the + * Apache HTTP Client 5.x configuration example for more complex configuration options. + */ +public final class Apache5HttpTransport extends HttpTransport { + + /** Apache HTTP client. */ + private final HttpClient httpClient; + + /** If the HTTP client uses mTLS channel. */ + private final boolean isMtls; + + /** Constructor that uses {@link #newDefaultHttpClient()} for the Apache HTTP client. */ + public Apache5HttpTransport() { + this(newDefaultHttpClient(), false); + } + + /** + * Constructor that allows an alternative Apache HTTP client to be used. + * + *

              If you choose to provide your own Apache HttpClient implementation, be sure that + * + *

                + *
              • HTTP version is set to 1.1. + *
              • Retries are disabled (google-http-client handles retries). + *
              + * + * @param httpClient Apache HTTP client to use + */ + public Apache5HttpTransport(HttpClient httpClient) { + this.httpClient = httpClient; + this.isMtls = false; + } + + /** + * {@link Beta}
              + * Constructor that allows an alternative CLoseable Apache HTTP client to be used. + * + *

              If you choose to provide your own Apache HttpClient implementation, be sure that + * + *

                + *
              • HTTP version is set to 1.1. + *
              • Retries are disabled (google-http-client handles retries). + *
              • Redirects are disabled (google-http-client handles retries). + *
              + * + * @param httpClient Apache HTTP client to use + * @param isMtls If the HTTP client is mutual TLS + */ + @Beta + public Apache5HttpTransport(HttpClient httpClient, boolean isMtls) { + this.httpClient = httpClient; + this.isMtls = isMtls; + } + + /** + * Creates a new instance of the Apache HTTP client that is used by the {@link + * #Apache5HttpTransport()} constructor. + * + *

              Settings: + * + *

                + *
              • The client connection manager is set to {@link PoolingHttpClientConnectionManager}. + *
              • The retry mechanism is turned off using {@link + * HttpClientBuilder#disableAutomaticRetries()}. + *
              • Redirects are turned off using {@link HttpClientBuilder#disableRedirectHandling}. + *
              • The route planner uses {@link SystemDefaultRoutePlanner} with {@link + * ProxySelector#getDefault()}, which uses the proxy settings from system + * properties. + *
              + * + * @return new instance of the Apache HTTP client + */ + public static HttpClient newDefaultHttpClient() { + return newDefaultHttpClientBuilder().build(); + } + + /** + * Creates a new Apache HTTP client builder that is used by the {@link #Apache5HttpTransport()} + * constructor. + * + *

              Settings: + * + *

                + *
              • The client connection manager is set to {@link PoolingHttpClientConnectionManager}. + *
              • The retry mechanism is turned off using {@link + * HttpClientBuilder#disableAutomaticRetries()}. + *
              • Redirects are turned off using {@link HttpClientBuilder#disableRedirectHandling}. + *
              • The route planner uses {@link SystemDefaultRoutePlanner} with {@link + * ProxySelector#getDefault()}, which uses the proxy settings from system + * properties. + *
              + * + * @return new instance of the Apache HTTP client builder + */ + public static HttpClientBuilder newDefaultHttpClientBuilder() { + PoolingHttpClientConnectionManager connectionManager = + PoolingHttpClientConnectionManagerBuilder.create() + .setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) + .setMaxConnTotal(200) + .setMaxConnPerRoute(20) + .setDefaultConnectionConfig( + ConnectionConfig.custom().setTimeToLive(-1, TimeUnit.MILLISECONDS).build()) + .build(); + + return HttpClients.custom() + .useSystemProperties() + .setConnectionManager(connectionManager) + .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) + .disableRedirectHandling() + .disableAutomaticRetries(); + } + + @Override + public boolean supportsMethod(String method) { + return true; + } + + @Override + protected Apache5HttpRequest buildRequest(String method, String url) { + HttpUriRequestBase requestBase; + if (method.equals(HttpMethods.DELETE)) { + requestBase = new HttpDelete(url); + } else if (method.equals(HttpMethods.GET)) { + requestBase = new HttpGet(url); + } else if (method.equals(HttpMethods.HEAD)) { + requestBase = new HttpHead(url); + } else if (method.equals(HttpMethods.PATCH)) { + requestBase = new HttpPatch(url); + } else if (method.equals(HttpMethods.POST)) { + requestBase = new HttpPost(url); + } else if (method.equals(HttpMethods.PUT)) { + requestBase = new HttpPut(url); + } else if (method.equals(HttpMethods.TRACE)) { + requestBase = new HttpTrace(url); + } else if (method.equals(HttpMethods.OPTIONS)) { + requestBase = new HttpOptions(url); + } else { + requestBase = new HttpUriRequestBase(Preconditions.checkNotNull(method), URI.create(url)); + } + return new Apache5HttpRequest(httpClient, requestBase); + } + + /** + * Gracefully shuts down the connection manager and releases allocated resources. This closes all + * connections, whether they are currently used or not. + */ + @Override + public void shutdown() throws IOException { + if (httpClient instanceof ModalCloseable) { + ((ModalCloseable) httpClient).close(CloseMode.GRACEFUL); + } + // otherwise no-op + } + + /** Returns the Apache HTTP client. */ + public HttpClient getHttpClient() { + return httpClient; + } + + /** Returns if the underlying HTTP client is mTLS. */ + @Override + public boolean isMtls() { + return isMtls; + } +} diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java new file mode 100644 index 000000000..c2d3091df --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java @@ -0,0 +1,75 @@ +package com.google.api.client.http.apache.v5; + +import com.google.common.annotations.VisibleForTesting; +import java.io.IOException; +import java.io.InputStream; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.HttpResponse; + +/** + * Class that wraps an {@link org.apache.hc.core5.http.HttpEntity}'s content {@link InputStream} + * along with the {@link ClassicHttpResponse} that contains this entity. The main purpose is to be + * able to close the response as well as the content input stream when {@link #close()} is called, + * in order to not break the existing contract with clients using apache v4 that only required them + * to close the input stream to clean up all resources. + */ +public class Apache5ResponseContent extends InputStream { + private final ClassicHttpResponse response; + private final InputStream wrappedStream; + + public Apache5ResponseContent(InputStream wrappedStream, ClassicHttpResponse response) { + this.response = response; + this.wrappedStream = wrappedStream; + } + + @Override + public int read() throws IOException { + return wrappedStream.read(); + } + + @Override + public int read(byte b[]) throws IOException { + return wrappedStream.read(b); + } + + @Override + public int read(byte b[], int off, int len) throws IOException { + return wrappedStream.read(b, off, len); + } + + @Override + public long skip(long n) throws IOException { + return wrappedStream.skip(n); + } + + @Override + public int available() throws IOException { + return wrappedStream.available(); + } + + @Override + public synchronized void mark(int readlimit) { + wrappedStream.mark(readlimit); + } + + @Override + public synchronized void reset() throws IOException { + wrappedStream.reset(); + } + + @Override + public void close() throws IOException { + wrappedStream.close(); + response.close(); + } + + @Override + public boolean markSupported() { + return wrappedStream.markSupported(); + } + + @VisibleForTesting + HttpResponse getResponse() { + return response; + } +} diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/package-info.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/package-info.java new file mode 100644 index 000000000..223edc82d --- /dev/null +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/package-info.java @@ -0,0 +1,16 @@ +/* + * Copyright 2024 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. + */ + +/** HTTP Transport library for Google API's based on Apache HTTP Client/Core version 5.x */ +package com.google.api.client.http.apache.v5; diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpRequestTest.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpRequestTest.java new file mode 100644 index 000000000..3b7ca4a21 --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpRequestTest.java @@ -0,0 +1,131 @@ +/* + * 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.apache.v5; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.google.api.client.http.ByteArrayContent; +import com.google.api.client.http.HttpContent; +import com.google.api.client.http.InputStreamContent; +import com.google.api.client.http.LowLevelHttpResponse; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicInteger; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.core5.http.ClassicHttpRequest; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.io.entity.BasicHttpEntity; +import org.apache.hc.core5.http.protocol.HttpContext; +import org.junit.Test; + +public class Apache5HttpRequestTest { + @Test + public void testContentLengthSet() throws Exception { + HttpUriRequestBase base = new HttpPost("http://www.google.com"); + Apache5HttpRequest request = + new Apache5HttpRequest( + new MockHttpClient() { + @Override + public ClassicHttpResponse executeOpen( + HttpHost target, ClassicHttpRequest request, HttpContext context) { + return new MockClassicHttpResponse(); + } + }, + base); + HttpContent content = + new ByteArrayContent("text/plain", "sample".getBytes(StandardCharsets.UTF_8)); + request.setStreamingContent(content); + request.setContentLength(content.getLength()); + request.execute(); + + assertFalse(base.getEntity().isChunked()); + assertEquals(6, base.getEntity().getContentLength()); + } + + @Test + public void testChunked() throws Exception { + byte[] buf = new byte[300]; + Arrays.fill(buf, (byte) ' '); + HttpUriRequestBase base = new HttpPost("http://www.google.com"); + Apache5HttpRequest request = + new Apache5HttpRequest( + new MockHttpClient() { + @Override + public ClassicHttpResponse executeOpen( + HttpHost target, ClassicHttpRequest request, HttpContext context) { + return new MockClassicHttpResponse(); + } + }, + base); + HttpContent content = new InputStreamContent("text/plain", new ByteArrayInputStream(buf)); + request.setStreamingContent(content); + request.execute(); + + assertTrue(base.getEntity().isChunked()); + assertEquals(-1, base.getEntity().getContentLength()); + } + + @Test + public void testExecute_closeContent_closesResponse() throws Exception { + HttpUriRequestBase base = new HttpPost("http://www.google.com"); + final InputStream responseContentStream = new ByteArrayInputStream(new byte[] {1, 2, 3}); + BasicHttpEntity testEntity = + new BasicHttpEntity(responseContentStream, ContentType.DEFAULT_BINARY); + AtomicInteger closedResponseCounter = new AtomicInteger(0); + ClassicHttpResponse classicResponse = + new MockClassicHttpResponse() { + @Override + public HttpEntity getEntity() { + return testEntity; + } + + @Override + public void close() { + closedResponseCounter.incrementAndGet(); + } + }; + + Apache5HttpRequest request = + new Apache5HttpRequest( + new MockHttpClient() { + @Override + public ClassicHttpResponse executeOpen( + HttpHost target, ClassicHttpRequest request, HttpContext context) { + return classicResponse; + } + }, + base); + LowLevelHttpResponse response = request.execute(); + assertTrue(response instanceof Apache5HttpResponse); + + // we confirm that the classic response we prepared in this test is the same as the content's + // response + assertTrue(response.getContent() instanceof Apache5ResponseContent); + assertEquals(classicResponse, ((Apache5ResponseContent) response.getContent()).getResponse()); + + // we close the response's content stream and confirm the response is also closed + assertEquals(0, closedResponseCounter.get()); + response.getContent().close(); + assertEquals(1, closedResponseCounter.get()); + } +} diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpTransportTest.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpTransportTest.java new file mode 100644 index 000000000..99045d99d --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpTransportTest.java @@ -0,0 +1,353 @@ +/* + * 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.apache.v5; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; + +import com.google.api.client.http.GenericUrl; +import com.google.api.client.http.HttpResponseException; +import com.google.api.client.http.HttpTransport; +import com.google.api.client.http.LowLevelHttpResponse; +import com.google.api.client.util.ByteArrayStreamingContent; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import org.apache.hc.client5.http.ConnectTimeoutException; +import org.apache.hc.client5.http.HttpHostConnectException; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.core5.http.ClassicHttpRequest; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.EntityDetails; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.HttpRequestInterceptor; +import org.apache.hc.core5.http.HttpRequestMapper; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.HttpStatus; +import org.apache.hc.core5.http.impl.bootstrap.HttpServer; +import org.apache.hc.core5.http.impl.io.HttpRequestExecutor; +import org.apache.hc.core5.http.impl.io.HttpService; +import org.apache.hc.core5.http.io.HttpClientConnection; +import org.apache.hc.core5.http.io.HttpRequestHandler; +import org.apache.hc.core5.http.io.entity.ByteArrayEntity; +import org.apache.hc.core5.http.io.support.BasicHttpServerRequestHandler; +import org.apache.hc.core5.http.protocol.HttpContext; +import org.apache.hc.core5.http.protocol.HttpProcessor; +import org.junit.Assert; +import org.junit.Test; + +/** Tests {@link Apache5HttpTransport}. */ +public class Apache5HttpTransportTest { + + @Test + public void testApacheHttpTransport() { + Apache5HttpTransport transport = new Apache5HttpTransport(); + checkHttpTransport(transport); + assertFalse(transport.isMtls()); + } + + @Test + public void testApacheHttpTransportWithParam() { + Apache5HttpTransport transport = new Apache5HttpTransport(HttpClients.custom().build(), true); + checkHttpTransport(transport); + assertTrue(transport.isMtls()); + } + + @Test + public void testNewDefaultHttpClient() { + HttpClient client = Apache5HttpTransport.newDefaultHttpClient(); + checkHttpClient(client); + } + + private void checkHttpTransport(Apache5HttpTransport transport) { + assertNotNull(transport); + HttpClient client = transport.getHttpClient(); + checkHttpClient(client); + } + + private void checkHttpClient(HttpClient client) { + assertNotNull(client); + // TODO(chingor): Is it possible to test this effectively? The newer HttpClient implementations + // are read-only and we're testing that we built the client with the right configuration + } + + @Test + public void testRequestsWithContent() throws IOException { + // This test confirms that we can set the content on any type of request + HttpClient mockClient = + new MockHttpClient() { + @Override + public ClassicHttpResponse executeOpen( + HttpHost target, ClassicHttpRequest request, HttpContext context) { + return new MockClassicHttpResponse(); + } + }; + Apache5HttpTransport transport = new Apache5HttpTransport(mockClient); + + // Test GET. + execute(transport.buildRequest("GET", "http://www.test.url")); + // Test DELETE. + execute(transport.buildRequest("DELETE", "http://www.test.url")); + // Test HEAD. + execute(transport.buildRequest("HEAD", "http://www.test.url")); + + // Test PATCH. + execute(transport.buildRequest("PATCH", "http://www.test.url")); + // Test PUT. + execute(transport.buildRequest("PUT", "http://www.test.url")); + // Test POST. + execute(transport.buildRequest("POST", "http://www.test.url")); + // Test PATCH. + execute(transport.buildRequest("PATCH", "http://www.test.url")); + } + + private void execute(Apache5HttpRequest request) throws IOException { + byte[] bytes = "abc".getBytes(StandardCharsets.UTF_8); + request.setStreamingContent(new ByteArrayStreamingContent(bytes)); + request.setContentType("text/html"); + request.setContentLength(bytes.length); + request.execute(); + } + + @Test + public void testRequestShouldNotFollowRedirects() throws IOException { + final AtomicInteger requestsAttempted = new AtomicInteger(0); + HttpRequestExecutor requestExecutor = + new HttpRequestExecutor() { + @Override + public ClassicHttpResponse execute( + ClassicHttpRequest request, HttpClientConnection connection, HttpContext context) + throws IOException, HttpException { + ClassicHttpResponse response = new MockClassicHttpResponse(); + response.setCode(302); + response.setReasonPhrase(null); + response.addHeader("location", "https://google.com/path"); + response.addHeader(HttpHeaders.SET_COOKIE, ""); + requestsAttempted.incrementAndGet(); + return response; + } + }; + HttpClient client = HttpClients.custom().setRequestExecutor(requestExecutor).build(); + Apache5HttpTransport transport = new Apache5HttpTransport(client); + Apache5HttpRequest request = transport.buildRequest("GET", "https://google.com"); + LowLevelHttpResponse response = request.execute(); + assertEquals(1, requestsAttempted.get()); + assertEquals(302, response.getStatusCode()); + } + + @Test + public void testRequestCanSetHeaders() { + final AtomicBoolean interceptorCalled = new AtomicBoolean(false); + HttpClient client = + HttpClients.custom() + .addRequestInterceptorFirst( + new HttpRequestInterceptor() { + @Override + public void process( + HttpRequest request, EntityDetails details, HttpContext context) + throws HttpException, IOException { + Header header = request.getFirstHeader("foo"); + assertNotNull("Should have found header", header); + assertEquals("bar", header.getValue()); + interceptorCalled.set(true); + throw new IOException("cancelling request"); + } + }) + .build(); + + Apache5HttpTransport transport = new Apache5HttpTransport(client); + Apache5HttpRequest request = transport.buildRequest("GET", "https://google.com"); + request.addHeader("foo", "bar"); + try { + LowLevelHttpResponse response = request.execute(); + fail("should not actually make the request"); + } catch (IOException exception) { + assertEquals("cancelling request", exception.getMessage()); + } + assertTrue("Expected to have called our test interceptor", interceptorCalled.get()); + } + + @Test(timeout = 10_000L) + public void testConnectTimeout() { + // TODO(chanseok): Java 17 returns an IOException (SocketException: Network is unreachable). + // Figure out a way to verify connection timeout works on Java 17+. + assumeTrue(System.getProperty("java.version").compareTo("17") < 0); + + HttpTransport httpTransport = new Apache5HttpTransport(); + GenericUrl url = new GenericUrl("http://google.com:81"); + try { + httpTransport.createRequestFactory().buildGetRequest(url).setConnectTimeout(100).execute(); + fail("should have thrown an exception"); + } catch (HttpHostConnectException | ConnectTimeoutException expected) { + // expected + } catch (IOException e) { + fail("unexpected IOException: " + e.getClass().getName() + ": " + e.getMessage()); + } + } + + private static class FakeServer implements AutoCloseable { + private final HttpServer server; + + FakeServer(final HttpRequestHandler httpHandler) throws IOException { + HttpRequestMapper mapper = + new HttpRequestMapper() { + @Override + public HttpRequestHandler resolve(HttpRequest request, HttpContext context) + throws HttpException { + return httpHandler; + }; + }; + server = + new HttpServer( + 0, + HttpService.builder() + .withHttpProcessor( + new HttpProcessor() { + @Override + public void process( + HttpRequest request, EntityDetails entity, HttpContext context) + throws HttpException, IOException {} + + @Override + public void process( + HttpResponse response, EntityDetails entity, HttpContext context) + throws HttpException, IOException {} + }) + .withHttpServerRequestHandler(new BasicHttpServerRequestHandler(mapper)) + .build(), + null, + null, + null, + null, + null, + null); + // server.createContext("/", httpHandler); + server.start(); + } + + public int getPort() { + return server.getLocalPort(); + } + + @Override + public void close() { + server.initiateShutdown(); + } + } + + @Test + public void testNormalizedUrl() throws IOException { + final HttpRequestHandler handler = + new HttpRequestHandler() { + @Override + public void handle( + ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context) + throws HttpException, IOException { + // Extract the request URI and convert to bytes + byte[] responseData = request.getRequestUri().getBytes(StandardCharsets.UTF_8); + + // Set the response headers (status code and content length) + response.setCode(HttpStatus.SC_OK); + response.setHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(responseData.length)); + + // Set the response entity (body) + ByteArrayEntity entity = new ByteArrayEntity(responseData, ContentType.TEXT_PLAIN); + response.setEntity(entity); + } + }; + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new Apache5HttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpResponse response = + transport.createRequestFactory().buildGetRequest(testUrl).execute(); + assertEquals(200, response.getStatusCode()); + assertEquals("/foo//bar", response.parseAsString()); + } + } + + @Test + public void testReadErrorStream() throws IOException { + final HttpRequestHandler handler = + new HttpRequestHandler() { + @Override + public void handle( + ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context) + throws HttpException, IOException { + byte[] responseData = "Forbidden".getBytes(StandardCharsets.UTF_8); + response.setCode(HttpStatus.SC_FORBIDDEN); // 403 Forbidden + response.setHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(responseData.length)); + ByteArrayEntity entity = new ByteArrayEntity(responseData, ContentType.TEXT_PLAIN); + response.setEntity(entity); + } + }; + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new Apache5HttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpRequest getRequest = + transport.createRequestFactory().buildGetRequest(testUrl); + getRequest.setThrowExceptionOnExecuteError(false); + com.google.api.client.http.HttpResponse response = getRequest.execute(); + assertEquals(403, response.getStatusCode()); + assertEquals("Forbidden", response.parseAsString()); + } + } + + @Test + public void testReadErrorStream_withException() throws IOException { + final HttpRequestHandler handler = + new HttpRequestHandler() { + @Override + public void handle( + ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context) + throws HttpException, IOException { + byte[] responseData = "Forbidden".getBytes(StandardCharsets.UTF_8); + response.setCode(HttpStatus.SC_FORBIDDEN); // 403 Forbidden + response.setHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(responseData.length)); + ByteArrayEntity entity = new ByteArrayEntity(responseData, ContentType.TEXT_PLAIN); + response.setEntity(entity); + } + }; + try (FakeServer server = new FakeServer(handler)) { + HttpTransport transport = new Apache5HttpTransport(); + GenericUrl testUrl = new GenericUrl("http://localhost/foo//bar"); + testUrl.setPort(server.getPort()); + com.google.api.client.http.HttpRequest getRequest = + transport.createRequestFactory().buildGetRequest(testUrl); + try { + getRequest.execute(); + Assert.fail(); + } catch (HttpResponseException ex) { + assertEquals("Forbidden", ex.getContent()); + } + } + } + + private boolean isWindows() { + return System.getProperty("os.name").startsWith("Windows"); + } +} diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockClassicHttpResponse.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockClassicHttpResponse.java new file mode 100644 index 000000000..091721745 --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockClassicHttpResponse.java @@ -0,0 +1,182 @@ +package com.google.api.client.http.apache.v5; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.stream.Collectors; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpVersion; +import org.apache.hc.core5.http.ProtocolException; +import org.apache.hc.core5.http.ProtocolVersion; + +public class MockClassicHttpResponse implements ClassicHttpResponse { + List
              headers = new ArrayList<>(); + int code = 200; + + @Override + public int getCode() { + return code; + } + + @Override + public void setCode(int code) { + this.code = code; + } + + @Override + public String getReasonPhrase() { + return null; + } + + @Override + public void setReasonPhrase(String reason) {} + + @Override + public Locale getLocale() { + return null; + } + + @Override + public void setLocale(Locale loc) {} + + @Override + public void setVersion(ProtocolVersion version) {} + + @Override + public ProtocolVersion getVersion() { + return HttpVersion.HTTP_1_1; + } + + @Override + public void addHeader(Header header) { + headers.add(header); + } + + @Override + public void addHeader(String name, Object value) { + addHeader(newHeader(name, value)); + } + + private Header newHeader(String key, Object value) { + return new Header() { + @Override + public boolean isSensitive() { + return false; + } + + @Override + public String getName() { + return key; + } + + @Override + public String getValue() { + return value.toString(); + } + }; + } + + @Override + public void setHeader(Header header) { + if (headers.contains(header)) { + int index = headers.indexOf(header); + headers.set(index, header); + } else { + addHeader(header); + } + } + + @Override + public void setHeader(String name, Object value) { + setHeader(newHeader(name, value)); + } + + @Override + public void setHeaders(Header... headers) { + for (Header header : headers) { + setHeader(header); + } + } + + @Override + public boolean removeHeader(Header header) { + if (headers.contains(header)) { + headers.remove(headers.indexOf(header)); + return true; + } + return false; + } + + @Override + public boolean removeHeaders(String name) { + int initialSize = headers.size(); + for (Header header : + headers.stream().filter(h -> h.getName() == name).collect(Collectors.toList())) { + removeHeader(header); + } + return headers.size() < initialSize; + } + + @Override + public boolean containsHeader(String name) { + return headers.stream().anyMatch(h -> h.getName() == name); + } + + @Override + public int countHeaders(String name) { + return headers.size(); + } + + @Override + public Header getFirstHeader(String name) { + return headers.stream().findFirst().orElse(null); + } + + @Override + public Header getHeader(String name) throws ProtocolException { + return headers.stream().filter(h -> h.getName() == name).findFirst().orElse(null); + } + + @Override + public Header[] getHeaders() { + return headers.toArray(new Header[0]); + } + + @Override + public Header[] getHeaders(String name) { + return headers.stream() + .filter(h -> h.getName() == name) + .collect(Collectors.toList()) + .toArray(new Header[0]); + } + + @Override + public Header getLastHeader(String name) { + return headers.isEmpty() ? null : headers.get(headers.size() - 1); + } + + @Override + public Iterator
              headerIterator() { + return headers.iterator(); + } + + @Override + public Iterator
              headerIterator(String name) { + return headers.stream().filter(h -> h.getName() == name).iterator(); + } + + @Override + public void close() throws IOException {} + + @Override + public HttpEntity getEntity() { + return null; + } + + @Override + public void setEntity(HttpEntity entity) {} +} diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockHttpClient.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockHttpClient.java new file mode 100644 index 000000000..8d26096cf --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/MockHttpClient.java @@ -0,0 +1,86 @@ +package com.google.api.client.http.apache.v5; + +import com.google.api.client.util.Preconditions; +import java.io.IOException; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.core5.http.ClassicHttpRequest; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.HttpHost; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.io.HttpClientResponseHandler; +import org.apache.hc.core5.http.protocol.HttpContext; + +public class MockHttpClient implements HttpClient { + + /** HTTP response code to use. */ + int responseCode; + + /** Returns the HTTP response code to use. */ + public final int getResponseCode() { + return responseCode; + } + + /** Sets the HTTP response code to use. */ + public MockHttpClient setResponseCode(int responseCode) { + Preconditions.checkArgument(responseCode >= 0); + this.responseCode = responseCode; + return this; + } + + @Override + public HttpResponse execute(ClassicHttpRequest request) throws IOException { + return null; + } + + @Override + public HttpResponse execute(ClassicHttpRequest request, HttpContext context) throws IOException { + return null; + } + + @Override + public ClassicHttpResponse execute(HttpHost target, ClassicHttpRequest request) + throws IOException { + return null; + } + + @Override + public HttpResponse execute(HttpHost target, ClassicHttpRequest request, HttpContext context) + throws IOException { + return null; + } + + @Override + public T execute( + ClassicHttpRequest request, HttpClientResponseHandler responseHandler) + throws IOException { + return null; + } + + @Override + public T execute( + ClassicHttpRequest request, + HttpContext context, + HttpClientResponseHandler responseHandler) + throws IOException { + return null; + } + + @Override + public T execute( + HttpHost target, + ClassicHttpRequest request, + HttpClientResponseHandler responseHandler) + throws IOException { + return null; + } + + @Override + public T execute( + HttpHost target, + ClassicHttpRequest request, + HttpContext context, + HttpClientResponseHandler responseHandler) + throws IOException { + return null; + } +} diff --git a/google-http-client-assembly/classpath-include b/google-http-client-assembly/classpath-include index c1bd80328..c7bbd573f 100644 --- a/google-http-client-assembly/classpath-include +++ b/google-http-client-assembly/classpath-include @@ -7,8 +7,8 @@ - - + + diff --git a/google-http-client-assembly/readme.html b/google-http-client-assembly/readme.html index 5e7af564d..8a146df1e 100644 --- a/google-http-client-assembly/readme.html +++ b/google-http-client-assembly/readme.html @@ -135,8 +135,8 @@

              General Purpose Java Environment Dependencies

              required for general purpose Java applications :
              • commons-logging-${project.commons-logging.version}.jar
              • -
              • httpclient-${project.httpclient.version}.jar
              • -
              • httpcore-${project.httpcore.version}.jar
              • +
              • httpclient-${project.apache-httpclient-4.version}.jar
              • +
              • httpcore-${project.apache-httpcore-4.version}.jar
              diff --git a/pom.xml b/pom.xml index 5760c3e67..8ba47ef2f 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,7 @@ google-http-client-appengine google-http-client-android google-http-client-apache-v2 + google-http-client-apache-v5 google-http-client-protobuf google-http-client-gson google-http-client-jackson2 @@ -156,12 +157,22 @@ org.apache.httpcomponents httpclient - ${project.httpclient.version} + ${project.apache-httpclient-4.version} org.apache.httpcomponents httpcore - ${project.httpcore.version} + ${project.apache-httpcore-4.version} + + + org.apache.httpcomponents.client5 + httpclient5 + ${project.apache-httpclient-5.version} + + + org.apache.httpcomponents.core5 + httpcore5 + ${project.apache-httpcore-5.version} com.google.guava @@ -601,8 +612,10 @@ 3.21.12 30.1.1-android 1.1.4c - 4.5.14 - 4.4.16 + 4.5.14 + 4.4.16 + 5.3.1 + 5.2.4 0.31.1 .. 3.2.5 diff --git a/versions.txt b/versions.txt index 963efeb8d..87dbbb662 100644 --- a/versions.txt +++ b/versions.txt @@ -7,6 +7,7 @@ google-http-client-parent:1.44.2:1.44.3-SNAPSHOT google-http-client-android:1.44.2:1.44.3-SNAPSHOT google-http-client-android-test:1.44.2:1.44.3-SNAPSHOT google-http-client-apache-v2:1.44.2:1.44.3-SNAPSHOT +google-http-client-apache-v5:1.44.2:1.44.3-SNAPSHOT google-http-client-appengine:1.44.2:1.44.3-SNAPSHOT google-http-client-assembly:1.44.2:1.44.3-SNAPSHOT google-http-client-findbugs:1.44.2:1.44.3-SNAPSHOT From 4202d328ea2cefff0771036b010fbfd80928f88c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:11:32 +0200 Subject: [PATCH 877/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.17.2 (#1987) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8ba47ef2f..67d5c5fd8 100644 --- a/pom.xml +++ b/pom.xml @@ -608,7 +608,7 @@ UTF-8 3.0.2 2.10.1 - 2.14.2 + 2.17.2 3.21.12 30.1.1-android 1.1.4c From 9f91eeae7d18e85817ab82236dd98f14cb772c95 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:12:33 +0200 Subject: [PATCH 878/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.11.0 (#1975) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index ad1099684..54dca4f2c 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.9.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.11.0" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index e5229b14e..8b05c77ff 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.9.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.11.0" } env_vars: { diff --git a/pom.xml b/pom.xml index 67d5c5fd8..a3a950bc9 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.9.0 + 1.11.0 If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-http-java-client). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6acb164d7..b7973cc74 100644 --- a/pom.xml +++ b/pom.xml @@ -372,7 +372,7 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.23 + 1.24 org.apache.maven.plugins From e527f0d9624e47c37a551590cf555f6207751fe9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:17:33 +0200 Subject: [PATCH 883/983] deps: update actions/github-script action to v7 (#1994) --- .github/workflows/auto-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 7a106d007..18d92e5a2 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true From f8b0cc1c908b4ebdf3c30a9f9a9b50c96d33f781 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:17:45 +0200 Subject: [PATCH 884/983] deps: update actions/checkout action to v4 (#1993) --- .github/workflows/ci-java7.yaml | 2 +- .github/workflows/ci.yaml | 12 ++++++------ .github/workflows/downstream.yaml | 2 +- .github/workflows/scorecard.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-java7.yaml b/.github/workflows/ci-java7.yaml index e2ce98b22..4dec872e2 100644 --- a/.github/workflows/ci-java7.yaml +++ b/.github/workflows/ci-java7.yaml @@ -24,7 +24,7 @@ jobs: name: "units (7)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v1 # setup-java v2 or higher does not have version 1.7 with: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 32feef7d1..0e87e017c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -41,7 +41,7 @@ jobs: steps: - name: Support longpaths run: git config --system core.longpaths true - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -56,7 +56,7 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -66,7 +66,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -78,7 +78,7 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -94,7 +94,7 @@ jobs: name: "units (21)" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: java-version: 21 diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index c4be85eaa..8681fe5fd 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -133,7 +133,7 @@ jobs: - workflow-executions - workflows steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: zulu diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index dc9e72ff9..6cac86981 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -32,7 +32,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: persist-credentials: false From 08c5e5a7f7a887aaccc03a40c784d34ecbc45984 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:17:58 +0200 Subject: [PATCH 885/983] deps: update ossf/scorecard-action action to v2.4.0 (#1992) --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 6cac86981..f153dddd4 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -37,7 +37,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2 + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 with: results_file: results.sarif results_format: sarif From 66a9f15c35bc64c25f10094c424e025ea6b0a693 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:18:13 +0200 Subject: [PATCH 886/983] deps: update dependency io.grpc:grpc-context to v1.66.0 (#1990) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b7973cc74..ca96fb091 100644 --- a/pom.xml +++ b/pom.xml @@ -252,7 +252,7 @@ io.grpc grpc-context - 1.60.1 + 1.66.0 io.opencensus From 1cfd045ab9f3329f59b5cedfc77e34d21b43e2c1 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:18:21 +0200 Subject: [PATCH 887/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.8.0 (#1973) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) | `3.7.0` -> `3.8.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.7.0/3.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.7.0/3.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-http-java-client). --- google-http-client-bom/pom.xml | 2 +- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 4f00e6f03..3993d1535 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -128,7 +128,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 true diff --git a/pom.xml b/pom.xml index ca96fb091..ba299d7c1 100644 --- a/pom.xml +++ b/pom.xml @@ -324,7 +324,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 attach-javadocs @@ -800,7 +800,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 com.microsoft.doclet.DocFxDoclet false From 6e19c5ca66c67dad53272998535ed197559dfe02 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:18:25 +0200 Subject: [PATCH 888/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.30.0 (#1989) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ba299d7c1..265c9ba27 100644 --- a/pom.xml +++ b/pom.xml @@ -132,7 +132,7 @@ com.google.errorprone error_prone_annotations - 2.23.0 + 2.30.0 com.google.appengine From aecf9b83ffa6ee65063e3d9695ca5eabb607badd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:20:25 +0200 Subject: [PATCH 889/983] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.4.0 (#1983) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 265c9ba27..1211abf9b 100644 --- a/pom.xml +++ b/pom.xml @@ -618,7 +618,7 @@ 5.2.4 0.31.1 .. - 3.2.5 + 3.4.0 false From 05bb0040b654e8c67dd3d550759a42c29e55507b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:20:37 +0200 Subject: [PATCH 890/983] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.2 (#1982) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1211abf9b..7f2e86cb0 100644 --- a/pom.xml +++ b/pom.xml @@ -377,7 +377,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.5.0 + 3.6.2 org.apache.maven.plugins @@ -560,7 +560,7 @@ maven-project-info-reports-plugin - 3.5.0 + 3.6.2 From 470d3c2d204e2a9793439d58552f609f52c798ce Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:20:48 +0200 Subject: [PATCH 891/983] build(deps): update dependency org.apache.maven.plugins:maven-dependency-plugin to v3.7.1 (#1981) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7f2e86cb0..0877dd710 100644 --- a/pom.xml +++ b/pom.xml @@ -387,7 +387,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.7.1 org.apache.maven.plugins From b9c628a38d3261dc99b6a4b7f16d55318ab32132 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:20:59 +0200 Subject: [PATCH 892/983] build(deps): update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.4.0 (#1980) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0877dd710..cc8fe6551 100644 --- a/pom.xml +++ b/pom.xml @@ -357,7 +357,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + 3.4.0 org.codehaus.mojo From a3fd1e34925a531d47613145d5f3b5473cef2d82 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:21:12 +0200 Subject: [PATCH 893/983] deps: update project.appengine.version to v2.0.29 (#1978) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cc8fe6551..591d71977 100644 --- a/pom.xml +++ b/pom.xml @@ -604,7 +604,7 @@ - Internally, update the default features.json file --> 1.44.3-SNAPSHOT - 2.0.27 + 2.0.29 UTF-8 3.0.2 2.10.1 From 052fc10f1bcf448ac59e03228e135b3d637423bf Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:21:23 +0200 Subject: [PATCH 894/983] build(deps): update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.5 (#1976) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3993d1535..3e5a6aee6 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -166,7 +166,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.4 + 3.2.5 sign-artifacts diff --git a/pom.xml b/pom.xml index 591d71977..1d2f7e25d 100644 --- a/pom.xml +++ b/pom.xml @@ -711,7 +711,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.4 + 3.2.5 sign-artifacts From ab913a34f94f61c864bfcf23390663bc779cc272 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 20:21:59 +0200 Subject: [PATCH 895/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.44.0 (#1985) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c269830a9..54ade4611 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.10.0 + 26.44.0 pom import From 9d7a71693fe8661a4460763feb04ef300783eab6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 21:42:02 +0200 Subject: [PATCH 896/983] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.4.1 (#1984) --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index ba5e2efc8..9e5ac5075 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 3.3.0 + 3.4.1 From 07aa01c2f86dc35fd6d1f968cbf111315ef26aa5 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 21:57:31 +0200 Subject: [PATCH 897/983] deps: update actions/setup-java action to v4 (#1995) * deps: update actions/setup-java action to v4 * Update ci-java7.yaml * Update ci-java7.yaml * Update ci-java7.yaml * Update ci-java7.yaml --------- Co-authored-by: Diego Marquez --- .github/workflows/ci-java7.yaml | 9 +++++---- .github/workflows/ci.yaml | 14 +++++++------- .github/workflows/downstream.yaml | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-java7.yaml b/.github/workflows/ci-java7.yaml index 4dec872e2..5086c87d5 100644 --- a/.github/workflows/ci-java7.yaml +++ b/.github/workflows/ci-java7.yaml @@ -25,19 +25,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v4 # setup-java v2 or higher does not have version 1.7 with: - version: 1.7 + java-version: 7 + distribution: zulu architecture: x64 - run: | java -version # This value is used in "-Djvm=" later echo "JAVA7_HOME=${JAVA_HOME}" >> $GITHUB_ENV - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: 17 - distribution: temurin + distribution: zulu - name: Set up Maven uses: stCarolas/setup-maven@v4.5 with: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e87e017c..4595806ea 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -28,7 +28,7 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: ${{matrix.java}} @@ -42,7 +42,7 @@ jobs: - name: Support longpaths run: git config --system core.longpaths true - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 8 @@ -57,7 +57,7 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: ${{matrix.java}} @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 8 @@ -95,7 +95,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: 21 distribution: temurin @@ -104,7 +104,7 @@ jobs: # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV shell: bash - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: java-version: 8 distribution: temurin diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 8681fe5fd..1f44d518d 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -134,7 +134,7 @@ jobs: - workflows steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: zulu java-version: ${{matrix.java}} From 63afd35f0a3c15f5a66f5b6a06bae01f82b54504 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 21:57:37 +0200 Subject: [PATCH 898/983] deps: update dependency com.google.code.gson:gson to v2.11.0 (#1988) * deps: update dependency com.google.code.gson:gson to v2.11.0 * exclude error prone annotations --------- Co-authored-by: Diego Marquez --- pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1d2f7e25d..274d4474f 100644 --- a/pom.xml +++ b/pom.xml @@ -117,6 +117,12 @@ com.google.code.gson gson ${project.gson.version} + + + com.google.errorprone + error_prone_annotations + + junit @@ -607,7 +613,7 @@ 2.0.29 UTF-8 3.0.2 - 2.10.1 + 2.11.0 2.17.2 3.21.12 30.1.1-android From c4ebcdca478590c991ead047db3f92fdad941ef7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 22:11:33 +0200 Subject: [PATCH 899/983] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.1.3 (#2001) --- pom.xml | 2 +- samples/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 274d4474f..882848cd0 100644 --- a/pom.xml +++ b/pom.xml @@ -312,7 +312,7 @@ maven-deploy-plugin - 3.1.2 + 3.1.3 org.apache.maven.plugins diff --git a/samples/pom.xml b/samples/pom.xml index d116730e8..d0d9e30e4 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.2 + 3.1.3 true From 8c6106505a119380e555c64151542445f0e1a5f8 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 21 Aug 2024 22:11:49 +0200 Subject: [PATCH 900/983] deps: update dependency org.apache.httpcomponents.core5:httpcore5 to v5.2.5 (#2002) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 882848cd0..96257f362 100644 --- a/pom.xml +++ b/pom.xml @@ -621,7 +621,7 @@ 4.5.14 4.4.16 5.3.1 - 5.2.4 + 5.2.5 0.31.1 .. 3.4.0 From 354e4d5b6b4639c1da53aa930f59ceeca45237e7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:28:04 -0400 Subject: [PATCH 901/983] chore(main): release 1.45.0 (#1946) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 28 +++++++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 22 +++++++------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 84 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cb4c04d2..3dcf93689 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [1.45.0](https://github.com/googleapis/google-http-java-client/compare/v1.44.2...v1.45.0) (2024-08-21) + + +### Features + +* Introduce google-http-client-apache-v5 (Apache Client/Core 5.x) ([#1960](https://github.com/googleapis/google-http-java-client/issues/1960)) ([5d527dc](https://github.com/googleapis/google-http-java-client/commit/5d527dc3afade0834a82e5280f22e0129b5f1297)) +* Next release from main is 1.45.0 ([#1972](https://github.com/googleapis/google-http-java-client/issues/1972)) ([094dcc8](https://github.com/googleapis/google-http-java-client/commit/094dcc87f22d16686242ce6cb06151b2a199ec2a)) + + +### Dependencies + +* Update actions/checkout action to v4 ([#1993](https://github.com/googleapis/google-http-java-client/issues/1993)) ([f8b0cc1](https://github.com/googleapis/google-http-java-client/commit/f8b0cc1c908b4ebdf3c30a9f9a9b50c96d33f781)) +* Update actions/github-script action to v7 ([#1994](https://github.com/googleapis/google-http-java-client/issues/1994)) ([e527f0d](https://github.com/googleapis/google-http-java-client/commit/e527f0d9624e47c37a551590cf555f6207751fe9)) +* Update actions/setup-java action to v4 ([#1995](https://github.com/googleapis/google-http-java-client/issues/1995)) ([07aa01c](https://github.com/googleapis/google-http-java-client/commit/07aa01c2f86dc35fd6d1f968cbf111315ef26aa5)) +* Update actions/upload-artifact action to v4 ([#1996](https://github.com/googleapis/google-http-java-client/issues/1996)) ([5ba7021](https://github.com/googleapis/google-http-java-client/commit/5ba70218d8bdae18094b1031f9c800688aa58fb4)) +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.17.2 ([#1987](https://github.com/googleapis/google-http-java-client/issues/1987)) ([4202d32](https://github.com/googleapis/google-http-java-client/commit/4202d328ea2cefff0771036b010fbfd80928f88c)) +* Update dependency com.google.cloud:native-image-shared-config to v1.7.7 ([#1937](https://github.com/googleapis/google-http-java-client/issues/1937)) ([b224a1d](https://github.com/googleapis/google-http-java-client/commit/b224a1d64cae44878f1bb0af83fb8e33e2e12d63)) +* Update dependency com.google.cloud:native-image-shared-config to v1.9.0 ([#1961](https://github.com/googleapis/google-http-java-client/issues/1961)) ([792e44f](https://github.com/googleapis/google-http-java-client/commit/792e44f6a2b7678fef30c3bdfc0955be533a7613)) +* Update dependency com.google.code.gson:gson to v2.11.0 ([#1988](https://github.com/googleapis/google-http-java-client/issues/1988)) ([63afd35](https://github.com/googleapis/google-http-java-client/commit/63afd35f0a3c15f5a66f5b6a06bae01f82b54504)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.30.0 ([#1989](https://github.com/googleapis/google-http-java-client/issues/1989)) ([6e19c5c](https://github.com/googleapis/google-http-java-client/commit/6e19c5ca66c67dad53272998535ed197559dfe02)) +* Update dependency com.google.j2objc:j2objc-annotations to v3 ([#1998](https://github.com/googleapis/google-http-java-client/issues/1998)) ([3d70537](https://github.com/googleapis/google-http-java-client/commit/3d7053747076e599f819c41f8362f6070a96ce8a)) +* Update dependency io.grpc:grpc-context to v1.66.0 ([#1990](https://github.com/googleapis/google-http-java-client/issues/1990)) ([66a9f15](https://github.com/googleapis/google-http-java-client/commit/66a9f15c35bc64c25f10094c424e025ea6b0a693)) +* Update dependency org.apache.httpcomponents.core5:httpcore5 to v5.2.5 ([#2002](https://github.com/googleapis/google-http-java-client/issues/2002)) ([8c61065](https://github.com/googleapis/google-http-java-client/commit/8c6106505a119380e555c64151542445f0e1a5f8)) +* Update github/codeql-action action to v3 ([#2000](https://github.com/googleapis/google-http-java-client/issues/2000)) ([7250f64](https://github.com/googleapis/google-http-java-client/commit/7250f649be7a989dc0a855d6f6ddff987ac0ebaa)) +* Update ossf/scorecard-action action to v2.4.0 ([#1992](https://github.com/googleapis/google-http-java-client/issues/1992)) ([08c5e5a](https://github.com/googleapis/google-http-java-client/commit/08c5e5a7f7a887aaccc03a40c784d34ecbc45984)) +* Update project.appengine.version to v2.0.27 ([#1938](https://github.com/googleapis/google-http-java-client/issues/1938)) ([3f27cc8](https://github.com/googleapis/google-http-java-client/commit/3f27cc800db62c2208160234a5afad641f1a3781)) +* Update project.appengine.version to v2.0.29 ([#1978](https://github.com/googleapis/google-http-java-client/issues/1978)) ([a3fd1e3](https://github.com/googleapis/google-http-java-client/commit/a3fd1e34925a531d47613145d5f3b5473cef2d82)) + ## [1.44.2](https://github.com/googleapis/google-http-java-client/compare/v1.44.1...v1.44.2) (2024-05-16) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 500725541..48bc0f333 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.44.3-SNAPSHOT + 1.45.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.44.3-SNAPSHOT + 1.45.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.44.3-SNAPSHOT + 1.45.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index bedac6c25..1ac9f5e2b 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-android - 1.44.3-SNAPSHOT + 1.45.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 10307d3bb..0e1c72742 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-apache-v2 - 1.44.3-SNAPSHOT + 1.45.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index a67897975..c2cd4f070 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-apache-v5 - 1.44.3-SNAPSHOT + 1.45.0 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index a61580b85..573b3a334 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-appengine - 1.44.3-SNAPSHOT + 1.45.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 3f82074e3..3f58b39d8 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.44.3-SNAPSHOT + 1.45.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 3e5a6aee6..ac2f8cbab 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.44.3-SNAPSHOT + 1.45.0 pom Google HTTP Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.http-client google-http-client - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-android - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-apache-v2 - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-appengine - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-findbugs - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-gson - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-jackson2 - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-protobuf - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-test - 1.44.3-SNAPSHOT + 1.45.0 com.google.http-client google-http-client-xml - 1.44.3-SNAPSHOT + 1.45.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 812f9f8de..00c3f9a98 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-findbugs - 1.44.3-SNAPSHOT + 1.45.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index bb7dc31b5..81c9e005f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-gson - 1.44.3-SNAPSHOT + 1.45.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index d8afee4f6..a9450c3be 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-jackson2 - 1.44.3-SNAPSHOT + 1.45.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index f5b9a87b8..814c4a951 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-protobuf - 1.44.3-SNAPSHOT + 1.45.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 89648a188..82bd423c5 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-test - 1.44.3-SNAPSHOT + 1.45.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c3acca5f0..c28f0e20f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client-xml - 1.44.3-SNAPSHOT + 1.45.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e787ec4ec..d1dd414fa 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../pom.xml google-http-client - 1.44.3-SNAPSHOT + 1.45.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 96257f362..ea79fec71 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.44.3-SNAPSHOT + 1.45.0 2.0.29 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 9e5ac5075..14d9218ce 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.44.3-SNAPSHOT + 1.45.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 87dbbb662..aa6a7232b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.44.2:1.44.3-SNAPSHOT -google-http-client-bom:1.44.2:1.44.3-SNAPSHOT -google-http-client-parent:1.44.2:1.44.3-SNAPSHOT -google-http-client-android:1.44.2:1.44.3-SNAPSHOT -google-http-client-android-test:1.44.2:1.44.3-SNAPSHOT -google-http-client-apache-v2:1.44.2:1.44.3-SNAPSHOT -google-http-client-apache-v5:1.44.2:1.44.3-SNAPSHOT -google-http-client-appengine:1.44.2:1.44.3-SNAPSHOT -google-http-client-assembly:1.44.2:1.44.3-SNAPSHOT -google-http-client-findbugs:1.44.2:1.44.3-SNAPSHOT -google-http-client-gson:1.44.2:1.44.3-SNAPSHOT -google-http-client-jackson2:1.44.2:1.44.3-SNAPSHOT -google-http-client-protobuf:1.44.2:1.44.3-SNAPSHOT -google-http-client-test:1.44.2:1.44.3-SNAPSHOT -google-http-client-xml:1.44.2:1.44.3-SNAPSHOT +google-http-client:1.45.0:1.45.0 +google-http-client-bom:1.45.0:1.45.0 +google-http-client-parent:1.45.0:1.45.0 +google-http-client-android:1.45.0:1.45.0 +google-http-client-android-test:1.45.0:1.45.0 +google-http-client-apache-v2:1.45.0:1.45.0 +google-http-client-apache-v5:1.45.0:1.45.0 +google-http-client-appengine:1.45.0:1.45.0 +google-http-client-assembly:1.45.0:1.45.0 +google-http-client-findbugs:1.45.0:1.45.0 +google-http-client-gson:1.45.0:1.45.0 +google-http-client-jackson2:1.45.0:1.45.0 +google-http-client-protobuf:1.45.0:1.45.0 +google-http-client-test:1.45.0:1.45.0 +google-http-client-xml:1.45.0:1.45.0 From f9d4e15bd3c784b1fd3b0f3468000a91c6f79715 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:52:43 +0000 Subject: [PATCH 902/983] chore: remove owlbot (#2010) --- .github/.OwlBot.lock.yaml | 17 ------ .github/.OwlBot.yaml | 16 ------ .github/generated-files-bot.yml | 12 ----- codecov.yaml | 4 -- owlbot.py | 39 -------------- synth.metadata | 91 --------------------------------- 6 files changed, 179 deletions(-) delete mode 100644 .github/.OwlBot.lock.yaml delete mode 100644 .github/.OwlBot.yaml delete mode 100644 .github/generated-files-bot.yml delete mode 100644 codecov.yaml delete mode 100644 owlbot.py delete mode 100644 synth.metadata diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 359fe71c1..000000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2024 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. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:72f0d373307d128b2cb720c5cb4d90b31f0e86529dd138c632710ae0c69efae3 -# created: 2024-06-05T18:32:21.724930324Z diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 5d9a9d8b5..000000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2021 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. - -docker: - image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml deleted file mode 100644 index c644a24e1..000000000 --- a/.github/generated-files-bot.yml +++ /dev/null @@ -1,12 +0,0 @@ -externalManifests: -- type: json - file: 'synth.metadata' - jsonpath: '$.generatedFiles[*]' -- type: json - file: '.github/readme/synth.metadata/synth.metadata' - jsonpath: '$.generatedFiles[*]' -ignoreAuthors: -- 'renovate-bot' -- 'yoshi-automation' -- 'release-please[bot]' -- 'gcf-owl-bot[bot]' diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5724ea947..000000000 --- a/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index cfc9ba444..000000000 --- a/owlbot.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2021 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 -# -# https://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. - -import synthtool as s -from synthtool.languages import java - - -for library in s.get_staging_dirs(): - # put any special-case replacements here - s.move(library) - -s.remove_staging_dirs() -java.common_templates( - excludes=[ - "README.md", - "CONTRIBUTING.md", - "java.header", - "checkstyle.xml", - "license-checks.xml", - ".github/workflows/samples.yaml", - ".kokoro/build.sh", - "renovate.json", - ".github/workflows/ci.yaml", - ".kokoro/requirements.in", - ".kokoro/requirements.txt", - ".kokoro/dependencies.sh" # Remove this once updated in synthtool - ] -) diff --git a/synth.metadata b/synth.metadata deleted file mode 100644 index 53b033004..000000000 --- a/synth.metadata +++ /dev/null @@ -1,91 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/google-http-java-client.git", - "sha": "9f389ef89195af77eff8f1e1c1c9ee9bf9c7792c" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "a4be3384ccb92364795d981f2863f6986fcee620" - } - } - ], - "generatedFiles": [ - ".github/CODEOWNERS", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/blunderbuss.yml", - ".github/generated-files-bot.yml", - ".github/release-please.yml", - ".github/release-trigger.yml", - ".github/snippet-bot.yml", - ".github/sync-repo-settings.yaml", - ".github/trusted-contribution.yml", - ".github/workflows/approve-readme.yaml", - ".github/workflows/auto-release.yaml", - ".github/workflows/ci.yaml", - ".kokoro/build.bat", - ".kokoro/build.sh", - ".kokoro/coerce_logs.sh", - ".kokoro/common.cfg", - ".kokoro/common.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/java8.cfg", - ".kokoro/dependencies.sh", - ".kokoro/nightly/common.cfg", - ".kokoro/nightly/integration.cfg", - ".kokoro/nightly/java11.cfg", - ".kokoro/nightly/java7.cfg", - ".kokoro/nightly/java8-osx.cfg", - ".kokoro/nightly/java8-win.cfg", - ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/clirr.cfg", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/dependencies.cfg", - ".kokoro/presubmit/integration.cfg", - ".kokoro/presubmit/java11.cfg", - ".kokoro/presubmit/java7.cfg", - ".kokoro/presubmit/java8-osx.cfg", - ".kokoro/presubmit/java8-win.cfg", - ".kokoro/presubmit/java8.cfg", - ".kokoro/presubmit/linkage-monitor.cfg", - ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", - ".kokoro/readme.sh", - ".kokoro/release/bump_snapshot.cfg", - ".kokoro/release/common.cfg", - ".kokoro/release/common.sh", - ".kokoro/release/drop.cfg", - ".kokoro/release/drop.sh", - ".kokoro/release/promote.cfg", - ".kokoro/release/promote.sh", - ".kokoro/release/publish_javadoc.cfg", - ".kokoro/release/publish_javadoc.sh", - ".kokoro/release/publish_javadoc11.cfg", - ".kokoro/release/publish_javadoc11.sh", - ".kokoro/release/snapshot.cfg", - ".kokoro/release/snapshot.sh", - ".kokoro/release/stage.cfg", - ".kokoro/release/stage.sh", - ".kokoro/trampoline.sh", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "SECURITY.md", - "codecov.yaml", - "renovate.json", - "samples/install-without-bom/pom.xml", - "samples/pom.xml", - "samples/snapshot/pom.xml", - "samples/snippets/pom.xml" - ] -} \ No newline at end of file From b2e9b0c7602e6f54cdc0e4b968dc702c476ee2f2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 2 Oct 2024 16:16:02 +0200 Subject: [PATCH 903/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.11.3 (#2018) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 54dca4f2c..f6a0f1d04 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.11.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.11.3" } env_vars: { diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 8b05c77ff..0a7901742 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -3,7 +3,7 @@ # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.11.0" + value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.11.3" } env_vars: { diff --git a/pom.xml b/pom.xml index ea79fec71..477d0255c 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.11.0 + 1.11.3 + + com.google.http-client + google-http-client-apache-v5 + 1.45.0 + com.google.http-client google-http-client-appengine From 65de517cb9dcdea01679b74fc2527d9a6825cebf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:12:23 -0500 Subject: [PATCH 906/983] chore(main): release 1.45.1-SNAPSHOT (#2005) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 48bc0f333..77d2f6d74 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.45.0 + 1.45.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.0 + 1.45.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.0 + 1.45.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 1ac9f5e2b..ef9c8c343 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-android - 1.45.0 + 1.45.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 0e1c72742..f50639b4f 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.45.0 + 1.45.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index c2cd4f070..6e7e8c707 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.45.0 + 1.45.1-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 573b3a334..1b0e56977 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.45.0 + 1.45.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 3f58b39d8..b1d6c6a0b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.45.0 + 1.45.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 71c49a0d1..6249ee2bc 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.0 + 1.45.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-android - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-test - 1.45.0 + 1.45.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.45.0 + 1.45.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 00c3f9a98..4c7cbbb0e 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.45.0 + 1.45.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 81c9e005f..d76868f36 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.45.0 + 1.45.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index a9450c3be..eac34bfb8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.45.0 + 1.45.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 814c4a951..c282783af 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.45.0 + 1.45.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 82bd423c5..0e89422ce 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-test - 1.45.0 + 1.45.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c28f0e20f..0799aaa24 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.45.0 + 1.45.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index d1dd414fa..1e2292150 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../pom.xml google-http-client - 1.45.0 + 1.45.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 477d0255c..dc50f00e6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.0 + 1.45.1-SNAPSHOT 2.0.29 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 14d9218ce..561db55fc 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.0 + 1.45.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index aa6a7232b..5839efc1a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.0:1.45.0 -google-http-client-bom:1.45.0:1.45.0 -google-http-client-parent:1.45.0:1.45.0 -google-http-client-android:1.45.0:1.45.0 -google-http-client-android-test:1.45.0:1.45.0 -google-http-client-apache-v2:1.45.0:1.45.0 -google-http-client-apache-v5:1.45.0:1.45.0 -google-http-client-appengine:1.45.0:1.45.0 -google-http-client-assembly:1.45.0:1.45.0 -google-http-client-findbugs:1.45.0:1.45.0 -google-http-client-gson:1.45.0:1.45.0 -google-http-client-jackson2:1.45.0:1.45.0 -google-http-client-protobuf:1.45.0:1.45.0 -google-http-client-test:1.45.0:1.45.0 -google-http-client-xml:1.45.0:1.45.0 +google-http-client:1.45.0:1.45.1-SNAPSHOT +google-http-client-bom:1.45.0:1.45.1-SNAPSHOT +google-http-client-parent:1.45.0:1.45.1-SNAPSHOT +google-http-client-android:1.45.0:1.45.1-SNAPSHOT +google-http-client-android-test:1.45.0:1.45.1-SNAPSHOT +google-http-client-apache-v2:1.45.0:1.45.1-SNAPSHOT +google-http-client-apache-v5:1.45.0:1.45.1-SNAPSHOT +google-http-client-appengine:1.45.0:1.45.1-SNAPSHOT +google-http-client-assembly:1.45.0:1.45.1-SNAPSHOT +google-http-client-findbugs:1.45.0:1.45.1-SNAPSHOT +google-http-client-gson:1.45.0:1.45.1-SNAPSHOT +google-http-client-jackson2:1.45.0:1.45.1-SNAPSHOT +google-http-client-protobuf:1.45.0:1.45.1-SNAPSHOT +google-http-client-test:1.45.0:1.45.1-SNAPSHOT +google-http-client-xml:1.45.0:1.45.1-SNAPSHOT From d3425c7a1f4c3eba30f27ac664298ffa49e40758 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:33:04 -0500 Subject: [PATCH 907/983] chore(main): release 1.45.1 (#2024) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcf93689..25a7684a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.45.1](https://github.com/googleapis/google-http-java-client/compare/v1.45.0...v1.45.1) (2024-11-12) + + +### Bug Fixes + +* Add google-http-client-apache-v5 to bom ([#2021](https://github.com/googleapis/google-http-java-client/issues/2021)) ([4830ad7](https://github.com/googleapis/google-http-java-client/commit/4830ad788a62fe9cd4f64873b771e6ef8ef92193)) + ## [1.45.0](https://github.com/googleapis/google-http-java-client/compare/v1.44.2...v1.45.0) (2024-08-21) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 77d2f6d74..6f4becee1 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.45.1-SNAPSHOT + 1.45.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.1-SNAPSHOT + 1.45.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.1-SNAPSHOT + 1.45.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index ef9c8c343..89d77a108 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-android - 1.45.1-SNAPSHOT + 1.45.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index f50639b4f..2fb75d731 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-apache-v2 - 1.45.1-SNAPSHOT + 1.45.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6e7e8c707..ee57af11e 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-apache-v5 - 1.45.1-SNAPSHOT + 1.45.1 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1b0e56977..0b2d45962 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-appengine - 1.45.1-SNAPSHOT + 1.45.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index b1d6c6a0b..aa8e32870 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.45.1-SNAPSHOT + 1.45.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 6249ee2bc..641009500 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.1-SNAPSHOT + 1.45.1 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-android - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-apache-v2 - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-apache-v5 - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-appengine - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-findbugs - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-gson - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-jackson2 - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-protobuf - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-test - 1.45.1-SNAPSHOT + 1.45.1 com.google.http-client google-http-client-xml - 1.45.1-SNAPSHOT + 1.45.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 4c7cbbb0e..b61cb9134 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-findbugs - 1.45.1-SNAPSHOT + 1.45.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index d76868f36..63249542a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-gson - 1.45.1-SNAPSHOT + 1.45.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index eac34bfb8..7b95a307d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-jackson2 - 1.45.1-SNAPSHOT + 1.45.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index c282783af..b460a86a9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-protobuf - 1.45.1-SNAPSHOT + 1.45.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 0e89422ce..20bcaeb5d 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-test - 1.45.1-SNAPSHOT + 1.45.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 0799aaa24..c2964254d 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client-xml - 1.45.1-SNAPSHOT + 1.45.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 1e2292150..582e556ca 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../pom.xml google-http-client - 1.45.1-SNAPSHOT + 1.45.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index dc50f00e6..eb087eca1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.1-SNAPSHOT + 1.45.1 2.0.29 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 561db55fc..1094cbe8f 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.1-SNAPSHOT + 1.45.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 5839efc1a..6b6cf561a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.0:1.45.1-SNAPSHOT -google-http-client-bom:1.45.0:1.45.1-SNAPSHOT -google-http-client-parent:1.45.0:1.45.1-SNAPSHOT -google-http-client-android:1.45.0:1.45.1-SNAPSHOT -google-http-client-android-test:1.45.0:1.45.1-SNAPSHOT -google-http-client-apache-v2:1.45.0:1.45.1-SNAPSHOT -google-http-client-apache-v5:1.45.0:1.45.1-SNAPSHOT -google-http-client-appengine:1.45.0:1.45.1-SNAPSHOT -google-http-client-assembly:1.45.0:1.45.1-SNAPSHOT -google-http-client-findbugs:1.45.0:1.45.1-SNAPSHOT -google-http-client-gson:1.45.0:1.45.1-SNAPSHOT -google-http-client-jackson2:1.45.0:1.45.1-SNAPSHOT -google-http-client-protobuf:1.45.0:1.45.1-SNAPSHOT -google-http-client-test:1.45.0:1.45.1-SNAPSHOT -google-http-client-xml:1.45.0:1.45.1-SNAPSHOT +google-http-client:1.45.1:1.45.1 +google-http-client-bom:1.45.1:1.45.1 +google-http-client-parent:1.45.1:1.45.1 +google-http-client-android:1.45.1:1.45.1 +google-http-client-android-test:1.45.1:1.45.1 +google-http-client-apache-v2:1.45.1:1.45.1 +google-http-client-apache-v5:1.45.1:1.45.1 +google-http-client-appengine:1.45.1:1.45.1 +google-http-client-assembly:1.45.1:1.45.1 +google-http-client-findbugs:1.45.1:1.45.1 +google-http-client-gson:1.45.1:1.45.1 +google-http-client-jackson2:1.45.1:1.45.1 +google-http-client-protobuf:1.45.1:1.45.1 +google-http-client-test:1.45.1:1.45.1 +google-http-client-xml:1.45.1:1.45.1 From 34538647512367d70f6d594f0c73157ffffbd471 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:01:45 -0500 Subject: [PATCH 908/983] chore: migrate graalvm jobs to kokoro instance pool (#2023) * chore: migrate graalvm jobs to kokoro instance pool --- .kokoro/presubmit/common.cfg | 9 --------- .kokoro/presubmit/graalvm-native-a.cfg | 10 +++++----- .kokoro/presubmit/graalvm-native-b.cfg | 10 +++++----- renovate.json | 4 +--- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg index ad5913e48..5ba7070f2 100644 --- a/.kokoro/presubmit/common.cfg +++ b/.kokoro/presubmit/common.cfg @@ -23,12 +23,3 @@ env_vars: { key: "JOB_TYPE" value: "test" } - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index f6a0f1d04..a031a0528 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -1,10 +1,6 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_a:1.11.3" -} +build_file: "google-http-java-client/.kokoro/build.sh" env_vars: { key: "JOB_TYPE" @@ -31,3 +27,7 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + +container_properties { + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.0" +} diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 0a7901742..271b61f7b 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -1,10 +1,6 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/graalvm_b:1.11.3" -} +build_file: "google-http-java-client/.kokoro/build.sh" env_vars: { key: "JOB_TYPE" @@ -31,3 +27,7 @@ env_vars: { key: "SECRET_MANAGER_KEYS" value: "java-it-service-account" } + +container_properties { + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.0" +} diff --git a/renovate.json b/renovate.json index 09aa66d34..f734b7d7f 100644 --- a/renovate.json +++ b/renovate.json @@ -19,9 +19,7 @@ "fileMatch": [ "^.kokoro/presubmit/graalvm-native.*.cfg$" ], - "matchStrings": [ - "value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\"" - ], + "matchStrings": ["docker_image: \"us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm.*:(?.*?)\""], "depNameTemplate": "com.google.cloud:native-image-shared-config", "datasourceTemplate": "maven" } From 12c742b1f7536fd1fd408a74071007b15480b149 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Wed, 4 Dec 2024 21:53:02 +0000 Subject: [PATCH 909/983] fix: NPE if response entity is null (#2043) * fix npe * fix npe * fix npe * fix npe --- .../http/apache/v5/Apache5HttpResponse.java | 3 +- .../apache/v5/Apache5ResponseContent.java | 8 +++- .../apache/v5/Apache5HttpResponseTest.java | 36 +++++++++++++++ .../apache/v5/Apache5ResponseContentTest.java | 44 +++++++++++++++++++ 4 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpResponseTest.java create mode 100644 google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5ResponseContentTest.java diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java index 1574c8c89..ae3c2ffb6 100644 --- a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5HttpResponse.java @@ -46,7 +46,8 @@ public int getStatusCode() { @Override public InputStream getContent() throws IOException { - return new Apache5ResponseContent(entity.getContent(), response); + InputStream content = entity == null ? null : entity.getContent(); + return new Apache5ResponseContent(content, response); } @Override diff --git a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java index c2d3091df..dfb6da8a4 100644 --- a/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java +++ b/google-http-client-apache-v5/src/main/java/com/google/api/client/http/apache/v5/Apache5ResponseContent.java @@ -59,8 +59,12 @@ public synchronized void reset() throws IOException { @Override public void close() throws IOException { - wrappedStream.close(); - response.close(); + if (wrappedStream != null) { + wrappedStream.close(); + } + if (response != null) { + response.close(); + } } @Override diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpResponseTest.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpResponseTest.java new file mode 100644 index 000000000..d2712b356 --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5HttpResponseTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2024 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.apache.v5; + +import static org.junit.Assert.assertNotNull; + +import java.io.InputStream; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.junit.Test; + +public class Apache5HttpResponseTest { + @Test + public void testNullContent() throws Exception { + HttpUriRequestBase base = new HttpPost("http://www.google.com"); + MockClassicHttpResponse mockResponse = new MockClassicHttpResponse(); + mockResponse.setEntity(null); + Apache5HttpResponse response = new Apache5HttpResponse(base, mockResponse); + + InputStream content = response.getContent(); + + assertNotNull(content); + } +} diff --git a/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5ResponseContentTest.java b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5ResponseContentTest.java new file mode 100644 index 000000000..ddbda0dd5 --- /dev/null +++ b/google-http-client-apache-v5/src/test/java/com/google/api/client/http/apache/v5/Apache5ResponseContentTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 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.apache.v5; + +import java.io.IOException; +import java.io.InputStream; +import org.junit.Test; + +public class Apache5ResponseContentTest { + @Test + public void testNullResponseContent_doesNotThrowExceptionOnClose() throws Exception { + Apache5ResponseContent response = + new Apache5ResponseContent( + new InputStream() { + @Override + public int read() throws IOException { + return 0; + } + }, + null); + + response.close(); + } + + @Test + public void testNullWrappedContent_doesNotThrowExceptionOnClose() throws Exception { + MockClassicHttpResponse mockResponse = new MockClassicHttpResponse(); + Apache5ResponseContent response = new Apache5ResponseContent(null, mockResponse); + + response.close(); + } +} From 8bb79e5448e0fa2767b029e7101e3d5d5112eaf2 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 4 Dec 2024 23:08:19 +0100 Subject: [PATCH 910/983] deps: update project.appengine.version to v2.0.31 (#2027) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb087eca1..109bd3dfa 100644 --- a/pom.xml +++ b/pom.xml @@ -610,7 +610,7 @@ - Internally, update the default features.json file --> 1.45.1 - 2.0.29 + 2.0.31 UTF-8 3.0.2 2.11.0 From 9fba799ac04c7870f3ee5c425ccb0a51dc7e0d16 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 15:32:38 +0100 Subject: [PATCH 911/983] deps: update dependency io.grpc:grpc-context to v1.68.2 (#2038) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 109bd3dfa..bd6c3d94b 100644 --- a/pom.xml +++ b/pom.xml @@ -258,7 +258,7 @@ io.grpc grpc-context - 1.66.0 + 1.68.2 io.opencensus From 5d247854d65075c9e0f8e9076c210f0e93742c46 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 15:33:48 +0100 Subject: [PATCH 912/983] deps: update dependency com.fasterxml.jackson.core:jackson-core to v2.18.2 (#2036) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bd6c3d94b..958701ba0 100644 --- a/pom.xml +++ b/pom.xml @@ -614,7 +614,7 @@ UTF-8 3.0.2 2.11.0 - 2.17.2 + 2.18.2 3.21.12 30.1.1-android 1.1.4c From adae4511b0be42e6724fd32e435440d5e548b02e Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 15:34:36 +0100 Subject: [PATCH 913/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.51.0 (#2033) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9730678a1..c50e894d7 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.44.0 + 26.51.0 pom import From 86179054e951f191faecee404232322767c0b015 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:25:54 +0100 Subject: [PATCH 914/983] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.11.1 (#2030) --- google-http-client-bom/pom.xml | 2 +- pom.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 641009500..345d15b49 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.11.1 true diff --git a/pom.xml b/pom.xml index 958701ba0..1fc7d19fd 100644 --- a/pom.xml +++ b/pom.xml @@ -330,7 +330,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.11.1 attach-javadocs @@ -648,7 +648,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.11.1 1.8 false @@ -806,7 +806,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.11.1 com.microsoft.doclet.DocFxDoclet false From ac83eb259331de683806787c172514592d27de01 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:26:44 +0100 Subject: [PATCH 915/983] deps: update dependency ubuntu to v24 (#2041) --- .github/workflows/renovate_config_check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml index 7c5ec7865..36da117bc 100644 --- a/.github/workflows/renovate_config_check.yaml +++ b/.github/workflows/renovate_config_check.yaml @@ -7,7 +7,7 @@ on: jobs: renovate_bot_config_validation: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout code From cc6eb61a9f7ae550951ee7b5c8a383d755e76959 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:27:12 +0100 Subject: [PATCH 916/983] deps: update dependency com.google.errorprone:error_prone_annotations to v2.36.0 (#2037) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1fc7d19fd..ea76ef663 100644 --- a/pom.xml +++ b/pom.xml @@ -138,7 +138,7 @@ com.google.errorprone error_prone_annotations - 2.30.0 + 2.36.0 com.google.appengine From 024fd718793d20f9439d538b9c342daeb84b89bc Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:27:54 +0100 Subject: [PATCH 917/983] deps: update actions/checkout action to v4.2.2 (#2034) --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index f153dddd4..0181d5306 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -32,7 +32,7 @@ jobs: steps: - name: "Checkout code" - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false From 38d523d81025668855f14300f63b2ae06e70523a Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:29:23 +0100 Subject: [PATCH 918/983] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.5.0 (#2032) --- samples/dailymotion-simple-cmdline-sample/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 1094cbe8f..c1bc351b6 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -15,7 +15,7 @@ org.codehaus.mojo exec-maven-plugin - 3.4.1 + 3.5.0 From a2f6adcff2fa1d3fba7706037aae08d323d85320 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:29:50 +0100 Subject: [PATCH 919/983] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.2 (#2031) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea76ef663..32c7afc84 100644 --- a/pom.xml +++ b/pom.xml @@ -624,7 +624,7 @@ 5.2.5 0.31.1 .. - 3.4.0 + 3.5.2 false From cc9c948f9f49d6fc672c8f92566f3a0f1c81357d Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 5 Dec 2024 17:30:31 +0100 Subject: [PATCH 920/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.12.0 (#2028) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 32c7afc84..113427078 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.11.3 + 1.12.0 + 1.45.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.1 + 1.45.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.1 + 1.45.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 89d77a108..4cbfa89d0 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-android - 1.45.1 + 1.45.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 2fb75d731..1569683cb 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.45.1 + 1.45.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 83ecf4776..060dcf3fb 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.45.1 + 1.45.2-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 0b2d45962..78444d25d 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.45.1 + 1.45.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index aa8e32870..c0d50c758 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.45.1 + 1.45.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ed295beef..0bff68ead 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.1 + 1.45.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-android - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-test - 1.45.1 + 1.45.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.45.1 + 1.45.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index b61cb9134..de4e6abad 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.45.1 + 1.45.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 63249542a..15ce7ae6c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.45.1 + 1.45.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 7b95a307d..233b029ce 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.45.1 + 1.45.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b460a86a9..5d0fc30d9 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.45.1 + 1.45.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 20bcaeb5d..5edd3eb77 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-test - 1.45.1 + 1.45.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c2964254d..f8576a5ad 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.45.1 + 1.45.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 582e556ca..bce43649a 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../pom.xml google-http-client - 1.45.1 + 1.45.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 65daa2c8f..ec0896817 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.1 + 1.45.2-SNAPSHOT 2.0.31 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index c1bc351b6..acf29f407 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.1 + 1.45.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 6b6cf561a..de40e1b92 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.1:1.45.1 -google-http-client-bom:1.45.1:1.45.1 -google-http-client-parent:1.45.1:1.45.1 -google-http-client-android:1.45.1:1.45.1 -google-http-client-android-test:1.45.1:1.45.1 -google-http-client-apache-v2:1.45.1:1.45.1 -google-http-client-apache-v5:1.45.1:1.45.1 -google-http-client-appengine:1.45.1:1.45.1 -google-http-client-assembly:1.45.1:1.45.1 -google-http-client-findbugs:1.45.1:1.45.1 -google-http-client-gson:1.45.1:1.45.1 -google-http-client-jackson2:1.45.1:1.45.1 -google-http-client-protobuf:1.45.1:1.45.1 -google-http-client-test:1.45.1:1.45.1 -google-http-client-xml:1.45.1:1.45.1 +google-http-client:1.45.1:1.45.2-SNAPSHOT +google-http-client-bom:1.45.1:1.45.2-SNAPSHOT +google-http-client-parent:1.45.1:1.45.2-SNAPSHOT +google-http-client-android:1.45.1:1.45.2-SNAPSHOT +google-http-client-android-test:1.45.1:1.45.2-SNAPSHOT +google-http-client-apache-v2:1.45.1:1.45.2-SNAPSHOT +google-http-client-apache-v5:1.45.1:1.45.2-SNAPSHOT +google-http-client-appengine:1.45.1:1.45.2-SNAPSHOT +google-http-client-assembly:1.45.1:1.45.2-SNAPSHOT +google-http-client-findbugs:1.45.1:1.45.2-SNAPSHOT +google-http-client-gson:1.45.1:1.45.2-SNAPSHOT +google-http-client-jackson2:1.45.1:1.45.2-SNAPSHOT +google-http-client-protobuf:1.45.1:1.45.2-SNAPSHOT +google-http-client-test:1.45.1:1.45.2-SNAPSHOT +google-http-client-xml:1.45.1:1.45.2-SNAPSHOT From b3f12421026ac3968e5682cf0cdd74a2eadae795 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:43:33 -0500 Subject: [PATCH 928/983] chore(main): release 1.45.2 (#2045) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 19 ++++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 76 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25a7684a0..52ac76ad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [1.45.2](https://github.com/googleapis/google-http-java-client/compare/v1.45.1...v1.45.2) (2024-12-05) + + +### Bug Fixes + +* NPE if response entity is null ([#2043](https://github.com/googleapis/google-http-java-client/issues/2043)) ([12c742b](https://github.com/googleapis/google-http-java-client/commit/12c742b1f7536fd1fd408a74071007b15480b149)) + + +### Dependencies + +* Update actions/checkout action to v4.2.2 ([#2034](https://github.com/googleapis/google-http-java-client/issues/2034)) ([024fd71](https://github.com/googleapis/google-http-java-client/commit/024fd718793d20f9439d538b9c342daeb84b89bc)) +* Update actions/upload-artifact action to v4.4.3 ([#2035](https://github.com/googleapis/google-http-java-client/issues/2035)) ([443157c](https://github.com/googleapis/google-http-java-client/commit/443157c5ff20fdddaf40193e005f43b7bc6a6f54)) +* Update dependency com.fasterxml.jackson.core:jackson-core to v2.18.2 ([#2036](https://github.com/googleapis/google-http-java-client/issues/2036)) ([5d24785](https://github.com/googleapis/google-http-java-client/commit/5d247854d65075c9e0f8e9076c210f0e93742c46)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.36.0 ([#2037](https://github.com/googleapis/google-http-java-client/issues/2037)) ([cc6eb61](https://github.com/googleapis/google-http-java-client/commit/cc6eb61a9f7ae550951ee7b5c8a383d755e76959)) +* Update dependency io.grpc:grpc-context to v1.68.2 ([#2038](https://github.com/googleapis/google-http-java-client/issues/2038)) ([9fba799](https://github.com/googleapis/google-http-java-client/commit/9fba799ac04c7870f3ee5c425ccb0a51dc7e0d16)) +* Update dependency ubuntu to v24 ([#2041](https://github.com/googleapis/google-http-java-client/issues/2041)) ([ac83eb2](https://github.com/googleapis/google-http-java-client/commit/ac83eb259331de683806787c172514592d27de01)) +* Update github/codeql-action action to v3.27.6 ([#2003](https://github.com/googleapis/google-http-java-client/issues/2003)) ([dc8e46a](https://github.com/googleapis/google-http-java-client/commit/dc8e46a6b6308985380e312fad82b7c182dd9e6f)) +* Update project.appengine.version to v2.0.31 ([#2027](https://github.com/googleapis/google-http-java-client/issues/2027)) ([8bb79e5](https://github.com/googleapis/google-http-java-client/commit/8bb79e5448e0fa2767b029e7101e3d5d5112eaf2)) + ## [1.45.1](https://github.com/googleapis/google-http-java-client/compare/v1.45.0...v1.45.1) (2024-11-12) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index bea7ca2d7..168176a12 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.45.2-SNAPSHOT + 1.45.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.2-SNAPSHOT + 1.45.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.2-SNAPSHOT + 1.45.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 4cbfa89d0..e8ff8ac08 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-android - 1.45.2-SNAPSHOT + 1.45.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 1569683cb..d58f2ef8b 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-apache-v2 - 1.45.2-SNAPSHOT + 1.45.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 060dcf3fb..d8a193a2e 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-apache-v5 - 1.45.2-SNAPSHOT + 1.45.2 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 78444d25d..eb02924cf 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-appengine - 1.45.2-SNAPSHOT + 1.45.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index c0d50c758..b058fb832 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.45.2-SNAPSHOT + 1.45.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0bff68ead..91927b591 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.2-SNAPSHOT + 1.45.2 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-android - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-apache-v2 - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-apache-v5 - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-appengine - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-findbugs - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-gson - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-jackson2 - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-protobuf - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-test - 1.45.2-SNAPSHOT + 1.45.2 com.google.http-client google-http-client-xml - 1.45.2-SNAPSHOT + 1.45.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index de4e6abad..02d1ccb80 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-findbugs - 1.45.2-SNAPSHOT + 1.45.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 15ce7ae6c..3d8c6f490 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-gson - 1.45.2-SNAPSHOT + 1.45.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 233b029ce..2d2bf424d 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-jackson2 - 1.45.2-SNAPSHOT + 1.45.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5d0fc30d9..b3a3fb0d8 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-protobuf - 1.45.2-SNAPSHOT + 1.45.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 5edd3eb77..b45b9b873 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-test - 1.45.2-SNAPSHOT + 1.45.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index f8576a5ad..c667c14f8 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client-xml - 1.45.2-SNAPSHOT + 1.45.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index bce43649a..bceb1ddb4 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../pom.xml google-http-client - 1.45.2-SNAPSHOT + 1.45.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index ec0896817..b0994adf7 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.2-SNAPSHOT + 1.45.2 2.0.31 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index acf29f407..19b40aafc 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.2-SNAPSHOT + 1.45.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index de40e1b92..b7d7abe05 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.1:1.45.2-SNAPSHOT -google-http-client-bom:1.45.1:1.45.2-SNAPSHOT -google-http-client-parent:1.45.1:1.45.2-SNAPSHOT -google-http-client-android:1.45.1:1.45.2-SNAPSHOT -google-http-client-android-test:1.45.1:1.45.2-SNAPSHOT -google-http-client-apache-v2:1.45.1:1.45.2-SNAPSHOT -google-http-client-apache-v5:1.45.1:1.45.2-SNAPSHOT -google-http-client-appengine:1.45.1:1.45.2-SNAPSHOT -google-http-client-assembly:1.45.1:1.45.2-SNAPSHOT -google-http-client-findbugs:1.45.1:1.45.2-SNAPSHOT -google-http-client-gson:1.45.1:1.45.2-SNAPSHOT -google-http-client-jackson2:1.45.1:1.45.2-SNAPSHOT -google-http-client-protobuf:1.45.1:1.45.2-SNAPSHOT -google-http-client-test:1.45.1:1.45.2-SNAPSHOT -google-http-client-xml:1.45.1:1.45.2-SNAPSHOT +google-http-client:1.45.2:1.45.2 +google-http-client-bom:1.45.2:1.45.2 +google-http-client-parent:1.45.2:1.45.2 +google-http-client-android:1.45.2:1.45.2 +google-http-client-android-test:1.45.2:1.45.2 +google-http-client-apache-v2:1.45.2:1.45.2 +google-http-client-apache-v5:1.45.2:1.45.2 +google-http-client-appengine:1.45.2:1.45.2 +google-http-client-assembly:1.45.2:1.45.2 +google-http-client-findbugs:1.45.2:1.45.2 +google-http-client-gson:1.45.2:1.45.2 +google-http-client-jackson2:1.45.2:1.45.2 +google-http-client-protobuf:1.45.2:1.45.2 +google-http-client-test:1.45.2:1.45.2 +google-http-client-xml:1.45.2:1.45.2 From 44a47417dcf9f5e7f59c3cf1b548331a5d516dcd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:21:10 -0500 Subject: [PATCH 929/983] chore(main): release 1.45.3-SNAPSHOT (#2046) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 168176a12..56dca85aa 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.45.2 + 1.45.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.2 + 1.45.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.2 + 1.45.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index e8ff8ac08..21ebb7cc6 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-android - 1.45.2 + 1.45.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index d58f2ef8b..ea900492f 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.45.2 + 1.45.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index d8a193a2e..c9f8f9f6d 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.45.2 + 1.45.3-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index eb02924cf..8828e496a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.45.2 + 1.45.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index b058fb832..a505ee92e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.45.2 + 1.45.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 91927b591..a0eabe825 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.2 + 1.45.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-android - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-test - 1.45.2 + 1.45.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.45.2 + 1.45.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 02d1ccb80..7ce564264 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.45.2 + 1.45.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 3d8c6f490..0213abd06 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.45.2 + 1.45.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 2d2bf424d..709928fc7 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.45.2 + 1.45.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index b3a3fb0d8..5f9640660 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.45.2 + 1.45.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index b45b9b873..d582cb55e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-test - 1.45.2 + 1.45.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c667c14f8..e47ba415b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.45.2 + 1.45.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index bceb1ddb4..3e41f00fe 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../pom.xml google-http-client - 1.45.2 + 1.45.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index b0994adf7..0ecf4c5d9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.2 + 1.45.3-SNAPSHOT 2.0.31 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 19b40aafc..678f336dc 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.2 + 1.45.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b7d7abe05..fad37e133 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.2:1.45.2 -google-http-client-bom:1.45.2:1.45.2 -google-http-client-parent:1.45.2:1.45.2 -google-http-client-android:1.45.2:1.45.2 -google-http-client-android-test:1.45.2:1.45.2 -google-http-client-apache-v2:1.45.2:1.45.2 -google-http-client-apache-v5:1.45.2:1.45.2 -google-http-client-appengine:1.45.2:1.45.2 -google-http-client-assembly:1.45.2:1.45.2 -google-http-client-findbugs:1.45.2:1.45.2 -google-http-client-gson:1.45.2:1.45.2 -google-http-client-jackson2:1.45.2:1.45.2 -google-http-client-protobuf:1.45.2:1.45.2 -google-http-client-test:1.45.2:1.45.2 -google-http-client-xml:1.45.2:1.45.2 +google-http-client:1.45.2:1.45.3-SNAPSHOT +google-http-client-bom:1.45.2:1.45.3-SNAPSHOT +google-http-client-parent:1.45.2:1.45.3-SNAPSHOT +google-http-client-android:1.45.2:1.45.3-SNAPSHOT +google-http-client-android-test:1.45.2:1.45.3-SNAPSHOT +google-http-client-apache-v2:1.45.2:1.45.3-SNAPSHOT +google-http-client-apache-v5:1.45.2:1.45.3-SNAPSHOT +google-http-client-appengine:1.45.2:1.45.3-SNAPSHOT +google-http-client-assembly:1.45.2:1.45.3-SNAPSHOT +google-http-client-findbugs:1.45.2:1.45.3-SNAPSHOT +google-http-client-gson:1.45.2:1.45.3-SNAPSHOT +google-http-client-jackson2:1.45.2:1.45.3-SNAPSHOT +google-http-client-protobuf:1.45.2:1.45.3-SNAPSHOT +google-http-client-test:1.45.2:1.45.3-SNAPSHOT +google-http-client-xml:1.45.2:1.45.3-SNAPSHOT From 7b66dae911c6997899400c1ce2efc3f61cbe8f97 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 11 Dec 2024 21:33:08 +0100 Subject: [PATCH 930/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.12.2 (#2047) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index a031a0528..d675bf9e1 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.2" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 271b61f7b..a4eb406fd 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.2" } diff --git a/pom.xml b/pom.xml index 0ecf4c5d9..0a8377434 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.12.0 + 1.12.2 + 1.45.3 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.3-SNAPSHOT + 1.45.3 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.3-SNAPSHOT + 1.45.3 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 21ebb7cc6..50f33d72c 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-android - 1.45.3-SNAPSHOT + 1.45.3 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index ea900492f..be7972ae1 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-apache-v2 - 1.45.3-SNAPSHOT + 1.45.3 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index c9f8f9f6d..ddf74a6cc 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-apache-v5 - 1.45.3-SNAPSHOT + 1.45.3 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 8828e496a..833463927 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-appengine - 1.45.3-SNAPSHOT + 1.45.3 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index a505ee92e..89f5281f2 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml com.google.http-client google-http-client-assembly - 1.45.3-SNAPSHOT + 1.45.3 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 18b524530..5cc13a5c7 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.3-SNAPSHOT + 1.45.3 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-android - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-apache-v2 - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-apache-v5 - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-appengine - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-findbugs - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-gson - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-jackson2 - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-protobuf - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-test - 1.45.3-SNAPSHOT + 1.45.3 com.google.http-client google-http-client-xml - 1.45.3-SNAPSHOT + 1.45.3 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 7ce564264..412942efb 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-findbugs - 1.45.3-SNAPSHOT + 1.45.3 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 0213abd06..fa327614a 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-gson - 1.45.3-SNAPSHOT + 1.45.3 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 709928fc7..8fcd5e68e 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-jackson2 - 1.45.3-SNAPSHOT + 1.45.3 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5f9640660..d81fad2c5 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-protobuf - 1.45.3-SNAPSHOT + 1.45.3 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d582cb55e..daef80f3c 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-test - 1.45.3-SNAPSHOT + 1.45.3 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e47ba415b..f7e2bdd6d 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client-xml - 1.45.3-SNAPSHOT + 1.45.3 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 3e41f00fe..172de498d 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../pom.xml google-http-client - 1.45.3-SNAPSHOT + 1.45.3 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 8be9dce3f..f31c6fd06 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.3-SNAPSHOT + 1.45.3 2.0.31 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 678f336dc..cb6fc4ce8 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.3-SNAPSHOT + 1.45.3 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index fad37e133..3a1526b19 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.2:1.45.3-SNAPSHOT -google-http-client-bom:1.45.2:1.45.3-SNAPSHOT -google-http-client-parent:1.45.2:1.45.3-SNAPSHOT -google-http-client-android:1.45.2:1.45.3-SNAPSHOT -google-http-client-android-test:1.45.2:1.45.3-SNAPSHOT -google-http-client-apache-v2:1.45.2:1.45.3-SNAPSHOT -google-http-client-apache-v5:1.45.2:1.45.3-SNAPSHOT -google-http-client-appengine:1.45.2:1.45.3-SNAPSHOT -google-http-client-assembly:1.45.2:1.45.3-SNAPSHOT -google-http-client-findbugs:1.45.2:1.45.3-SNAPSHOT -google-http-client-gson:1.45.2:1.45.3-SNAPSHOT -google-http-client-jackson2:1.45.2:1.45.3-SNAPSHOT -google-http-client-protobuf:1.45.2:1.45.3-SNAPSHOT -google-http-client-test:1.45.2:1.45.3-SNAPSHOT -google-http-client-xml:1.45.2:1.45.3-SNAPSHOT +google-http-client:1.45.3:1.45.3 +google-http-client-bom:1.45.3:1.45.3 +google-http-client-parent:1.45.3:1.45.3 +google-http-client-android:1.45.3:1.45.3 +google-http-client-android-test:1.45.3:1.45.3 +google-http-client-apache-v2:1.45.3:1.45.3 +google-http-client-apache-v5:1.45.3:1.45.3 +google-http-client-appengine:1.45.3:1.45.3 +google-http-client-assembly:1.45.3:1.45.3 +google-http-client-findbugs:1.45.3:1.45.3 +google-http-client-gson:1.45.3:1.45.3 +google-http-client-jackson2:1.45.3:1.45.3 +google-http-client-protobuf:1.45.3:1.45.3 +google-http-client-test:1.45.3:1.45.3 +google-http-client-xml:1.45.3:1.45.3 From b75890f195c9888f14ba6ee6d8fd4beb38ad7196 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:50:16 -0500 Subject: [PATCH 936/983] chore(main): release 1.45.4-SNAPSHOT (#2052) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index fe9d7117b..39c9e85e8 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.45.3 + 1.45.4-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.3 + 1.45.4-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.3 + 1.45.4-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 50f33d72c..5c8b61838 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-android - 1.45.3 + 1.45.4-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index be7972ae1..30f15d986 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.45.3 + 1.45.4-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index ddf74a6cc..c01a98b5a 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.45.3 + 1.45.4-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 833463927..d7f740df1 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-appengine - 1.45.3 + 1.45.4-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 89f5281f2..98afad920 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.45.3 + 1.45.4-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5cc13a5c7..fb1c172ba 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.3 + 1.45.4-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-android - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-appengine - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-gson - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-test - 1.45.3 + 1.45.4-SNAPSHOT com.google.http-client google-http-client-xml - 1.45.3 + 1.45.4-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 412942efb..a451c1e0c 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.45.3 + 1.45.4-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index fa327614a..c25eb2afd 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-gson - 1.45.3 + 1.45.4-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 8fcd5e68e..e1e09f8fb 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.45.3 + 1.45.4-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index d81fad2c5..2dee67b9a 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.45.3 + 1.45.4-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index daef80f3c..3eca52557 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-test - 1.45.3 + 1.45.4-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index f7e2bdd6d..becb813a1 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client-xml - 1.45.3 + 1.45.4-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 172de498d..961fbef70 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../pom.xml google-http-client - 1.45.3 + 1.45.4-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f31c6fd06..6f7af7935 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.3 + 1.45.4-SNAPSHOT 2.0.31 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index cb6fc4ce8..7ea312a2e 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.3 + 1.45.4-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 3a1526b19..27ce6e5cb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.3:1.45.3 -google-http-client-bom:1.45.3:1.45.3 -google-http-client-parent:1.45.3:1.45.3 -google-http-client-android:1.45.3:1.45.3 -google-http-client-android-test:1.45.3:1.45.3 -google-http-client-apache-v2:1.45.3:1.45.3 -google-http-client-apache-v5:1.45.3:1.45.3 -google-http-client-appengine:1.45.3:1.45.3 -google-http-client-assembly:1.45.3:1.45.3 -google-http-client-findbugs:1.45.3:1.45.3 -google-http-client-gson:1.45.3:1.45.3 -google-http-client-jackson2:1.45.3:1.45.3 -google-http-client-protobuf:1.45.3:1.45.3 -google-http-client-test:1.45.3:1.45.3 -google-http-client-xml:1.45.3:1.45.3 +google-http-client:1.45.3:1.45.4-SNAPSHOT +google-http-client-bom:1.45.3:1.45.4-SNAPSHOT +google-http-client-parent:1.45.3:1.45.4-SNAPSHOT +google-http-client-android:1.45.3:1.45.4-SNAPSHOT +google-http-client-android-test:1.45.3:1.45.4-SNAPSHOT +google-http-client-apache-v2:1.45.3:1.45.4-SNAPSHOT +google-http-client-apache-v5:1.45.3:1.45.4-SNAPSHOT +google-http-client-appengine:1.45.3:1.45.4-SNAPSHOT +google-http-client-assembly:1.45.3:1.45.4-SNAPSHOT +google-http-client-findbugs:1.45.3:1.45.4-SNAPSHOT +google-http-client-gson:1.45.3:1.45.4-SNAPSHOT +google-http-client-jackson2:1.45.3:1.45.4-SNAPSHOT +google-http-client-protobuf:1.45.3:1.45.4-SNAPSHOT +google-http-client-test:1.45.3:1.45.4-SNAPSHOT +google-http-client-xml:1.45.3:1.45.4-SNAPSHOT From f06c1db8864e9f48314c29dd43a0e99c7e07d8b7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 7 Jan 2025 02:35:08 +0100 Subject: [PATCH 937/983] chore(deps): update dependency com.google.cloud:libraries-bom to v26.52.0 (#2054) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c50e894d7..cb84e581e 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.51.0 + 26.52.0 pom import From 987126c19eae3296a3f3cf97630bd72da829129f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 7 Jan 2025 02:48:35 +0100 Subject: [PATCH 938/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.12.3 (#2053) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index d675bf9e1..708987d2d 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.2" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.3" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index a4eb406fd..190354236 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.2" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.3" } diff --git a/pom.xml b/pom.xml index 6f7af7935..a33bd19dc 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.12.2 + 1.12.3 If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-http-java-client). --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 708987d2d..1b125c908 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.12.3" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.13.0" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 190354236..40dced107 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.12.3" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.13.0" } diff --git a/pom.xml b/pom.xml index a33bd19dc..7248a69cb 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.12.3 + 1.13.0 1.45.4-SNAPSHOT - 2.0.31 + 2.0.32 UTF-8 3.0.2 2.11.0 From 7a0fab3efd2104144dff752da334f8fa8a82951d Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 6 Feb 2025 16:34:05 -0500 Subject: [PATCH 945/983] feat: Update and adapt to GraalVM for JDK 23 (#2069) * build(deps): update dependency com.google.cloud:native-image-shared-config to v1.14.0 * disable testDisconnectShouldNotWaitToReadResponse for JDK >= 23 * fix assumption code * fix assumption ii * Revert "fix assumption ii" This reverts commit 2fbd4cb4721e8c89e47b436c988625731e7cb44e. * Revert "fix assumption code" This reverts commit d3557409adffaaa6ef4cf3e1f894b8bc030fd606. * Revert "disable testDisconnectShouldNotWaitToReadResponse for JDK >= 23" This reverts commit e2c988e45f83c2baf830a393b871d3bbcb40a37d. * chore: use JUnit4 in tests this is basically not rely on extending TestCase and using @Test annotations * use at least 1 Junit38 test * Revert "use at least 1 Junit38 test" This reverts commit 84f3f4f3619728917b0fb242e8de23ac88a55afc. * fix net http response tests * annotate tests with @RunWith(JUnit4.class) * initialize static members in static block * use static blocks to initialize test classes * format * set up class initialization * convert google-http-client-test to JUnit4 * use java.nio for tests * run with JUnit 4 explicitly * use static block * Revert "use static block" This reverts commit 73ebee2dfd5e097667608acde84943ab679f258f. * Reapply "use static block" This reverts commit 06acc4a5c30cb99bcc887cd78fa79df003ada591. * initialize IS_WINDOWS at build time * prevent cryptic message when initializing FileDataStoreFactory * fix static initialization in AbstractDatastoreFactory * test no IS_WINDOWS * Revert "test no IS_WINDOWS" This reverts commit 3f6483de2192a7c9e147a8fa354cfccbffcb9525. * ruling out logger initialization * add test output * safe initialization of ID_PATTERN * remove provided scope depdendency * convert appengine transport to JUnit 4 * add clirr differences * include appengine classes in runtime this allows native compilation * add native config * add reflect-config for appengine * use JUnit4 in GSON tests * fix clirr * port abstract json parser test to JUnit4 * remove unused imports * update clirr again * add native config to gson module * convert jackson module to JUnit4 * make jackson factory instantiation native friendly * config test-only build-time initialization * adapt protocol buffers module to JUnit 4 * initialize test classes at test time * convert xml module to JUnit4 * add test time initialization entries to xml module * format * restore debug setup * add junit test time initialization flags * add junit to gson deps * add junit test-scoped dependency to jackson2 module * add jackson factory to class initialization this is due to one of the test classes statically initializing this factory. * add app engine feature * try setup time feature registration * Revert "try setup time feature registration" This reverts commit eeb9352a031564eb02ef52eab0f6cc4a3b296f5f. * Revert "add app engine feature" This reverts commit e75875b34ab2156f7f6d4b6c66a92dd3d9990489. * add app engine core lib for testing this allows these classes to be included for native testing * add test-scoped dep in test module * use -Pnative-deps * add conflicting dep in native-deps profile for appengine * include appengine in graalvm tests * restore static blocks in google-http-client * restore static blocks in gson module * restore static blocks in jackson * restore static blocks in protobuf * format * restore static initailization in xml module * restore static block in jackson module * format * remove app engine from test --------- Co-authored-by: Mend Renovate --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- google-http-client-appengine/pom.xml | 11 + .../reflect-config.json | 47 +++ .../appengine/http/UrlFetchTransportTest.java | 5 + .../native-image.properties | 1 + google-http-client-gson/pom.xml | 5 + .../api/client/json/gson/GsonFactoryTest.java | 15 +- .../native-image.properties | 1 + google-http-client-jackson2/pom.xml | 5 + .../json/jackson2/JacksonFactoryTest.java | 13 +- .../native-image.properties | 9 +- .../native-image.properties | 1 + .../client/protobuf/ProtocolBuffersTest.java | 10 +- .../clirr-ignored-differences.xml | 75 ++++ .../test/json/AbstractJsonFactoryTest.java | 352 ++++++++++++++---- .../test/json/AbstractJsonGeneratorTest.java | 11 +- .../test/json/AbstractJsonParserTest.java | 25 +- .../store/AbstractDataStoreFactoryTest.java | 37 +- .../native-image.properties | 1 + .../util/store/FileDataStoreFactoryTest.java | 12 +- .../store/MemoryDataStoreFactoryTest.java | 3 + .../com/google/api/client/xml/AtomTest.java | 3 + .../api/client/xml/GenericXmlListTest.java | 3 + .../google/api/client/xml/GenericXmlTest.java | 3 + .../google/api/client/xml/XmlEnumTest.java | 3 + .../google/api/client/xml/XmlListTest.java | 3 + .../xml/XmlNamespaceDictionaryTest.java | 28 +- .../com/google/api/client/xml/XmlTest.java | 3 + .../native-image.properties | 1 + .../util/store/AbstractDataStoreFactory.java | 18 +- .../util/store/FileDataStoreFactory.java | 14 +- .../client/http/AbstractHttpContentTest.java | 12 +- .../client/http/BasicAuthenticationTest.java | 11 +- .../api/client/http/ByteArrayContentTest.java | 12 +- .../client/http/ConsumingInputStreamTest.java | 3 + .../api/client/http/EmptyContentTest.java | 12 +- .../http/ExponentialBackOffPolicyTest.java | 33 +- .../api/client/http/GZipEncodingTest.java | 10 +- .../api/client/http/GenericUrlTest.java | 67 +++- .../api/client/http/GzipSupportTest.java | 3 + .../HttpBackOffIOExpcetionHandlerTest.java | 12 +- ...ackOffUnsuccessfulResponseHandlerTest.java | 14 +- .../HttpEncodingStreamingContentTest.java | 10 +- .../api/client/http/HttpHeadersTest.java | 29 +- .../api/client/http/HttpMediaTypeTest.java | 33 +- .../client/http/HttpRequestFactoryTest.java | 10 +- .../api/client/http/HttpRequestTest.java | 256 ++++++++----- .../client/http/HttpRequestTracingTest.java | 3 + .../http/HttpResponseExceptionTest.java | 24 +- .../api/client/http/HttpResponseTest.java | 45 ++- .../api/client/http/HttpStatusCodesTest.java | 12 +- .../api/client/http/MultipartContentTest.java | 13 +- .../api/client/http/OpenCensusUtilsTest.java | 42 ++- .../api/client/http/UriTemplateTest.java | 36 +- .../client/http/UrlEncodedContentTest.java | 15 +- .../api/client/http/UrlEncodedParserTest.java | 23 +- .../http/javanet/NetHttpRequestTest.java | 3 + .../http/javanet/NetHttpResponseTest.java | 11 +- .../http/javanet/NetHttpTransportTest.java | 16 +- .../api/client/json/GenericJsonTest.java | 10 +- .../api/client/json/JsonObjectParserTest.java | 9 +- .../api/client/json/JsonParserTest.java | 12 +- .../json/webtoken/JsonWebSignatureTest.java | 3 + .../client/testing/http/FixedClockTest.java | 10 +- .../testing/http/MockHttpTransportTest.java | 10 +- .../http/MockLowLevelHttpRequestTest.java | 10 +- .../javanet/MockHttpUrlConnectionTest.java | 13 +- .../client/testing/util/MockBackOffTest.java | 10 +- .../google/api/client/util/ArrayMapTest.java | 30 +- .../google/api/client/util/BackOffTest.java | 10 +- .../api/client/util/BackOffUtilsTest.java | 10 +- .../google/api/client/util/Base64Test.java | 21 +- .../google/api/client/util/ClassInfoTest.java | 18 +- .../com/google/api/client/util/ClockTest.java | 11 +- .../google/api/client/util/DataMapTest.java | 20 +- .../com/google/api/client/util/DataTest.java | 27 +- .../google/api/client/util/DateTimeTest.java | 29 +- .../client/util/ExponentialBackOffTest.java | 33 +- .../google/api/client/util/FieldInfoTest.java | 13 +- .../api/client/util/GenericDataTest.java | 25 +- .../google/api/client/util/IOUtilsTest.java | 15 +- .../util/LoggingStreamingContentTest.java | 12 +- .../google/api/client/util/NanoClockTest.java | 11 +- .../google/api/client/util/ObjectsTest.java | 13 +- .../google/api/client/util/PemReaderTest.java | 8 +- .../api/client/util/SecurityUtilsTest.java | 21 +- .../api/client/util/StringUtilsTest.java | 20 +- .../com/google/api/client/util/TypesTest.java | 21 +- .../client/util/escape/CharEscapersTest.java | 13 +- .../util/escape/PercentEscaperTest.java | 3 + .../native-image.properties | 8 +- pom.xml | 2 +- 93 files changed, 1562 insertions(+), 411 deletions(-) create mode 100644 google-http-client-appengine/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/reflect-config.json create mode 100644 google-http-client-appengine/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/native-image.properties create mode 100644 google-http-client-gson/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/native-image.properties create mode 100644 google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/native-image.properties create mode 100644 google-http-client-test/clirr-ignored-differences.xml create mode 100644 google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/native-image.properties create mode 100644 google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/native-image.properties diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 1b125c908..1f4b4493c 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.13.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.14.0" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 40dced107..1a8dec5aa 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.13.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.14.0" } diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index d7f740df1..8947539c3 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -90,4 +90,15 @@ test + + + native-deps + + + com.google.appengine + appengine-api-1.0-sdk + + + + diff --git a/google-http-client-appengine/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/reflect-config.json b/google-http-client-appengine/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/reflect-config.json new file mode 100644 index 000000000..d2efd41b8 --- /dev/null +++ b/google-http-client-appengine/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/reflect-config.json @@ -0,0 +1,47 @@ +[ + { + "name": "com.google.apphosting.api.DatastorePb$DeleteRequest", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.apphosting.api.DatastorePb$GetRequest", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.apphosting.api.DatastorePb$NextRequest", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.apphosting.api.DatastorePb$PutRequest", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + }, + { + "name": "com.google.apphosting.api.DatastorePb$Query", + "methods": [ + { + "name": "", + "parameterTypes": [] + } + ] + } +] diff --git a/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java b/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java index 3de60a6d7..b9ce9585d 100644 --- a/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java +++ b/google-http-client-appengine/src/test/java/com/google/api/client/extensions/appengine/http/UrlFetchTransportTest.java @@ -15,14 +15,19 @@ package com.google.api.client.extensions.appengine.http; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link UrlFetchTransport}. * * @author Tony Aiuto */ +@RunWith(JUnit4.class) public class UrlFetchTransportTest extends TestCase { + @Test public void test() { new UrlFetchTransport(); } diff --git a/google-http-client-appengine/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/native-image.properties b/google-http-client-appengine/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/native-image.properties new file mode 100644 index 000000000..33cc1b54d --- /dev/null +++ b/google-http-client-appengine/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-appengine/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation \ diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index c25eb2afd..63f5fe10c 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -72,5 +72,10 @@ com.google.code.gson gson + + junit + junit + test + diff --git a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java index 5d166e689..b256f74f5 100644 --- a/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java +++ b/google-http-client-gson/src/test/java/com/google/api/client/json/gson/GsonFactoryTest.java @@ -14,6 +14,10 @@ package com.google.api.client.json.gson; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonObjectParser; @@ -25,6 +29,7 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import org.junit.Test; /** * Tests {@link GsonFactory}. @@ -58,21 +63,19 @@ public class GsonFactoryTest extends AbstractJsonFactoryTest { + GSON_LINE_SEPARATOR + "}"; - public GsonFactoryTest(String name) { - super(name); - } - @Override protected JsonFactory newFactory() { return new GsonFactory(); } + @Test public final void testToPrettyString_entry() throws Exception { Entry entry = new Entry(); entry.title = "foo"; assertEquals(JSON_ENTRY_PRETTY, newFactory().toPrettyString(entry)); } + @Test public final void testToPrettyString_Feed() throws Exception { Feed feed = new Feed(); Entry entryFoo = new Entry(); @@ -85,11 +88,13 @@ public final void testToPrettyString_Feed() throws Exception { assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); } + @Test public final void testParse_directValue() throws IOException { JsonParser parser = newFactory().createJsonParser("123"); assertEquals(123, parser.parse(Integer.class, true)); } + @Test public final void testGetByteValue() throws IOException { JsonParser parser = newFactory().createJsonParser("123"); @@ -101,6 +106,7 @@ public final void testGetByteValue() throws IOException { } } + @Test public final void testReaderLeniency_lenient() throws IOException { JsonObjectParser parser = new JsonObjectParser(GsonFactory.builder().setReadLeniency(true).build()); @@ -113,6 +119,7 @@ public final void testReaderLeniency_lenient() throws IOException { assertEquals("foo", json.get("title")); } + @Test public final void testReaderLeniency_not_lenient_by_default() throws IOException { JsonObjectParser parser = new JsonObjectParser(GsonFactory.getDefaultInstance()); diff --git a/google-http-client-gson/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/native-image.properties b/google-http-client-gson/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/native-image.properties new file mode 100644 index 000000000..3cbd2b27f --- /dev/null +++ b/google-http-client-gson/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-gson/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index e1e09f8fb..3816e5094 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -71,5 +71,10 @@ com.fasterxml.jackson.core jackson-core + + junit + junit + test + diff --git a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java index c90edc2e3..89e7d0596 100644 --- a/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java +++ b/google-http-client-jackson2/src/test/java/com/google/api/client/json/jackson2/JacksonFactoryTest.java @@ -14,12 +14,17 @@ package com.google.api.client.json.jackson2; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonParser; import com.google.api.client.test.json.AbstractJsonFactoryTest; import com.google.api.client.util.StringUtils; import java.io.IOException; import java.util.ArrayList; +import org.junit.Test; /** * Tests {@link JacksonFactory}. @@ -45,21 +50,19 @@ public class JacksonFactoryTest extends AbstractJsonFactoryTest { + StringUtils.LINE_SEPARATOR + "}"; - public JacksonFactoryTest(String name) { - super(name); - } - @Override protected JsonFactory newFactory() { return new JacksonFactory(); } + @Test public final void testToPrettyString_entry() throws Exception { Entry entry = new Entry(); entry.title = "foo"; assertEquals(JSON_ENTRY_PRETTY, newFactory().toPrettyString(entry)); } + @Test public final void testToPrettyString_Feed() throws Exception { Feed feed = new Feed(); Entry entryFoo = new Entry(); @@ -72,11 +75,13 @@ public final void testToPrettyString_Feed() throws Exception { assertEquals(JSON_FEED_PRETTY, newFactory().toPrettyString(feed)); } + @Test public final void testParse_directValue() throws Exception { JsonParser parser = newFactory().createJsonParser("123"); assertEquals(123, parser.parse(Integer.class, true)); } + @Test public final void testGetByteValue() throws IOException { JsonParser parser = newFactory().createJsonParser("123"); diff --git a/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties b/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties index b6b626175..0bb622f01 100644 --- a/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties +++ b/google-http-client-jackson2/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-jackson2/native-image.properties @@ -1,7 +1,6 @@ Args=--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonFactoryTest \ --initialize-at-build-time=com.google.api.client.json.jackson2.JacksonGeneratorTest \ ---initialize-at-build-time=com.fasterxml.jackson.core.io.SerializedString \ ---initialize-at-build-time=com.fasterxml.jackson.core.io.CharTypes \ ---initialize-at-build-time=com.fasterxml.jackson.core.JsonFactory \ ---initialize-at-build-time=com.fasterxml.jackson.core.io.JsonStringEncoder \ ---initialize-at-build-time=com.google.api.client.util.StringUtils \ No newline at end of file +--initialize-at-build-time=com.google.api.client.json.jackson2.JacksonFactory \ +--initialize-at-build-time=com.google.api.client.util.StringUtils \ +--initialize-at-build-time=com.fasterxml.jackson.core \ +--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation \ No newline at end of file diff --git a/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/native-image.properties b/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/native-image.properties new file mode 100644 index 000000000..3cbd2b27f --- /dev/null +++ b/google-http-client-protobuf/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-protobuf/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation diff --git a/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java b/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java index 94d7d1391..40265b8c3 100644 --- a/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java +++ b/google-http-client-protobuf/src/test/java/com/google/api/client/protobuf/ProtocolBuffersTest.java @@ -14,16 +14,22 @@ package com.google.api.client.protobuf; +import static org.junit.Assert.assertEquals; + import java.io.ByteArrayInputStream; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ProtocolBuffers}. * * @author Yaniv Inbar */ -public class ProtocolBuffersTest extends TestCase { +@RunWith(JUnit4.class) +public class ProtocolBuffersTest { + @Test public void testParseAndClose() throws Exception { SimpleProto.TestMessage mockResponse = SimpleProto.TestMessage.newBuilder() diff --git a/google-http-client-test/clirr-ignored-differences.xml b/google-http-client-test/clirr-ignored-differences.xml new file mode 100644 index 000000000..34c8e4f44 --- /dev/null +++ b/google-http-client-test/clirr-ignored-differences.xml @@ -0,0 +1,75 @@ + + + + + + + 4001 + com/google/api/client/test/util/store/AbstractDataStoreFactoryTest + junit/framework/Test + + + + 4001 + com/google/api/client/test/json/AbstractJsonFactoryTest + junit/framework/Test + + + + 4001 + com/google/api/client/test/json/AbstractJsonGeneratorTest + junit/framework/Test + + + + 4001 + com/google/api/client/test/json/AbstractJsonParserTest + junit/framework/Test + + + + 5001 + com/google/api/client/test/util/store/AbstractDataStoreFactoryTest + junit/framework/* + + + + 5001 + com/google/api/client/test/json/AbstractJsonFactoryTest + junit/framework/* + + + + 5001 + com/google/api/client/test/json/AbstractJsonGeneratorTest + junit/framework/* + + + + 5001 + com/google/api/client/test/json/AbstractJsonParserTest + junit/framework/* + + + + 7004 + com/google/api/client/test/json/AbstractJsonFactoryTest + * + + diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java index 8bf518109..a0629280f 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonFactoryTest.java @@ -14,6 +14,13 @@ package com.google.api.client.test.json; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.http.json.JsonHttpContent; import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; @@ -53,29 +60,36 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Abstract test case for testing a {@link JsonFactory}. * * @author Yaniv Inbar */ -public abstract class AbstractJsonFactoryTest extends TestCase { - - public AbstractJsonFactoryTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public abstract class AbstractJsonFactoryTest { protected abstract JsonFactory newFactory(); - private static final String EMPTY = ""; - private static final String JSON_THREE_ELEMENTS = - "{" - + " \"one\": { \"num\": 1 }" - + ", \"two\": { \"num\": 2 }" - + ", \"three\": { \"num\": 3 }" - + "}"; + private static final String EMPTY; + private static final String JSON_THREE_ELEMENTS; + private static final String EMPTY_OBJECT; + static { + EMPTY = ""; + JSON_THREE_ELEMENTS = + "{" + + " \"one\": { \"num\": 1 }" + + ", \"two\": { \"num\": 2 }" + + ", \"three\": { \"num\": 3 }" + + "}"; + EMPTY_OBJECT = "{}"; + } + + @Test public void testParse_empty() throws Exception { JsonParser parser = newFactory().createJsonParser(EMPTY); parser.nextToken(); @@ -87,8 +101,7 @@ public void testParse_empty() throws Exception { } } - private static final String EMPTY_OBJECT = "{}"; - + @Test public void testParse_emptyMap() throws Exception { JsonParser parser = newFactory().createJsonParser(EMPTY_OBJECT); parser.nextToken(); @@ -97,6 +110,7 @@ public void testParse_emptyMap() throws Exception { assertTrue(map.isEmpty()); } + @Test public void testParse_emptyGenericJson() throws Exception { JsonParser parser = newFactory().createJsonParser(EMPTY_OBJECT); parser.nextToken(); @@ -104,6 +118,7 @@ public void testParse_emptyGenericJson() throws Exception { assertTrue(json.isEmpty()); } + @Test public void testParser_partialEmpty() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -118,15 +133,21 @@ public void testParser_partialEmpty() throws Exception { assertTrue(result.isEmpty()); } - private static final String JSON_ENTRY = "{\"title\":\"foo\"}"; - private static final String JSON_FEED = - "{\"entries\":[" + "{\"title\":\"foo\"}," + "{\"title\":\"bar\"}]}"; + private static final String JSON_ENTRY; + private static final String JSON_FEED; + + static { + JSON_ENTRY = "{\"title\":\"foo\"}"; + JSON_FEED = "{\"entries\":[" + "{\"title\":\"foo\"}," + "{\"title\":\"bar\"}]}"; + } + @Test public void testParseEntry() throws Exception { Entry entry = newFactory().createJsonParser(JSON_ENTRY).parseAndClose(Entry.class); assertEquals("foo", entry.title); } + @Test public void testParser_partialEntry() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -140,6 +161,7 @@ public void testParser_partialEntry() throws Exception { assertEquals("foo", result.title); } + @Test public void testParseFeed() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_FEED); parser.nextToken(); @@ -151,6 +173,7 @@ public void testParseFeed() throws Exception { } @SuppressWarnings("unchecked") + @Test public void testParseEntryAsMap() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -159,6 +182,7 @@ public void testParseEntryAsMap() throws Exception { assertTrue(map.isEmpty()); } + @Test public void testSkipToKey_missingEmpty() throws Exception { JsonParser parser = newFactory().createJsonParser(EMPTY_OBJECT); parser.nextToken(); @@ -166,6 +190,7 @@ public void testSkipToKey_missingEmpty() throws Exception { assertEquals(JsonToken.END_OBJECT, parser.getCurrentToken()); } + @Test public void testSkipToKey_missing() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -173,6 +198,7 @@ public void testSkipToKey_missing() throws Exception { assertEquals(JsonToken.END_OBJECT, parser.getCurrentToken()); } + @Test public void testSkipToKey_found() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -181,6 +207,7 @@ public void testSkipToKey_found() throws Exception { assertEquals("foo", parser.getText()); } + @Test public void testSkipToKey_startWithFieldName() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -190,6 +217,7 @@ public void testSkipToKey_startWithFieldName() throws Exception { assertEquals("foo", parser.getText()); } + @Test public void testSkipChildren_string() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -199,6 +227,7 @@ public void testSkipChildren_string() throws Exception { assertEquals("foo", parser.getText()); } + @Test public void testSkipChildren_object() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_ENTRY); parser.nextToken(); @@ -206,6 +235,7 @@ public void testSkipChildren_object() throws Exception { assertEquals(JsonToken.END_OBJECT, parser.getCurrentToken()); } + @Test public void testSkipChildren_array() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_FEED); parser.nextToken(); @@ -214,6 +244,7 @@ public void testSkipChildren_array() throws Exception { assertEquals(JsonToken.END_ARRAY, parser.getCurrentToken()); } + @Test public void testNextToken() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_FEED); assertEquals(JsonToken.START_OBJECT, parser.nextToken()); @@ -232,6 +263,7 @@ public void testNextToken() throws Exception { assertNull(parser.nextToken()); } + @Test public void testCurrentToken() throws Exception { JsonParser parser = newFactory().createJsonParser(JSON_FEED); assertNull(parser.getCurrentToken()); @@ -277,8 +309,13 @@ public static class A { @Key public Map map; } - static final String CONTAINED_MAP = "{\"map\":{\"title\":\"foo\"}}"; + static final String CONTAINED_MAP; + + static { + CONTAINED_MAP = "{\"map\":{\"title\":\"foo\"}}"; + } + @Test public void testParse() throws Exception { JsonParser parser = newFactory().createJsonParser(CONTAINED_MAP); parser.nextToken(); @@ -335,22 +372,27 @@ public static class NumberTypesAsString { @Key @JsonString Map longMapValue; } - static final String NUMBER_TYPES = - "{\"bigDecimalValue\":1.0,\"bigIntegerValue\":1,\"byteObjValue\":1,\"byteValue\":1," - + "\"doubleObjValue\":1.0,\"doubleValue\":1.0,\"floatObjValue\":1.0,\"floatValue\":1.0," - + "\"intObjValue\":1,\"intValue\":1,\"longListValue\":[1],\"longMapValue\":{\"a\":1}," - + "\"longObjValue\":1,\"longValue\":1,\"shortObjValue\":1,\"shortValue\":1," - + "\"yetAnotherBigDecimalValue\":1}"; + static final String NUMBER_TYPES; + static final String NUMBER_TYPES_AS_STRING; - static final String NUMBER_TYPES_AS_STRING = - "{\"bigDecimalValue\":\"1.0\",\"bigIntegerValue\":\"1\",\"byteObjValue\":\"1\"," - + "\"byteValue\":\"1\",\"doubleObjValue\":\"1.0\",\"doubleValue\":\"1.0\"," - + "\"floatObjValue\":\"1.0\",\"floatValue\":\"1.0\",\"intObjValue\":\"1\"," - + "\"intValue\":\"1\",\"longListValue\":[\"1\"],\"longMapValue\":{\"a\":\"1\"}," - + "\"longObjValue\":\"1\",\"longValue\":\"1\"," - + "\"shortObjValue\":\"1\"," - + "\"shortValue\":\"1\",\"yetAnotherBigDecimalValue\":\"1\"}"; + static { + NUMBER_TYPES = + "{\"bigDecimalValue\":1.0,\"bigIntegerValue\":1,\"byteObjValue\":1,\"byteValue\":1," + + "\"doubleObjValue\":1.0,\"doubleValue\":1.0,\"floatObjValue\":1.0,\"floatValue\":1.0," + + "\"intObjValue\":1,\"intValue\":1,\"longListValue\":[1],\"longMapValue\":{\"a\":1}," + + "\"longObjValue\":1,\"longValue\":1,\"shortObjValue\":1,\"shortValue\":1," + + "\"yetAnotherBigDecimalValue\":1}"; + NUMBER_TYPES_AS_STRING = + "{\"bigDecimalValue\":\"1.0\",\"bigIntegerValue\":\"1\",\"byteObjValue\":\"1\"," + + "\"byteValue\":\"1\",\"doubleObjValue\":\"1.0\",\"doubleValue\":\"1.0\"," + + "\"floatObjValue\":\"1.0\",\"floatValue\":\"1.0\",\"intObjValue\":\"1\"," + + "\"intValue\":\"1\",\"longListValue\":[\"1\"],\"longMapValue\":{\"a\":\"1\"}," + + "\"longObjValue\":\"1\",\"longValue\":\"1\"," + + "\"shortObjValue\":\"1\"," + + "\"shortValue\":\"1\",\"yetAnotherBigDecimalValue\":\"1\"}"; + } + @Test public void testParser_numberTypes() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -384,15 +426,22 @@ public void testParser_numberTypes() throws Exception { } } + @Test public void testToFromString() throws Exception { JsonFactory factory = newFactory(); NumberTypes result = factory.fromString(NUMBER_TYPES, NumberTypes.class); assertEquals(NUMBER_TYPES, factory.toString(result)); } - private static final String UTF8_VALUE = "123\u05D9\u05e0\u05D9\u05D1"; - private static final String UTF8_JSON = "{\"value\":\"" + UTF8_VALUE + "\"}"; + private static final String UTF8_VALUE; + private static final String UTF8_JSON; + static { + UTF8_VALUE = "123\u05D9\u05e0\u05D9\u05D1"; + UTF8_JSON = "{\"value\":\"" + UTF8_VALUE + "\"}"; + } + + @Test public void testToFromString_UTF8() throws Exception { JsonFactory factory = newFactory(); GenericJson result = factory.fromString(UTF8_JSON, GenericJson.class); @@ -409,10 +458,15 @@ public static class AnyType { @Key public Object nul; } - static final String ANY_TYPE = - "{\"arr\":[1],\"bool\":true,\"nul\":null,\"num\":5," - + "\"obj\":{\"key\":\"value\"},\"str\":\"value\"}"; + static final String ANY_TYPE; + static { + ANY_TYPE = + "{\"arr\":[1],\"bool\":true,\"nul\":null,\"num\":5," + + "\"obj\":{\"key\":\"value\"},\"str\":\"value\"}"; + } + + @Test public void testParser_anyType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -430,8 +484,13 @@ public static class ArrayType { @Key public Integer[] integerArr; } - static final String ARRAY_TYPE = "{\"arr\":[4,5],\"arr2\":[[1,2],[3]],\"integerArr\":[6,7]}"; + static final String ARRAY_TYPE; + + static { + ARRAY_TYPE = "{\"arr\":[4,5],\"arr2\":[[1,2],[3]],\"integerArr\":[6,7]}"; + } + @Test public void testParser_arrayType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -461,8 +520,13 @@ public static class CollectionOfCollectionType { @Key public LinkedList> arr; } - static final String COLLECTION_TYPE = "{\"arr\":[[\"a\",\"b\"],[\"c\"]]}"; + static final String COLLECTION_TYPE; + static { + COLLECTION_TYPE = "{\"arr\":[[\"a\",\"b\"],[\"c\"]]}"; + } + + @Test public void testParser_collectionType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -480,9 +544,13 @@ public static class MapOfMapType { @Key public Map>[] value; } - static final String MAP_TYPE = - "{\"value\":[{\"map1\":{\"k1\":1,\"k2\":2},\"map2\":{\"kk1\":3,\"kk2\":4}}]}"; + static final String MAP_TYPE; + + static { + MAP_TYPE = "{\"value\":[{\"map1\":{\"k1\":1,\"k2\":2},\"map2\":{\"kk1\":3,\"kk2\":4}}]}"; + } + @Test public void testParser_mapType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -503,6 +571,7 @@ public void testParser_mapType() throws Exception { assertEquals(4, map2.get("kk2").intValue()); } + @Test public void testParser_hashmapForMapType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -531,11 +600,16 @@ public static class WildCardTypes { @Key public Collection[] upper; } - static final String WILDCARD_TYPE = - "{\"lower\":[[1,2,3]],\"map\":{\"v\":1},\"mapInWild\":[{\"v\":1}]," - + "\"mapUpper\":{\"v\":1},\"simple\":[[1,2,3]],\"upper\":[[1,2,3]]}"; + static final String WILDCARD_TYPE; + + static { + WILDCARD_TYPE = + "{\"lower\":[[1,2,3]],\"map\":{\"v\":1},\"mapInWild\":[{\"v\":1}]," + + "\"mapUpper\":{\"v\":1},\"simple\":[[1,2,3]],\"upper\":[[1,2,3]]}"; + } @SuppressWarnings("unchecked") + @Test public void testParser_wildCardType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -590,20 +664,31 @@ public static class DoubleListTypeVariableType extends TypeVariableType> {} - static final String INTEGER_TYPE_VARIABLE_TYPE = - "{\"arr\":[null,[null,1]],\"list\":[null,[null,1]],\"nullValue\":null,\"value\":1}"; + static final String INTEGER_TYPE_VARIABLE_TYPE; + + static final String INT_ARRAY_TYPE_VARIABLE_TYPE; + + static final String DOUBLE_LIST_TYPE_VARIABLE_TYPE; + + static final String FLOAT_MAP_TYPE_VARIABLE_TYPE; + + static { + INTEGER_TYPE_VARIABLE_TYPE = + "{\"arr\":[null,[null,1]],\"list\":[null,[null,1]],\"nullValue\":null,\"value\":1}"; - static final String INT_ARRAY_TYPE_VARIABLE_TYPE = - "{\"arr\":[null,[null,[1]]],\"list\":[null,[null,[1]]],\"nullValue\":null,\"value\":[1]}"; + INT_ARRAY_TYPE_VARIABLE_TYPE = + "{\"arr\":[null,[null,[1]]],\"list\":[null,[null,[1]]],\"nullValue\":null,\"value\":[1]}"; - static final String DOUBLE_LIST_TYPE_VARIABLE_TYPE = - "{\"arr\":[null,[null,[1.0]]],\"list\":[null,[null,[1.0]]]," - + "\"nullValue\":null,\"value\":[1.0]}"; + DOUBLE_LIST_TYPE_VARIABLE_TYPE = + "{\"arr\":[null,[null,[1.0]]],\"list\":[null,[null,[1.0]]]," + + "\"nullValue\":null,\"value\":[1.0]}"; - static final String FLOAT_MAP_TYPE_VARIABLE_TYPE = - "{\"arr\":[null,[null,{\"a\":1.0}]],\"list\":[null,[null,{\"a\":1.0}]]," - + "\"nullValue\":null,\"value\":{\"a\":1.0}}"; + FLOAT_MAP_TYPE_VARIABLE_TYPE = + "{\"arr\":[null,[null,{\"a\":1.0}]],\"list\":[null,[null,{\"a\":1.0}]]," + + "\"nullValue\":null,\"value\":{\"a\":1.0}}"; + } + @Test public void testParser_integerTypeVariableType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -640,6 +725,7 @@ public void testParser_integerTypeVariableType() throws Exception { assertEquals(1, value.intValue()); } + @Test public void testParser_intArrayTypeVariableType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -676,6 +762,7 @@ public void testParser_intArrayTypeVariableType() throws Exception { assertTrue(Arrays.equals(new int[] {1}, value)); } + @Test public void testParser_doubleListTypeVariableType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -696,7 +783,7 @@ public void testParser_doubleListTypeVariableType() throws Exception { List arrValue = subArr[1]; assertEquals(1, arrValue.size()); Double dValue = arrValue.get(0); - assertEquals(1.0, dValue); + assertEquals(Double.valueOf(1.0), dValue); // collection LinkedList>> list = result.list; assertEquals(2, list.size()); @@ -714,6 +801,7 @@ public void testParser_doubleListTypeVariableType() throws Exception { assertEquals(ImmutableList.of(Double.valueOf(1)), value); } + @Test public void testParser_floatMapTypeVariableType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -734,7 +822,7 @@ public void testParser_floatMapTypeVariableType() throws Exception { Map arrValue = subArr[1]; assertEquals(1, arrValue.size()); Float fValue = arrValue.get("a"); - assertEquals(1.0f, fValue); + assertEquals(Float.valueOf(1.0f), fValue); // collection LinkedList>> list = result.list; assertEquals(2, list.size()); @@ -745,7 +833,7 @@ public void testParser_floatMapTypeVariableType() throws Exception { arrValue = subList.get(1); assertEquals(1, arrValue.size()); fValue = arrValue.get("a"); - assertEquals(1.0f, fValue); + assertEquals(Float.valueOf(1.0f), fValue); // null value Map nullValue = result.nullValue; assertEquals(Data.nullOf(HashMap.class), nullValue); @@ -753,10 +841,11 @@ public void testParser_floatMapTypeVariableType() throws Exception { Map value = result.value; assertEquals(1, value.size()); fValue = value.get("a"); - assertEquals(1.0f, fValue); + assertEquals(Float.valueOf(1.0f), fValue); } @SuppressWarnings("unchecked") + @Test public void testParser_treemapForTypeVariableType() throws Exception { // parse JsonFactory factory = newFactory(); @@ -790,8 +879,13 @@ public static class StringNullValue { @Key public String value; } - static final String NULL_VALUE = "{\"arr\":[null],\"arr2\":[null,[null]],\"value\":null}"; + static final String NULL_VALUE; + + static { + NULL_VALUE = "{\"arr\":[null],\"arr2\":[null,[null]],\"value\":null}"; + } + @Test public void testParser_nullValue() throws Exception { // parse JsonFactory factory = newFactory(); @@ -830,9 +924,13 @@ public static class EnumValue { @Key public E nullValue; } - static final String ENUM_VALUE = - "{\"nullValue\":null,\"otherValue\":\"other\",\"value\":\"VALUE\"}"; + static final String ENUM_VALUE; + static { + ENUM_VALUE = "{\"nullValue\":null,\"otherValue\":\"other\",\"value\":\"VALUE\"}"; + } + + @Test public void testParser_enumValue() throws Exception { // parse JsonFactory factory = newFactory(); @@ -862,8 +960,13 @@ public static class Z { public static class TypeVariablesPassedAround extends X> {} - static final String TYPE_VARS = "{\"y\":{\"z\":{\"f\":[\"abc\"]}}}"; + static final String TYPE_VARS; + + static { + TYPE_VARS = "{\"y\":{\"z\":{\"f\":[\"abc\"]}}}"; + } + @Test public void testParser_typeVariablesPassAround() throws Exception { // parse JsonFactory factory = newFactory(); @@ -878,8 +981,13 @@ public void testParser_typeVariablesPassAround() throws Exception { assertEquals("abc", f.get(0)); } - static final String STRING_ARRAY = "[\"a\",\"b\",\"c\"]"; + static final String STRING_ARRAY; + static { + STRING_ARRAY = "[\"a\",\"b\",\"c\"]"; + } + + @Test public void testParser_stringArray() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -891,8 +999,13 @@ public void testParser_stringArray() throws Exception { assertTrue(Arrays.equals(new String[] {"a", "b", "c"}, result)); } - static final String INT_ARRAY = "[1,2,3]"; + static final String INT_ARRAY; + + static { + INT_ARRAY = "[1,2,3]"; + } + @Test public void testParser_intArray() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -904,8 +1017,13 @@ public void testParser_intArray() throws Exception { assertTrue(Arrays.equals(new int[] {1, 2, 3}, result)); } - private static final String EMPTY_ARRAY = "[]"; + private static final String EMPTY_ARRAY; + static { + EMPTY_ARRAY = "[]"; + } + + @Test public void testParser_emptyArray() throws Exception { JsonFactory factory = newFactory(); String[] result = factory.createJsonParser(EMPTY_ARRAY).parse(String[].class); @@ -914,6 +1032,7 @@ public void testParser_emptyArray() throws Exception { assertEquals(0, result.length); } + @Test public void testParser_partialEmptyArray() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -927,8 +1046,13 @@ public void testParser_partialEmptyArray() throws Exception { assertEquals(0, result.length); } - private static final String NUMBER_TOP_VALUE = "1"; + private static final String NUMBER_TOP_VALUE; + static { + NUMBER_TOP_VALUE = "1"; + } + + @Test public void testParser_num() throws Exception { JsonFactory factory = newFactory(); int result = factory.createJsonParser(NUMBER_TOP_VALUE).parse(int.class); @@ -937,8 +1061,13 @@ public void testParser_num() throws Exception { assertEquals(1, result); } - private static final String STRING_TOP_VALUE = "\"a\""; + private static final String STRING_TOP_VALUE; + + static { + STRING_TOP_VALUE = "\"a\""; + } + @Test public void testParser_string() throws Exception { JsonFactory factory = newFactory(); String result = factory.createJsonParser(STRING_TOP_VALUE).parse(String.class); @@ -947,8 +1076,13 @@ public void testParser_string() throws Exception { assertEquals("a", result); } - private static final String NULL_TOP_VALUE = "null"; + private static final String NULL_TOP_VALUE; + static { + NULL_TOP_VALUE = "null"; + } + + @Test public void testParser_null() throws Exception { JsonFactory factory = newFactory(); String result = factory.createJsonParser(NULL_TOP_VALUE).parse(String.class); @@ -957,8 +1091,13 @@ public void testParser_null() throws Exception { assertTrue(Data.isNull(result)); } - private static final String BOOL_TOP_VALUE = "true"; + private static final String BOOL_TOP_VALUE; + + static { + BOOL_TOP_VALUE = "true"; + } + @Test public void testParser_bool() throws Exception { JsonFactory factory = newFactory(); boolean result = factory.createJsonParser(BOOL_TOP_VALUE).parse(boolean.class); @@ -1040,6 +1179,7 @@ public final void testToPrettyString_FeedApproximate() throws Exception { assertEquals(JSON_FEED, factory.toString(factory.fromString(prettyString, Feed.class))); } + @Test public void testParser_nullInputStream() throws Exception { try { newFactory().createJsonParser((InputStream) null, Charsets.UTF_8); @@ -1049,6 +1189,7 @@ public void testParser_nullInputStream() throws Exception { } } + @Test public void testParser_nullString() throws Exception { try { newFactory().createJsonParser((String) null); @@ -1058,6 +1199,7 @@ public void testParser_nullString() throws Exception { } } + @Test public void testParser_nullReader() throws Exception { try { newFactory().createJsonParser((Reader) null); @@ -1067,6 +1209,7 @@ public void testParser_nullReader() throws Exception { } } + @Test public void testObjectParserParse_entry() throws Exception { @SuppressWarnings("serial") Entry entry = @@ -1077,6 +1220,7 @@ public void testObjectParserParse_entry() throws Exception { assertEquals("foo", entry.title); } + @Test public void testObjectParserParse_stringList() throws Exception { JsonFactory factory = newFactory(); @SuppressWarnings({"unchecked", "serial"}) @@ -1092,6 +1236,7 @@ public void testObjectParserParse_stringList() throws Exception { assertTrue(ImmutableList.of("a", "b", "c").equals(result)); } + @Test public void testToString_withFactory() { GenericJson data = new GenericJson(); data.put("a", "b"); @@ -1099,6 +1244,7 @@ public void testToString_withFactory() { assertEquals("{\"a\":\"b\"}", data.toString()); } + @Test public void testFactory() { JsonFactory factory = newFactory(); GenericJson data = new GenericJson(); @@ -1111,6 +1257,7 @@ private JsonParser createParser(String json) throws Exception { return newFactory().createJsonParser(json); } + @Test public void testSkipToKey_firstKey() throws Exception { JsonParser parser = createParser(JSON_THREE_ELEMENTS); assertEquals("one", parser.skipToKey(ImmutableSet.of("one"))); @@ -1118,6 +1265,7 @@ public void testSkipToKey_firstKey() throws Exception { assertEquals(1, parser.getIntValue()); } + @Test public void testSkipToKey_lastKey() throws Exception { JsonParser parser = createParser(JSON_THREE_ELEMENTS); assertEquals("three", parser.skipToKey(ImmutableSet.of("three"))); @@ -1125,6 +1273,7 @@ public void testSkipToKey_lastKey() throws Exception { assertEquals(3, parser.getIntValue()); } + @Test public void testSkipToKey_multipleKeys() throws Exception { JsonParser parser = createParser(JSON_THREE_ELEMENTS); assertEquals("two", parser.skipToKey(ImmutableSet.of("foo", "three", "two"))); @@ -1132,6 +1281,7 @@ public void testSkipToKey_multipleKeys() throws Exception { assertEquals(2, parser.getIntValue()); } + @Test public void testSkipToKey_noMatch() throws Exception { JsonParser parser = createParser(JSON_THREE_ELEMENTS); assertEquals(null, parser.skipToKey(ImmutableSet.of("foo", "bar", "num"))); @@ -1220,8 +1370,13 @@ public ExtendsGenericJson set(String fieldName, Object value) { } } - static final String EXTENDS_JSON = "{\"numAsString\":\"1\",\"num\":1}"; + static final String EXTENDS_JSON; + static { + EXTENDS_JSON = "{\"numAsString\":\"1\",\"num\":1}"; + } + + @Test public void testParser_extendsGenericJson() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -1236,9 +1391,15 @@ public static class Simple { @Key String a; } - static final String SIMPLE = "{\"a\":\"b\"}"; - static final String SIMPLE_WRAPPED = "{\"d\":{\"a\":\"b\"}}"; + static final String SIMPLE; + static final String SIMPLE_WRAPPED; + + static { + SIMPLE = "{\"a\":\"b\"}"; + SIMPLE_WRAPPED = "{\"d\":{\"a\":\"b\"}}"; + } + @Test public void testJsonObjectParser_reader() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = new JsonObjectParser(factory); @@ -1246,6 +1407,7 @@ public void testJsonObjectParser_reader() throws Exception { assertEquals("b", simple.a); } + @Test public void testJsonObjectParser_inputStream() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = new JsonObjectParser(factory); @@ -1257,6 +1419,7 @@ public void testJsonObjectParser_inputStream() throws Exception { assertEquals("b", simple.a); } + @Test public void testJsonObjectParser_readerWrapped() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = @@ -1265,6 +1428,7 @@ public void testJsonObjectParser_readerWrapped() throws Exception { assertEquals("b", simple.a); } + @Test public void testJsonObjectParser_inputStreamWrapped() throws Exception { JsonFactory factory = newFactory(); JsonObjectParser parser = @@ -1277,6 +1441,7 @@ public void testJsonObjectParser_inputStreamWrapped() throws Exception { assertEquals("b", simple.a); } + @Test public void testJsonHttpContent_simple() throws Exception { JsonFactory factory = newFactory(); Simple simple = new Simple(); @@ -1287,6 +1452,7 @@ public void testJsonHttpContent_simple() throws Exception { assertEquals(SIMPLE, out.toString("UTF-8")); } + @Test public void testJsonHttpContent_wrapped() throws Exception { JsonFactory factory = newFactory(); Simple simple = new Simple(); @@ -1302,6 +1468,7 @@ public static class V { @Key String s; } + @Test public void testParse_void() throws Exception { subtestParse_void(null); subtestParse_void("\"a\""); @@ -1328,14 +1495,25 @@ public static class BooleanTypes { @Key boolean bool; } - public static final String BOOLEAN_TYPE_EMPTY = "{}"; - public static final String BOOLEAN_TYPE_EMPTY_OUTPUT = "{\"bool\":false}"; - public static final String BOOLEAN_TYPE_TRUE = "{\"bool\":true,\"boolObj\":true}"; - public static final String BOOLEAN_TYPE_FALSE = "{\"bool\":false,\"boolObj\":false}"; - public static final String BOOLEAN_TYPE_NULL = "{\"boolObj\":null}"; - public static final String BOOLEAN_TYPE_NULL_OUTPUT = "{\"bool\":false,\"boolObj\":null}"; - public static final String BOOLEAN_TYPE_WRONG = "{\"boolObj\":{}}"; + public static final String BOOLEAN_TYPE_EMPTY; + public static final String BOOLEAN_TYPE_EMPTY_OUTPUT; + public static final String BOOLEAN_TYPE_TRUE; + public static final String BOOLEAN_TYPE_FALSE; + public static final String BOOLEAN_TYPE_NULL; + public static final String BOOLEAN_TYPE_NULL_OUTPUT; + public static final String BOOLEAN_TYPE_WRONG; + + static { + BOOLEAN_TYPE_EMPTY = "{}"; + BOOLEAN_TYPE_EMPTY_OUTPUT = "{\"bool\":false}"; + BOOLEAN_TYPE_TRUE = "{\"bool\":true,\"boolObj\":true}"; + BOOLEAN_TYPE_FALSE = "{\"bool\":false,\"boolObj\":false}"; + BOOLEAN_TYPE_NULL = "{\"boolObj\":null}"; + BOOLEAN_TYPE_NULL_OUTPUT = "{\"bool\":false,\"boolObj\":null}"; + BOOLEAN_TYPE_WRONG = "{\"boolObj\":{}}"; + } + @Test public void testParse_boolean() throws Exception { JsonFactory factory = newFactory(); BooleanTypes parsed; @@ -1414,6 +1592,7 @@ public static class Centipede extends Animal { "{\"unused\":0, \"bodyColor\":\"green\",\"name\":\"Mr. Icky\",\"legCount\":68,\"type\":" + "\"bug\"}"; + @Test public void testParser_heterogeneousSchemata() throws Exception { testParser_heterogeneousSchemata_Helper(DOG, CENTIPEDE); // TODO(ngmiceli): Test that this uses the optimized flow (once implemented) @@ -1451,6 +1630,7 @@ private void testParser_heterogeneousSchemata_Helper(String dogJson, String cent public static final String ANIMAL_WITHOUT_TYPE = "{\"legCount\":3,\"name\":\"Confused\"}"; + @Test public void testParser_heterogeneousSchema_missingType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser; @@ -1471,6 +1651,7 @@ public static class Human extends Animal { public static final String HUMAN = "{\"bestFriend\":" + DOG + ",\"legCount\":2,\"name\":\"Joe\",\"type\":\"human\"}"; + @Test public void testParser_heterogeneousSchema_withObject() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(HUMAN); @@ -1508,6 +1689,7 @@ public static class DogGenericJson extends AnimalGenericJson { + "\"unusedInfo\":\"this is not being used!\",\"unused\":{\"foo\":200}}"; @SuppressWarnings("unchecked") + @Test public void testParser_heterogeneousSchema_genericJson() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(DOG_EXTRA_INFO); @@ -1536,6 +1718,7 @@ public static class DogWithFamily extends Dog { @Key public Animal[] children; } + @Test public void testParser_heterogeneousSchema_withArrays() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(DOG_WITH_FAMILY); @@ -1560,6 +1743,7 @@ public void testParser_heterogeneousSchema_withArrays() throws Exception { public static final String DOG_WITH_NO_FAMILY_PARSED = "{\"legCount\":4,\"tricksKnown\":0,\"type\":\"dogwithfamily\"}"; + @Test public void testParser_heterogeneousSchema_withNullArrays() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(DOG_WITH_NO_FAMILY); @@ -1590,6 +1774,7 @@ public static class PolymorphicWithMultipleAnnotations { public static final String MULTIPLE_ANNOTATIONS_JSON = "{\"a\":\"foo\",\"b\":\"dog\",\"c\":\"bar\",\"d\":\"bug\"}"; + @Test public void testParser_polymorphicClass_tooManyAnnotations() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(MULTIPLE_ANNOTATIONS_JSON); @@ -1620,6 +1805,7 @@ public static class NumericTypedSubclass2 extends PolymorphicWithNumericType {} public static final String POLYMORPHIC_NUMERIC_TYPE_1 = "{\"foo\":\"bar\",\"type\":1}"; public static final String POLYMORPHIC_NUMERIC_TYPE_2 = "{\"foo\":\"bar\",\"type\":2}"; + @Test public void testParser_heterogeneousSchema_numericType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(POLYMORPHIC_NUMERIC_TYPE_1); @@ -1648,6 +1834,7 @@ public static class NumericValueTypedSubclass2 extends PolymorphicWithNumericVal public static final String POLYMORPHIC_NUMERIC_UNSPECIFIED_TYPE = "{\"foo\":\"bar\"}"; + @Test public void testParser_heterogeneousSchema_numericValueType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(POLYMORPHIC_NUMERIC_TYPE_1); @@ -1679,6 +1866,7 @@ public static class PolymorphicWithIllegalValueType { Object type; } + @Test public void testParser_heterogeneousSchema_illegalValueType() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(POLYMORPHIC_NUMERIC_TYPE_1); @@ -1700,6 +1888,7 @@ public static class PolymorphicWithDuplicateTypeKeys { String type; } + @Test public void testParser_polymorphicClass_duplicateTypeKeys() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(EMPTY_OBJECT); @@ -1714,6 +1903,7 @@ public void testParser_polymorphicClass_duplicateTypeKeys() throws Exception { public static final String POLYMORPHIC_WITH_UNKNOWN_KEY = "{\"legCount\":4,\"name\":\"Fido\",\"tricksKnown\":3,\"type\":\"unknown\"}"; + @Test public void testParser_polymorphicClass_noMatchingTypeKey() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(POLYMORPHIC_WITH_UNKNOWN_KEY); @@ -1736,6 +1926,7 @@ public static class PolymorphicSelfReferencing { public static final String POLYMORPHIC_SELF_REFERENCING = "{\"info\":\"blah\",\"type\":\"self\"}"; + @Test public void testParser_polymorphicClass_selfReferencing() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(POLYMORPHIC_SELF_REFERENCING); @@ -1765,6 +1956,7 @@ public static class HumanWithPets extends Human { + ",\"second\":{\"legCount\":0,\"tricksKnown\":0,\"type\":\"dog\"}}," + "\"type\":\"human with pets\"}"; + @Test public void testParser_polymorphicClass_mapOfPolymorphicClasses() throws Exception { JsonFactory factory = newFactory(); JsonParser parser = factory.createJsonParser(HUMAN_WITH_PETS); diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java index 1a2a1bb54..96db2b1f5 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonGeneratorTest.java @@ -14,6 +14,8 @@ package com.google.api.client.test.json; +import static org.junit.Assert.assertEquals; + import com.google.api.client.json.JsonGenerator; import java.io.IOException; import java.io.StringWriter; @@ -21,9 +23,12 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; -public abstract class AbstractJsonGeneratorTest extends TestCase { +@RunWith(JUnit4.class) +public abstract class AbstractJsonGeneratorTest { protected abstract JsonGenerator newGenerator(Writer writer) throws IOException; @@ -34,6 +39,7 @@ public Iterator> iterator() { } } + @Test public void testSerialize_simpleMap() throws Exception { StringWriter writer = new StringWriter(); JsonGenerator generator = newGenerator(writer); @@ -46,6 +52,7 @@ public void testSerialize_simpleMap() throws Exception { assertEquals("{\"a\":\"b\"}", writer.toString()); } + @Test public void testSerialize_iterableMap() throws Exception { StringWriter writer = new StringWriter(); JsonGenerator generator = newGenerator(writer); diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java index 985637aea..25bb77bb4 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/json/AbstractJsonParserTest.java @@ -13,6 +13,10 @@ */ package com.google.api.client.test.json; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonObjectParser; @@ -21,17 +25,25 @@ import java.io.InputStream; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; -public abstract class AbstractJsonParserTest extends TestCase { +@RunWith(JUnit4.class) +public abstract class AbstractJsonParserTest { protected abstract JsonFactory newJsonFactory(); - private static final String TEST_JSON = - "{\"strValue\": \"bar\", \"intValue\": 123, \"boolValue\": false}"; - private static final String TEST_JSON_BIG_DECIMAL = "{\"bigDecimalValue\": 1559341956102}"; + private static final String TEST_JSON; + private static final String TEST_JSON_BIG_DECIMAL; + + static { + TEST_JSON = "{\"strValue\": \"bar\", \"intValue\": 123, \"boolValue\": false}"; + TEST_JSON_BIG_DECIMAL = "{\"bigDecimalValue\": 1559341956102}"; + } + @Test public void testParse_basic() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); InputStream inputStream = new ByteArrayInputStream(TEST_JSON.getBytes(StandardCharsets.UTF_8)); @@ -45,6 +57,7 @@ public void testParse_basic() throws IOException { assertEquals(Boolean.FALSE, json.get("boolValue")); } + @Test public void testGetWrongType() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); InputStream inputStream = new ByteArrayInputStream(TEST_JSON.getBytes(StandardCharsets.UTF_8)); @@ -57,6 +70,7 @@ public void testGetWrongType() throws IOException { assertEquals(Boolean.FALSE, json.get("boolValue")); } + @Test public void testParse_badJson() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); InputStream inputStream = new ByteArrayInputStream("not json".getBytes(StandardCharsets.UTF_8)); @@ -68,6 +82,7 @@ public void testParse_badJson() throws IOException { } } + @Test public void testParse_bigDecimal() throws IOException { JsonObjectParser parser = new JsonObjectParser(newJsonFactory()); InputStream inputStream = diff --git a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java index e1e8e4061..7a5f464c8 100644 --- a/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java +++ b/google-http-client-test/src/main/java/com/google/api/client/test/util/store/AbstractDataStoreFactoryTest.java @@ -14,6 +14,12 @@ package com.google.api.client.test.util.store; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.util.Beta; import com.google.api.client.util.store.DataStore; import com.google.api.client.util.store.DataStoreFactory; @@ -21,7 +27,11 @@ import java.util.Arrays; import java.util.Collection; import java.util.Set; -import junit.framework.TestCase; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link DataStoreFactory}. @@ -29,10 +39,17 @@ * @author Yaniv Inbar */ @Beta -public abstract class AbstractDataStoreFactoryTest extends TestCase { +@RunWith(JUnit4.class) +public abstract class AbstractDataStoreFactoryTest { + + private static final String STRING_ID; + private static final String BOOLEAN_ID; + + static { + STRING_ID = "String"; + BOOLEAN_ID = "Boolean"; + } - private static final String STRING_ID = "String"; - private static final String BOOLEAN_ID = "Boolean"; DataStoreFactory dataStore; DataStore stringTyped; DataStore boolTyped; @@ -40,14 +57,14 @@ public abstract class AbstractDataStoreFactoryTest extends TestCase { /** Returns a new instance of the data store factory to test. */ protected abstract DataStoreFactory newDataStoreFactory() throws Exception; - @Override + @Before public void setUp() throws Exception { dataStore = newDataStoreFactory(); stringTyped = dataStore.getDataStore(STRING_ID); boolTyped = dataStore.getDataStore(BOOLEAN_ID); } - @Override + @After public void tearDown() throws Exception { stringTyped.clear(); assertTrue(stringTyped.values().isEmpty()); @@ -59,6 +76,7 @@ private static void assertContentsAnyOrder(Collection c, Object... elts) { assertEquals(Sets.newHashSet(c), Sets.newHashSet(Arrays.asList(elts))); } + @Test public void testId() throws Exception { subtestIdNoException("1"); subtestIdNoException("123456789012345678901234567890"); @@ -83,6 +101,7 @@ private void subtestIdNoException(String id) throws Exception { newDataStoreFactory().getDataStore(id); } + @Test public void testSet() throws Exception { // get null assertNull(stringTyped.get(null)); @@ -123,6 +142,7 @@ public void testSet() throws Exception { assertTrue(boolTyped.get("k")); } + @Test public void testValues() throws Exception { // before assertTrue(stringTyped.values().isEmpty()); @@ -144,6 +164,7 @@ public void testValues() throws Exception { assertContentsAnyOrder(boolTyped.values(), true); } + @Test public void testKeySet() throws Exception { // before assertTrue(stringTyped.keySet().isEmpty()); @@ -164,6 +185,7 @@ public void testKeySet() throws Exception { assertTrue(stringTyped.keySet().isEmpty()); } + @Test public void testDelete() throws Exception { // store with basic values stringTyped.set("k", "v").set("k2", "v2"); @@ -186,6 +208,7 @@ public void testDelete() throws Exception { assertEquals(0, stringTyped.size()); } + @Test public void testClear() throws Exception { // store with basic values stringTyped.set("k", "v").set("k2", "v2"); @@ -199,6 +222,7 @@ public void testClear() throws Exception { assertEquals(0, stringTyped.size()); } + @Test public void testLarge() throws Exception { // TODO(yanivi): size = 1000? need to speed up JdoDataStoreTest first int size = 100; @@ -210,6 +234,7 @@ public void testLarge() throws Exception { assertEquals("hello" + mid, stringTyped.get(String.valueOf(mid))); } + @Test public void testContainsKeyAndValue() throws Exception { // before assertFalse(stringTyped.containsKey("k")); diff --git a/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/native-image.properties b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/native-image.properties new file mode 100644 index 000000000..3cbd2b27f --- /dev/null +++ b/google-http-client-test/src/main/resources/META-INF/native-image/com.google.http-client/google-http-client-test/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation diff --git a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java index 46918d765..78282861e 100644 --- a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java +++ b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/FileDataStoreFactoryTest.java @@ -14,27 +14,35 @@ package com.google.api.client.test.util.store; +import static java.nio.file.Files.createTempDirectory; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.util.store.DataStore; import com.google.api.client.util.store.FileDataStoreFactory; import com.google.common.collect.ImmutableSet; -import com.google.common.io.Files; import java.io.File; import java.io.IOException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link FileDataStoreFactory}. * * @author Yaniv Inbar */ +@RunWith(JUnit4.class) public class FileDataStoreFactoryTest extends AbstractDataStoreFactoryTest { @Override protected FileDataStoreFactory newDataStoreFactory() throws IOException { - File dataDir = Files.createTempDir(); + File dataDir = createTempDirectory("temp").toFile(); dataDir.deleteOnExit(); return new FileDataStoreFactory(dataDir); } + @Test public void testSave() throws IOException { FileDataStoreFactory factory = newDataStoreFactory(); DataStore store = factory.getDataStore("foo"); diff --git a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java index a18384a10..3454f8dba 100644 --- a/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java +++ b/google-http-client-test/src/test/java/com/google/api/client/test/util/store/MemoryDataStoreFactoryTest.java @@ -16,12 +16,15 @@ import com.google.api.client.util.store.DataStoreFactory; import com.google.api.client.util.store.MemoryDataStoreFactory; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MemoryDataStoreFactory}. * * @author Yaniv Inbar */ +@RunWith(JUnit4.class) public class MemoryDataStoreFactoryTest extends AbstractDataStoreFactoryTest { @Override diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java index f93311d46..b33196b0f 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java @@ -32,6 +32,8 @@ import java.util.List; import org.junit.Assert; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; /** @@ -40,6 +42,7 @@ * @author Yaniv Inbar * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class AtomTest { private static final String SAMPLE_FEED = diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java index 0172fccb7..e40f0658d 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java @@ -24,6 +24,8 @@ import java.util.ArrayList; import java.util.Collection; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; @@ -35,6 +37,7 @@ * * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class GenericXmlListTest { private static final String MULTI_TYPE_WITH_CLASS_TYPE = diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java index 02a85cfa9..abc083fcc 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java @@ -28,6 +28,8 @@ import java.util.List; import java.util.Map; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlSerializer; @@ -41,6 +43,7 @@ * @author Yaniv Inbar * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class GenericXmlTest { private static final String XML = diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java index 7cb908d62..b199cb2db 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java @@ -25,6 +25,8 @@ import java.io.StringReader; import java.util.ArrayList; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; @@ -33,6 +35,7 @@ * * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class XmlEnumTest { private static final String XML = diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java index 930d0de86..c12904faa 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java @@ -24,6 +24,8 @@ import java.util.ArrayList; import java.util.Collection; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; @@ -32,6 +34,7 @@ * * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class XmlListTest { private static final String MULTI_TYPE_WITH_CLASS_TYPE = diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java index 569477010..562bdb224 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java @@ -14,13 +14,20 @@ package com.google.api.client.xml; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.util.Key; import com.google.api.client.xml.atom.Atom; import com.google.common.collect.ImmutableMap; import java.io.StringWriter; import java.util.Collection; import java.util.TreeSet; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlSerializer; /** @@ -28,7 +35,8 @@ * * @author Yaniv Inbar */ -public class XmlNamespaceDictionaryTest extends TestCase { +@RunWith(JUnit4.class) +public class XmlNamespaceDictionaryTest { private static final String EXPECTED = "One" + "Two"; - public XmlNamespaceDictionaryTest() {} - - public XmlNamespaceDictionaryTest(String name) { - super(name); - } - + @Test public void testSet() { XmlNamespaceDictionary dictionary = new XmlNamespaceDictionary(); dictionary.set("", "http://www.w3.org/2005/Atom").set("gd", "http://schemas.google.com/g/2005"); @@ -78,6 +81,7 @@ public void testSet() { assertTrue(dictionary.getAliasToUriMap().isEmpty()); } + @Test public void testSerialize() throws Exception { Feed feed = new Feed(); feed.entries = new TreeSet(); @@ -93,6 +97,7 @@ public void testSerialize() throws Exception { assertEquals(EXPECTED, writer.toString()); } + @Test public void testSerializeByName() throws Exception { Feed feed = new Feed(); feed.entries = new TreeSet(); @@ -108,6 +113,7 @@ public void testSerializeByName() throws Exception { assertEquals(EXPECTED, writer.toString()); } + @Test public void testSerialize_emptyMap() throws Exception { ImmutableMap map = ImmutableMap.of(); StringWriter writer = new StringWriter(); @@ -119,6 +125,7 @@ public void testSerialize_emptyMap() throws Exception { assertEquals(EXPECTED_EMPTY_MAP, writer.toString()); } + @Test public void testSerializeByName_emptyMap() throws Exception { ImmutableMap map = ImmutableMap.of(); StringWriter writer = new StringWriter(); @@ -130,6 +137,7 @@ public void testSerializeByName_emptyMap() throws Exception { assertEquals(EXPECTED_EMPTY_MAP, writer.toString()); } + @Test public void testSerializeByName_emptyMapAtomNs() throws Exception { ImmutableMap map = ImmutableMap.of(); StringWriter writer = new StringWriter(); @@ -141,6 +149,7 @@ public void testSerializeByName_emptyMapAtomNs() throws Exception { assertEquals(EXPECTED_EMPTY_MAP_ATOM_NS, writer.toString()); } + @Test public void testSerialize_emptyMapNsUndeclared() throws Exception { ImmutableMap map = ImmutableMap.of(); StringWriter writer = new StringWriter(); @@ -151,6 +160,7 @@ public void testSerialize_emptyMapNsUndeclared() throws Exception { assertEquals(EXPECTED_EMPTY_MAP_NS_UNDECLARED, writer.toString()); } + @Test public void testSerialize_errorOnUnknown() throws Exception { Entry entry = new Entry("One", "abc"); StringWriter writer = new StringWriter(); @@ -166,6 +176,7 @@ public void testSerialize_errorOnUnknown() throws Exception { } } + @Test public void testSerializeByName_errorOnUnknown() throws Exception { Entry entry = new Entry("One", "abc"); StringWriter writer = new StringWriter(); @@ -181,6 +192,7 @@ public void testSerializeByName_errorOnUnknown() throws Exception { } } + @Test public void testSerialize_unknown() throws Exception { Feed feed = new Feed(); feed.entries = new TreeSet(); diff --git a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java index b1345f15c..d9a381424 100644 --- a/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java +++ b/google-http-client-xml/src/test/java/com/google/api/client/xml/XmlTest.java @@ -28,6 +28,8 @@ import java.util.Collection; import java.util.List; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlSerializer; @@ -37,6 +39,7 @@ * @author Yaniv Inbar * @author Gerald Madlmayr */ +@RunWith(JUnit4.class) public class XmlTest { private static final String SIMPLE_XML = "test"; diff --git a/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/native-image.properties b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/native-image.properties new file mode 100644 index 000000000..3cbd2b27f --- /dev/null +++ b/google-http-client-xml/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client-xml/native-image.properties @@ -0,0 +1 @@ +Args=--initialize-at-build-time=org.junit.runner.RunWith,java.lang.annotation.Annotation diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java index 0136e5a32..d70de7d43 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/AbstractDataStoreFactory.java @@ -14,13 +14,15 @@ package com.google.api.client.util.store; +import static com.google.api.client.util.Preconditions.checkArgument; + import com.google.api.client.util.Maps; -import com.google.api.client.util.Preconditions; import java.io.IOException; import java.io.Serializable; import java.util.Map; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import java.util.logging.Logger; import java.util.regex.Pattern; /** @@ -41,11 +43,19 @@ public abstract class AbstractDataStoreFactory implements DataStoreFactory { * Pattern to control possible values for the {@code id} parameter of {@link * #getDataStore(String)}. */ - private static final Pattern ID_PATTERN = Pattern.compile("\\w{1,30}"); + private static final Pattern ID_PATTERN; + + static { + try { + ID_PATTERN = Pattern.compile("\\w{1,30}"); + } catch (Throwable t) { + Logger.getLogger(AbstractDataStoreFactory.class.getName()).severe(t.getMessage()); + throw t; + } + } public final DataStore getDataStore(String id) throws IOException { - Preconditions.checkArgument( - ID_PATTERN.matcher(id).matches(), "%s does not match pattern %s", id, ID_PATTERN); + checkArgument(ID_PATTERN.matcher(id).matches(), "%s does not match pattern %s", id, ID_PATTERN); lock.lock(); try { @SuppressWarnings("unchecked") diff --git a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java index 98c5003ef..16b33b093 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java +++ b/google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java @@ -37,6 +37,7 @@ import java.util.HashSet; import java.util.Locale; import java.util.Set; +import java.util.logging.Logger; /** * Thread-safe file implementation of a credential store. @@ -54,8 +55,17 @@ */ public class FileDataStoreFactory extends AbstractDataStoreFactory { - private static final boolean IS_WINDOWS = - StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows"); + private static final boolean IS_WINDOWS; + + static { + try { + IS_WINDOWS = + StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows"); + } catch (Throwable ex) { + Logger.getLogger(FileDataStoreFactory.class.getName()).severe(ex.getMessage()); + throw ex; + } + } /** Directory to store data. */ private final File dataDirectory; diff --git a/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java index 93f3fa963..0d916512e 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java @@ -14,17 +14,23 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import java.io.IOException; import java.io.OutputStream; import java.util.Arrays; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link AbstractHttpContent}. * * @author Yaniv Inbar */ -public class AbstractHttpContentTest extends TestCase { +@RunWith(JUnit4.class) +public class AbstractHttpContentTest { static class TestHttpContent extends AbstractHttpContent { @@ -54,11 +60,13 @@ public boolean retrySupported() { } } + @Test public void testRetrySupported() { AbstractHttpContent content = new TestHttpContent(true, 0); assertTrue(content.retrySupported()); } + @Test public void testComputeLength() throws Exception { subtestComputeLength(true, 0, 0); subtestComputeLength(true, 1, 1); diff --git a/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java b/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java index a76081275..be7e3dd83 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java @@ -14,16 +14,21 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; + import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link BasicAuthentication}. * * @author Yaniv Inbar */ -public class BasicAuthenticationTest extends TestCase { +@RunWith(JUnit4.class) +public class BasicAuthenticationTest { static final String USERNAME = "Aladdin"; @@ -31,12 +36,14 @@ public class BasicAuthenticationTest extends TestCase { static final String AUTH_HEADER = "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="; + @Test public void testConstructor() { BasicAuthentication auth = new BasicAuthentication(USERNAME, PASSWORD); assertEquals(USERNAME, auth.getUsername()); assertEquals(PASSWORD, auth.getPassword()); } + @Test public void testInitialize() throws Exception { BasicAuthentication auth = new BasicAuthentication(USERNAME, PASSWORD); HttpRequest request = diff --git a/google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java index da73c5437..66f28c53d 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java @@ -14,20 +14,28 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.util.IOUtils; import com.google.api.client.util.StringUtils; import java.io.ByteArrayOutputStream; import java.io.IOException; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ByteArrayContent}. * * @author Yaniv Inbar */ -public class ByteArrayContentTest extends TestCase { +@RunWith(JUnit4.class) +public class ByteArrayContentTest { private static final byte[] FOO = StringUtils.getBytesUtf8("foo"); + @Test public void testConstructor() throws IOException { subtestConstructor(new ByteArrayContent("type", FOO), "foo"); subtestConstructor(new ByteArrayContent("type", FOO, 0, 3), "foo"); diff --git a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java index afcdf2bf5..d86a1d811 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java @@ -22,7 +22,10 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class ConsumingInputStreamTest { @Test diff --git a/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java index 743fc75e1..06e942a38 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java @@ -14,17 +14,25 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import java.io.ByteArrayOutputStream; import java.io.IOException; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link EmptyContent}. * * @author Yaniv Inbar */ -public class EmptyContentTest extends TestCase { +@RunWith(JUnit4.class) +public class EmptyContentTest { + @Test public void test() throws IOException { EmptyContent content = new EmptyContent(); assertEquals(0L, content.getLength()); diff --git a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java index 5a0cb0494..159305d43 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java @@ -14,8 +14,13 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.util.NanoClock; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ExponentialBackOffPolicy}. @@ -23,12 +28,10 @@ * @author Ravi Mistry */ @Deprecated -public class ExponentialBackOffPolicyTest extends TestCase { - - public ExponentialBackOffPolicyTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class ExponentialBackOffPolicyTest { + @Test public void testConstructor() { ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy(); assertEquals( @@ -39,8 +42,9 @@ public void testConstructor() { backOffPolicy.getCurrentIntervalMillis()); assertEquals( ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + backOffPolicy.getRandomizationFactor(), + 0); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier(), 0); assertEquals( ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); assertEquals( @@ -48,6 +52,7 @@ public void testConstructor() { backOffPolicy.getMaxElapsedTimeMillis()); } + @Test public void testBuilder() { ExponentialBackOffPolicy backOffPolicy = ExponentialBackOffPolicy.builder().build(); assertEquals( @@ -58,8 +63,9 @@ public void testBuilder() { backOffPolicy.getCurrentIntervalMillis()); assertEquals( ExponentialBackOffPolicy.DEFAULT_RANDOMIZATION_FACTOR, - backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + backOffPolicy.getRandomizationFactor(), + 0); + assertEquals(ExponentialBackOffPolicy.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier(), 0); assertEquals( ExponentialBackOffPolicy.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); assertEquals( @@ -82,12 +88,13 @@ public void testBuilder() { .build(); assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); - assertEquals(testMultiplier, backOffPolicy.getMultiplier()); + assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor(), 0); + assertEquals(testMultiplier, backOffPolicy.getMultiplier(), 0); assertEquals(testMaxInterval, backOffPolicy.getMaxIntervalMillis()); assertEquals(testMaxElapsedTime, backOffPolicy.getMaxElapsedTimeMillis()); } + @Test public void testBackOff() throws Exception { int testInitialInterval = 500; double testRandomizationFactor = 0.1; @@ -130,6 +137,7 @@ public long nanoTime() { } } + @Test public void testGetElapsedTimeMillis() { ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy.Builder().setNanoClock(new MyNanoClock()).build(); @@ -137,6 +145,7 @@ public void testGetElapsedTimeMillis() { assertEquals("elapsedTimeMillis=" + elapsedTimeMillis, 1000, elapsedTimeMillis); } + @Test public void testBackOffOverflow() throws Exception { int testInitialInterval = Integer.MAX_VALUE / 2; double testMultiplier = 2.1; diff --git a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java index 4963b05bd..e73edc311 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java @@ -14,19 +14,24 @@ package com.google.api.client.http; +import static org.junit.Assert.assertFalse; + import com.google.api.client.testing.util.TestableByteArrayOutputStream; import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; import java.io.IOException; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link GZipEncoding}. * * @author Yaniv Inbar */ -public class GZipEncodingTest extends TestCase { +@RunWith(JUnit4.class) +public class GZipEncodingTest { private static final byte[] EXPECED_ZIPPED = new byte[] { @@ -42,6 +47,7 @@ public class GZipEncodingTest extends TestCase { 0, 0, 0, 0, 0, 0, 0, 0 }; + @Test public void test() throws IOException { // TODO: remove when no longer using Java < 16. byte[] expected = diff --git a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java index dbe1cc931..1e2dfddf1 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java @@ -14,6 +14,11 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.fail; + import com.google.api.client.util.Key; import java.net.MalformedURLException; import java.net.URI; @@ -24,24 +29,21 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; -import junit.framework.TestCase; -import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link GenericUrl}. * * @author Yaniv Inbar */ -public class GenericUrlTest extends TestCase { - - public GenericUrlTest() {} - - public GenericUrlTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class GenericUrlTest { private static final String MINIMAL = "http://bar"; + @Test public void testBuild_minimal() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -49,6 +51,7 @@ public void testBuild_minimal() { assertEquals(MINIMAL, url.build()); } + @Test public void testParse_minimal() { GenericUrl url = new GenericUrl(MINIMAL); assertEquals("http", url.getScheme()); @@ -56,6 +59,7 @@ public void testParse_minimal() { private static final String NO_PATH = "http://bar?a=b"; + @Test public void testBuild_noPath() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -64,11 +68,13 @@ public void testBuild_noPath() { assertEquals(NO_PATH, url.build()); } + @Test public void testBuild_noUserInfo() { GenericUrl url = new GenericUrl(NO_PATH); assertNull(url.getUserInfo()); } + @Test public void testBuild_noScheme() { GenericUrl url = new GenericUrl(); try { @@ -79,6 +85,7 @@ public void testBuild_noScheme() { } } + @Test public void testBuild_noHost() { GenericUrl url = new GenericUrl(); try { @@ -90,6 +97,7 @@ public void testBuild_noHost() { } } + @Test public void testParse_noPath() { GenericUrl url = new GenericUrl(NO_PATH); assertEquals("http", url.getScheme()); @@ -102,6 +110,7 @@ public void testParse_noPath() { private static final List SHORT_PATH_PARTS = Arrays.asList("", "path"); + @Test public void testBuild_shortPath() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -111,6 +120,7 @@ public void testBuild_shortPath() { assertEquals(SHORT_PATH, url.build()); } + @Test public void testParse_shortPath() { GenericUrl url = new GenericUrl(SHORT_PATH); assertEquals("http", url.getScheme()); @@ -123,6 +133,7 @@ public void testParse_shortPath() { private static final List LONG_PATH_PARTS = Arrays.asList("", "path", "to", "resource"); + @Test public void testBuild_longPath() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -132,6 +143,7 @@ public void testBuild_longPath() { assertEquals(LONG_PATH, url.build()); } + @Test public void testParse_longPath() { GenericUrl url = new GenericUrl(LONG_PATH); assertEquals("http", url.getScheme()); @@ -172,6 +184,7 @@ public TestUrl(String encodedUrl, boolean verbatim) { private static final String USER_INFO = "user:"; private static final String FRAGMENT = ""; + @Test public void testBuild_full() { TestUrl url = new TestUrl(); url.setScheme("https"); @@ -189,6 +202,7 @@ public void testBuild_full() { assertEquals(FULL, url.build()); } + @Test public void testParse_full() { TestUrl url = new TestUrl(FULL); subtestFull(url); @@ -197,27 +211,32 @@ public void testParse_full() { assertEquals("bar", url.foo); } + @Test public void testParse_full_verbatim() { TestUrl url = new TestUrl(FULL, true); assertNull(url.hidden); assertEquals("Go%3D%23/%25%26%20?%3Co%3Egle", url.getFirst("q")); } + @Test public void testConstructor_url() throws MalformedURLException { GenericUrl url = new GenericUrl(new URL(FULL)); subtestFull(url); } + @Test public void testConstructor_uri() throws URISyntaxException { GenericUrl url = new GenericUrl(new URI(FULL)); subtestFull(url); } + @Test public void testConstructor_string() { GenericUrl url = new GenericUrl(FULL); subtestFull(url); } + @Test public void testConstructor_schemeToLowerCase() throws URISyntaxException, MalformedURLException { GenericUrl url = new GenericUrl("HTTps://www.google.com:223"); assertEquals("https", url.getScheme()); @@ -274,6 +293,7 @@ public FieldTypesUrl set(String fieldName, Object value) { private static final String FIELD_TYPES = "http://bar?B=true&D=-3.14&I=-3&b=true&d=-3.14&i=-3&s=a&a=b"; + @Test public void testBuild_fieldTypes() { FieldTypesUrl url = new FieldTypesUrl(); url.setScheme("http"); @@ -290,6 +310,7 @@ public void testBuild_fieldTypes() { assertEquals(FIELD_TYPES, url.build()); } + @Test public void testParse_fieldTypes() { FieldTypesUrl url = new FieldTypesUrl(FIELD_TYPES); assertEquals("http", url.getScheme()); @@ -308,6 +329,7 @@ public void testParse_fieldTypes() { private static final String FRAGMENT1 = "http://bar/path/to/resource#fragme=%23/%25&%20?%3Co%3Ent"; + @Test public void testBuild_fragment1() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -317,6 +339,7 @@ public void testBuild_fragment1() { assertEquals(FRAGMENT1, url.build()); } + @Test public void testParse_fragment1() { GenericUrl url = new GenericUrl(FRAGMENT1); assertEquals("http", url.getScheme()); @@ -327,6 +350,7 @@ public void testParse_fragment1() { private static final String FRAGMENT2 = "http://bar/path/to/resource?a=b#fragment"; + @Test public void testBuild_fragment2() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -337,6 +361,7 @@ public void testBuild_fragment2() { assertEquals(FRAGMENT2, url.build()); } + @Test public void testParse_fragment2() { GenericUrl url = new GenericUrl(FRAGMENT2); assertEquals("http", url.getScheme()); @@ -346,6 +371,7 @@ public void testParse_fragment2() { assertEquals("fragment", url.getFragment()); } + @Test public void testBuildAuthority_exception() { // Test without a scheme. GenericUrl url = new GenericUrl(); @@ -353,7 +379,7 @@ public void testBuildAuthority_exception() { try { url.buildAuthority(); - Assert.fail("no exception was thrown"); + fail("no exception was thrown"); } catch (NullPointerException expected) { } @@ -363,11 +389,12 @@ public void testBuildAuthority_exception() { try { url.buildAuthority(); - Assert.fail("no exception was thrown"); + fail("no exception was thrown"); } catch (NullPointerException expected) { } } + @Test public void testBuildAuthority_simple() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -375,6 +402,7 @@ public void testBuildAuthority_simple() { assertEquals("http://example.com", url.buildAuthority()); } + @Test public void testBuildAuthority_withPort() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -383,6 +411,7 @@ public void testBuildAuthority_withPort() { assertEquals("http://example.com:1234", url.buildAuthority()); } + @Test public void testBuildAuthority_withUserInfo() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -391,6 +420,7 @@ public void testBuildAuthority_withUserInfo() { assertEquals("http://first.last:pa%40%40@www.example.com", url.buildAuthority()); } + @Test public void testBuildRelativeUrl_empty() { GenericUrl url = new GenericUrl(); url.setScheme("foo"); @@ -399,6 +429,7 @@ public void testBuildRelativeUrl_empty() { assertEquals("", url.buildRelativeUrl()); } + @Test public void testBuildRelativeUrl_simple() { GenericUrl url = new GenericUrl(); url.setScheme("foo"); @@ -407,6 +438,7 @@ public void testBuildRelativeUrl_simple() { assertEquals("/example", url.buildRelativeUrl()); } + @Test public void testBuildRelativeUrl_simpleQuery() { GenericUrl url = new GenericUrl(); url.setScheme("foo"); @@ -416,6 +448,7 @@ public void testBuildRelativeUrl_simpleQuery() { assertEquals("/example?key=value", url.buildRelativeUrl()); } + @Test public void testBuildRelativeUrl_fragment() { GenericUrl url = new GenericUrl(); url.setScheme("foo"); @@ -425,6 +458,7 @@ public void testBuildRelativeUrl_fragment() { assertEquals("/example#test", url.buildRelativeUrl()); } + @Test public void testBuildRelativeUrl_onlyQuery() { GenericUrl url = new GenericUrl(); url.setScheme("foo"); @@ -437,6 +471,7 @@ public void testBuildRelativeUrl_onlyQuery() { private static final String BASE_URL = "http://google.com"; private static final String FULL_PATH = "/some/path/someone%2Fis%2F@gmail.com/test/?one=1&two=2"; + @Test public void testBuildRelativeUrl_full() { GenericUrl url = new GenericUrl(BASE_URL + FULL_PATH); assertEquals(FULL_PATH, url.buildRelativeUrl()); @@ -448,6 +483,7 @@ public void testBuildRelativeUrl_full() { private static final List PATH_WITH_SLASH_PARTS = Arrays.asList("", "m8", "feeds", "contacts", "someone/is/@gmail.com", "full", ""); + @Test public void testBuild_pathWithSlash() { GenericUrl url = new GenericUrl(); url.setScheme("http"); @@ -456,12 +492,14 @@ public void testBuild_pathWithSlash() { assertEquals(PATH_WITH_SLASH, url.build()); } + @Test public void testConstructorUnderscore() { String url = "http://url_with_underscore.google.com"; GenericUrl parsed = new GenericUrl(url); assertEquals("url_with_underscore.google.com", parsed.getHost()); } + @Test public void testParse_pathWithSlash() { GenericUrl url = new GenericUrl(PATH_WITH_SLASH); assertEquals("http", url.getScheme()); @@ -469,6 +507,7 @@ public void testParse_pathWithSlash() { assertEquals(PATH_WITH_SLASH_PARTS, url.getPathParts()); } + @Test public void testToPathParts() { subtestToPathParts(null, (String[]) null); subtestToPathParts(null, ""); @@ -493,6 +532,7 @@ private void subtestToPathParts(String encodedPath, String... expectedDecodedPar } } + @Test public void testAppendPath() { GenericUrl url = new GenericUrl("http://google.com"); assertNull(url.getPathParts()); @@ -525,6 +565,7 @@ public void testAppendPath() { private static final String REPEATED_PARAM = PREFIX + REPEATED_PARAM_PATH + "?q=c&q=a&q=b&s=e"; + @Test public void testRepeatedParam_build() { GenericUrl url = new GenericUrl(); url.setScheme("https"); @@ -535,6 +576,7 @@ public void testRepeatedParam_build() { assertEquals(REPEATED_PARAM, url.build()); } + @Test public void testRepeatedParam_parse() { GenericUrl url = new GenericUrl(REPEATED_PARAM); assertEquals("https", url.getScheme()); @@ -552,6 +594,7 @@ public void testRepeatedParam_parse() { assertEquals(Arrays.asList("c", "a", "b"), new ArrayList(url.getAll("q"))); } + @Test public void testBuild_noValue() { GenericUrl url = new GenericUrl(); url.setScheme("https"); @@ -561,12 +604,14 @@ public void testBuild_noValue() { assertEquals(PREFIX + REPEATED_PARAM_PATH + "?noval", url.build()); } + @Test public void testClone() { GenericUrl url = new GenericUrl("http://www.google.com"); GenericUrl clone = url.clone(); assertEquals("http://www.google.com", clone.build()); } + @Test public void testToUrl_relative() { // relative redirect testRedirectUtility("http://www.google.com/test", "http://www.google.com", "/test"); diff --git a/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java b/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java index f7c863222..ba7d2df32 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java @@ -27,7 +27,10 @@ import java.io.SequenceInputStream; import java.util.zip.GZIPInputStream; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public final class GzipSupportTest { @SuppressWarnings("UnstableApiUsage") // CountingInputStream is @Beta diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java index ae0ae125f..f2760c447 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java @@ -14,21 +14,28 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; import com.google.api.client.util.BackOff; import com.google.api.client.util.Sleeper; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpBackOffIOExceptionHandler}. * * @author Eyal Peled */ -public class HttpBackOffIOExpcetionHandlerTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpBackOffIOExpcetionHandlerTest { + @Test public void testHandle() throws IOException { subsetHandle(0, 0, true, BackOff.STOP_BACKOFF); subsetHandle(0, 0, false, new MockBackOff().setBackOffMillis(0).setMaxTries(5)); @@ -49,6 +56,7 @@ public void subsetHandle(long count, long millis, boolean retrySupported, BackOf assertEquals(count, sleeper.getCount()); } + @Test public void testHandleIOException_returnsFalseAndThreadRemainsInterrupted_whenSleepIsInterrupted() throws Exception { final AtomicBoolean stillInterrupted = new AtomicBoolean(false); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java index afe9ff65d..daefab430 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpBackOffUnsuccessfulResponseHandlerTest.java @@ -14,6 +14,9 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.http.HttpBackOffUnsuccessfulResponseHandler.BackOffRequired; import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; @@ -21,19 +24,24 @@ import com.google.api.client.util.Sleeper; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test {@link HttpBackOffUnsuccessfulResponseHandler}. * * @author Eyal Peled */ -public class HttpBackOffUnsuccessfulResponseHandlerTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpBackOffUnsuccessfulResponseHandlerTest { + @Test public void testHandleResponse_retryFalse() throws IOException { subsetHandleResponse(0, 0, false, new MockBackOff(), BackOffRequired.ALWAYS); } + @Test public void testHandleResponse_requiredFalse() throws IOException { subsetHandleResponse( 0, @@ -47,6 +55,7 @@ public boolean isRequired(HttpResponse response) { }); } + @Test public void testHandleResponse_requiredTrue() throws IOException { BackOff backOff = new MockBackOff().setBackOffMillis(4).setMaxTries(7); subsetHandleResponse(7, 4, true, backOff, BackOffRequired.ALWAYS); @@ -70,6 +79,7 @@ private void subsetHandleResponse( assertEquals(count, sleeper.getCount()); } + @Test public void testHandleResponse_returnsFalseAndThreadRemainsInterrupted_whenSleepIsInterrupted() throws Exception { final AtomicBoolean stillInterrupted = new AtomicBoolean(false); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java index 265814722..96c16a244 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpEncodingStreamingContentTest.java @@ -14,19 +14,24 @@ package com.google.api.client.http; +import static org.junit.Assert.assertFalse; + import com.google.api.client.testing.util.TestableByteArrayOutputStream; import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; import java.io.IOException; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpEncodingStreamingContent}. * * @author Yaniv Inbar */ -public class HttpEncodingStreamingContentTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpEncodingStreamingContentTest { private static final byte[] EXPECED_ZIPPED = new byte[] { @@ -42,6 +47,7 @@ public class HttpEncodingStreamingContentTest extends TestCase { 0, 0, 0, 0, 0, 0, 0, 0 }; + @Test public void test() throws IOException { // TODO: remove when no longer using Java < 16. byte[] expected = diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java index 70f76cd32..3b9baf113 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpHeadersTest.java @@ -14,6 +14,10 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import com.google.api.client.http.HttpRequestTest.E; import com.google.api.client.testing.http.MockLowLevelHttpRequest; import com.google.api.client.testing.http.MockLowLevelHttpResponse; @@ -25,21 +29,19 @@ import java.io.Writer; import java.util.Arrays; import java.util.List; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpHeaders}. * * @author Yaniv Inbar */ -public class HttpHeadersTest extends TestCase { - - public HttpHeadersTest() {} - - public HttpHeadersTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class HttpHeadersTest { + @Test public void testBasicAuthentication() { HttpHeaders headers = new HttpHeaders(); headers.setBasicAuthentication( @@ -66,6 +68,7 @@ public static class MyHeaders extends HttpHeaders { @Key E otherValue; } + @Test public void testSerializeHeaders() throws Exception { // custom headers MyHeaders myHeaders = new MyHeaders(); @@ -131,6 +134,7 @@ public void testSerializeHeaders() throws Exception { } @SuppressWarnings("unchecked") + @Test public void testFromHttpHeaders() { HttpHeaders rawHeaders = new HttpHeaders(); rawHeaders.setContentLength(Long.MAX_VALUE); @@ -169,6 +173,7 @@ public void testFromHttpHeaders() { private static final String AUTHORIZATION_HEADERS = "Accept-Encoding: gzip\r\nAuthorization: Foo\r\nAuthorization: Bar\r\n"; + @Test public void testAuthorizationHeader() throws IOException { // serialization HttpHeaders headers = new HttpHeaders(); @@ -187,6 +192,7 @@ public void testAuthorizationHeader() throws IOException { assertTrue(authHeader.toString(), ImmutableList.of("Foo", "Bar").equals(authHeader)); } + @Test public void testHeaderStringValues() { // custom headers MyHeaders myHeaders = new MyHeaders(); @@ -236,6 +242,7 @@ public static class SlugHeaders extends HttpHeaders { String slug; } + @Test public void testParseAge() throws Exception { MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse() @@ -247,6 +254,7 @@ public void testParseAge() throws Exception { assertEquals(3456L, httpHeaders.getAge().longValue()); } + @Test public void testFromHttpResponse_normalFlow() throws Exception { MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse() @@ -266,6 +274,7 @@ public void testFromHttpResponse_normalFlow() throws Exception { assertEquals("123456789", slugHeaders.slug); } + @Test public void testFromHttpResponse_doubleConvert() throws Exception { MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse() @@ -285,6 +294,7 @@ public void testFromHttpResponse_doubleConvert() throws Exception { assertEquals("123456789", slugHeaders2.slug); } + @Test public void testFromHttpResponse_clearOldValue() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.put("Foo", "oldValue"); @@ -301,7 +311,8 @@ public static class V extends HttpHeaders { @Key String s; } - public void testFromHttpResponse_void(String value) throws Exception { + @Test + public void testFromHttpResponse_void() throws Exception { MockLowLevelHttpResponse httpResponse = new MockLowLevelHttpResponse() .setHeaderNames(Arrays.asList("v", "v", "s")) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java index 91342a144..da5600a2e 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpMediaTypeTest.java @@ -14,9 +14,14 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + import com.google.common.base.Charsets; import com.google.common.testing.EqualsTester; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the {@link HttpMediaType} class. @@ -24,18 +29,22 @@ * @author Matthias Linder (mlinder) * @since 1.10 */ -public class HttpMediaTypeTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpMediaTypeTest { + @Test public void testBuild() { HttpMediaType m = new HttpMediaType("main", "sub"); assertEquals("main/sub", m.build()); } + @Test public void testBuild_star() { HttpMediaType m = new HttpMediaType("*", "*"); assertEquals("*/*", m.build()); } + @Test public void testBuild_parameters() { HttpMediaType m = new HttpMediaType("main", "sub"); m.setParameter("bbb", ";/ "); @@ -43,35 +52,41 @@ public void testBuild_parameters() { assertEquals("main/sub; aaa=1; bbb=\";/ \"", m.build()); } + @Test public void testBuild_json() { HttpMediaType m = new HttpMediaType("application/json").setCharsetParameter(Charsets.UTF_8); assertEquals("application/json; charset=UTF-8", m.build()); } + @Test public void testBuild_multipartSpec() { HttpMediaType m = new HttpMediaType("main", "sub"); m.setParameter("bbb", "foo=/bar"); assertEquals("main/sub; bbb=\"foo=/bar\"", m.build()); } + @Test public void testBuild_parametersCasing() { HttpMediaType m = new HttpMediaType("main", "sub"); m.setParameter("foo", "FooBar"); assertEquals("main/sub; foo=FooBar", m.build()); } + @Test public void testFromString() { HttpMediaType m = new HttpMediaType("main/sub"); assertEquals("main", m.getType()); assertEquals("sub", m.getSubType()); } + @Test public void testFromString_star() { HttpMediaType m = new HttpMediaType("text/*"); assertEquals("text", m.getType()); assertEquals("*", m.getSubType()); } + @Test public void testFromString_null() { try { new HttpMediaType(null); @@ -80,6 +95,7 @@ public void testFromString_null() { } } + @Test public void testFromString_multipartSpec() { // Values allowed by the spec: http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html String value = "f00'()+_,-./:=?bar"; @@ -88,6 +104,7 @@ public void testFromString_multipartSpec() { assertEquals("bar", m.getParameter("foo")); } + @Test public void testFromString_full() { HttpMediaType m = new HttpMediaType("text/plain; charset=utf-8; foo=\"foo; =bar\""); assertEquals("text", m.getType()); @@ -97,15 +114,18 @@ public void testFromString_full() { assertEquals(2, m.getParameters().size()); } + @Test public void testFromString_case() { HttpMediaType m = new HttpMediaType("text/plain; Foo=Bar"); assertEquals("Bar", m.getParameter("fOO")); } + @Test public void testSetMainType() { assertEquals("foo", new HttpMediaType("text", "plain").setType("foo").getType()); } + @Test public void testSetMainType_invalid() { try { new HttpMediaType("text", "plain").setType("foo/bar"); @@ -114,10 +134,12 @@ public void testSetMainType_invalid() { } } + @Test public void testSetSubType() { assertEquals("foo", new HttpMediaType("text", "plain").setSubType("foo").getSubType()); } + @Test public void testSetSubType_invalid() { try { new HttpMediaType("text", "plain").setSubType("foo/bar"); @@ -126,6 +148,7 @@ public void testSetSubType_invalid() { } } + @Test public void testSetParameter_casing() { HttpMediaType mt = new HttpMediaType("text", "plain"); mt.setParameter("Foo", "Bar"); @@ -145,6 +168,7 @@ private void assertFullSerialization(String str) { assertEquals(str, new HttpMediaType(str).build()); } + @Test public void testFullSerialization() { assertFullSerialization("text/plain"); assertFullSerialization("text/plain; foo=bar"); @@ -155,6 +179,7 @@ public void testFullSerialization() { assertFullSerialization("text/*; charset=utf-8; foo=\"bar bar bar\""); } + @Test public void testInvalidCharsRegex() { assertEquals(false, containsInvalidChar("foo")); assertEquals(false, containsInvalidChar("X-Foo-Bar")); @@ -163,6 +188,7 @@ public void testInvalidCharsRegex() { assertEquals(true, containsInvalidChar("foo;bar")); } + @Test public void testCharset() { HttpMediaType hmt = new HttpMediaType("foo/bar"); assertEquals(null, hmt.getCharsetParameter()); @@ -171,6 +197,7 @@ public void testCharset() { assertEquals(Charsets.UTF_8, hmt.getCharsetParameter()); } + @Test public void testEqualsIgnoreParameters() { assertEquals( true, new HttpMediaType("foo/bar").equalsIgnoreParameters(new HttpMediaType("Foo/bar"))); @@ -183,6 +210,7 @@ public void testEqualsIgnoreParameters() { assertEquals(false, new HttpMediaType("foo/bar").equalsIgnoreParameters(null)); } + @Test public void testEqualsIgnoreParameters_static() { assertEquals(true, HttpMediaType.equalsIgnoreParameters(null, null)); assertEquals(false, HttpMediaType.equalsIgnoreParameters(null, "foo/bar")); @@ -190,6 +218,7 @@ public void testEqualsIgnoreParameters_static() { assertEquals(true, HttpMediaType.equalsIgnoreParameters("foo/bar; a=c", "foo/bar; b=d")); } + @Test public void testEquals() { new EqualsTester() .addEqualityGroup(new HttpMediaType("foo/bar"), new HttpMediaType("foo/bar")) diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java index 568eb201c..66d21826e 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestFactoryTest.java @@ -14,13 +14,19 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; + import com.google.api.client.http.javanet.NetHttpTransport; import java.io.IOException; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests {@link HttpRequestFactory}. */ -public class HttpRequestFactoryTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpRequestFactoryTest { + @Test public void testBuildRequest_urlShouldBeSet() throws IllegalArgumentException, IOException { HttpRequestFactory requestFactory = new NetHttpTransport() diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java index e7075131d..085b9f563 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTest.java @@ -14,6 +14,13 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.testing.http.MockHttpUnsuccessfulResponseHandler; @@ -42,37 +49,38 @@ import java.util.concurrent.TimeoutException; import java.util.logging.Level; import java.util.regex.Pattern; -import junit.framework.TestCase; -import org.junit.Assert; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpRequest}. * * @author Yaniv Inbar */ -public class HttpRequestTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpRequestTest { private static final ImmutableSet BASIC_METHODS = ImmutableSet.of(HttpMethods.GET, HttpMethods.PUT, HttpMethods.POST, HttpMethods.DELETE); private static final ImmutableSet OTHER_METHODS = ImmutableSet.of(HttpMethods.HEAD, HttpMethods.PATCH); - public HttpRequestTest(String name) { - super(name); - } - - @Override + @Before public void setUp() { // suppress logging warnings to the console HttpTransport.LOGGER.setLevel(java.util.logging.Level.SEVERE); } - @Override + @After public void tearDown() { // back to the standard logging level for console HttpTransport.LOGGER.setLevel(java.util.logging.Level.WARNING); } + @Test public void testNotSupportedByDefault() throws Exception { MockHttpTransport transport = new MockHttpTransport(); HttpRequest request = @@ -203,6 +211,7 @@ public boolean handleResponse( }); } + @Test public void test301Redirect() throws Exception { // Set up RedirectTransport to redirect on the first request and then return success. RedirectTransport fakeTransport = new RedirectTransport(); @@ -210,11 +219,12 @@ public void test301Redirect() throws Exception { fakeTransport.createRequestFactory().buildGetRequest(new GenericUrl("http://gmail.com")); HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); } @Deprecated + @Test public void test301RedirectWithUnsuccessfulResponseHandled() throws Exception { MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); MockBackOffPolicy backOffPolicy = new MockBackOffPolicy(); @@ -226,18 +236,19 @@ public void test301RedirectWithUnsuccessfulResponseHandled() throws Exception { request.setBackOffPolicy(backOffPolicy); HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); // Assert that the redirect logic was not invoked because the response handler could handle the // request. The request url should be the original http://gmail.com - Assert.assertEquals("http://gmail.com", request.getUrl().toString()); + assertEquals("http://gmail.com", request.getUrl().toString()); // Assert that the backoff policy was not invoked because the response handler could handle the // request. - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(0, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Exception { MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(true); // Set up RedirectTransport to redirect on the first request and then return success. @@ -250,14 +261,14 @@ public void test301RedirectWithBackOffUnsuccessfulResponseHandled() throws Excep HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); // Assert that the redirect logic was not invoked because the response handler could handle the // request. The request url should be the original http://gmail.com - Assert.assertEquals("http://gmail.com", request.getUrl().toString()); + assertEquals("http://gmail.com", request.getUrl().toString()); // Assert that the backoff was not invoked since the response handler could handle the request - Assert.assertEquals(0, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(0, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } @Deprecated @@ -273,17 +284,18 @@ public void test301RedirectWithUnsuccessfulResponseNotHandled() throws Exception request.setBackOffPolicy(backOffPolicy); HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); + assertEquals(200, resp.getStatusCode()); // Assert that the redirect logic was invoked because the response handler could not handle the // request. The request url should have changed from http://gmail.com to http://google.com - Assert.assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); + assertEquals(2, fakeTransport.lowLevelExecCalls); // Assert that the backoff policy is never invoked (except to reset) because the response // handler returned false. - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(0, backOffPolicy.backOffCalls); } + @Test public void test301RedirectWithBackOffUnsuccessfulResponseNotHandled() throws Exception { // Create an Unsuccessful response handler that always returns false. MockHttpUnsuccessfulResponseHandler handler = new MockHttpUnsuccessfulResponseHandler(false); @@ -297,15 +309,16 @@ public void test301RedirectWithBackOffUnsuccessfulResponseNotHandled() throws Ex HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); + assertEquals(200, resp.getStatusCode()); // Assert that the redirect logic was invoked because the response handler could not handle the // request. The request url should have changed from http://gmail.com to http://google.com - Assert.assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(HttpTesting.SIMPLE_URL, request.getUrl().toString()); + assertEquals(2, fakeTransport.lowLevelExecCalls); // Assert that the backoff was not invoked since it's not required for 3xx errors - Assert.assertEquals(0, backOff.getNumberOfTries()); + assertEquals(0, backOff.getNumberOfTries()); } + @Test public void test303Redirect() throws Exception { // Set up RedirectTransport to redirect on the first request and then return success. RedirectTransport fakeTransport = new RedirectTransport(); @@ -320,14 +333,15 @@ public void test303Redirect() throws Exception { request.setRequestMethod(HttpMethods.POST); HttpResponse resp = request.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); // Assert that the method in the request was changed to a GET due to the 303. - Assert.assertEquals(HttpMethods.GET, request.getRequestMethod()); + assertEquals(HttpMethods.GET, request.getRequestMethod()); // Assert that the content is null, since GET requests don't support non-zero content-length - Assert.assertNull(request.getContent()); + assertNull(request.getContent()); } + @Test public void testInfiniteRedirects() throws Exception { // Set up RedirectTransport to cause infinite redirections. RedirectTransport fakeTransport = new RedirectTransport(); @@ -342,9 +356,10 @@ public void testInfiniteRedirects() throws Exception { // Should be called 1 more than the number of retries allowed (because the first request is not // counted as a retry). - Assert.assertEquals(request.getNumberOfRetries() + 1, fakeTransport.lowLevelExecCalls); + assertEquals(request.getNumberOfRetries() + 1, fakeTransport.lowLevelExecCalls); } + @Test public void testMissingLocationRedirect() throws Exception { // Set up RedirectTransport to set responses with missing location headers. RedirectTransport fakeTransport = new RedirectTransport(); @@ -357,7 +372,7 @@ public void testMissingLocationRedirect() throws Exception { } catch (HttpResponseException e) { } - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); + assertEquals(1, fakeTransport.lowLevelExecCalls); } private static class FailThenSuccessBackoffTransport extends MockHttpTransport { @@ -454,6 +469,7 @@ public LowLevelHttpRequest buildRequest(String method, String url) { } } + @Test public void testHandleRedirect() throws Exception { StatusCodesTransport transport = new StatusCodesTransport(); HttpRequest req = @@ -508,6 +524,7 @@ private void subtestRedirect(int statusCode, boolean setLocation) throws Excepti } } + @Test public void testHandleRedirect_relativeLocation() throws IOException { subtestHandleRedirect_relativeLocation("http://some.org/a/b", "z", "http://some.org/a/z"); subtestHandleRedirect_relativeLocation("http://some.org/a/b", "z/", "http://some.org/a/z/"); @@ -527,6 +544,7 @@ public void subtestHandleRedirect_relativeLocation( } @Deprecated + @Test public void testExecuteErrorWithRetryEnabled() throws Exception { int callsBeforeSuccess = 3; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -537,10 +555,11 @@ public void testExecuteErrorWithRetryEnabled() throws Exception { req.setNumberOfRetries(callsBeforeSuccess + 1); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(4, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(4, fakeTransport.lowLevelExecCalls); } + @Test public void testExecuteErrorWithIOExceptionHandler() throws Exception { int callsBeforeSuccess = 3; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -551,11 +570,12 @@ public void testExecuteErrorWithIOExceptionHandler() throws Exception { req.setNumberOfRetries(callsBeforeSuccess + 1); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(4, fakeTransport.lowLevelExecCalls); + assertEquals(200, resp.getStatusCode()); + assertEquals(4, fakeTransport.lowLevelExecCalls); } @Deprecated + @Test public void testExecuteErrorWithRetryEnabledBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -570,9 +590,10 @@ public void testExecuteErrorWithRetryEnabledBeyondRetryLimit() throws Exception } catch (IOException e) { // Expected } - Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); + assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); } + @Test public void testExecuteErrorWithIOExceptionHandlerBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -587,9 +608,10 @@ public void testExecuteErrorWithIOExceptionHandlerBeyondRetryLimit() throws Exce } catch (IOException e) { // Expected } - Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); + assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); } + @Test public void testExecuteErrorWithoutIOExceptionHandler() throws Exception { int callsBeforeSuccess = 3; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -604,10 +626,11 @@ public void testExecuteErrorWithoutIOExceptionHandler() throws Exception { } catch (IOException e) { // Expected } - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); + assertEquals(1, fakeTransport.lowLevelExecCalls); } @Deprecated + @Test public void testUserAgentWithExecuteErrorAndRetryEnabled() throws Exception { int callsBeforeSuccess = 3; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -618,12 +641,13 @@ public void testUserAgentWithExecuteErrorAndRetryEnabled() throws Exception { req.setNumberOfRetries(callsBeforeSuccess + 1); HttpResponse resp = req.execute(); - Assert.assertEquals(1, fakeTransport.userAgentHeader.size()); - Assert.assertEquals(HttpRequest.USER_AGENT_SUFFIX, fakeTransport.userAgentHeader.get(0)); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(4, fakeTransport.lowLevelExecCalls); + assertEquals(1, fakeTransport.userAgentHeader.size()); + assertEquals(HttpRequest.USER_AGENT_SUFFIX, fakeTransport.userAgentHeader.get(0)); + assertEquals(200, resp.getStatusCode()); + assertEquals(4, fakeTransport.lowLevelExecCalls); } + @Test public void testUserAgentWithExecuteErrorAndIOExceptionHandler() throws Exception { int callsBeforeSuccess = 3; FailThenSuccessConnectionErrorTransport fakeTransport = @@ -634,12 +658,13 @@ public void testUserAgentWithExecuteErrorAndIOExceptionHandler() throws Exceptio req.setNumberOfRetries(callsBeforeSuccess + 1); HttpResponse resp = req.execute(); - Assert.assertEquals(1, fakeTransport.userAgentHeader.size()); - Assert.assertEquals(HttpRequest.USER_AGENT_SUFFIX, fakeTransport.userAgentHeader.get(0)); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(4, fakeTransport.lowLevelExecCalls); + assertEquals(1, fakeTransport.userAgentHeader.size()); + assertEquals(HttpRequest.USER_AGENT_SUFFIX, fakeTransport.userAgentHeader.get(0)); + assertEquals(200, resp.getStatusCode()); + assertEquals(4, fakeTransport.lowLevelExecCalls); } + @Test public void testAbnormalResponseHandlerWithNoBackOff() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); @@ -650,12 +675,13 @@ public void testAbnormalResponseHandlerWithNoBackOff() throws Exception { req.setUnsuccessfulResponseHandler(handler); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testAbnormalResponseHandlerWithBackOff() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -668,13 +694,14 @@ public void testAbnormalResponseHandlerWithBackOff() throws Exception { req.setBackOffPolicy(backOffPolicy); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(0, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -686,13 +713,14 @@ public void testAbnormalResponseHandlerWithBackOffUnsuccessfulResponseHandler() setBackOffUnsuccessfulResponseHandler(req, backOff, handler); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(0, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(0, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testBackOffSingleCall() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -705,13 +733,14 @@ public void testBackOffSingleCall() throws Exception { req.setBackOffPolicy(backOffPolicy); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(1, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_SERVER_ERROR, 1); @@ -723,13 +752,14 @@ public void testBackOffUnsuccessfulResponseSingleCall() throws Exception { setBackOffUnsuccessfulResponseHandler(req, backOff, handler); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testBackOffMultipleCalls() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = @@ -744,13 +774,14 @@ public void testBackOffMultipleCalls() throws Exception { req.setBackOffPolicy(backOffPolicy); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(callsBeforeSuccess, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(callsBeforeSuccess, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = @@ -764,13 +795,14 @@ public void testBackOffUnsucessfulReponseMultipleCalls() throws Exception { setBackOffUnsuccessfulResponseHandler(req, backOff, handler); HttpResponse resp = req.execute(); - Assert.assertEquals(200, resp.getStatusCode()); - Assert.assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(callsBeforeSuccess, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(200, resp.getStatusCode()); + assertEquals(callsBeforeSuccess + 1, fakeTransport.lowLevelExecCalls); + assertEquals(callsBeforeSuccess, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testBackOffCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessBackoffTransport fakeTransport = @@ -789,12 +821,13 @@ public void testBackOffCallsBeyondRetryLimit() throws Exception { fail("expected HttpResponseException"); } catch (HttpResponseException e) { } - Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); - Assert.assertEquals(callsBeforeSuccess - 1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); + assertEquals(callsBeforeSuccess - 1, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Exception { int callsBeforeSuccess = 11; FailThenSuccessBackoffTransport fakeTransport = @@ -812,12 +845,13 @@ public void testBackOffUnsuccessfulReponseCallsBeyondRetryLimit() throws Excepti fail("expected HttpResponseException"); } catch (HttpResponseException e) { } - Assert.assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(callsBeforeSuccess - 1, backOff.getMaxTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(callsBeforeSuccess, fakeTransport.lowLevelExecCalls); + assertEquals(callsBeforeSuccess - 1, backOff.getMaxTries()); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testBackOffUnRecognizedStatusCode() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); @@ -833,13 +867,14 @@ public void testBackOffUnRecognizedStatusCode() throws Exception { } catch (HttpResponseException e) { } - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); + assertEquals(1, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); // The BackOffPolicy should not be called since it does not support 401 status codes. - Assert.assertEquals(0, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(0, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Exception { FailThenSuccessBackoffTransport fakeTransport = new FailThenSuccessBackoffTransport(HttpStatusCodes.STATUS_CODE_UNAUTHORIZED, 1); @@ -854,13 +889,14 @@ public void testBackOffUnsuccessfulReponseUnRecognizedStatusCode() throws Except } catch (HttpResponseException e) { } - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); + assertEquals(1, fakeTransport.lowLevelExecCalls); // The back-off should not be called since it does not support 401 status codes. - Assert.assertEquals(0, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(0, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } @Deprecated + @Test public void testBackOffStop() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = @@ -879,14 +915,15 @@ public void testBackOffStop() throws Exception { } catch (HttpResponseException e) { } - Assert.assertEquals(1, fakeTransport.lowLevelExecCalls); - Assert.assertEquals(1, backOffPolicy.resetCalls); + assertEquals(1, fakeTransport.lowLevelExecCalls); + assertEquals(1, backOffPolicy.resetCalls); // The BackOffPolicy should be called only once and then it should return BackOffPolicy.STOP // should stop all back off retries. - Assert.assertEquals(1, backOffPolicy.backOffCalls); - Assert.assertTrue(handler.isCalled()); + assertEquals(1, backOffPolicy.backOffCalls); + assertTrue(handler.isCalled()); } + @Test public void testBackOffUnsucessfulResponseStop() throws Exception { int callsBeforeSuccess = 5; FailThenSuccessBackoffTransport fakeTransport = @@ -903,10 +940,10 @@ public void testBackOffUnsucessfulResponseStop() throws Exception { } catch (HttpResponseException e) { } - Assert.assertEquals(2, fakeTransport.lowLevelExecCalls); + assertEquals(2, fakeTransport.lowLevelExecCalls); // The back-off should be called only once, since the its max tries is set to 1 - Assert.assertEquals(1, backOff.getNumberOfTries()); - Assert.assertTrue(handler.isCalled()); + assertEquals(1, backOff.getNumberOfTries()); + assertTrue(handler.isCalled()); } public enum E { @@ -933,6 +970,7 @@ public static class MyHeaders extends HttpHeaders { @Key E otherValue; } + @Test public void testExecute_headerSerialization() throws Exception { // custom headers MyHeaders myHeaders = new MyHeaders(); @@ -973,6 +1011,7 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce assertEquals(ImmutableList.of("other"), lowLevelRequest.getHeaderValues("othervalue")); } + @Test public void testGZipEncoding() throws Exception { class MyTransport extends MockHttpTransport { @@ -1022,6 +1061,7 @@ public LowLevelHttpResponse execute() throws IOException { request.execute(); } + @Test public void testContentLoggingLimitWithLoggingEnabledAndDisabled() throws Exception { class MyTransport extends MockHttpTransport { @@ -1088,17 +1128,20 @@ public LowLevelHttpResponse execute() throws IOException { } } + @Test public void testVersion() { assertNotNull("version constant should not be null", HttpRequest.VERSION); Pattern semverPattern = Pattern.compile("\\d+\\.\\d+\\.\\d+(-sp\\.\\d+)?(-SNAPSHOT)?"); assertTrue(semverPattern.matcher(HttpRequest.VERSION).matches()); } + @Test public void testUserAgent() { assertTrue(HttpRequest.USER_AGENT_SUFFIX.contains("Google-HTTP-Java-Client")); assertTrue(HttpRequest.USER_AGENT_SUFFIX.contains("gzip")); } + @Test public void testExecute_headers() throws Exception { HttpTransport transport = new MockHttpTransport(); HttpRequest request = @@ -1108,6 +1151,7 @@ public void testExecute_headers() throws Exception { request.execute(); } + @Test public void testSuppressUserAgentSuffix() throws Exception { class MyTransport extends MockHttpTransport { String expectedUserAgent; @@ -1150,6 +1194,7 @@ public LowLevelHttpResponse execute() throws IOException { request.execute(); } + @Test public void testExecuteAsync() throws IOException, InterruptedException, ExecutionException, TimeoutException { MockExecutor mockExecutor = new MockExecutor(); @@ -1164,6 +1209,7 @@ public void testExecuteAsync() assertNotNull(futureResponse.get(10, TimeUnit.MILLISECONDS)); } + @Test public void testExecute_redirects() throws Exception { class MyTransport extends MockHttpTransport { int count = 1; @@ -1194,6 +1240,7 @@ public LowLevelHttpRequest buildRequest(String method, String url) throws IOExce } } + @Test public void testExecute_redirectWithIncorrectContentRetryableSetting() throws Exception { // TODO(yanivi): any way we can warn user about this? RedirectTransport fakeTransport = new RedirectTransport(); @@ -1214,6 +1261,7 @@ public void testExecute_redirectWithIncorrectContentRetryableSetting() throws Ex assertEquals(2, fakeTransport.lowLevelExecCalls); } + @Test public void testExecute_curlLogger() throws Exception { LogRecordingHandler recorder = new LogRecordingHandler(); HttpTransport.LOGGER.setLevel(Level.CONFIG); @@ -1236,6 +1284,7 @@ public void testExecute_curlLogger() throws Exception { assertTrue(found); } + @Test public void testExecute_curlLoggerWithContentEncoding() throws Exception { LogRecordingHandler recorder = new LogRecordingHandler(); HttpTransport.LOGGER.setLevel(Level.CONFIG); @@ -1269,6 +1318,7 @@ public void testExecute_curlLoggerWithContentEncoding() throws Exception { assertTrue(found); } + @Test public void testVersion_matchesAcceptablePatterns() throws Exception { String acceptableVersionPattern = "unknown-version|(?:\\d+\\.\\d+\\.\\d+(?:-.*?)?(?:-SNAPSHOT)?)"; diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java index 6fc9cb37d..528f5f309 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpRequestTracingTest.java @@ -36,7 +36,10 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class HttpRequestTracingTest { private static final TestHandler testHandler = new TestHandler(); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java index cbe6e6a0d..3c4c2aa94 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseExceptionTest.java @@ -17,7 +17,10 @@ import static com.google.api.client.testing.http.HttpTesting.SIMPLE_GENERIC_URL; import static com.google.api.client.util.StringUtils.LINE_SEPARATOR; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; import com.google.api.client.http.HttpResponseException.Builder; import com.google.api.client.testing.http.MockHttpTransport; @@ -30,17 +33,20 @@ import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; -import junit.framework.TestCase; -import org.junit.Assert; +import org.junit.Test; import org.junit.function.ThrowingRunnable; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpResponseException}. * * @author Yaniv Inbar */ -public class HttpResponseExceptionTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpResponseExceptionTest { + @Test public void testConstructor() throws Exception { HttpTransport transport = new MockHttpTransport(); HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); @@ -54,6 +60,7 @@ public void testConstructor() throws Exception { assertTrue(headers == responseException.getHeaders()); } + @Test public void testBuilder() throws Exception { HttpHeaders headers = new HttpHeaders(); Builder builder = @@ -73,6 +80,7 @@ public void testBuilder() throws Exception { assertTrue(headers == e.getHeaders()); } + @Test public void testConstructorWithStatusMessage() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -94,6 +102,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("OK", responseException.getStatusMessage()); } + @Test public void testConstructor_noStatusCode() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -123,6 +132,7 @@ public void run() throws Throwable { assertThat(responseException).hasMessageThat().isEqualTo("GET " + SIMPLE_GENERIC_URL); } + @Test public void testConstructor_messageButNoStatusCode() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -153,6 +163,7 @@ public void run() throws Throwable { assertThat(responseException).hasMessageThat().isEqualTo("Foo\nGET " + SIMPLE_GENERIC_URL); } + @Test public void testComputeMessage() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -174,6 +185,7 @@ public LowLevelHttpResponse execute() throws IOException { .isEqualTo("200 Foo\nGET " + SIMPLE_GENERIC_URL); } + @Test public void testThrown() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -214,6 +226,7 @@ public void run() throws Throwable { assertEquals(1, responseException.getAttemptCount()); } + @Test public void testInvalidCharset() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -249,6 +262,7 @@ public void run() throws Throwable { .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } + @Test public void testAttemptCountWithBackOff() throws Exception { HttpTransport fakeTransport = new MockHttpTransport() { @@ -288,11 +302,12 @@ public void run() throws Throwable { } }); - Assert.assertEquals(500, responseException.getStatusCode()); + assertEquals(500, responseException.getStatusCode()); // original request and 1 retry - total 2 assertEquals(2, responseException.getAttemptCount()); } + @Test public void testUnsupportedCharset() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -327,6 +342,7 @@ public void run() throws Throwable { .isEqualTo("404 Not Found\nGET " + SIMPLE_GENERIC_URL); } + @Test public void testSerialization() throws Exception { HttpTransport transport = new MockHttpTransport(); HttpRequest request = transport.createRequestFactory().buildGetRequest(SIMPLE_GENERIC_URL); diff --git a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java index ef7599197..9017b39a5 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/HttpResponseTest.java @@ -14,6 +14,13 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.json.Json; import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; @@ -37,21 +44,19 @@ import java.util.logging.Level; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link HttpResponse}. * * @author Yaniv Inbar */ -public class HttpResponseTest extends TestCase { - - public HttpResponseTest() {} - - public HttpResponseTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class HttpResponseTest { + @Test public void testParseAsString_none() throws Exception { HttpTransport transport = new MockHttpTransport(); HttpRequest request = @@ -72,6 +77,7 @@ public void testParseAsString_none() throws Exception { private static final String INVALID_CONTENT_TYPE = "!!!invalid!!!"; private static final String JSON_CONTENT_TYPE = "application/json"; + @Test public void testParseAsString_utf8() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -95,6 +101,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("UTF-8", response.getContentCharset().name()); } + @Test public void testParseAsString_noContentType() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -117,6 +124,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("ISO-8859-1", response.getContentCharset().name()); } + @Test public void testParseAsString_validContentType() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -143,6 +151,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("ISO-8859-1", response.getContentCharset().name()); } + @Test public void testParseAsString_validContentTypeWithParams() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -169,6 +178,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("UTF-8", response.getContentCharset().name()); } + @Test public void testParseAsString_invalidContentType() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -195,6 +205,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("ISO-8859-1", response.getContentCharset().name()); } + @Test public void testParseAsString_validContentTypeWithoutCharSetWithParams() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -221,6 +232,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("UTF-8", response.getContentCharset().name()); } + @Test public void testParseAsString_jsonContentType() throws IOException { HttpTransport transport = new MockHttpTransport() { @@ -246,10 +258,12 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("UTF-8", response.getContentCharset().name()); } + @Test public void testStatusCode_negative_dontThrowException() throws Exception { subtestStatusCode_negative(false); } + @Test public void testStatusCode_negative_throwException() throws Exception { subtestStatusCode_negative(true); } @@ -289,6 +303,7 @@ public static class MyHeaders extends HttpHeaders { static final String ETAG_VALUE = "\"abc\""; + @Test public void testHeaderParsing() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -325,6 +340,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(ETAG_VALUE, response.getHeaders().getETag()); } + @Test public void testParseAs_noParser() throws Exception { try { new MockHttpTransport() @@ -338,6 +354,7 @@ public void testParseAs_noParser() throws Exception { } } + @Test public void testParseAs_classNoContent() throws Exception { final MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); @@ -375,6 +392,7 @@ public LowLevelHttpResponse execute() throws IOException { } } + @Test public void testParseAs_typeNoContent() throws Exception { final MockLowLevelHttpResponse result = new MockLowLevelHttpResponse(); @@ -412,6 +430,7 @@ public LowLevelHttpResponse execute() throws IOException { } } + @Test public void testDownload() throws Exception { HttpTransport transport = new MockHttpTransport() { @@ -436,6 +455,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(SAMPLE, outputStream.toString("UTF-8")); } + @Test public void testDisconnectWithContent() throws Exception { final MockLowLevelHttpResponse lowLevelHttpResponse = new MockLowLevelHttpResponse(); @@ -466,6 +486,7 @@ public LowLevelHttpResponse execute() throws IOException { assertTrue(content.isClosed()); } + @Test public void testDisconnectWithNoContent() throws Exception { final MockLowLevelHttpResponse lowLevelHttpResponse = new MockLowLevelHttpResponse(); @@ -490,6 +511,7 @@ public LowLevelHttpResponse execute() throws IOException { assertTrue(lowLevelHttpResponse.isDisconnected()); } + @Test public void testContentLoggingLimitWithLoggingEnabledAndDisabled() throws Exception { subtestContentLoggingLimit("", 2, false); subtestContentLoggingLimit("A", 2, false); @@ -556,6 +578,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals(Arrays.asList(expectedMessages), recorder.messages()); } + @Test public void testGetContent_gzipNoContent() throws IOException { HttpTransport transport = new MockHttpTransport() { @@ -580,6 +603,7 @@ public LowLevelHttpResponse execute() throws IOException { assertNull(noContent); } + @Test public void testGetContent_gzipEncoding_ReturnRawStream() throws IOException { HttpTransport transport = new MockHttpTransport() { @@ -609,15 +633,18 @@ public LowLevelHttpResponse execute() throws IOException { request.execute().getContent() instanceof BufferedInputStream); } + @Test public void testGetContent_gzipEncoding_finishReading() throws IOException { do_testGetContent_gzipEncoding_finishReading("gzip"); } + @Test public void testGetContent_gzipEncoding_finishReadingWithUppercaseContentEncoding() throws IOException { do_testGetContent_gzipEncoding_finishReading("GZIP"); } + @Test public void testGetContent_gzipEncoding_finishReadingWithDifferentDefaultLocaleAndUppercaseContentEncoding() throws IOException { @@ -677,6 +704,7 @@ public LowLevelHttpResponse execute() throws IOException { } } + @Test public void testGetContent_otherEncodingWithgzipInItsName_GzipIsNotUsed() throws IOException { final MockLowLevelHttpResponse mockResponse = new MockLowLevelHttpResponse(); mockResponse.setContent("abcd"); @@ -703,6 +731,7 @@ public LowLevelHttpResponse execute() throws IOException { assertEquals("abcd", response.parseAsString()); } + @Test public void testGetContent_bufferedContent() throws IOException { HttpTransport transport = new MockHttpTransport() { 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 index 58b43f024..16a7c4bef 100644 --- 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 @@ -14,11 +14,18 @@ package com.google.api.client.http; -import junit.framework.TestCase; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests {@link HttpStatusCodes}. */ -public class HttpStatusCodesTest extends TestCase { +@RunWith(JUnit4.class) +public class HttpStatusCodesTest { + @Test public void testIsRedirect_3xx() { assertTrue(HttpStatusCodes.isRedirect(301)); assertTrue(HttpStatusCodes.isRedirect(302)); @@ -27,6 +34,7 @@ public void testIsRedirect_3xx() { assertTrue(HttpStatusCodes.isRedirect(308)); } + @Test public void testIsRedirect_non3xx() { assertFalse(HttpStatusCodes.isRedirect(200)); assertFalse(HttpStatusCodes.isRedirect(401)); diff --git a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java index 8b286a983..198534f6f 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/MultipartContentTest.java @@ -14,18 +14,25 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import com.google.api.client.json.Json; import com.google.api.client.util.StringUtils; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MultipartContent}. * * @author Yaniv Inbar */ -public class MultipartContentTest extends TestCase { +@RunWith(JUnit4.class) +public class MultipartContentTest { private static final String BOUNDARY = "__END_OF_PART__"; private static final String CRLF = "\r\n"; @@ -43,6 +50,7 @@ private static String headers(String contentType, String value) { + CRLF; } + @Test public void testRandomContent() throws Exception { MultipartContent content = new MultipartContent(); String boundaryString = content.getBoundary(); @@ -81,6 +89,7 @@ public void testRandomContent() throws Exception { assertEquals(StringUtils.getBytesUtf8(expectedContent).length, content.getLength()); } + @Test public void testContent() throws Exception { subtestContent("--" + BOUNDARY + "--" + CRLF, null); subtestContent( diff --git a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java index 480d10150..f29d6b986 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/OpenCensusUtilsTest.java @@ -14,6 +14,10 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + import io.opencensus.trace.Annotation; import io.opencensus.trace.AttributeValue; import io.opencensus.trace.BlankSpan; @@ -27,14 +31,19 @@ import io.opencensus.trace.propagation.TextFormat; import java.util.List; import java.util.Map; -import junit.framework.TestCase; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link OpenCensusUtils}. * * @author Hailong Wen */ -public class OpenCensusUtilsTest extends TestCase { +@RunWith(JUnit4.class) +public class OpenCensusUtilsTest { TextFormat mockTextFormat; TextFormat.Setter mockTextFormatSetter; @@ -44,11 +53,7 @@ public class OpenCensusUtilsTest extends TestCase { HttpHeaders headers; Tracer tracer; - public OpenCensusUtilsTest(String testName) { - super(testName); - } - - @Override + @Before public void setUp() { mockTextFormat = new TextFormat() { @@ -100,28 +105,32 @@ public void end(EndSpanOptions options) {} originTextFormatSetter = OpenCensusUtils.propagationTextFormatSetter; } - @Override + @After public void tearDown() { OpenCensusUtils.setPropagationTextFormat(originTextFormat); OpenCensusUtils.setPropagationTextFormatSetter(originTextFormatSetter); } - public void testInitializatoin() { + @Test + public void testInitialization() { assertNotNull(OpenCensusUtils.getTracer()); assertNotNull(OpenCensusUtils.propagationTextFormat); assertNotNull(OpenCensusUtils.propagationTextFormatSetter); } + @Test public void testSetPropagationTextFormat() { OpenCensusUtils.setPropagationTextFormat(mockTextFormat); assertEquals(mockTextFormat, OpenCensusUtils.propagationTextFormat); } + @Test public void testSetPropagationTextFormatSetter() { OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); assertEquals(mockTextFormatSetter, OpenCensusUtils.propagationTextFormatSetter); } + @Test public void testPropagateTracingContextInjection() { OpenCensusUtils.setPropagationTextFormat(mockTextFormat); try { @@ -132,6 +141,7 @@ public void testPropagateTracingContextInjection() { } } + @Test public void testPropagateTracingContextHeader() { OpenCensusUtils.setPropagationTextFormatSetter(mockTextFormatSetter); try { @@ -142,6 +152,7 @@ public void testPropagateTracingContextHeader() { } } + @Test public void testPropagateTracingContextNullSpan() { OpenCensusUtils.setPropagationTextFormat(mockTextFormat); try { @@ -152,6 +163,7 @@ public void testPropagateTracingContextNullSpan() { } } + @Test public void testPropagateTracingContextNullHeaders() { OpenCensusUtils.setPropagationTextFormat(mockTextFormat); try { @@ -162,17 +174,20 @@ public void testPropagateTracingContextNullHeaders() { } } + @Test public void testPropagateTracingContextInvalidSpan() { OpenCensusUtils.setPropagationTextFormat(mockTextFormat); // No injection. No exceptions should be thrown. OpenCensusUtils.propagateTracingContext(BlankSpan.INSTANCE, headers); } + @Test public void testGetEndSpanOptionsNoResponse() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(null)); } + @Test public void testGetEndSpanOptionsSuccess() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.OK).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(200)); @@ -180,37 +195,44 @@ public void testGetEndSpanOptionsSuccess() { assertEquals(expected, OpenCensusUtils.getEndSpanOptions(202)); } + @Test public void testGetEndSpanOptionsBadRequest() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.INVALID_ARGUMENT).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(400)); } + @Test public void testGetEndSpanOptionsUnauthorized() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAUTHENTICATED).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(401)); } + @Test public void testGetEndSpanOptionsForbidden() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.PERMISSION_DENIED).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(403)); } + @Test public void testGetEndSpanOptionsNotFound() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.NOT_FOUND).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(404)); } + @Test public void testGetEndSpanOptionsPreconditionFailed() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.FAILED_PRECONDITION).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(412)); } + @Test public void testGetEndSpanOptionsServerError() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNAVAILABLE).build(); assertEquals(expected, OpenCensusUtils.getEndSpanOptions(500)); } + @Test public void testGetEndSpanOptionsOther() { EndSpanOptions expected = EndSpanOptions.builder().setStatus(Status.UNKNOWN).build(); // test some random unsupported statuses @@ -219,6 +241,7 @@ public void testGetEndSpanOptionsOther() { assertEquals(expected, OpenCensusUtils.getEndSpanOptions(501)); } + @Test public void testRecordMessageEventInNullSpan() { try { OpenCensusUtils.recordMessageEvent(null, 0, MessageEvent.Type.SENT); @@ -228,6 +251,7 @@ public void testRecordMessageEventInNullSpan() { } } + @Test public void testRecordMessageEvent() { try { OpenCensusUtils.recordMessageEvent(mockSpan, 0, MessageEvent.Type.SENT); diff --git a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java index 14ebc61b6..73492d3c4 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java @@ -14,6 +14,9 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.util.Value; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -21,14 +24,17 @@ import java.util.List; import java.util.Map; import java.util.SortedMap; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link UriTemplate}. * * @author Ravi Mistry */ -public class UriTemplateTest extends TestCase { +@RunWith(JUnit4.class) +public class UriTemplateTest { public void testExpandTemplates_initialization() { SortedMap map = Maps.newTreeMap(); @@ -39,6 +45,7 @@ public void testExpandTemplates_initialization() { assertEquals("/a/b/c", UriTemplate.expand("{/id*}", map, false)); } + @Test public void testExpandTemplates_basic() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -58,6 +65,7 @@ public void testExpandTemplates_basic() { assertTrue(requestMap.containsKey("unused")); } + @Test public void testExpandTemplates_basicEncodeValue() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz;def"); @@ -65,12 +73,14 @@ public void testExpandTemplates_basicEncodeValue() { assertEquals("xyz;def", UriTemplate.expand("{+abc}", requestMap, false)); } + @Test public void testExpandTemplates_encodeSpace() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz def"); assertEquals(";abc=xyz%20def", UriTemplate.expand("{;abc}", requestMap, false)); } + @Test public void testExpandTemplates_noExpansionsWithQueryParams() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -79,6 +89,7 @@ public void testExpandTemplates_noExpansionsWithQueryParams() { "foo/xyz/bar/123?abc=xyz&def=123", UriTemplate.expand("foo/xyz/bar/123", requestMap, true)); } + @Test public void testExpandTemplates_noExpansionsWithoutQueryParams() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -86,12 +97,14 @@ public void testExpandTemplates_noExpansionsWithoutQueryParams() { assertEquals("foo/xyz/bar/123", UriTemplate.expand("foo/xyz/bar/123", requestMap, false)); } + @Test public void testExpandTemplates_missingParameter() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); assertEquals("foo/xyz/bar/", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, true)); } + @Test public void testExpandTemplates_nullValue() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -99,6 +112,7 @@ public void testExpandTemplates_nullValue() { assertEquals("foo/xyz/bar/", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, true)); } + @Test public void testExpandTemplates_emptyAndNullRequestMap() { SortedMap requestMap = Maps.newTreeMap(); assertEquals("foo//bar/", UriTemplate.expand("foo/{abc}/bar/{def}", requestMap, true)); @@ -129,6 +143,7 @@ private Iterable getListIterable() { {"{&d*}", "&d=red&d=green&d=blue"}, }; + @Test public void testExpandTemplates_explodeIterator() { for (String[] test : LIST_TESTS) { SortedMap requestMap = Maps.newTreeMap(); @@ -137,6 +152,7 @@ public void testExpandTemplates_explodeIterator() { } } + @Test public void testExpandTemplates_explodeIterable() { for (String[] test : LIST_TESTS) { SortedMap requestMap = Maps.newTreeMap(); @@ -150,12 +166,14 @@ enum testEnum { ONE } + @Test public void testExpandTemplates_explodeEnum() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("d", testEnum.ONE); assertEquals(testEnum.ONE.toString(), UriTemplate.expand("{d}", requestMap, true)); } + @Test public void testExpandTemplates_missingCompositeParameter() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -163,6 +181,7 @@ public void testExpandTemplates_missingCompositeParameter() { assertEquals("?abc=xyz", UriTemplate.expand("{d}", requestMap, true)); } + @Test public void testExpandTemplates_emptyListParameter() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("d", Lists.newArrayList()); @@ -197,6 +216,7 @@ private Map getMapParams() { {"{&d*}", "&semi=%3B&dot=.&comma=%2C"}, }; + @Test public void testExpandTemplates_explodeMap() { for (String[] test : MAP_TESTS) { SortedMap requestMap = Maps.newTreeMap(); @@ -205,12 +225,14 @@ public void testExpandTemplates_explodeMap() { } } + @Test public void testExpandTemplates_emptyMapParameter() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("d", Maps.newTreeMap()); assertEquals("", UriTemplate.expand("{d}", requestMap, true)); } + @Test public void testExpandTemplates_unusedQueryParametersEncoding() { Map requestMap = Maps.newLinkedHashMap(); // Add unused params. @@ -222,6 +244,7 @@ public void testExpandTemplates_unusedQueryParametersEncoding() { UriTemplate.expand("", requestMap, true)); } + @Test public void testExpandTemplates_unusedListQueryParameters() { Map requestMap = Maps.newLinkedHashMap(); // Add unused params. @@ -236,6 +259,7 @@ public void testExpandTemplates_unusedListQueryParameters() { UriTemplate.expand("", requestMap, true)); } + @Test public void testExpandTemplates_mixedBagParameters() { Map requestMap = Maps.newLinkedHashMap(); // Add list params. @@ -264,6 +288,7 @@ public void testExpandTemplates_mixedBagParameters() { assertTrue(requestMap.containsKey("unused2")); } + @Test public void testExpandTemplates_withBaseUrl() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -284,6 +309,7 @@ public void testExpandTemplates_withBaseUrl() { "https://test/base/path/", "http://test3/{abc}/{def}/bar/", requestMap, true)); } + @Test public void testExpandNonReservedNonComposite() { SortedMap requestMap = Maps.newTreeMap(); requestMap.put("abc", "xyz"); @@ -294,6 +320,7 @@ public void testExpandNonReservedNonComposite() { "foo/xyz/bar/a/b?c", UriTemplate.expand("foo/{abc}/bar/{+def}", requestMap, false)); } + @Test public void testExpandSeveralTemplates() { SortedMap map = Maps.newTreeMap(); map.put("id", "a"); @@ -302,6 +329,7 @@ public void testExpandSeveralTemplates() { assertEquals("?id=a&uid=b", UriTemplate.expand("{?id,uid}", map, false)); } + @Test public void testExpandSeveralTemplatesUnusedParameterInMiddle() { SortedMap map = Maps.newTreeMap(); map.put("id", "a"); @@ -310,6 +338,7 @@ public void testExpandSeveralTemplatesUnusedParameterInMiddle() { assertEquals("?id=a&uid=b", UriTemplate.expand("{?id,foo,bar,uid}", map, false)); } + @Test public void testExpandSeveralTemplatesFirstParameterUnused() { SortedMap map = Maps.newTreeMap(); map.put("id", "a"); @@ -318,11 +347,13 @@ public void testExpandSeveralTemplatesFirstParameterUnused() { assertEquals("?id=a&uid=b", UriTemplate.expand("{?foo,id,uid}", map, false)); } + @Test public void testExpandSeveralTemplatesNoParametersUsed() { SortedMap map = Maps.newTreeMap(); assertEquals("", UriTemplate.expand("{?id,uid}", map, false)); } + @Test public void testExpandTemplates_reservedExpansion_mustNotEscapeReservedCharSet() { String reservedSet = ":/?#[]@!$&'()*+,;="; @@ -336,6 +367,7 @@ public void testExpandTemplates_reservedExpansion_mustNotEscapeReservedCharSet() UriTemplate.expand("{+var}", requestMap, false)); } + @Test public void testExpandTemplates_reservedExpansion_mustNotEscapeUnreservedCharSet() { String unReservedSet = "-._~"; diff --git a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java index 059d9e2c9..42510c279 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedContentTest.java @@ -14,6 +14,11 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.testing.http.MockHttpTransport; import com.google.api.client.util.ArrayMap; @@ -23,15 +28,19 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link UrlEncodedContent}. * * @author Yaniv Inbar */ -public class UrlEncodedContentTest extends TestCase { +@RunWith(JUnit4.class) +public class UrlEncodedContentTest { + @Test public void testWriteTo() throws IOException { subtestWriteTo("a=x", ArrayMap.of("a", "x"), false); subtestWriteTo("noval", ArrayMap.of("noval", ""), false); @@ -64,6 +73,7 @@ private void subtestWriteTo(String expected, Object data, boolean useEscapeUriPa assertEquals(expected, out.toString()); } + @Test public void testGetContent() throws Exception { HttpRequest request = new MockHttpTransport() @@ -75,6 +85,7 @@ public void testGetContent() throws Exception { assertEquals(content, UrlEncodedContent.getContent(request)); } + @Test public void testGetData() { try { new UrlEncodedContent(null); diff --git a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java index e61799777..e4beed966 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UrlEncodedParserTest.java @@ -14,6 +14,10 @@ package com.google.api.client.http; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import com.google.api.client.util.ArrayMap; import com.google.api.client.util.GenericData; import com.google.api.client.util.Key; @@ -25,20 +29,17 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link UrlEncodedParser}. * * @author Yaniv Inbar */ -public class UrlEncodedParserTest extends TestCase { - - public UrlEncodedParserTest() {} - - public UrlEncodedParserTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class UrlEncodedParserTest { public static class Simple { @@ -99,6 +100,7 @@ public Generic set(String fieldName, Object value) { } } + @Test public void testParse_simple() { Simple actual = new Simple(); UrlEncodedParser.parse( @@ -114,6 +116,7 @@ public void testParse_simple() { assertNull(expected.v); } + @Test public void testParse_generic() { Generic actual = new Generic(); UrlEncodedParser.parse("p=4&q=1&a=x&p=3&b=y&c=z&d=v&q=2&p=5&o=object", actual); @@ -128,6 +131,7 @@ public void testParse_generic() { assertEquals(ArrayList.class, actual.get("d").getClass()); } + @Test public void testParse_map() { ArrayMap actual = new ArrayMap(); UrlEncodedParser.parse("p=4&q=1&a=x&p=3&b=y&c=z&d=v&q=2&p=5&noval1&noval2=", actual); @@ -144,6 +148,7 @@ public void testParse_map() { assertEquals(ArrayList.class, actual.get("a").getClass()); } + @Test public void testParse_encoding() { ArrayMap actual = new ArrayMap(); UrlEncodedParser.parse("q=%20", actual); @@ -152,6 +157,7 @@ public void testParse_encoding() { assertEquals(expected, actual); } + @Test public void testParse_null() { ArrayMap actual = new ArrayMap(); UrlEncodedParser.parse((String) null, actual); @@ -177,6 +183,7 @@ public EnumValue set(String fieldName, Object value) { static final String ENUM_VALUE = "otherValue=other&value=VALUE"; + @Test public void testParse_enum() throws IOException { EnumValue actual = new EnumValue(); UrlEncodedParser.parse(ENUM_VALUE, actual); diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java index 754ae8fad..9599507a2 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpRequestTest.java @@ -17,7 +17,10 @@ import java.nio.charset.StandardCharsets; import java.util.concurrent.TimeoutException; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class NetHttpRequestTest { static class SleepingOutputWriter implements OutputWriter { diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java index beb4891ef..f82c4b25f 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java @@ -14,20 +14,25 @@ package com.google.api.client.http.javanet; +import static org.junit.Assert.assertEquals; + import com.google.api.client.testing.http.javanet.MockHttpURLConnection; import com.google.api.client.util.StringUtils; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link NetHttpResponse}. * * @author Yaniv Inbar */ -public class NetHttpResponseTest extends TestCase { +@RunWith(JUnit4.class) +public class NetHttpResponseTest { private static final String VALID_RESPONSE = "This is a valid response."; private static final String ERROR_RESPONSE = "This is an error response."; @@ -45,6 +50,7 @@ public void subtestGetStatusCode(int expectedCode, int responseCode) throws IOEx .getStatusCode()); } + @Test public void testGetContent() throws IOException { subtestGetContent(0); subtestGetContent(200); @@ -103,6 +109,7 @@ public void subtestGetContentWithShortRead(int responseCode) throws IOException } } + @Test public void testSkippingBytes() throws IOException { MockHttpURLConnection connection = new MockHttpURLConnection(null) diff --git a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java index 26ecd5139..87c5337c6 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpTransportTest.java @@ -14,6 +14,11 @@ package com.google.api.client.http.javanet; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpTransport; import com.google.api.client.testing.http.HttpTesting; @@ -33,15 +38,17 @@ import java.security.KeyStore; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import junit.framework.TestCase; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link NetHttpTransport}. * * @author Yaniv Inbar */ -public class NetHttpTransportTest extends TestCase { +@RunWith(JUnit4.class) +public class NetHttpTransportTest { private static final String[] METHODS = { "GET", "POST", "HEAD", "OPTIONS", "PUT", "DELETE", "TRACE" @@ -55,6 +62,7 @@ public void testNotMtlsWithoutClientCert() throws Exception { assertFalse(transport.isMtls()); } + @Test public void testIsMtlsWithClientCert() throws Exception { KeyStore trustStore = KeyStore.getInstance("JKS"); KeyStore keyStore = KeyStore.getInstance("PKCS12"); @@ -73,6 +81,7 @@ public void testIsMtlsWithClientCert() throws Exception { assertTrue(transport.isMtls()); } + @Test public void testExecute_mock() throws Exception { for (String method : METHODS) { boolean isPutOrPost = method.equals("PUT") || method.equals("POST"); @@ -97,6 +106,7 @@ public void testExecute_mock() throws Exception { } } + @Test public void testExecute_methodUnchanged() throws Exception { String body = "Arbitrary body"; byte[] buf = StringUtils.getBytesUtf8(body); @@ -113,6 +123,7 @@ public void testExecute_methodUnchanged() throws Exception { } } + @Test public void testAbruptTerminationIsNoticedWithContentLength() throws Exception { String incompleteBody = "" + "Fixed size body test.\r\n" + "Incomplete response."; byte[] buf = StringUtils.getBytesUtf8(incompleteBody); @@ -138,6 +149,7 @@ public void testAbruptTerminationIsNoticedWithContentLength() throws Exception { assertTrue(thrown); } + @Test public void testAbruptTerminationIsNoticedWithContentLengthWithReadToBuf() throws Exception { String incompleteBody = "" + "Fixed size body test.\r\n" + "Incomplete response."; byte[] buf = StringUtils.getBytesUtf8(incompleteBody); diff --git a/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java b/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java index 5d56eae40..cfa2efcb3 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/GenericJsonTest.java @@ -14,15 +14,21 @@ package com.google.api.client.json; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link GenericJson}. * * @author Yaniv Inbar */ -public class GenericJsonTest extends TestCase { +@RunWith(JUnit4.class) +public class GenericJsonTest { + @Test public void testToString_noFactory() { GenericJson data = new GenericJson(); data.put("a", "b"); diff --git a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java index d4f030a22..394468553 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/JsonObjectParserTest.java @@ -14,6 +14,9 @@ package com.google.api.client.json; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + import com.google.api.client.testing.json.MockJsonFactory; import com.google.api.client.testing.json.MockJsonParser; import com.google.common.base.Charsets; @@ -24,8 +27,9 @@ import java.io.StringReader; import java.lang.reflect.Type; import java.nio.charset.Charset; -import junit.framework.TestCase; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the {@link JsonObjectParser} class. @@ -33,7 +37,8 @@ * @author Matthias Linder (mlinder) * @since 1.10 */ -public class JsonObjectParserTest extends TestCase { +@RunWith(JUnit4.class) +public class JsonObjectParserTest { @Test public void testConstructor_null() { diff --git a/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java b/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java index 3f4db6fc9..ffedade88 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/JsonParserTest.java @@ -14,17 +14,24 @@ package com.google.api.client.json; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.api.client.testing.json.MockJsonFactory; import com.google.api.client.testing.json.MockJsonParser; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link JsonParser}. * * @author Yaniv Inbar */ -public class JsonParserTest extends TestCase { +@RunWith(JUnit4.class) +public class JsonParserTest { + @Test public void testParseAndClose_noInput() throws Exception { MockJsonParser parser = (MockJsonParser) new MockJsonFactory().createJsonParser(""); try { @@ -35,6 +42,7 @@ public void testParseAndClose_noInput() throws Exception { } } + @Test public void testParseAndClose_noInputVoid() throws Exception { MockJsonParser parser = (MockJsonParser) new MockJsonFactory().createJsonParser(""); parser.parseAndClose(Void.class); diff --git a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java index 78fb06def..94a688162 100644 --- a/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java +++ b/google-http-client/src/test/java/com/google/api/client/json/webtoken/JsonWebSignatureTest.java @@ -39,12 +39,15 @@ import javax.net.ssl.X509TrustManager; import org.junit.Assert; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link JsonWebSignature}. * * @author Yaniv Inbar */ +@RunWith(JUnit4.class) public class JsonWebSignatureTest { @Test diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java index 002685427..ccc441fac 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/FixedClockTest.java @@ -14,15 +14,21 @@ package com.google.api.client.testing.http; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the {@link FixedClock}. * * @author mlinder@google.com (Matthias Linder) */ -public class FixedClockTest extends TestCase { +@RunWith(JUnit4.class) +public class FixedClockTest { /** Tests that the {@link FixedClock#currentTimeMillis()} method will return the mocked values. */ + @Test public void testCurrentTimeMillis() { // Check that the initial value is set properly. FixedClock clock = new FixedClock(100); diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java index ea5851917..a78f127da 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/MockHttpTransportTest.java @@ -19,17 +19,21 @@ import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpRequestFactory; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MockHttpTransport}. * * @author Paweł Zuzelski */ -public final class MockHttpTransportTest extends TestCase { +@RunWith(JUnit4.class) +public final class MockHttpTransportTest { // The purpose of this test is to verify, that the actual lowLevelHttpRequest used is preserved // so that the content of the request can be verified in tests. - public void testBuildGetRequest_preservesLoLevelHttpRequest() throws Exception { + @Test + public void testBuildGetRequest_preservesLowLevelHttpRequest() throws Exception { MockHttpTransport httpTransport = new MockHttpTransport(); GenericUrl url = new GenericUrl("http://example.org"); HttpRequestFactory requestFactory = httpTransport.createRequestFactory(); diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java index 3c887a3ef..144ff1c73 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/MockLowLevelHttpRequestTest.java @@ -14,17 +14,23 @@ package com.google.api.client.testing.http; +import static org.junit.Assert.assertEquals; + import com.google.api.client.util.ByteArrayStreamingContent; import com.google.api.client.util.StringUtils; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MockLowLevelHttpRequest}. * * @author Yaniv Inbar */ -public class MockLowLevelHttpRequestTest extends TestCase { +@RunWith(JUnit4.class) +public class MockLowLevelHttpRequestTest { + @Test public void testGetContentAsString() throws Exception { subtestGetContentAsString("", null); subtestGetContentAsString("hello", "hello"); diff --git a/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java b/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java index 4dbf2df37..5a64c1f79 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/http/javanet/MockHttpUrlConnectionTest.java @@ -14,6 +14,9 @@ package com.google.api.client.testing.http.javanet; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + import com.google.api.client.testing.http.HttpTesting; import com.google.api.client.util.StringUtils; import java.io.ByteArrayInputStream; @@ -23,10 +26,13 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** Tests {@link MockHttpURLConnection}. */ -public class MockHttpUrlConnectionTest extends TestCase { +@RunWith(JUnit4.class) +public class MockHttpUrlConnectionTest { private static final String RESPONSE_BODY = "body"; private static final String HEADER_NAME = "Custom-Header"; @@ -37,6 +43,7 @@ public void testSetGetHeaders() throws IOException { assertEquals("100", connection.getHeaderField(HEADER_NAME)); } + @Test public void testSetGetMultipleHeaders() throws IOException { MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); List values = Arrays.asList("value1", "value2", "value3"); @@ -50,11 +57,13 @@ public void testSetGetMultipleHeaders() throws IOException { } } + @Test public void testGetNonExistingHeader() throws IOException { MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); assertNull(connection.getHeaderField(HEADER_NAME)); } + @Test public void testSetInputStreamAndInputStreamImmutable() throws IOException { MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); connection.setInputStream(new ByteArrayInputStream(StringUtils.getBytesUtf8(RESPONSE_BODY))); diff --git a/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java b/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java index 9fdc66ecf..8260c2082 100644 --- a/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java +++ b/google-http-client/src/test/java/com/google/api/client/testing/util/MockBackOffTest.java @@ -14,17 +14,23 @@ package com.google.api.client.testing.util; +import static org.junit.Assert.assertEquals; + import com.google.api.client.util.BackOff; import java.io.IOException; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link MockBackOff}. * * @author Yaniv Inbar */ -public class MockBackOffTest extends TestCase { +@RunWith(JUnit4.class) +public class MockBackOffTest { + @Test public void testNextBackOffMillis() throws IOException { subtestNextBackOffMillis(0, new MockBackOff()); subtestNextBackOffMillis(BackOff.STOP, new MockBackOff().setBackOffMillis(BackOff.STOP)); diff --git a/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java b/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java index b08c2fa29..8aa50280c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ArrayMapTest.java @@ -14,28 +14,31 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.util.Iterator; import java.util.Map; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ArrayMap}. * * @author Yaniv Inbar */ -public class ArrayMapTest extends TestCase { - - public ArrayMapTest() {} - - public ArrayMapTest(String testName) { - super(testName); - } +@RunWith(JUnit4.class) +public class ArrayMapTest { + @Test public void testOf_zero() { ArrayMap map = ArrayMap.of(); assertTrue(map.isEmpty()); } + @Test public void testOf_one() { ArrayMap map = ArrayMap.of("a", 1); assertEquals(1, map.size()); @@ -43,6 +46,7 @@ public void testOf_one() { assertEquals((Integer) 1, map.getValue(0)); } + @Test public void testOf_two() { ArrayMap map = ArrayMap.of("a", 1, "b", 2); assertEquals(2, map.size()); @@ -52,30 +56,35 @@ public void testOf_two() { assertEquals((Integer) 2, map.getValue(1)); } + @Test public void testRemove1() { ArrayMap map = ArrayMap.of("a", 1, "b", 2); map.remove("b"); assertEquals(ArrayMap.of("a", 1), map); } + @Test public void testRemove2() { ArrayMap map = ArrayMap.of("a", 1, "b", 2); map.remove("a"); assertEquals(ArrayMap.of("b", 2), map); } + @Test public void testRemove3() { ArrayMap map = ArrayMap.of("a", 1); map.remove("a"); assertEquals(ArrayMap.of(), map); } + @Test public void testRemove4() { ArrayMap map = ArrayMap.of("a", 1, "b", 2, "c", 3); map.remove("b"); assertEquals(ArrayMap.of("a", 1, "c", 3), map); } + @Test public void testClone_changingEntrySet() { ArrayMap map = ArrayMap.of(); assertEquals("{}", map.toString()); @@ -84,6 +93,7 @@ public void testClone_changingEntrySet() { assertEquals("{foo=bar}", clone.toString()); } + @Test public void testSet() { ArrayMap map = ArrayMap.of(); map.set(0, "a", 1); @@ -102,6 +112,7 @@ public void testSet() { } } + @Test public void testHashCode() { ArrayMap map = ArrayMap.of(); map.set(0, "a", null); @@ -111,6 +122,7 @@ public void testHashCode() { assertTrue(map.hashCode() > 0); } + @Test public void testIteratorRemove1() { ArrayMap map = new ArrayMap(); map.put("a", "a"); @@ -126,6 +138,7 @@ public void testIteratorRemove1() { assertEquals(0, map.size()); } + @Test public void testIteratorRemove2() { ArrayMap map = new ArrayMap(); map.put("a", "a"); @@ -143,6 +156,7 @@ public void testIteratorRemove2() { assertEquals("c", map.get("c")); } + @Test public void testIteratorRemove3() { ArrayMap map = new ArrayMap(); map.put("a", "a"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java b/google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java index b88dd780b..9e462f58b 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/BackOffTest.java @@ -14,16 +14,22 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; + import java.io.IOException; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link BackOff}. * * @author Yaniv Inbar */ -public class BackOffTest extends TestCase { +@RunWith(JUnit4.class) +public class BackOffTest { + @Test public void testNextBackOffMillis() throws IOException { subtestNextBackOffMillis(0, BackOff.ZERO_BACKOFF); subtestNextBackOffMillis(BackOff.STOP, BackOff.STOP_BACKOFF); diff --git a/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java index 79ddc4f5e..dc07b2cf6 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/BackOffUtilsTest.java @@ -14,17 +14,23 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; + import com.google.api.client.testing.util.MockBackOff; import com.google.api.client.testing.util.MockSleeper; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link BackOffUtils}. * * @author Yaniv Inbar */ -public class BackOffUtilsTest extends TestCase { +@RunWith(JUnit4.class) +public class BackOffUtilsTest { + @Test public void testNext() throws Exception { subtestNext(7); subtestNext(0); diff --git a/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java index 218dd1f1b..cfc8e937f 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java +++ b/google-http-client/src/test/java/com/google/api/client/util/Base64Test.java @@ -15,27 +15,35 @@ package com.google.api.client.util; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import java.nio.charset.StandardCharsets; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link Base64}. * * @author Jeff Ching */ -public class Base64Test extends TestCase { +@RunWith(JUnit4.class) +public class Base64Test { + @Test public void test_decodeBase64_withPadding() { String encoded = "Zm9vOmJhcg=="; assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); } + @Test public void test_decodeBase64_withoutPadding() { String encoded = "Zm9vOmJhcg"; assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); } + @Test public void test_decodeBase64_withTrailingWhitespace() { // Some internal use cases append extra space characters that apache-commons base64 decoding // previously handled. @@ -43,28 +51,34 @@ public void test_decodeBase64_withTrailingWhitespace() { assertEquals("foo:bar", new String(Base64.decodeBase64(encoded), StandardCharsets.UTF_8)); } + @Test public void test_decodeBase64_withNullBytes_shouldReturnNull() { byte[] encoded = null; assertNull(Base64.decodeBase64(encoded)); } + @Test public void test_decodeBase64_withNull_shouldReturnNull() { String encoded = null; assertNull(Base64.decodeBase64(encoded)); } + @Test public void test_encodeBase64URLSafeString_withNull_shouldReturnNull() { assertNull(Base64.encodeBase64URLSafeString(null)); } + @Test public void test_encodeBase64URLSafe_withNull_shouldReturnNull() { assertNull(Base64.encodeBase64URLSafe(null)); } + @Test public void test_encodeBase64_withNull_shouldReturnNull() { assertNull(Base64.encodeBase64(null)); } + @Test public void test_decodeBase64_newline_character_invalid_length() { // The RFC 4648 (https://datatracker.ietf.org/doc/html/rfc4648#section-3.3) states that a // specification referring to the Base64 encoding may state that it ignores characters outside @@ -91,6 +105,7 @@ public void test_decodeBase64_newline_character_invalid_length() { assertEquals("abcdef", new String(Base64.decodeBase64(encodedString), StandardCharsets.UTF_8)); } + @Test public void test_decodeBase64_newline_character() { // In Base64 encoding, 2 characters (16 bits) are converted to 3 of 6-bits plus the padding // character ('="). @@ -112,6 +127,7 @@ public void test_decodeBase64_newline_character() { assertEquals("ab", new String(Base64.decodeBase64(encodedString), StandardCharsets.UTF_8)); } + @Test public void test_decodeBase64_plus_and_newline_characters() { // The plus sign is 62 in the Base64 table. So it's a valid character in encoded strings. // https://datatracker.ietf.org/doc/html/rfc4648#section-4 @@ -123,6 +139,7 @@ public void test_decodeBase64_plus_and_newline_characters() { assertThat(actual).isEqualTo(new byte[] {(byte) 0xfb}); } + @Test public void test_decodeBase64_slash_and_newline_characters() { // The slash sign is 63 in the Base64 table. So it's a valid character in encoded strings. // https://datatracker.ietf.org/doc/html/rfc4648#section-4 diff --git a/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java b/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java index 380fd6189..d5e51d120 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ClassInfoTest.java @@ -14,17 +14,25 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.Arrays; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ClassInfo}. * * @author Yaniv Inbar */ -public class ClassInfoTest extends TestCase { +@RunWith(JUnit4.class) +public class ClassInfoTest { public enum E { @Value @@ -36,11 +44,13 @@ public enum E { IGNORED_VALUE } + @Test public void testIsEnum() { assertTrue(ClassInfo.of(E.class).isEnum()); assertFalse(ClassInfo.of(String.class).isEnum()); } + @Test public void testGetFieldInfo_enum() throws Exception { ClassInfo classInfo = ClassInfo.of(E.class); assertEquals(E.class.getField("NULL"), classInfo.getFieldInfo(null).getField()); @@ -76,21 +86,25 @@ public class A1 { String foo2; } + @Test public void testNames() { assertEquals(ImmutableList.of("AbC", "b", "oc"), ClassInfo.of(A.class).names); assertEquals(ImmutableList.of("AbC", "b", "e", "oc"), ClassInfo.of(B.class).names); } + @Test public void testNames_ignoreCase() { assertEquals(ImmutableList.of("abc", "b", "oc"), ClassInfo.of(A.class, true).names); assertEquals(ImmutableList.of("abc", "b", "e", "oc"), ClassInfo.of(B.class, true).names); } + @Test public void testNames_enum() { ClassInfo classInfo = ClassInfo.of(E.class); assertEquals(Lists.newArrayList(Arrays.asList(null, "VALUE", "other")), classInfo.names); } + @Test public void testOf() { try { ClassInfo.of(A1.class, true); diff --git a/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java b/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java index 8af12e19c..e87a4fc61 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ClockTest.java @@ -14,15 +14,22 @@ package com.google.api.client.util; -import junit.framework.TestCase; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the {@link Clock}. * * @author mlinder@google.com (Matthias Linder) */ -public class ClockTest extends TestCase { +@RunWith(JUnit4.class) +public class ClockTest { /** Tests that the Clock.SYSTEM.currentTimeMillis() method returns useful values. */ + @Test public void testSystemClock() { assertNotNull(Clock.SYSTEM); diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java index 82b7ed2a4..45f07d5c2 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataMapTest.java @@ -14,24 +14,34 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.Iterator; import java.util.Map; -import junit.framework.TestCase; +import org.checkerframework.checker.units.qual.A; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link DataMap}. * * @author Yaniv Inbar */ -public class DataMapTest extends TestCase { +@RunWith(JUnit4.class) +public class DataMapTest { static class A { @Key String r; @Key String s; @Key String t; } + @Test public void testSizeAndIsEmpty() { A a = new A(); DataMap map = new DataMap(a, false); @@ -48,6 +58,7 @@ public void testSizeAndIsEmpty() { assertFalse(map.isEmpty()); } + @Test public void testIterator() { A a = new A(); a.s = "value"; @@ -62,6 +73,7 @@ public void testIterator() { assertFalse(iterator.hasNext()); } + @Test public void testValues() { A a = new A(); a.r = "r"; @@ -77,6 +89,7 @@ public void testValues() { assertEquals(ImmutableList.of(), Lists.newArrayList(map.values())); } + @Test public void testKeys() { A a = new A(); a.r = "r"; @@ -92,6 +105,7 @@ public void testKeys() { assertEquals(ImmutableList.of(), Lists.newArrayList(map.keySet())); } + @Test public void testClear() { A a = new A(); a.r = "r"; @@ -103,6 +117,7 @@ public void testClear() { assertTrue(map.isEmpty()); } + @Test public void testGetKeyAndContainsKey() { A a = new A(); a.r = "rv"; @@ -115,6 +130,7 @@ public void testGetKeyAndContainsKey() { assertTrue(map.containsKey("r")); } + @Test public void testPut() { A a = new A(); a.r = "rv"; diff --git a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java index 5cce2816a..1d2946f25 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DataTest.java @@ -14,6 +14,13 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.common.collect.ImmutableMap; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; @@ -39,15 +46,19 @@ import java.util.TreeMap; import java.util.TreeSet; import java.util.concurrent.ConcurrentMap; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link Data}. * * @author Yaniv Inbar */ -public class DataTest extends TestCase { +@RunWith(JUnit4.class) +public class DataTest { + @Test public void testNullOf() { assertEquals("java.lang.Object", Data.nullOf(Object.class).getClass().getName()); assertEquals("java.lang.String", Data.nullOf(String.class).getClass().getName()); @@ -69,12 +80,14 @@ public void testNullOf() { } } + @Test public void testNullOfTemplateTypes() { String nullValue = Data.nullOf(String.class); Map nullField = ImmutableMap.of("v", nullValue); assertEquals(nullValue, nullField.get("v")); } + @Test public void testIsNull() { assertTrue(Data.isNull(Data.NULL_BOOLEAN)); assertTrue(Data.isNull(Data.NULL_STRING)); @@ -102,6 +115,7 @@ public void testIsNull() { assertFalse(Data.isNull(BigInteger.ZERO)); } + @Test public void testClone_array() { String[] orig = new String[] {"a", "b", "c"}; String[] result = Data.clone(orig); @@ -109,6 +123,7 @@ public void testClone_array() { assertTrue(Arrays.equals(orig, result)); } + @Test public void testClone_intArray() { int[] orig = new int[] {1, 2, 3}; int[] result = Data.clone(orig); @@ -116,12 +131,14 @@ public void testClone_intArray() { assertTrue(Arrays.equals(orig, result)); } + @Test public void testClone_arrayMap() { ArrayMap map = ArrayMap.of(); map.add("a", 1); assertEquals(map, Data.clone(map)); } + @Test public void testClone_ArraysAsList() { { List orig = Arrays.asList("a", "b", "c", new ArrayList()); @@ -139,6 +156,7 @@ public void testClone_ArraysAsList() { } } + @Test public void testNewCollectionInstance() throws Exception { assertEquals(ArrayList.class, Data.newCollectionInstance(null).getClass()); assertEquals(ArrayList.class, Data.newCollectionInstance(String[].class).getClass()); @@ -173,6 +191,7 @@ public void testNewCollectionInstance() throws Exception { } } + @Test public void testNewMapInstance() { assertEquals(ArrayMap.class, Data.newMapInstance(Object.class).getClass()); assertEquals(ArrayMap.class, Data.newMapInstance(Map.class).getClass()); @@ -196,12 +215,14 @@ public void testNewMapInstance() { } } + @Test public void testIsPrimitive() { assertFalse(Data.isPrimitive(null)); assertTrue(Data.isPrimitive(int.class)); assertTrue(Data.isPrimitive(Integer.class)); } + @Test public void testParsePrimitiveValue() { assertNull(Data.parsePrimitiveValue(Boolean.class, null)); assertEquals("abc", Data.parsePrimitiveValue(null, "abc")); @@ -273,6 +294,7 @@ private enum MyEnum { } } + @Test public void testParsePrimitiveValueWithUnknownEnum() { try { Data.parsePrimitiveValue(MyEnum.class, "foo"); @@ -303,6 +325,7 @@ static class ParameterizedResolve extends Resolve, Integer> static class MedXResolve extends Resolve {} + @Test public void testResolveWildcardTypeOrTypeVariable() throws Exception { // t TypeVariable tTypeVar = (TypeVariable) Resolve.class.getField("t").getGenericType(); diff --git a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java index ce7d2b027..66c0b7171 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/DateTimeTest.java @@ -14,30 +14,40 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.util.DateTime.SecondsAndNanos; import java.util.Date; import java.util.TimeZone; -import junit.framework.TestCase; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link DateTime}. * * @author Yaniv Inbar */ -public class DateTimeTest extends TestCase { +@RunWith(JUnit4.class) +public class DateTimeTest { private TimeZone originalTimeZone; - @Override - protected void setUp() throws Exception { + @Before + public void setUp() throws Exception { originalTimeZone = TimeZone.getDefault(); } - @Override - protected void tearDown() throws Exception { + @Before + public void tearDown() throws Exception { TimeZone.setDefault(originalTimeZone); } + @Test public void testToStringRfc3339() { TimeZone.setDefault(TimeZone.getTimeZone("GMT-4")); @@ -69,6 +79,7 @@ public void testToStringRfc3339() { new DateTime(new Date(1352232644000L)).toStringRfc3339()); } + @Test public void testToStringRfc3339_dateOnly() { for (String timeZoneString : new String[] {"GMT-4", "UTC", "UTC-7"}) { TimeZone.setDefault(TimeZone.getTimeZone(timeZoneString)); @@ -78,6 +89,7 @@ public void testToStringRfc3339_dateOnly() { } } + @Test public void testEquals() throws InterruptedException { assertFalse( "Check equals with two different tz specified.", @@ -102,6 +114,7 @@ public void testEquals() throws InterruptedException { assertEquals(dateTime1, dateTime2); } + @Test public void testParseRfc3339() { expectExceptionForParseRfc3339(""); expectExceptionForParseRfc3339("abc"); @@ -182,6 +195,7 @@ public void testParseRfc3339() { * 2018-03-01T10:11:12.1000Z | 1519899072 | 100000000 * */ + @Test public void testParseRfc3339ToSecondsAndNanos() { assertParsedRfc3339( "2018-03-01T10:11:12.999Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 999000000)); @@ -225,10 +239,12 @@ public void testParseRfc3339ToSecondsAndNanos() { "2018-03-01T10:11:12.1000Z", SecondsAndNanos.ofSecondsAndNanos(1519899072L, 100000000)); } + @Test public void testEpoch() { assertParsedRfc3339("1970-01-01T00:00:00.000Z", SecondsAndNanos.ofSecondsAndNanos(0, 0)); } + @Test public void testOneSecondBeforeEpoch() { assertParsedRfc3339("1969-12-31T23:59:59.000Z", SecondsAndNanos.ofSecondsAndNanos(-1, 0)); } @@ -240,6 +256,7 @@ private static void assertParsedRfc3339(String input, SecondsAndNanos expected) assertEquals("Nanos for " + input + " do not match", expected.getNanos(), actual.getNanos()); } + @Test public void testParseAndFormatRfc3339() { // .12 becomes .120 String input = "1996-12-19T16:39:57.12-08:00"; diff --git a/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java b/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java index 7d9fe9dff..194adbb2c 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ExponentialBackOffTest.java @@ -14,19 +14,22 @@ package com.google.api.client.util; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link ExponentialBackOff}. * * @author Ravi Mistry */ -public class ExponentialBackOffTest extends TestCase { - - public ExponentialBackOffTest(String name) { - super(name); - } +@RunWith(JUnit4.class) +public class ExponentialBackOffTest { + @Test public void testConstructor() { ExponentialBackOff backOffPolicy = new ExponentialBackOff(); assertEquals( @@ -36,8 +39,8 @@ public void testConstructor() { ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); assertEquals( - ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor(), 0); + assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier(), 0); assertEquals( ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); assertEquals( @@ -45,6 +48,7 @@ public void testConstructor() { backOffPolicy.getMaxElapsedTimeMillis()); } + @Test public void testBuilder() { ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder().build(); assertEquals( @@ -54,8 +58,8 @@ public void testBuilder() { ExponentialBackOff.DEFAULT_INITIAL_INTERVAL_MILLIS, backOffPolicy.getCurrentIntervalMillis()); assertEquals( - ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor()); - assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier()); + ExponentialBackOff.DEFAULT_RANDOMIZATION_FACTOR, backOffPolicy.getRandomizationFactor(), 0); + assertEquals(ExponentialBackOff.DEFAULT_MULTIPLIER, backOffPolicy.getMultiplier(), 0); assertEquals( ExponentialBackOff.DEFAULT_MAX_INTERVAL_MILLIS, backOffPolicy.getMaxIntervalMillis()); assertEquals( @@ -78,12 +82,13 @@ public void testBuilder() { .build(); assertEquals(testInitialInterval, backOffPolicy.getInitialIntervalMillis()); assertEquals(testInitialInterval, backOffPolicy.getCurrentIntervalMillis()); - assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor()); - assertEquals(testMultiplier, backOffPolicy.getMultiplier()); + assertEquals(testRandomizationFactor, backOffPolicy.getRandomizationFactor(), 0); + assertEquals(testMultiplier, backOffPolicy.getMultiplier(), 0); assertEquals(testMaxInterval, backOffPolicy.getMaxIntervalMillis()); assertEquals(testMaxElapsedTime, backOffPolicy.getMaxElapsedTimeMillis()); } + @Test public void testBackOff() throws Exception { int testInitialInterval = 500; double testRandomizationFactor = 0.1; @@ -110,6 +115,7 @@ public void testBackOff() throws Exception { } } + @Test public void testGetRandomizedInterval() { // 33% chance of being 1. assertEquals(1, ExponentialBackOff.getRandomValueFromInterval(0.5, 0, 2)); @@ -138,6 +144,7 @@ public long nanoTime() { } } + @Test public void testGetElapsedTimeMillis() { ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder().setNanoClock(new MyNanoClock()).build(); @@ -145,6 +152,7 @@ public void testGetElapsedTimeMillis() { assertEquals("elapsedTimeMillis=" + elapsedTimeMillis, 1000, elapsedTimeMillis); } + @Test public void testMaxElapsedTime() throws Exception { ExponentialBackOff backOffPolicy = new ExponentialBackOff.Builder().setNanoClock(new MyNanoClock(10000)).build(); @@ -155,6 +163,7 @@ public void testMaxElapsedTime() throws Exception { assertEquals(BackOff.STOP, backOffPolicy.nextBackOffMillis()); } + @Test public void testBackOffOverflow() throws Exception { int testInitialInterval = Integer.MAX_VALUE / 2; double testMultiplier = 2.1; diff --git a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java index 0cd1c17de..03e9b3c00 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/FieldInfoTest.java @@ -14,15 +14,21 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + import com.google.api.client.json.GenericJson; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link FieldInfo}. * * @author Yaniv Inbar */ -public class FieldInfoTest extends TestCase { +@RunWith(JUnit4.class) +public class FieldInfoTest { public enum E { @Value @@ -34,6 +40,7 @@ public enum E { IGNORED_VALUE } + @Test public void testOf_enum() throws Exception { assertEquals(E.class.getField("VALUE"), FieldInfo.of(E.VALUE).getField()); assertEquals(E.class.getField("OTHER_VALUE"), FieldInfo.of(E.OTHER_VALUE).getField()); @@ -45,6 +52,7 @@ public void testOf_enum() throws Exception { } } + @Test public void testEnumValue() { assertEquals(E.VALUE, FieldInfo.of(E.VALUE).enumValue()); assertEquals(E.OTHER_VALUE, FieldInfo.of(E.OTHER_VALUE).enumValue()); @@ -66,6 +74,7 @@ public Data setPassCode(String passCode) { } } + @Test public void testSetValueCaseSensitivityPriority() { Data data = new Data(); data.setPasscode("pass1"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java index 52b2b9a0a..3b823d411 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/GenericDataTest.java @@ -14,19 +14,27 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertTrue; + import com.google.api.client.util.GenericData.Flags; import java.util.ArrayList; import java.util.EnumSet; import java.util.List; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link GenericData}. * * @author Yaniv Inbar */ -public class GenericDataTest extends TestCase { +@RunWith(JUnit4.class) +public class GenericDataTest { private class MyData extends GenericData { public MyData() { super(EnumSet.of(Flags.IGNORE_CASE)); @@ -66,6 +74,7 @@ public GenericData2() { public String fieldA; } + @Test public void testEquals_Symmetric() { GenericData actual = new GenericData1(); actual.set("fieldA", "bar"); @@ -80,6 +89,7 @@ public void testEquals_Symmetric() { assertFalse(expected.hashCode() == actual.hashCode()); } + @Test public void testEquals_SymmetricWithSameClass() { GenericData actual = new MyData(); actual.set("fieldA", "bar"); @@ -91,6 +101,7 @@ public void testEquals_SymmetricWithSameClass() { assertTrue(expected.hashCode() == expected.hashCode()); } + @Test public void testNotEquals_SymmetricWithSameClass() { GenericData actual = new MyData(); actual.set("fieldA", "bar"); @@ -102,6 +113,7 @@ public void testNotEquals_SymmetricWithSameClass() { assertFalse(expected.hashCode() == actual.hashCode()); } + @Test public void testClone_changingEntrySet() { GenericData data = new GenericData(); assertEquals("GenericData{classInfo=[], {}}", data.toString()); @@ -110,6 +122,7 @@ public void testClone_changingEntrySet() { assertEquals("GenericData{classInfo=[], {foo=bar}}", clone.toString()); } + @Test public void testSetIgnoreCase_unknownKey() { GenericData data = new GenericData(EnumSet.of(Flags.IGNORE_CASE)); data.set("Foobar", "oldValue"); @@ -122,6 +135,7 @@ public void testSetIgnoreCase_unknownKey() { assertEquals(1, data.getUnknownKeys().size()); } + @Test public void testSetIgnoreCase_class() { MyData data = new MyData(); data.set("FIELDA", "someValue"); @@ -129,6 +143,7 @@ public void testSetIgnoreCase_class() { assertEquals(0, data.getUnknownKeys().size()); } + @Test public void testPutIgnoreCase_class() { MyData data = new MyData(); data.fieldA = "123"; @@ -137,12 +152,14 @@ public void testPutIgnoreCase_class() { assertEquals(0, data.getUnknownKeys().size()); } + @Test public void testGetIgnoreCase_class() { MyData data = new MyData(); data.fieldA = "someValue"; assertEquals("someValue", data.get("FIELDA")); } + @Test public void testRemoveIgnoreCase_class() { MyData data = new MyData(); data.fieldA = "someValue"; @@ -153,6 +170,7 @@ public void testRemoveIgnoreCase_class() { } } + @Test public void testPutIgnoreCase_unknownKey() { GenericData data = new GenericData(EnumSet.of(Flags.IGNORE_CASE)); assertEquals(null, data.put("fooBAR", "oldValue")); @@ -165,6 +183,7 @@ public void testPutIgnoreCase_unknownKey() { assertEquals(1, data.getUnknownKeys().size()); } + @Test public void testGetIgnoreCase_unknownKey() { GenericData data = new GenericData(EnumSet.of(Flags.IGNORE_CASE)); data.set("One", 1); @@ -176,6 +195,7 @@ public void testGetIgnoreCase_unknownKey() { assertEquals(null, data.get("unknownKey")); } + @Test public void testRemoveIgnoreCase_unknownKey() { GenericData data = new GenericData(EnumSet.of(Flags.IGNORE_CASE)); data.set("One", 1); @@ -187,6 +207,7 @@ public void testRemoveIgnoreCase_unknownKey() { assertEquals(null, data.remove("TESTA")); } + @Test public void testPutShouldUseSetter() { MyData data = new MyData(); data.put("fieldB", "value1"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java index 42166ae5d..c3c8acd17 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/IOUtilsTest.java @@ -14,17 +14,25 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + import java.io.File; import java.io.IOException; import java.nio.file.Files; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link IOUtils}. * * @author Yaniv Inbar */ -public class IOUtilsTest extends TestCase { +@RunWith(JUnit4.class) +public class IOUtilsTest { static final String VALUE = "abc"; @@ -33,16 +41,19 @@ public void testSerialize() throws IOException { assertEquals(VALUE, IOUtils.deserialize(bytes)); } + @Test public void testDeserialize() throws IOException { assertNull(IOUtils.deserialize((byte[]) null)); } + @Test public void testIsSymbolicLink_false() throws IOException { File file = File.createTempFile("tmp", null); file.deleteOnExit(); assertFalse(IOUtils.isSymbolicLink(file)); } + @Test public void testIsSymbolicLink_true() throws IOException { File file = File.createTempFile("tmp", null); file.deleteOnExit(); diff --git a/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java b/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java index cfb4eca4e..6efbf19dd 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/LoggingStreamingContentTest.java @@ -14,19 +14,25 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + import com.google.api.client.testing.util.LogRecordingHandler; import java.io.ByteArrayOutputStream; import java.util.Arrays; import java.util.logging.Level; import java.util.logging.Logger; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link LoggingStreamingContent}. * * @author Yaniv Inbar */ -public class LoggingStreamingContentTest extends TestCase { +@RunWith(JUnit4.class) +public class LoggingStreamingContentTest { static final Logger LOGGER = Logger.getLogger(LoggingStreamingContentTest.class.getName()); @@ -35,6 +41,7 @@ public class LoggingStreamingContentTest extends TestCase { private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; /** Test method for {@link LoggingStreamingContent#writeTo(java.io.OutputStream)}. */ + @Test public void testWriteTo() throws Exception { LoggingStreamingContent logContent = new LoggingStreamingContent( @@ -48,6 +55,7 @@ public void testWriteTo() throws Exception { assertEquals(Arrays.asList("Total: 11 bytes", SAMPLE), recorder.messages()); } + @Test public void testContentLoggingLimit() throws Exception { LOGGER.setLevel(Level.CONFIG); diff --git a/google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java b/google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java index 383da3f10..681fdd017 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/NanoClockTest.java @@ -14,15 +14,22 @@ package com.google.api.client.util; -import junit.framework.TestCase; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link NanoClock}. * * @author Yaniv Inbar */ -public class NanoClockTest extends TestCase { +@RunWith(JUnit4.class) +public class NanoClockTest { + @Test public void testSystemClock() { assertNotNull(NanoClock.SYSTEM); diff --git a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java index 5327e9267..e4a36d4d7 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/ObjectsTest.java @@ -14,30 +14,39 @@ package com.google.api.client.util; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link Objects}. * * @author Yaniv Inbar */ -public class ObjectsTest extends TestCase { +@RunWith(JUnit4.class) +public class ObjectsTest { + @Test public void testToStringHelper() { String toTest = Objects.toStringHelper(new TestClass()).add("hello", "world").toString(); assertEquals("TestClass{hello=world}", toTest); } + @Test public void testConstructor_innerClass() { String toTest = Objects.toStringHelper(new TestClass()).toString(); assertEquals("TestClass{}", toTest); } + @Test public void testToString_oneIntegerField() { String toTest = Objects.toStringHelper(new TestClass()).add("field1", Integer.valueOf(42)).toString(); assertEquals("TestClass{field1=42}", toTest); } + @Test public void testToStringOmitNullValues_oneField() { String toTest = Objects.toStringHelper(new TestClass()).omitNullValues().add("field1", null).toString(); diff --git a/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java b/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java index c3d4e586f..80d9dc171 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/PemReaderTest.java @@ -16,15 +16,18 @@ import java.io.InputStream; import java.io.InputStreamReader; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link PemReader}. * * @author Yaniv Inbar */ -public class PemReaderTest extends TestCase { +@RunWith(JUnit4.class) +public class PemReaderTest { private static final byte[] EXPECTED_BYTES = { 48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, @@ -60,6 +63,7 @@ public class PemReaderTest extends TestCase { -28, 32, 4, 85, 69, 122, 111, 110, 100, -86, -73, 46 }; + @Test public void testReadFirstSectionAndClose() throws Exception { InputStream stream = getClass().getClassLoader().getResourceAsStream("com/google/api/client/util/secret.pem"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java index 21bdd9dc3..611f2dad0 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/SecurityUtilsTest.java @@ -14,6 +14,12 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.api.client.testing.json.webtoken.TestCertificates; import com.google.api.client.testing.util.SecurityTestUtils; import java.io.ByteArrayInputStream; @@ -25,15 +31,18 @@ import java.security.interfaces.RSAPublicKey; import java.util.ArrayList; import javax.net.ssl.X509TrustManager; -import junit.framework.TestCase; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link SecurityUtils}. * * @author Yaniv Inbar */ -public class SecurityUtilsTest extends TestCase { +@RunWith(JUnit4.class) +public class SecurityUtilsTest { private static final byte[] ENCODED = { 48, -126, 2, 117, 2, 1, 0, 48, 13, 6, 9, 42, -122, 72, -122, -9, 13, 1, 1, 1, 5, 0, 4, -126, 2, @@ -113,6 +122,7 @@ public class SecurityUtilsTest extends TestCase { + "22RFKkRCWD/bMD0wITAJBgUrDgMCGgUABBTypWwWM5JDub1RzIXkRwfD7oQ9XwQUbgGuCBGKiU1C" + "YAqwa61lyj/OG90CAgQA"; + @Test public void testLoadPrivateKeyFromKeyStore() throws Exception { byte[] secretP12 = Base64.decodeBase64(SECRET_P12_BASE64); ByteArrayInputStream stream = new ByteArrayInputStream(secretP12); @@ -125,6 +135,7 @@ public void testLoadPrivateKeyFromKeyStore() throws Exception { Assert.assertArrayEquals(ENCODED, actualEncoded); } + @Test public void testSign() throws Exception { byte[] actualSigned = SecurityUtils.sign( @@ -134,6 +145,7 @@ public void testSign() throws Exception { Assert.assertArrayEquals(SIGNED, actualSigned); } + @Test public void testVerify() throws Exception { Signature signatureAlgorithm = SecurityUtils.getSha256WithRsaSignatureAlgorithm(); RSAPublicKey publicKey = SecurityTestUtils.newRsaPublicKey(); @@ -155,14 +167,17 @@ public X509Certificate verifyX509(TestCertificates.CertData caCert) throws Excep signatureAlgorithm, trustManager, certChain, signature, data.getBytes("UTF-8")); } + @Test public void testVerifyX509() throws Exception { assertNotNull(verifyX509(TestCertificates.CA_CERT)); } + @Test public void testVerifyX509WrongCa() throws Exception { assertNull(verifyX509(TestCertificates.BOGUS_CA_CERT)); } + @Test public void testCreateMtlsKeyStoreNoCert() throws Exception { final InputStream certMissing = getClass() @@ -180,6 +195,7 @@ public void testCreateMtlsKeyStoreNoCert() throws Exception { assertTrue("should have caught an IllegalArgumentException", thrown); } + @Test public void testCreateMtlsKeyStoreNoPrivateKey() throws Exception { final InputStream privateKeyMissing = getClass().getClassLoader().getResourceAsStream("com/google/api/client/util/cert.pem"); @@ -195,6 +211,7 @@ public void testCreateMtlsKeyStoreNoPrivateKey() throws Exception { assertTrue("should have caught an IllegalArgumentException", thrown); } + @Test public void testCreateMtlsKeyStoreSuccess() throws Exception { InputStream certAndKey = getClass() diff --git a/google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java b/google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java index 3606f3ba3..5e0601b27 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/StringUtilsTest.java @@ -14,40 +14,48 @@ package com.google.api.client.util; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; + import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link StringUtils}. * * @author Yaniv Inbar */ -public class StringUtilsTest extends TestCase { +@RunWith(JUnit4.class) +public class StringUtilsTest { private static final byte[] SAMPLE_UTF8 = new byte[] {49, 50, 51, -41, -103, -41, -96, -41, -103, -41, -111}; private static final String SAMPLE = "123\u05D9\u05e0\u05D9\u05D1"; - public StringUtilsTest(String testName) { - super(testName); - } - + @Test public void testLineSeparator() { assertNotNull(StringUtils.LINE_SEPARATOR); } + @Test public void testToBytesUtf8() { Assert.assertArrayEquals(SAMPLE_UTF8, StringUtils.getBytesUtf8(SAMPLE)); } + @Test public void testToBytesUtf8Null() { assertNull(StringUtils.getBytesUtf8(null)); } + @Test public void testFromBytesUtf8() { assertEquals(SAMPLE, StringUtils.newStringUtf8(SAMPLE_UTF8)); } + @Test public void testFromBytesUtf8Null() { assertNull(StringUtils.newStringUtf8(null)); } diff --git a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java index 7cbf26bb0..595854e22 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/TypesTest.java @@ -14,6 +14,12 @@ package com.google.api.client.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; @@ -32,15 +38,19 @@ import java.util.Stack; import java.util.TreeMap; import java.util.Vector; -import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests {@link Types}. * * @author Yaniv Inbar */ -public class TypesTest extends TestCase { +@RunWith(JUnit4.class) +public class TypesTest { + @Test public void testIsAssignableToOrFrom() { assertTrue(Types.isAssignableToOrFrom(String.class, Object.class)); assertTrue(Types.isAssignableToOrFrom(String.class, String.class)); @@ -50,6 +60,7 @@ public void testIsAssignableToOrFrom() { static class Foo {} + @Test public void testNewInstance() { assertEquals(Object.class, Types.newInstance(Object.class).getClass()); assertEquals(String.class, Types.newInstance(String.class).getClass()); @@ -80,6 +91,7 @@ static class WildcardBounds { public Collection lower; } + @Test public void testGetBound() throws Exception { subtestGetBound(Object.class, "any"); subtestGetBound(Number.class, "upper"); @@ -112,6 +124,7 @@ static class ArrayResolve extends Resolve {} static class ParameterizedResolve extends Resolve, Integer> {} + @Test public void testResolveTypeVariable() throws Exception { // t TypeVariable tTypeVar = (TypeVariable) Resolve.class.getField("t").getGenericType(); @@ -158,6 +171,7 @@ public class A { public class B extends A {} + @Test public void testGetIterableParameter() throws Exception { assertEquals( "T", @@ -209,6 +223,7 @@ public class C { public class D extends C {} + @Test public void testGetMapParameter() throws Exception { assertEquals( "T", @@ -243,6 +258,7 @@ public void testGetMapParameter() throws Exception { .getUpperBounds()[0]); } + @Test public void testIterableOf() { List list = ImmutableList.of("a"); assertEquals(list, Types.iterableOf(list)); @@ -250,6 +266,7 @@ public void testIterableOf() { assertTrue(Iterables.elementsEqual(ImmutableList.of(1), Types.iterableOf(new int[] {1}))); } + @Test public void testToArray() { assertTrue( Arrays.equals( diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java index 0a4e08809..340607f2a 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/CharEscapersTest.java @@ -14,10 +14,18 @@ package com.google.api.client.util.escape; -import junit.framework.TestCase; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; -public class CharEscapersTest extends TestCase { +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) +public class CharEscapersTest { + + @Test public void testDecodeUriPath() { subtestDecodeUriPath(null, null); subtestDecodeUriPath("", ""); @@ -31,6 +39,7 @@ private void subtestDecodeUriPath(String input, String expected) { assertEquals(expected, actual); } + @Test public void testDecodeUri_IllegalArgumentException() { subtestDecodeUri_IllegalArgumentException("abc%-1abc"); subtestDecodeUri_IllegalArgumentException("%JJ"); diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java index fa8aeba9d..e38462ca1 100644 --- a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEscaperTest.java @@ -16,7 +16,10 @@ import org.junit.Assert; import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +@RunWith(JUnit4.class) public class PercentEscaperTest { @Test diff --git a/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties index 7bc87751b..be831a62d 100644 --- a/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties +++ b/google-http-client/src/test/resources/META-INF/native-image/com.google.http-client/google-http-client/native-image.properties @@ -1,6 +1,4 @@ Args=--initialize-at-build-time=com.google.api.client.util.StringUtils \ ---initialize-at-build-time=com.google.api.client.http.HttpRequestTest \ ---initialize-at-build-time=com.google.api.client.http.ByteArrayContentTest \ ---initialize-at-build-time=com.google.api.client.http.MultipartContentTest \ ---initialize-at-build-time=com.google.api.client.util.LoggingStreamingContentTest \ ---initialize-at-build-time=com.google.api.client.util.SecurityUtilsTest \ No newline at end of file +--initialize-at-build-time=com.google.common.collect.RegularImmutableSet \ +--initialize-at-build-time=org.junit.runner.RunWith \ +--initialize-at-build-time=org.junit.runners.model.FrameworkField \ \ No newline at end of file diff --git a/pom.xml b/pom.xml index 2383dca87..54e063ea6 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.13.0 + 1.14.0 + 1.46.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.45.4-SNAPSHOT + 1.46.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.45.4-SNAPSHOT + 1.46.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 5c8b61838..c0a07b414 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-android - 1.45.4-SNAPSHOT + 1.46.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 30f15d986..ff2ebd2dc 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-apache-v2 - 1.45.4-SNAPSHOT + 1.46.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index c01a98b5a..71bd6ea3c 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-apache-v5 - 1.45.4-SNAPSHOT + 1.46.0 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 8947539c3..84cd8805e 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-appengine - 1.45.4-SNAPSHOT + 1.46.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 98afad920..031f37fb2 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.45.4-SNAPSHOT + 1.46.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index fb1c172ba..489f76165 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.45.4-SNAPSHOT + 1.46.0 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-android - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-apache-v2 - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-apache-v5 - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-appengine - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-findbugs - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-gson - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-jackson2 - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-protobuf - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-test - 1.45.4-SNAPSHOT + 1.46.0 com.google.http-client google-http-client-xml - 1.45.4-SNAPSHOT + 1.46.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index a451c1e0c..65f1ccd7d 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-findbugs - 1.45.4-SNAPSHOT + 1.46.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 63f5fe10c..bb324f0d3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-gson - 1.45.4-SNAPSHOT + 1.46.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 3816e5094..1734f952e 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-jackson2 - 1.45.4-SNAPSHOT + 1.46.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 2dee67b9a..5ff8e2447 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-protobuf - 1.45.4-SNAPSHOT + 1.46.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 3eca52557..f10773fe9 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-test - 1.45.4-SNAPSHOT + 1.46.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index becb813a1..594874ca6 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client-xml - 1.45.4-SNAPSHOT + 1.46.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 961fbef70..8eaa58758 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../pom.xml google-http-client - 1.45.4-SNAPSHOT + 1.46.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 54e063ea6..e02327982 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -609,7 +609,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.45.4-SNAPSHOT + 1.46.0 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 7ea312a2e..edfeb0d18 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.45.4-SNAPSHOT + 1.46.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 27ce6e5cb..c0033ab98 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.45.3:1.45.4-SNAPSHOT -google-http-client-bom:1.45.3:1.45.4-SNAPSHOT -google-http-client-parent:1.45.3:1.45.4-SNAPSHOT -google-http-client-android:1.45.3:1.45.4-SNAPSHOT -google-http-client-android-test:1.45.3:1.45.4-SNAPSHOT -google-http-client-apache-v2:1.45.3:1.45.4-SNAPSHOT -google-http-client-apache-v5:1.45.3:1.45.4-SNAPSHOT -google-http-client-appengine:1.45.3:1.45.4-SNAPSHOT -google-http-client-assembly:1.45.3:1.45.4-SNAPSHOT -google-http-client-findbugs:1.45.3:1.45.4-SNAPSHOT -google-http-client-gson:1.45.3:1.45.4-SNAPSHOT -google-http-client-jackson2:1.45.3:1.45.4-SNAPSHOT -google-http-client-protobuf:1.45.3:1.45.4-SNAPSHOT -google-http-client-test:1.45.3:1.45.4-SNAPSHOT -google-http-client-xml:1.45.3:1.45.4-SNAPSHOT +google-http-client:1.46.0:1.46.0 +google-http-client-bom:1.46.0:1.46.0 +google-http-client-parent:1.46.0:1.46.0 +google-http-client-android:1.46.0:1.46.0 +google-http-client-android-test:1.46.0:1.46.0 +google-http-client-apache-v2:1.46.0:1.46.0 +google-http-client-apache-v5:1.46.0:1.46.0 +google-http-client-appengine:1.46.0:1.46.0 +google-http-client-assembly:1.46.0:1.46.0 +google-http-client-findbugs:1.46.0:1.46.0 +google-http-client-gson:1.46.0:1.46.0 +google-http-client-jackson2:1.46.0:1.46.0 +google-http-client-protobuf:1.46.0:1.46.0 +google-http-client-test:1.46.0:1.46.0 +google-http-client-xml:1.46.0:1.46.0 From e3a3523eebc169ec87353ed94c12419e4dfa8b28 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 7 Feb 2025 12:23:42 -0500 Subject: [PATCH 947/983] fix: remove unnecessary nexus plugin activation (#2071) * fix: remove unnecessary nexus plugin activation * declare plugins wrapped by profiles --- google-http-client-appengine/pom.xml | 28 ++-- google-http-client-bom/pom.xml | 68 +++++++-- google-http-client-findbugs/pom.xml | 19 ++- pom.xml | 138 ++++++++++-------- .../dailymotion-simple-cmdline-sample/pom.xml | 18 ++- samples/pom.xml | 38 ++--- 6 files changed, 192 insertions(+), 117 deletions(-) diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 84cd8805e..1965b52ca 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -12,6 +12,22 @@ Google App Engine extensions to the Google HTTP Client Library for Java. + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + org.codehaus.mojo.signature + java17 + 1.0 + + + + + maven-javadoc-plugin @@ -27,18 +43,6 @@ maven-source-plugin - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - org.codehaus.mojo.signature - java17 - 1.0 - - - org.apache.maven.plugins maven-dependency-plugin diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 489f76165..ec67490e2 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -118,18 +118,22 @@ + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + sonatype-nexus-staging + https://google.oss.sonatype.org/ + false + + + + - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - org.apache.maven.plugins maven-javadoc-plugin @@ -158,6 +162,48 @@ + + + release-sonatype + + + + !artifact-registry-url + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + + + + + release-gcp-artifact-registry + + artifactregistry://undefined-artifact-registry-url-value + + + + gcp-artifact-registry-repository + ${artifact-registry-url} + + + gcp-artifact-registry-repository + ${artifact-registry-url} + + + release-sign-artifacts diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 65f1ccd7d..ceacc5b68 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -12,17 +12,22 @@ Google APIs Client Library Findbugs custom plugin. + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + true + + + + maven-source-plugin - - org.codehaus.mojo - animal-sniffer-maven-plugin - - true - - + org.apache.maven.plugins maven-dependency-plugin diff --git a/pom.xml b/pom.xml index e02327982..c31922893 100644 --- a/pom.xml +++ b/pom.xml @@ -287,17 +287,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://google.oss.sonatype.org/ - ${deploy.autorelease} - - maven-assembly-plugin 3.7.1 @@ -516,53 +505,6 @@ - - org.codehaus.mojo - clirr-maven-plugin - - clirr-ignored-differences.xml - true - - - - - check - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - java7 - - check - - - - org.codehaus.mojo.signature - java17 - 1.0 - - - - - android - - check - - - - net.sf.androidscents.signature - android-api-level-19 - 4.4.2_r4 - - - - - maven-project-info-reports-plugin @@ -576,10 +518,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - com.coveo fmt-maven-plugin @@ -629,6 +567,82 @@ + + clirr-compatibility-check + + + + [1.8,) + + + + + org.codehaus.mojo + clirr-maven-plugin + + clirr-ignored-differences.xml + true + + + + + check + + + + + + + + + animal-sniffer + + + [1.7,) + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + java7 + + check + + + + org.codehaus.mojo.signature + java17 + 1.0 + + + + + android + + check + + + + net.sf.androidscents.signature + android-api-level-19 + 4.4.2_r4 + + + + + + + + java21 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index edfeb0d18..afa6e584b 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -11,6 +11,17 @@ Simple example for the Dailymotion API. + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + org.codehaus.mojo @@ -55,13 +66,6 @@ true - - org.sonatype.plugins - nexus-staging-maven-plugin - - true - - ${project.artifactId}-${project.version} diff --git a/samples/pom.xml b/samples/pom.xml index f26c5460a..2943582a8 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -34,23 +34,25 @@ - - - org.apache.maven.plugins - maven-deploy-plugin - 3.1.3 - - true - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - - true - - - + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + + true + + + + From 8a3068139b7096a88ad8a791391f29b051bb7952 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:11:18 -0500 Subject: [PATCH 948/983] chore(main): release 1.46.1-SNAPSHOT (#2070) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index da0c63d30..b39faa2af 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.0 + 1.46.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.0 + 1.46.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.0 + 1.46.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index c0a07b414..60e663bfa 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-android - 1.46.0 + 1.46.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index ff2ebd2dc..5fc7c5510 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.46.0 + 1.46.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 71bd6ea3c..6ea5befe8 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.46.0 + 1.46.1-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1965b52ca..c47310bc0 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.46.0 + 1.46.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 031f37fb2..ab924ed2c 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.46.0 + 1.46.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ec67490e2..be2080c64 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.0 + 1.46.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-android - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-test - 1.46.0 + 1.46.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.46.0 + 1.46.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index ceacc5b68..d4519ec1e 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.46.0 + 1.46.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index bb324f0d3..8b25323a1 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.46.0 + 1.46.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 1734f952e..c164e0014 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.46.0 + 1.46.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5ff8e2447..82470ba27 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.46.0 + 1.46.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index f10773fe9..a5b69d428 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-test - 1.46.0 + 1.46.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 594874ca6..364009507 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.46.0 + 1.46.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 8eaa58758..abdc4809e 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../pom.xml google-http-client - 1.46.0 + 1.46.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index c31922893..a72f3dc69 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.0 + 1.46.1-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index afa6e584b..8cd5a87e4 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.0 + 1.46.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index c0033ab98..d92d1a6f5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.0:1.46.0 -google-http-client-bom:1.46.0:1.46.0 -google-http-client-parent:1.46.0:1.46.0 -google-http-client-android:1.46.0:1.46.0 -google-http-client-android-test:1.46.0:1.46.0 -google-http-client-apache-v2:1.46.0:1.46.0 -google-http-client-apache-v5:1.46.0:1.46.0 -google-http-client-appengine:1.46.0:1.46.0 -google-http-client-assembly:1.46.0:1.46.0 -google-http-client-findbugs:1.46.0:1.46.0 -google-http-client-gson:1.46.0:1.46.0 -google-http-client-jackson2:1.46.0:1.46.0 -google-http-client-protobuf:1.46.0:1.46.0 -google-http-client-test:1.46.0:1.46.0 -google-http-client-xml:1.46.0:1.46.0 +google-http-client:1.46.0:1.46.1-SNAPSHOT +google-http-client-bom:1.46.0:1.46.1-SNAPSHOT +google-http-client-parent:1.46.0:1.46.1-SNAPSHOT +google-http-client-android:1.46.0:1.46.1-SNAPSHOT +google-http-client-android-test:1.46.0:1.46.1-SNAPSHOT +google-http-client-apache-v2:1.46.0:1.46.1-SNAPSHOT +google-http-client-apache-v5:1.46.0:1.46.1-SNAPSHOT +google-http-client-appengine:1.46.0:1.46.1-SNAPSHOT +google-http-client-assembly:1.46.0:1.46.1-SNAPSHOT +google-http-client-findbugs:1.46.0:1.46.1-SNAPSHOT +google-http-client-gson:1.46.0:1.46.1-SNAPSHOT +google-http-client-jackson2:1.46.0:1.46.1-SNAPSHOT +google-http-client-protobuf:1.46.0:1.46.1-SNAPSHOT +google-http-client-test:1.46.0:1.46.1-SNAPSHOT +google-http-client-xml:1.46.0:1.46.1-SNAPSHOT From 5790ac4d27ebf2aa75155a4dcc24e7f74ca7b588 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 7 Feb 2025 16:37:28 -0500 Subject: [PATCH 949/983] Revert "deps: update dependency io.grpc:grpc-context to v1.70.0 (#2068)" (#2072) This reverts commit 7a580bf568bd2a5bc0519880f4a213f6c47c9849. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a72f3dc69..e6a03aee1 100644 --- a/pom.xml +++ b/pom.xml @@ -258,7 +258,7 @@ io.grpc grpc-context - 1.70.0 + 1.69.0 io.opencensus From fd38a8cbfe0c312881793b1b3242232dd8767de8 Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Fri, 7 Feb 2025 21:37:40 +0000 Subject: [PATCH 950/983] chore: freeze guava and grpc dependencies until after LTS 8 is released (#2074) --- renovate.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index f734b7d7f..bc479bbe5 100644 --- a/renovate.json +++ b/renovate.json @@ -29,7 +29,8 @@ "matchPackagePatterns": [ "^com.google.guava:" ], - "versioning": "docker" + "versioning": "docker", + "enabled": false }, { "matchPackagePatterns": [ @@ -82,6 +83,14 @@ "^com.fasterxml.jackson.core" ], "groupName": "jackson dependencies" + }, + { + "semanticCommitType": "deps", + "groupName": "gRPC dependencies", + "matchPackageNames": [ + "/^io.grpc/" + ], + "enabled": false } ], "semanticCommits": "enabled", From 3ee8bb6380ee22a8a6eb6e5048c603fbdb9ee320 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:45:45 -0500 Subject: [PATCH 951/983] chore(main): release 1.46.1 (#2073) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 12 ++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 69 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d09c2bc8..a453cdbe8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.46.1](https://github.com/googleapis/google-http-java-client/compare/v1.46.0...v1.46.1) (2025-02-07) + + +### Bug Fixes + +* Remove unnecessary nexus plugin activation ([#2071](https://github.com/googleapis/google-http-java-client/issues/2071)) ([e3a3523](https://github.com/googleapis/google-http-java-client/commit/e3a3523eebc169ec87353ed94c12419e4dfa8b28)) + + +### Dependencies + +* Revert dependency io.grpc:grpc-context back to v1.69.0 ([5790ac4](https://github.com/googleapis/google-http-java-client/commit/5790ac4d27ebf2aa75155a4dcc24e7f74ca7b588)) + ## [1.46.0](https://github.com/googleapis/google-http-java-client/compare/v1.45.3...v1.46.0) (2025-02-06) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index b39faa2af..e73fc6dec 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.1-SNAPSHOT + 1.46.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.1-SNAPSHOT + 1.46.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.1-SNAPSHOT + 1.46.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 60e663bfa..d9eaacfdd 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-android - 1.46.1-SNAPSHOT + 1.46.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 5fc7c5510..d8df6bf66 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-apache-v2 - 1.46.1-SNAPSHOT + 1.46.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6ea5befe8..6ea3fee8b 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-apache-v5 - 1.46.1-SNAPSHOT + 1.46.1 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c47310bc0..b1b616ee0 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-appengine - 1.46.1-SNAPSHOT + 1.46.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index ab924ed2c..d6d4baf3f 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.46.1-SNAPSHOT + 1.46.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index be2080c64..870f53066 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.1-SNAPSHOT + 1.46.1 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-android - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-apache-v2 - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-apache-v5 - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-appengine - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-findbugs - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-gson - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-jackson2 - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-protobuf - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-test - 1.46.1-SNAPSHOT + 1.46.1 com.google.http-client google-http-client-xml - 1.46.1-SNAPSHOT + 1.46.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index d4519ec1e..dda69ac30 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-findbugs - 1.46.1-SNAPSHOT + 1.46.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 8b25323a1..f72a4bef7 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-gson - 1.46.1-SNAPSHOT + 1.46.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index c164e0014..eb55599cc 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-jackson2 - 1.46.1-SNAPSHOT + 1.46.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 82470ba27..4bf449ff6 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-protobuf - 1.46.1-SNAPSHOT + 1.46.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index a5b69d428..e97309ca5 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-test - 1.46.1-SNAPSHOT + 1.46.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 364009507..0dca272c8 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client-xml - 1.46.1-SNAPSHOT + 1.46.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index abdc4809e..45fb9a7d7 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../pom.xml google-http-client - 1.46.1-SNAPSHOT + 1.46.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index e6a03aee1..f892ee40c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.1-SNAPSHOT + 1.46.1 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 8cd5a87e4..9b1f453e6 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.1-SNAPSHOT + 1.46.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index d92d1a6f5..564043952 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.0:1.46.1-SNAPSHOT -google-http-client-bom:1.46.0:1.46.1-SNAPSHOT -google-http-client-parent:1.46.0:1.46.1-SNAPSHOT -google-http-client-android:1.46.0:1.46.1-SNAPSHOT -google-http-client-android-test:1.46.0:1.46.1-SNAPSHOT -google-http-client-apache-v2:1.46.0:1.46.1-SNAPSHOT -google-http-client-apache-v5:1.46.0:1.46.1-SNAPSHOT -google-http-client-appengine:1.46.0:1.46.1-SNAPSHOT -google-http-client-assembly:1.46.0:1.46.1-SNAPSHOT -google-http-client-findbugs:1.46.0:1.46.1-SNAPSHOT -google-http-client-gson:1.46.0:1.46.1-SNAPSHOT -google-http-client-jackson2:1.46.0:1.46.1-SNAPSHOT -google-http-client-protobuf:1.46.0:1.46.1-SNAPSHOT -google-http-client-test:1.46.0:1.46.1-SNAPSHOT -google-http-client-xml:1.46.0:1.46.1-SNAPSHOT +google-http-client:1.46.1:1.46.1 +google-http-client-bom:1.46.1:1.46.1 +google-http-client-parent:1.46.1:1.46.1 +google-http-client-android:1.46.1:1.46.1 +google-http-client-android-test:1.46.1:1.46.1 +google-http-client-apache-v2:1.46.1:1.46.1 +google-http-client-apache-v5:1.46.1:1.46.1 +google-http-client-appengine:1.46.1:1.46.1 +google-http-client-assembly:1.46.1:1.46.1 +google-http-client-findbugs:1.46.1:1.46.1 +google-http-client-gson:1.46.1:1.46.1 +google-http-client-jackson2:1.46.1:1.46.1 +google-http-client-protobuf:1.46.1:1.46.1 +google-http-client-test:1.46.1:1.46.1 +google-http-client-xml:1.46.1:1.46.1 From 3a82a5f7d01860782dc5724cc4089ca94f71509d Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:44:27 +0000 Subject: [PATCH 952/983] deps: update grpc-context-io to 1.70.0 (#2078) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f892ee40c..89b93d970 100644 --- a/pom.xml +++ b/pom.xml @@ -258,7 +258,7 @@ io.grpc grpc-context - 1.69.0 + 1.70.0 io.opencensus From b8096bb4147ccd7affc587637fadd7d853768ad3 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:51:10 -0500 Subject: [PATCH 953/983] chore(main): release 1.46.2-SNAPSHOT (#2075) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index e73fc6dec..140a2fb41 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.1 + 1.46.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.1 + 1.46.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.1 + 1.46.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index d9eaacfdd..05f585730 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-android - 1.46.1 + 1.46.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index d8df6bf66..841de2901 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.46.1 + 1.46.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6ea3fee8b..44670864b 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.46.1 + 1.46.2-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index b1b616ee0..3ca9e374a 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.46.1 + 1.46.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index d6d4baf3f..1a9c206c2 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.46.1 + 1.46.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 870f53066..7231a82df 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.1 + 1.46.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-android - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-test - 1.46.1 + 1.46.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.46.1 + 1.46.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index dda69ac30..c0509163b 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.46.1 + 1.46.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index f72a4bef7..b7a4c8010 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.46.1 + 1.46.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index eb55599cc..60e97a765 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.46.1 + 1.46.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 4bf449ff6..10f57bcb5 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.46.1 + 1.46.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index e97309ca5..c334ce26b 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-test - 1.46.1 + 1.46.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 0dca272c8..edbed0b23 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.46.1 + 1.46.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 45fb9a7d7..48b526ab5 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../pom.xml google-http-client - 1.46.1 + 1.46.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 89b93d970..3feb1b826 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.1 + 1.46.2-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 9b1f453e6..c588e36c9 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.1 + 1.46.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 564043952..7b786cbf4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.1:1.46.1 -google-http-client-bom:1.46.1:1.46.1 -google-http-client-parent:1.46.1:1.46.1 -google-http-client-android:1.46.1:1.46.1 -google-http-client-android-test:1.46.1:1.46.1 -google-http-client-apache-v2:1.46.1:1.46.1 -google-http-client-apache-v5:1.46.1:1.46.1 -google-http-client-appengine:1.46.1:1.46.1 -google-http-client-assembly:1.46.1:1.46.1 -google-http-client-findbugs:1.46.1:1.46.1 -google-http-client-gson:1.46.1:1.46.1 -google-http-client-jackson2:1.46.1:1.46.1 -google-http-client-protobuf:1.46.1:1.46.1 -google-http-client-test:1.46.1:1.46.1 -google-http-client-xml:1.46.1:1.46.1 +google-http-client:1.46.1:1.46.2-SNAPSHOT +google-http-client-bom:1.46.1:1.46.2-SNAPSHOT +google-http-client-parent:1.46.1:1.46.2-SNAPSHOT +google-http-client-android:1.46.1:1.46.2-SNAPSHOT +google-http-client-android-test:1.46.1:1.46.2-SNAPSHOT +google-http-client-apache-v2:1.46.1:1.46.2-SNAPSHOT +google-http-client-apache-v5:1.46.1:1.46.2-SNAPSHOT +google-http-client-appengine:1.46.1:1.46.2-SNAPSHOT +google-http-client-assembly:1.46.1:1.46.2-SNAPSHOT +google-http-client-findbugs:1.46.1:1.46.2-SNAPSHOT +google-http-client-gson:1.46.1:1.46.2-SNAPSHOT +google-http-client-jackson2:1.46.1:1.46.2-SNAPSHOT +google-http-client-protobuf:1.46.1:1.46.2-SNAPSHOT +google-http-client-test:1.46.1:1.46.2-SNAPSHOT +google-http-client-xml:1.46.1:1.46.2-SNAPSHOT From ecec9a04897856bba833774cbb85a13a0375ae30 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 12:10:19 -0500 Subject: [PATCH 954/983] chore(main): release 1.46.2 (#2079) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a453cdbe8..b99024c13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.46.2](https://github.com/googleapis/google-http-java-client/compare/v1.46.1...v1.46.2) (2025-02-24) + + +### Dependencies + +* Update grpc-context-io to 1.70.0 ([#2078](https://github.com/googleapis/google-http-java-client/issues/2078)) ([3a82a5f](https://github.com/googleapis/google-http-java-client/commit/3a82a5f7d01860782dc5724cc4089ca94f71509d)) + ## [1.46.1](https://github.com/googleapis/google-http-java-client/compare/v1.46.0...v1.46.1) (2025-02-07) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 140a2fb41..5ad2ccd68 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.2-SNAPSHOT + 1.46.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.2-SNAPSHOT + 1.46.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.2-SNAPSHOT + 1.46.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 05f585730..226b15640 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-android - 1.46.2-SNAPSHOT + 1.46.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 841de2901..30c8f050e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-apache-v2 - 1.46.2-SNAPSHOT + 1.46.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 44670864b..630a1df29 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-apache-v5 - 1.46.2-SNAPSHOT + 1.46.2 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3ca9e374a..0bccdcca6 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-appengine - 1.46.2-SNAPSHOT + 1.46.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 1a9c206c2..62c2d5868 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml com.google.http-client google-http-client-assembly - 1.46.2-SNAPSHOT + 1.46.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 7231a82df..028465759 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.2-SNAPSHOT + 1.46.2 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-android - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-apache-v2 - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-apache-v5 - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-appengine - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-findbugs - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-gson - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-jackson2 - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-protobuf - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-test - 1.46.2-SNAPSHOT + 1.46.2 com.google.http-client google-http-client-xml - 1.46.2-SNAPSHOT + 1.46.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index c0509163b..379ffdc44 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-findbugs - 1.46.2-SNAPSHOT + 1.46.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index b7a4c8010..e8020ccfe 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-gson - 1.46.2-SNAPSHOT + 1.46.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 60e97a765..404e9d398 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-jackson2 - 1.46.2-SNAPSHOT + 1.46.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 10f57bcb5..1b979f1d3 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-protobuf - 1.46.2-SNAPSHOT + 1.46.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index c334ce26b..d19509903 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-test - 1.46.2-SNAPSHOT + 1.46.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index edbed0b23..d3e81699b 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client-xml - 1.46.2-SNAPSHOT + 1.46.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 48b526ab5..9f0045483 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../pom.xml google-http-client - 1.46.2-SNAPSHOT + 1.46.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 3feb1b826..103a3f2e1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.2-SNAPSHOT + 1.46.2 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index c588e36c9..0bc9fd3a1 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.2-SNAPSHOT + 1.46.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 7b786cbf4..85df6e22d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.1:1.46.2-SNAPSHOT -google-http-client-bom:1.46.1:1.46.2-SNAPSHOT -google-http-client-parent:1.46.1:1.46.2-SNAPSHOT -google-http-client-android:1.46.1:1.46.2-SNAPSHOT -google-http-client-android-test:1.46.1:1.46.2-SNAPSHOT -google-http-client-apache-v2:1.46.1:1.46.2-SNAPSHOT -google-http-client-apache-v5:1.46.1:1.46.2-SNAPSHOT -google-http-client-appengine:1.46.1:1.46.2-SNAPSHOT -google-http-client-assembly:1.46.1:1.46.2-SNAPSHOT -google-http-client-findbugs:1.46.1:1.46.2-SNAPSHOT -google-http-client-gson:1.46.1:1.46.2-SNAPSHOT -google-http-client-jackson2:1.46.1:1.46.2-SNAPSHOT -google-http-client-protobuf:1.46.1:1.46.2-SNAPSHOT -google-http-client-test:1.46.1:1.46.2-SNAPSHOT -google-http-client-xml:1.46.1:1.46.2-SNAPSHOT +google-http-client:1.46.2:1.46.2 +google-http-client-bom:1.46.2:1.46.2 +google-http-client-parent:1.46.2:1.46.2 +google-http-client-android:1.46.2:1.46.2 +google-http-client-android-test:1.46.2:1.46.2 +google-http-client-apache-v2:1.46.2:1.46.2 +google-http-client-apache-v5:1.46.2:1.46.2 +google-http-client-appengine:1.46.2:1.46.2 +google-http-client-assembly:1.46.2:1.46.2 +google-http-client-findbugs:1.46.2:1.46.2 +google-http-client-gson:1.46.2:1.46.2 +google-http-client-jackson2:1.46.2:1.46.2 +google-http-client-protobuf:1.46.2:1.46.2 +google-http-client-test:1.46.2:1.46.2 +google-http-client-xml:1.46.2:1.46.2 From 3636da6e8d13399c9eb89f68548b51a15cff61a2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:59:54 -0500 Subject: [PATCH 955/983] chore(main): release 1.46.3-SNAPSHOT (#2080) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 5ad2ccd68..6fc3bcb08 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.2 + 1.46.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.2 + 1.46.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.2 + 1.46.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 226b15640..cb91de653 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-android - 1.46.2 + 1.46.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 30c8f050e..a0de1875f 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.46.2 + 1.46.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 630a1df29..859f7bfc8 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.46.2 + 1.46.3-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 0bccdcca6..1cdf1d419 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-appengine - 1.46.2 + 1.46.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 62c2d5868..9e8ff585e 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.46.2 + 1.46.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 028465759..d2501177f 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.2 + 1.46.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-android - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-appengine - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-gson - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-test - 1.46.2 + 1.46.3-SNAPSHOT com.google.http-client google-http-client-xml - 1.46.2 + 1.46.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 379ffdc44..f31ea4af9 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.46.2 + 1.46.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index e8020ccfe..a7afc2078 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-gson - 1.46.2 + 1.46.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 404e9d398..815c06535 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.46.2 + 1.46.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 1b979f1d3..0e10ff330 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.46.2 + 1.46.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d19509903..d7d1d3073 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-test - 1.46.2 + 1.46.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index d3e81699b..64aa29883 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client-xml - 1.46.2 + 1.46.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9f0045483..090dc1a6a 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../pom.xml google-http-client - 1.46.2 + 1.46.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 103a3f2e1..c590f116a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.2 + 1.46.3-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 0bc9fd3a1..b7627e9c7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.2 + 1.46.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 85df6e22d..fa74d942b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.2:1.46.2 -google-http-client-bom:1.46.2:1.46.2 -google-http-client-parent:1.46.2:1.46.2 -google-http-client-android:1.46.2:1.46.2 -google-http-client-android-test:1.46.2:1.46.2 -google-http-client-apache-v2:1.46.2:1.46.2 -google-http-client-apache-v5:1.46.2:1.46.2 -google-http-client-appengine:1.46.2:1.46.2 -google-http-client-assembly:1.46.2:1.46.2 -google-http-client-findbugs:1.46.2:1.46.2 -google-http-client-gson:1.46.2:1.46.2 -google-http-client-jackson2:1.46.2:1.46.2 -google-http-client-protobuf:1.46.2:1.46.2 -google-http-client-test:1.46.2:1.46.2 -google-http-client-xml:1.46.2:1.46.2 +google-http-client:1.46.2:1.46.3-SNAPSHOT +google-http-client-bom:1.46.2:1.46.3-SNAPSHOT +google-http-client-parent:1.46.2:1.46.3-SNAPSHOT +google-http-client-android:1.46.2:1.46.3-SNAPSHOT +google-http-client-android-test:1.46.2:1.46.3-SNAPSHOT +google-http-client-apache-v2:1.46.2:1.46.3-SNAPSHOT +google-http-client-apache-v5:1.46.2:1.46.3-SNAPSHOT +google-http-client-appengine:1.46.2:1.46.3-SNAPSHOT +google-http-client-assembly:1.46.2:1.46.3-SNAPSHOT +google-http-client-findbugs:1.46.2:1.46.3-SNAPSHOT +google-http-client-gson:1.46.2:1.46.3-SNAPSHOT +google-http-client-jackson2:1.46.2:1.46.3-SNAPSHOT +google-http-client-protobuf:1.46.2:1.46.3-SNAPSHOT +google-http-client-test:1.46.2:1.46.3-SNAPSHOT +google-http-client-xml:1.46.2:1.46.3-SNAPSHOT From 1ab8c28d3b629c58523581c15f86fb7054364dcb Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:14:31 -0500 Subject: [PATCH 956/983] chore: update native-image-shared-config (#2082) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c590f116a..444c3540a 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.14.0 + 1.14.4 + 1.46.3 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.3-SNAPSHOT + 1.46.3 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.3-SNAPSHOT + 1.46.3 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index cb91de653..fd5d66413 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-android - 1.46.3-SNAPSHOT + 1.46.3 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index a0de1875f..18e988742 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-apache-v2 - 1.46.3-SNAPSHOT + 1.46.3 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 859f7bfc8..6b32052ef 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-apache-v5 - 1.46.3-SNAPSHOT + 1.46.3 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 1cdf1d419..c6781e212 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-appengine - 1.46.3-SNAPSHOT + 1.46.3 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9e8ff585e..e8a6d9266 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml com.google.http-client google-http-client-assembly - 1.46.3-SNAPSHOT + 1.46.3 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index d2501177f..b337eeed6 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.3-SNAPSHOT + 1.46.3 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-android - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-apache-v2 - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-apache-v5 - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-appengine - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-findbugs - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-gson - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-jackson2 - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-protobuf - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-test - 1.46.3-SNAPSHOT + 1.46.3 com.google.http-client google-http-client-xml - 1.46.3-SNAPSHOT + 1.46.3 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index f31ea4af9..9b8f8d4dd 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-findbugs - 1.46.3-SNAPSHOT + 1.46.3 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a7afc2078..e4b656141 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-gson - 1.46.3-SNAPSHOT + 1.46.3 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 815c06535..9d68d3aec 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-jackson2 - 1.46.3-SNAPSHOT + 1.46.3 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 0e10ff330..7bfbddc1d 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-protobuf - 1.46.3-SNAPSHOT + 1.46.3 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d7d1d3073..cd7360fd0 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-test - 1.46.3-SNAPSHOT + 1.46.3 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 64aa29883..71296abc0 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client-xml - 1.46.3-SNAPSHOT + 1.46.3 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 090dc1a6a..ce756ae45 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../pom.xml google-http-client - 1.46.3-SNAPSHOT + 1.46.3 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 444c3540a..52560435e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.3-SNAPSHOT + 1.46.3 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b7627e9c7..0db6f50e2 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.3-SNAPSHOT + 1.46.3 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index fa74d942b..b7b047d8d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.2:1.46.3-SNAPSHOT -google-http-client-bom:1.46.2:1.46.3-SNAPSHOT -google-http-client-parent:1.46.2:1.46.3-SNAPSHOT -google-http-client-android:1.46.2:1.46.3-SNAPSHOT -google-http-client-android-test:1.46.2:1.46.3-SNAPSHOT -google-http-client-apache-v2:1.46.2:1.46.3-SNAPSHOT -google-http-client-apache-v5:1.46.2:1.46.3-SNAPSHOT -google-http-client-appengine:1.46.2:1.46.3-SNAPSHOT -google-http-client-assembly:1.46.2:1.46.3-SNAPSHOT -google-http-client-findbugs:1.46.2:1.46.3-SNAPSHOT -google-http-client-gson:1.46.2:1.46.3-SNAPSHOT -google-http-client-jackson2:1.46.2:1.46.3-SNAPSHOT -google-http-client-protobuf:1.46.2:1.46.3-SNAPSHOT -google-http-client-test:1.46.2:1.46.3-SNAPSHOT -google-http-client-xml:1.46.2:1.46.3-SNAPSHOT +google-http-client:1.46.3:1.46.3 +google-http-client-bom:1.46.3:1.46.3 +google-http-client-parent:1.46.3:1.46.3 +google-http-client-android:1.46.3:1.46.3 +google-http-client-android-test:1.46.3:1.46.3 +google-http-client-apache-v2:1.46.3:1.46.3 +google-http-client-apache-v5:1.46.3:1.46.3 +google-http-client-appengine:1.46.3:1.46.3 +google-http-client-assembly:1.46.3:1.46.3 +google-http-client-findbugs:1.46.3:1.46.3 +google-http-client-gson:1.46.3:1.46.3 +google-http-client-jackson2:1.46.3:1.46.3 +google-http-client-protobuf:1.46.3:1.46.3 +google-http-client-test:1.46.3:1.46.3 +google-http-client-xml:1.46.3:1.46.3 From f24ec6decae8a3b12f2caf383a07ab696e39ea11 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 10:26:20 -0500 Subject: [PATCH 958/983] chore(main): release 1.46.4-SNAPSHOT (#2084) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 53e4d2159..a2a43299d 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.46.3 + 1.46.4-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.3 + 1.46.4-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.3 + 1.46.4-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index fd5d66413..f07550daf 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-android - 1.46.3 + 1.46.4-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 18e988742..8c7f77eb9 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.46.3 + 1.46.4-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6b32052ef..3e7dd6fcd 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.46.3 + 1.46.4-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c6781e212..3bc155b1b 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-appengine - 1.46.3 + 1.46.4-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index e8a6d9266..91e1919d7 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.46.3 + 1.46.4-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index b337eeed6..9a7c923a2 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.3 + 1.46.4-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-android - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-appengine - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-gson - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-test - 1.46.3 + 1.46.4-SNAPSHOT com.google.http-client google-http-client-xml - 1.46.3 + 1.46.4-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 9b8f8d4dd..30658f0f0 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.46.3 + 1.46.4-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index e4b656141..2bc3e78a2 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-gson - 1.46.3 + 1.46.4-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 9d68d3aec..de9ad0a95 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.46.3 + 1.46.4-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 7bfbddc1d..5430cd16c 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.46.3 + 1.46.4-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index cd7360fd0..ffb022cf8 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-test - 1.46.3 + 1.46.4-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 71296abc0..1e5671e17 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client-xml - 1.46.3 + 1.46.4-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index ce756ae45..5ce16aee1 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../pom.xml google-http-client - 1.46.3 + 1.46.4-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 52560435e..c33de4af5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.3 + 1.46.4-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 0db6f50e2..476e60146 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.3 + 1.46.4-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index b7b047d8d..356291e5b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.3:1.46.3 -google-http-client-bom:1.46.3:1.46.3 -google-http-client-parent:1.46.3:1.46.3 -google-http-client-android:1.46.3:1.46.3 -google-http-client-android-test:1.46.3:1.46.3 -google-http-client-apache-v2:1.46.3:1.46.3 -google-http-client-apache-v5:1.46.3:1.46.3 -google-http-client-appengine:1.46.3:1.46.3 -google-http-client-assembly:1.46.3:1.46.3 -google-http-client-findbugs:1.46.3:1.46.3 -google-http-client-gson:1.46.3:1.46.3 -google-http-client-jackson2:1.46.3:1.46.3 -google-http-client-protobuf:1.46.3:1.46.3 -google-http-client-test:1.46.3:1.46.3 -google-http-client-xml:1.46.3:1.46.3 +google-http-client:1.46.3:1.46.4-SNAPSHOT +google-http-client-bom:1.46.3:1.46.4-SNAPSHOT +google-http-client-parent:1.46.3:1.46.4-SNAPSHOT +google-http-client-android:1.46.3:1.46.4-SNAPSHOT +google-http-client-android-test:1.46.3:1.46.4-SNAPSHOT +google-http-client-apache-v2:1.46.3:1.46.4-SNAPSHOT +google-http-client-apache-v5:1.46.3:1.46.4-SNAPSHOT +google-http-client-appengine:1.46.3:1.46.4-SNAPSHOT +google-http-client-assembly:1.46.3:1.46.4-SNAPSHOT +google-http-client-findbugs:1.46.3:1.46.4-SNAPSHOT +google-http-client-gson:1.46.3:1.46.4-SNAPSHOT +google-http-client-jackson2:1.46.3:1.46.4-SNAPSHOT +google-http-client-protobuf:1.46.3:1.46.4-SNAPSHOT +google-http-client-test:1.46.3:1.46.4-SNAPSHOT +google-http-client-xml:1.46.3:1.46.4-SNAPSHOT From f89cc4c485c0acf0f22f5efe9706c404f997961d Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Fri, 28 Feb 2025 15:55:37 +0000 Subject: [PATCH 959/983] feat: next release from main branch is 1.47.0 (#2087) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index b1900aa11..14d4c507b 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -26,3 +26,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.44.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.46.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 5f2262e8a..b257bb300 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -98,6 +98,20 @@ branchProtectionRules: - dependencies (11) - clirr - cla/google + - pattern: 1.46.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (7) + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From b3ed2cf91ca9d3f7ba633a4e8b2a29b21da74993 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 16 Apr 2025 16:40:07 +0100 Subject: [PATCH 960/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.15.4 (#2093) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 1f4b4493c..99c59aa10 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.14.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.15.4" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 1a8dec5aa..a1bdd907b 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.14.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.15.4" } diff --git a/pom.xml b/pom.xml index c33de4af5..64617bd22 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.14.4 + 1.15.4 + 1.47.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.46.4-SNAPSHOT + 1.47.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.46.4-SNAPSHOT + 1.47.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index f07550daf..24e027a08 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-android - 1.46.4-SNAPSHOT + 1.47.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 8c7f77eb9..d619fdef1 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-apache-v2 - 1.46.4-SNAPSHOT + 1.47.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 3e7dd6fcd..b9a487b36 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-apache-v5 - 1.46.4-SNAPSHOT + 1.47.0 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 3bc155b1b..4b9386896 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-appengine - 1.46.4-SNAPSHOT + 1.47.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 91e1919d7..f7796968a 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.46.4-SNAPSHOT + 1.47.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 9a7c923a2..fab34eb6b 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.46.4-SNAPSHOT + 1.47.0 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-android - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-apache-v2 - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-apache-v5 - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-appengine - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-findbugs - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-gson - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-jackson2 - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-protobuf - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-test - 1.46.4-SNAPSHOT + 1.47.0 com.google.http-client google-http-client-xml - 1.46.4-SNAPSHOT + 1.47.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 30658f0f0..a409574fe 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-findbugs - 1.46.4-SNAPSHOT + 1.47.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 2bc3e78a2..96bfa7b05 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-gson - 1.46.4-SNAPSHOT + 1.47.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index de9ad0a95..942f4f456 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-jackson2 - 1.46.4-SNAPSHOT + 1.47.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 5430cd16c..79c15e3b7 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-protobuf - 1.46.4-SNAPSHOT + 1.47.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index ffb022cf8..261ffc7b1 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-test - 1.46.4-SNAPSHOT + 1.47.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 1e5671e17..e314dded9 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client-xml - 1.46.4-SNAPSHOT + 1.47.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 5ce16aee1..0d4f1c2e6 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../pom.xml google-http-client - 1.46.4-SNAPSHOT + 1.47.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 64617bd22..53d7d2f06 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.46.4-SNAPSHOT + 1.47.0 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 476e60146..0a0203b5e 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.46.4-SNAPSHOT + 1.47.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 356291e5b..2cb9ecf65 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.46.3:1.46.4-SNAPSHOT -google-http-client-bom:1.46.3:1.46.4-SNAPSHOT -google-http-client-parent:1.46.3:1.46.4-SNAPSHOT -google-http-client-android:1.46.3:1.46.4-SNAPSHOT -google-http-client-android-test:1.46.3:1.46.4-SNAPSHOT -google-http-client-apache-v2:1.46.3:1.46.4-SNAPSHOT -google-http-client-apache-v5:1.46.3:1.46.4-SNAPSHOT -google-http-client-appengine:1.46.3:1.46.4-SNAPSHOT -google-http-client-assembly:1.46.3:1.46.4-SNAPSHOT -google-http-client-findbugs:1.46.3:1.46.4-SNAPSHOT -google-http-client-gson:1.46.3:1.46.4-SNAPSHOT -google-http-client-jackson2:1.46.3:1.46.4-SNAPSHOT -google-http-client-protobuf:1.46.3:1.46.4-SNAPSHOT -google-http-client-test:1.46.3:1.46.4-SNAPSHOT -google-http-client-xml:1.46.3:1.46.4-SNAPSHOT +google-http-client:1.47.0:1.47.0 +google-http-client-bom:1.47.0:1.47.0 +google-http-client-parent:1.47.0:1.47.0 +google-http-client-android:1.47.0:1.47.0 +google-http-client-android-test:1.47.0:1.47.0 +google-http-client-apache-v2:1.47.0:1.47.0 +google-http-client-apache-v5:1.47.0:1.47.0 +google-http-client-appengine:1.47.0:1.47.0 +google-http-client-assembly:1.47.0:1.47.0 +google-http-client-findbugs:1.47.0:1.47.0 +google-http-client-gson:1.47.0:1.47.0 +google-http-client-jackson2:1.47.0:1.47.0 +google-http-client-protobuf:1.47.0:1.47.0 +google-http-client-test:1.47.0:1.47.0 +google-http-client-xml:1.47.0:1.47.0 From 369be6a220b0bcb5badfedb82c111d3e330fcf1c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 14:17:37 -0400 Subject: [PATCH 965/983] chore(main): release 1.47.1-SNAPSHOT (#2095) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 0414327c3..02a353c50 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.47.0 + 1.47.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.47.0 + 1.47.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.47.0 + 1.47.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 24e027a08..34fbc57f8 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-android - 1.47.0 + 1.47.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index d619fdef1..078db104f 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.47.0 + 1.47.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index b9a487b36..29e5b0433 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.47.0 + 1.47.1-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 4b9386896..bf5debf87 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-appengine - 1.47.0 + 1.47.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index f7796968a..5aec7569d 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.47.0 + 1.47.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index fab34eb6b..0b1f244e4 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.47.0 + 1.47.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-android - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-appengine - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-gson - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-test - 1.47.0 + 1.47.1-SNAPSHOT com.google.http-client google-http-client-xml - 1.47.0 + 1.47.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index a409574fe..661a72546 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.47.0 + 1.47.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 96bfa7b05..279851ea3 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-gson - 1.47.0 + 1.47.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 942f4f456..91833ae20 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.47.0 + 1.47.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 79c15e3b7..7fa6f1267 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.47.0 + 1.47.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 261ffc7b1..b882436db 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-test - 1.47.0 + 1.47.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e314dded9..c683aab23 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client-xml - 1.47.0 + 1.47.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 0d4f1c2e6..e13d8f301 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../pom.xml google-http-client - 1.47.0 + 1.47.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 53d7d2f06..a764845a3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.47.0 + 1.47.1-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 0a0203b5e..4afbe6edc 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.47.0 + 1.47.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 2cb9ecf65..77c49fef5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.47.0:1.47.0 -google-http-client-bom:1.47.0:1.47.0 -google-http-client-parent:1.47.0:1.47.0 -google-http-client-android:1.47.0:1.47.0 -google-http-client-android-test:1.47.0:1.47.0 -google-http-client-apache-v2:1.47.0:1.47.0 -google-http-client-apache-v5:1.47.0:1.47.0 -google-http-client-appengine:1.47.0:1.47.0 -google-http-client-assembly:1.47.0:1.47.0 -google-http-client-findbugs:1.47.0:1.47.0 -google-http-client-gson:1.47.0:1.47.0 -google-http-client-jackson2:1.47.0:1.47.0 -google-http-client-protobuf:1.47.0:1.47.0 -google-http-client-test:1.47.0:1.47.0 -google-http-client-xml:1.47.0:1.47.0 +google-http-client:1.47.0:1.47.1-SNAPSHOT +google-http-client-bom:1.47.0:1.47.1-SNAPSHOT +google-http-client-parent:1.47.0:1.47.1-SNAPSHOT +google-http-client-android:1.47.0:1.47.1-SNAPSHOT +google-http-client-android-test:1.47.0:1.47.1-SNAPSHOT +google-http-client-apache-v2:1.47.0:1.47.1-SNAPSHOT +google-http-client-apache-v5:1.47.0:1.47.1-SNAPSHOT +google-http-client-appengine:1.47.0:1.47.1-SNAPSHOT +google-http-client-assembly:1.47.0:1.47.1-SNAPSHOT +google-http-client-findbugs:1.47.0:1.47.1-SNAPSHOT +google-http-client-gson:1.47.0:1.47.1-SNAPSHOT +google-http-client-jackson2:1.47.0:1.47.1-SNAPSHOT +google-http-client-protobuf:1.47.0:1.47.1-SNAPSHOT +google-http-client-test:1.47.0:1.47.1-SNAPSHOT +google-http-client-xml:1.47.0:1.47.1-SNAPSHOT From f77f40880e171ab6124b6fd34653a654d093577d Mon Sep 17 00:00:00 2001 From: ldetmer <1771267+ldetmer@users.noreply.github.com> Date: Fri, 16 May 2025 10:17:03 -0400 Subject: [PATCH 966/983] chore: update ci tests to run against jdk 24 (#2096) --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12e4343aa..2915835ab 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [8, 11, 17, 23] + java: [8, 11, 17, 24] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11, 17, 23] + java: [8, 11, 17, 24] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 From 0d1726114ca678d8a9c8e3e231e0ab7205eb8395 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 27 May 2025 23:42:26 +0200 Subject: [PATCH 967/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.16.0 (#2098) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:native-image-shared-config](https://github.com/googleapis/java-shared-config) | `1.15.4` -> `1.16.0` | [![age](https://developer.mend.io/api/mc/badges/age/maven/com.google.cloud:native-image-shared-config/1.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.google.cloud:native-image-shared-config/1.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.google.cloud:native-image-shared-config/1.15.4/1.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.google.cloud:native-image-shared-config/1.15.4/1.16.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
              googleapis/java-shared-config (com.google.cloud:native-image-shared-config) ### [`v1.16.0`](https://github.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#1160-2025-05-27) [Compare Source](https://github.com/googleapis/java-shared-config/compare/v1.15.4...v1.16.0) ##### Features - Update GraalVM image B to GraalVM for JDK 24 ([#​1024](https://github.com/googleapis/java-shared-config/issues/1024)) ([9ef9d8b](https://github.com/googleapis/java-shared-config/commit/9ef9d8bc0abedc59d9337cb5f3426bcadfaeb4a3)) ##### Dependencies - Update dependency org.graalvm.buildtools:native-maven-plugin to v0.10.6 ([#​1004](https://github.com/googleapis/java-shared-config/issues/1004)) ([f123860](https://github.com/googleapis/java-shared-config/commit/f123860c0919c542d34f4b96e54e3378b0b5b433)) - Update dependency org.graalvm.sdk:graal-sdk to v24.2.1 ([#​1021](https://github.com/googleapis/java-shared-config/issues/1021)) ([28a41c7](https://github.com/googleapis/java-shared-config/commit/28a41c787a00514d7515e7f7f9242769cbb450b5))
              --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-http-java-client). --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- .kokoro/presubmit/graalvm-native-c.cfg | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index c1b9ab62c..5f8ee7699 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.15.4" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.16.0" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index bb04169d3..1fd813105 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.15.4" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.16.0" } diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg index f518dc865..db4b9721c 100644 --- a/.kokoro/presubmit/graalvm-native-c.cfg +++ b/.kokoro/presubmit/graalvm-native-c.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:1.15.4" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:1.16.0" } diff --git a/pom.xml b/pom.xml index a764845a3..b0329ee77 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.15.4 + 1.16.0 + 1.47.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.47.1-SNAPSHOT + 1.47.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.47.1-SNAPSHOT + 1.47.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 34fbc57f8..e7fad96b8 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-android - 1.47.1-SNAPSHOT + 1.47.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 078db104f..5ae724a1c 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-apache-v2 - 1.47.1-SNAPSHOT + 1.47.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 29e5b0433..ae06102a6 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-apache-v5 - 1.47.1-SNAPSHOT + 1.47.1 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index bf5debf87..76fa65053 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-appengine - 1.47.1-SNAPSHOT + 1.47.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 5aec7569d..28dd7e349 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml com.google.http-client google-http-client-assembly - 1.47.1-SNAPSHOT + 1.47.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 0b1f244e4..e031b7656 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.47.1-SNAPSHOT + 1.47.1 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-android - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-apache-v2 - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-apache-v5 - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-appengine - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-findbugs - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-gson - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-jackson2 - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-protobuf - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-test - 1.47.1-SNAPSHOT + 1.47.1 com.google.http-client google-http-client-xml - 1.47.1-SNAPSHOT + 1.47.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 661a72546..ced04a21d 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-findbugs - 1.47.1-SNAPSHOT + 1.47.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 279851ea3..04dcc1d0f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-gson - 1.47.1-SNAPSHOT + 1.47.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 91833ae20..66294a6b8 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-jackson2 - 1.47.1-SNAPSHOT + 1.47.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 7fa6f1267..fb35dbb5b 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-protobuf - 1.47.1-SNAPSHOT + 1.47.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index b882436db..86e912910 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-test - 1.47.1-SNAPSHOT + 1.47.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index c683aab23..e14008c3d 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client-xml - 1.47.1-SNAPSHOT + 1.47.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e13d8f301..2a481487f 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../pom.xml google-http-client - 1.47.1-SNAPSHOT + 1.47.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index b0329ee77..6ce79bfa9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.47.1-SNAPSHOT + 1.47.1 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 4afbe6edc..b1ab45a05 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.47.1-SNAPSHOT + 1.47.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 77c49fef5..78fb34efa 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.47.0:1.47.1-SNAPSHOT -google-http-client-bom:1.47.0:1.47.1-SNAPSHOT -google-http-client-parent:1.47.0:1.47.1-SNAPSHOT -google-http-client-android:1.47.0:1.47.1-SNAPSHOT -google-http-client-android-test:1.47.0:1.47.1-SNAPSHOT -google-http-client-apache-v2:1.47.0:1.47.1-SNAPSHOT -google-http-client-apache-v5:1.47.0:1.47.1-SNAPSHOT -google-http-client-appengine:1.47.0:1.47.1-SNAPSHOT -google-http-client-assembly:1.47.0:1.47.1-SNAPSHOT -google-http-client-findbugs:1.47.0:1.47.1-SNAPSHOT -google-http-client-gson:1.47.0:1.47.1-SNAPSHOT -google-http-client-jackson2:1.47.0:1.47.1-SNAPSHOT -google-http-client-protobuf:1.47.0:1.47.1-SNAPSHOT -google-http-client-test:1.47.0:1.47.1-SNAPSHOT -google-http-client-xml:1.47.0:1.47.1-SNAPSHOT +google-http-client:1.47.1:1.47.1 +google-http-client-bom:1.47.1:1.47.1 +google-http-client-parent:1.47.1:1.47.1 +google-http-client-android:1.47.1:1.47.1 +google-http-client-android-test:1.47.1:1.47.1 +google-http-client-apache-v2:1.47.1:1.47.1 +google-http-client-apache-v5:1.47.1:1.47.1 +google-http-client-appengine:1.47.1:1.47.1 +google-http-client-assembly:1.47.1:1.47.1 +google-http-client-findbugs:1.47.1:1.47.1 +google-http-client-gson:1.47.1:1.47.1 +google-http-client-jackson2:1.47.1:1.47.1 +google-http-client-protobuf:1.47.1:1.47.1 +google-http-client-test:1.47.1:1.47.1 +google-http-client-xml:1.47.1:1.47.1 From 33c6793487c082e7ff7288983b5d64611b433a55 Mon Sep 17 00:00:00 2001 From: Jin Seop Kim Date: Fri, 18 Jul 2025 13:01:14 -0700 Subject: [PATCH 970/983] feat: next release from main branch is 1.48.0 (#2110) --- .github/release-please.yml | 4 ++++ .github/sync-repo-settings.yaml | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/release-please.yml b/.github/release-please.yml index 14d4c507b..9f8d02d27 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -30,3 +30,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.46.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.47.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index b257bb300..f33a595ea 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -112,6 +112,20 @@ branchProtectionRules: - dependencies (11) - clirr - cla/google + - pattern: 1.47.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (7) + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin From 941038c81b99c4eaaab8935349d7b652362ab20c Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 31 Jul 2025 17:25:39 -0400 Subject: [PATCH 971/983] deps!: update guava to 33.4.8-android (#2112) * deps: update guava to 33.4.8-android in google-http-client and google-http-client-apache-v5 This implies a drop for support of Java 7 in google-http-client, also documented in README.md * build: drop java 7 checks * deps: support java 8 by default. Other modules depend directly on google-http-client, which will drop support for java 7 from now on. --- .github/sync-repo-settings.yaml | 1 - .github/workflows/ci-java7.yaml | 63 --------------------------------- README.md | 4 +-- pom.xml | 3 +- 4 files changed, 3 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/ci-java7.yaml diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index f33a595ea..847471c38 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -8,7 +8,6 @@ branchProtectionRules: requiresCodeOwnerReviews: true requiresStrictStatusChecks: false requiredStatusCheckContexts: - - units (7) - units (8) - units (11) - windows diff --git a/.github/workflows/ci-java7.yaml b/.github/workflows/ci-java7.yaml deleted file mode 100644 index 5086c87d5..000000000 --- a/.github/workflows/ci-java7.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2022 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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - push: - branches: - - main - pull_request: -name: ci-java7 -jobs: - units: - name: "units (7)" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - # setup-java v2 or higher does not have version 1.7 - with: - java-version: 7 - distribution: zulu - architecture: x64 - - run: | - java -version - # This value is used in "-Djvm=" later - echo "JAVA7_HOME=${JAVA_HOME}" >> $GITHUB_ENV - - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: zulu - - name: Set up Maven - uses: stCarolas/setup-maven@v4.5 - with: - maven-version: 3.8.8 - - name: Build - shell: bash - run: | - # Leveraging surefire's jvm option, running the test on Java 7. - # Surefire plugin 2.22.2 is the last version for Java 7. Newer version would fail with - # "UnsupportedClassVersionError: org/apache/maven/surefire/booter/ForkedBooter" error. - - # Why are these modules are skipped? - # google-http-client-jackson2 and google-http-client-appengine do not work with Java 7 - # any more because of Jackson and appengine library are compiled for Java 8. - # dailymotion-simple-cmdline-sample and google-http-client-assembly depend on - # google-http-client-jackson2 - mvn --batch-mode --show-version -ntp test \ - --projects '!google-http-client-jackson2,!google-http-client-appengine,!samples/dailymotion-simple-cmdline-sample,!google-http-client-assembly,!google-http-client-apache-v5' \ - -Dclirr.skip=true -Denforcer.skip=true -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true -T 1C \ - -Dproject.surefire.version=2.22.2 \ - -Djvm=${JAVA7_HOME}/bin/java diff --git a/README.md b/README.md index ab51e6e53..999337f7b 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,7 @@ content. The JSON and XML libraries are also fully pluggable, and they include s The library supports the following Java environments: -- Java 7 or higher - - The google-http-client-jackson2 and google-http-client-appengine modules require Java 8 or - higher due to their dependencies. +- Java 8 or higher - Android 4.4 (Kit Kat) - GoogleAppEngine Google App Engine diff --git a/pom.xml b/pom.xml index 6ce79bfa9..f4201694d 100644 --- a/pom.xml +++ b/pom.xml @@ -554,7 +554,8 @@ 2.11.0 2.18.2 3.21.12 - 30.1.1-android + + 33.4.8-android 1.1.4c 4.5.14 4.4.16 From 150135b3ff41d5fd2e6900d2e7bacd5f8e5afb78 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 10:58:23 -0400 Subject: [PATCH 972/983] chore(main): release 1.47.2-SNAPSHOT (#2106) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 45d506c14..84b6228bd 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.47.1 + 1.47.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.47.1 + 1.47.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.47.1 + 1.47.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index e7fad96b8..709ccd120 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-android - 1.47.1 + 1.47.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 5ae724a1c..273f794fa 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 1.47.1 + 1.47.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index ae06102a6..6723eb728 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 1.47.1 + 1.47.2-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 76fa65053..c7d99b948 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-appengine - 1.47.1 + 1.47.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 28dd7e349..abb42418a 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 1.47.1 + 1.47.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index e031b7656..5201f554d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.47.1 + 1.47.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-android - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-appengine - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-gson - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-test - 1.47.1 + 1.47.2-SNAPSHOT com.google.http-client google-http-client-xml - 1.47.1 + 1.47.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index ced04a21d..803dd61ae 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 1.47.1 + 1.47.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 04dcc1d0f..52a8f43a4 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-gson - 1.47.1 + 1.47.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 66294a6b8..f1b95d286 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 1.47.1 + 1.47.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index fb35dbb5b..100714172 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 1.47.1 + 1.47.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 86e912910..dec43e321 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-test - 1.47.1 + 1.47.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index e14008c3d..7ff7fc3c1 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client-xml - 1.47.1 + 1.47.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 2a481487f..61f674590 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../pom.xml google-http-client - 1.47.1 + 1.47.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f4201694d..6a612b580 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.47.1 + 1.47.2-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index b1ab45a05..dd10672f7 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.47.1 + 1.47.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 78fb34efa..525dcbc3d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.47.1:1.47.1 -google-http-client-bom:1.47.1:1.47.1 -google-http-client-parent:1.47.1:1.47.1 -google-http-client-android:1.47.1:1.47.1 -google-http-client-android-test:1.47.1:1.47.1 -google-http-client-apache-v2:1.47.1:1.47.1 -google-http-client-apache-v5:1.47.1:1.47.1 -google-http-client-appengine:1.47.1:1.47.1 -google-http-client-assembly:1.47.1:1.47.1 -google-http-client-findbugs:1.47.1:1.47.1 -google-http-client-gson:1.47.1:1.47.1 -google-http-client-jackson2:1.47.1:1.47.1 -google-http-client-protobuf:1.47.1:1.47.1 -google-http-client-test:1.47.1:1.47.1 -google-http-client-xml:1.47.1:1.47.1 +google-http-client:1.47.1:1.47.2-SNAPSHOT +google-http-client-bom:1.47.1:1.47.2-SNAPSHOT +google-http-client-parent:1.47.1:1.47.2-SNAPSHOT +google-http-client-android:1.47.1:1.47.2-SNAPSHOT +google-http-client-android-test:1.47.1:1.47.2-SNAPSHOT +google-http-client-apache-v2:1.47.1:1.47.2-SNAPSHOT +google-http-client-apache-v5:1.47.1:1.47.2-SNAPSHOT +google-http-client-appengine:1.47.1:1.47.2-SNAPSHOT +google-http-client-assembly:1.47.1:1.47.2-SNAPSHOT +google-http-client-findbugs:1.47.1:1.47.2-SNAPSHOT +google-http-client-gson:1.47.1:1.47.2-SNAPSHOT +google-http-client-jackson2:1.47.1:1.47.2-SNAPSHOT +google-http-client-protobuf:1.47.1:1.47.2-SNAPSHOT +google-http-client-test:1.47.1:1.47.2-SNAPSHOT +google-http-client-xml:1.47.1:1.47.2-SNAPSHOT From 5d0689a4a7174f8c829fbba6e38630d34298393d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 10:32:02 -0400 Subject: [PATCH 973/983] chore(main): release 2.0.0 (#2114) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 73 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50768f1ce..a8f839750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [2.0.0](https://github.com/googleapis/google-http-java-client/compare/v1.47.1...v2.0.0) (2025-08-08) + + +### ⚠ BREAKING CHANGES + +* update guava to 33.4.8-android ([#2112](https://github.com/googleapis/google-http-java-client/issues/2112)) + +### Features + +* Next release from main branch is 1.48.0 ([#2110](https://github.com/googleapis/google-http-java-client/issues/2110)) ([33c6793](https://github.com/googleapis/google-http-java-client/commit/33c6793487c082e7ff7288983b5d64611b433a55)) + + +### Dependencies + +* Update guava to 33.4.8-android ([#2112](https://github.com/googleapis/google-http-java-client/issues/2112)) ([941038c](https://github.com/googleapis/google-http-java-client/commit/941038c81b99c4eaaab8935349d7b652362ab20c)) + ## [1.47.1](https://github.com/googleapis/google-http-java-client/compare/v1.47.0...v1.47.1) (2025-06-23) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 84b6228bd..a7df0a44a 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 1.47.2-SNAPSHOT + 2.0.0 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 1.47.2-SNAPSHOT + 2.0.0 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 1.47.2-SNAPSHOT + 2.0.0 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 709ccd120..1105e1c55 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-android - 1.47.2-SNAPSHOT + 2.0.0 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 273f794fa..e8816150a 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-apache-v2 - 1.47.2-SNAPSHOT + 2.0.0 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6723eb728..552372d68 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-apache-v5 - 1.47.2-SNAPSHOT + 2.0.0 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index c7d99b948..dec87e73e 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-appengine - 1.47.2-SNAPSHOT + 2.0.0 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index abb42418a..9859e0f54 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml com.google.http-client google-http-client-assembly - 1.47.2-SNAPSHOT + 2.0.0 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5201f554d..ac7e2369d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 1.47.2-SNAPSHOT + 2.0.0 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-android - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-apache-v2 - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-apache-v5 - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-appengine - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-findbugs - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-gson - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-jackson2 - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-protobuf - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-test - 1.47.2-SNAPSHOT + 2.0.0 com.google.http-client google-http-client-xml - 1.47.2-SNAPSHOT + 2.0.0 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 803dd61ae..603a086aa 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-findbugs - 1.47.2-SNAPSHOT + 2.0.0 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 52a8f43a4..6ddfe96bc 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-gson - 1.47.2-SNAPSHOT + 2.0.0 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index f1b95d286..cf2431de7 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-jackson2 - 1.47.2-SNAPSHOT + 2.0.0 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 100714172..27245dbf0 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-protobuf - 1.47.2-SNAPSHOT + 2.0.0 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index dec43e321..d31da5e48 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-test - 1.47.2-SNAPSHOT + 2.0.0 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 7ff7fc3c1..91f62316f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client-xml - 1.47.2-SNAPSHOT + 2.0.0 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 61f674590..e725116af 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../pom.xml google-http-client - 1.47.2-SNAPSHOT + 2.0.0 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 6a612b580..a35530848 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.47.2-SNAPSHOT + 2.0.0 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index dd10672f7..6362bbcae 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 1.47.2-SNAPSHOT + 2.0.0 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 525dcbc3d..08350581c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:1.47.1:1.47.2-SNAPSHOT -google-http-client-bom:1.47.1:1.47.2-SNAPSHOT -google-http-client-parent:1.47.1:1.47.2-SNAPSHOT -google-http-client-android:1.47.1:1.47.2-SNAPSHOT -google-http-client-android-test:1.47.1:1.47.2-SNAPSHOT -google-http-client-apache-v2:1.47.1:1.47.2-SNAPSHOT -google-http-client-apache-v5:1.47.1:1.47.2-SNAPSHOT -google-http-client-appengine:1.47.1:1.47.2-SNAPSHOT -google-http-client-assembly:1.47.1:1.47.2-SNAPSHOT -google-http-client-findbugs:1.47.1:1.47.2-SNAPSHOT -google-http-client-gson:1.47.1:1.47.2-SNAPSHOT -google-http-client-jackson2:1.47.1:1.47.2-SNAPSHOT -google-http-client-protobuf:1.47.1:1.47.2-SNAPSHOT -google-http-client-test:1.47.1:1.47.2-SNAPSHOT -google-http-client-xml:1.47.1:1.47.2-SNAPSHOT +google-http-client:2.0.0:2.0.0 +google-http-client-bom:2.0.0:2.0.0 +google-http-client-parent:2.0.0:2.0.0 +google-http-client-android:2.0.0:2.0.0 +google-http-client-android-test:2.0.0:2.0.0 +google-http-client-apache-v2:2.0.0:2.0.0 +google-http-client-apache-v5:2.0.0:2.0.0 +google-http-client-appengine:2.0.0:2.0.0 +google-http-client-assembly:2.0.0:2.0.0 +google-http-client-findbugs:2.0.0:2.0.0 +google-http-client-gson:2.0.0:2.0.0 +google-http-client-jackson2:2.0.0:2.0.0 +google-http-client-protobuf:2.0.0:2.0.0 +google-http-client-test:2.0.0:2.0.0 +google-http-client-xml:2.0.0:2.0.0 From 30766a8a74df49c37e80ec41f1021d4ad69a8fda Mon Sep 17 00:00:00 2001 From: Alexander Asenov Date: Tue, 23 Sep 2025 22:39:19 +0300 Subject: [PATCH 974/983] fix: UriTemplate expansion reserved ("+") and fragment("#") should not encode already percent encoded parts (#2108) * Added new escaper for already percent encoded inputs * Added the new escaper to the CharEscapers utility class * Fixed the inconsistency with rfc6570#section-3.2.1 * Fix linter error * Update documentation to clarify support for URI Template levels * Change PercentEncodedEscaper class to package-private --------- Co-authored-by: Diego Marquez --- .../google/api/client/http/UriTemplate.java | 6 +- .../api/client/util/escape/CharEscapers.java | 12 ++++ .../util/escape/PercentEncodedEscaper.java | 57 +++++++++++++++++++ .../api/client/http/UriTemplateTest.java | 53 +++++++++++++++++ .../escape/PercentEncodedEscaperTest.java | 32 +++++++++++ 5 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 google-http-client/src/main/java/com/google/api/client/util/escape/PercentEncodedEscaper.java create mode 100644 google-http-client/src/test/java/com/google/api/client/util/escape/PercentEncodedEscaperTest.java diff --git a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java index 6a1e2e23c..d6095c4b4 100644 --- a/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java +++ b/google-http-client/src/main/java/com/google/api/client/http/UriTemplate.java @@ -29,8 +29,8 @@ /** * Expands URI Templates. * - *

              This Class supports Level 1 templates and all Level 4 composite templates as described in: RFC 6570. + *

              This class supports URI Template Level 1, partial support for Levels 2 and 3, and Level 4 + * composite templates as described in: RFC 6570. * *

              Specifically, for the variables: var := "value" list := ["red", "green", "blue"] keys := * [("semi", ";"),("dot", "."),("comma", ",")] @@ -159,7 +159,7 @@ private String getEncodedValue(String value) { String encodedValue; if (reservedExpansion) { // Reserved expansion allows percent-encoded triplets and characters in the reserved set. - encodedValue = CharEscapers.escapeUriPathWithoutReserved(value); + encodedValue = CharEscapers.escapeUriPathWithoutReservedAndPercentEncoded(value); } else { encodedValue = CharEscapers.escapeUriConformant(value); } diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java index 4350f2711..d434403dc 100644 --- a/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/CharEscapers.java @@ -44,6 +44,9 @@ public final class CharEscapers { private static final Escaper URI_QUERY_STRING_ESCAPER = new PercentEscaper(PercentEscaper.SAFEQUERYSTRINGCHARS_URLENCODER); + private static final Escaper URI_RESERVED_AND_PERCENT_ENCODED_ESCAPER = + new PercentEncodedEscaper(URI_RESERVED_ESCAPER); + /** * Escapes the string value so it can be safely included in application/x-www-form-urlencoded * data. This is not appropriate for generic URI escaping. In particular it encodes the space @@ -184,6 +187,15 @@ public static String escapeUriPathWithoutReserved(String value) { return URI_RESERVED_ESCAPER.escape(value); } + /** + * Escapes a URI path but retains all reserved and percent-encoded characters. That is the same as + * {@link #escapeUriPathWithoutReserved(String)} except that it also escapes percent encoded + * parts. + */ + public static String escapeUriPathWithoutReservedAndPercentEncoded(String value) { + return URI_RESERVED_AND_PERCENT_ENCODED_ESCAPER.escape(value); + } + /** * Escapes the string value so it can be safely included in URI user info part. For details on * escaping URIs, see RFC 3986 - section diff --git a/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEncodedEscaper.java b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEncodedEscaper.java new file mode 100644 index 000000000..6de6a0c1d --- /dev/null +++ b/google-http-client/src/main/java/com/google/api/client/util/escape/PercentEncodedEscaper.java @@ -0,0 +1,57 @@ +package com.google.api.client.util.escape; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * An {@link Escaper} implementation that preserves percent-encoded sequences in the input string. + * + *

              This escaper applies the provided {@link Escaper} to all parts of the input string except for + * valid percent-encoded sequences (e.g., %20), which are left unchanged. + */ +final class PercentEncodedEscaper extends Escaper { + + /** Pattern to match valid percent-encoded sequences (e.g., %20). */ + static final Pattern PCT_ENCODE_PATTERN = Pattern.compile("%[0-9A-Fa-f]{2}"); + + private final Escaper escaper; + + public PercentEncodedEscaper(Escaper escaper) { + if (escaper == null) { + throw new NullPointerException("Escaper cannot be null"); + } + this.escaper = escaper; + } + + /** + * Escapes the input string using the provided {@link Escaper}, preserving valid percent-encoded + * sequences. + * + * @param string the input string to escape + * @return the escaped string with percent-encoded sequences left unchanged + */ + @Override + public String escape(String string) { + if (string == null || string.isEmpty()) { + return string; + } + + Matcher matcher = PCT_ENCODE_PATTERN.matcher(string); + StringBuilder sb = new StringBuilder(); + + int lastEnd = 0; + while (matcher.find()) { + sb.append(escaper.escape(string.substring(lastEnd, matcher.start()))); + + sb.append(string.substring(matcher.start(), matcher.end())); + + lastEnd = matcher.end(); + } + + if (lastEnd < string.length()) { + sb.append(escaper.escape(string.substring(lastEnd))); + } + + return sb.toString(); + } +} diff --git a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java index 73492d3c4..9fc90ba85 100644 --- a/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java +++ b/google-http-client/src/test/java/com/google/api/client/http/UriTemplateTest.java @@ -380,4 +380,57 @@ public void testExpandTemplates_reservedExpansion_mustNotEscapeUnreservedCharSet unReservedSet, UriTemplate.expand("{+var}", requestMap, false)); } + + @Test + // These tests are from the uri-template test suite + // https://github.com/uri-templates/uritemplate-test/blob/master/extended-tests.json + public void testExpandTemplates_reservedExpansion_alreadyEncodedInput() { + Map variables = Maps.newLinkedHashMap(); + variables.put("id", "admin%2F"); + assertEquals("admin%252F", UriTemplate.expand("{id}", variables, false)); + assertEquals("admin%2F", UriTemplate.expand("{+id}", variables, false)); + assertEquals("#admin%2F", UriTemplate.expand("{#id}", variables, false)); + } + + @Test + // These tests are from the uri-template test suite + // https://github.com/uri-templates/uritemplate-test/blob/master/extended-tests.json + public void testExpandTemplates_reservedExpansion_notEncodedInput() { + Map variables = Maps.newLinkedHashMap(); + variables.put("not_pct", "%foo"); + assertEquals("%25foo", UriTemplate.expand("{not_pct}", variables, false)); + assertEquals("%25foo", UriTemplate.expand("{+not_pct}", variables, false)); + assertEquals("#%25foo", UriTemplate.expand("{#not_pct}", variables, false)); + } + + @Test + // These tests are from the uri-template test suite + // https://github.com/uri-templates/uritemplate-test/blob/master/extended-tests.json + public void testExpandTemplates_reservedExpansion_listExpansionWithMixedEncodedInput() { + Map variables = Maps.newLinkedHashMap(); + variables.put("list", Arrays.asList("red%25", "%2Fgreen", "blue ")); + assertEquals("red%2525,%252Fgreen,blue%20", UriTemplate.expand("{list}", variables, false)); + assertEquals("red%25,%2Fgreen,blue%20", UriTemplate.expand("{+list}", variables, false)); + assertEquals("#red%25,%2Fgreen,blue%20", UriTemplate.expand("{#list}", variables, false)); + } + + @Test + // These tests are from the uri-template test suite + // https://github.com/uri-templates/uritemplate-test/blob/master/extended-tests.json with an + // additional map entry + public void testExpandTemplates_reservedExpansion_mapWithMixedEncodedInput() { + Map variables = Maps.newLinkedHashMap(); + Map keys = Maps.newLinkedHashMap(); + keys.put("key1", "val1%2F"); + keys.put("key2", "val2%2F"); + keys.put("key3", "val "); + variables.put("keys", keys); + assertEquals( + "key1,val1%252F,key2,val2%252F,key3,val%20", + UriTemplate.expand("{keys}", variables, false)); + assertEquals( + "key1,val1%2F,key2,val2%2F,key3,val%20", UriTemplate.expand("{+keys}", variables, false)); + assertEquals( + "#key1,val1%2F,key2,val2%2F,key3,val%20", UriTemplate.expand("{#keys}", variables, false)); + } } diff --git a/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEncodedEscaperTest.java b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEncodedEscaperTest.java new file mode 100644 index 000000000..9eff5c0f7 --- /dev/null +++ b/google-http-client/src/test/java/com/google/api/client/util/escape/PercentEncodedEscaperTest.java @@ -0,0 +1,32 @@ +package com.google.api.client.util.escape; + +import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +@RunWith(JUnit4.class) +public class PercentEncodedEscaperTest extends TestCase { + @Test + public void testEscape() { + PercentEncodedEscaper escaper = + new PercentEncodedEscaper( + new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER)); + String input = "Hello%20World+/?#[]"; + + String actual = escaper.escape(input); + assertEquals(input, actual); // No change expected since it's already percent-encoded + } + + @Test + public void testEscapeEncode() { + PercentEncodedEscaper escaper = + new PercentEncodedEscaper( + new PercentEscaper(PercentEscaper.SAFE_PLUS_RESERVED_CHARS_URLENCODER)); + String input = "Hello World%"; + String expected = "Hello%20World%25"; + + String actual = escaper.escape(input); + assertEquals(expected, actual); + } +} From 9370499296acc792aabf9775dabb8815f90f2c7d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:00:42 +0000 Subject: [PATCH 975/983] chore(main): release 2.0.1-SNAPSHOT (#2115) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index a7df0a44a..02ea56916 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 2.0.0 + 2.0.1-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 2.0.0 + 2.0.1-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 2.0.0 + 2.0.1-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 1105e1c55..b5e38fd87 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-android - 2.0.0 + 2.0.1-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index e8816150a..af3384aa2 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 2.0.0 + 2.0.1-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 552372d68..31a927b67 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 2.0.0 + 2.0.1-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index dec87e73e..235d26977 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-appengine - 2.0.0 + 2.0.1-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 9859e0f54..bbf146d10 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 2.0.0 + 2.0.1-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index ac7e2369d..920107cfb 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 2.0.0 + 2.0.1-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-android - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-appengine - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-findbugs - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-gson - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-jackson2 - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-protobuf - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-test - 2.0.0 + 2.0.1-SNAPSHOT com.google.http-client google-http-client-xml - 2.0.0 + 2.0.1-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 603a086aa..284a8e2e1 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-findbugs - 2.0.0 + 2.0.1-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 6ddfe96bc..04a0df4a6 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-gson - 2.0.0 + 2.0.1-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index cf2431de7..276005278 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-jackson2 - 2.0.0 + 2.0.1-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 27245dbf0..758e7e333 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-protobuf - 2.0.0 + 2.0.1-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index d31da5e48..5a50ea665 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-test - 2.0.0 + 2.0.1-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 91f62316f..76046dfde 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client-xml - 2.0.0 + 2.0.1-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index e725116af..cc514c105 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../pom.xml google-http-client - 2.0.0 + 2.0.1-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index a35530848..605d72b79 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 2.0.0 + 2.0.1-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 6362bbcae..706bac9bd 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 2.0.0 + 2.0.1-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 08350581c..04836db4d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:2.0.0:2.0.0 -google-http-client-bom:2.0.0:2.0.0 -google-http-client-parent:2.0.0:2.0.0 -google-http-client-android:2.0.0:2.0.0 -google-http-client-android-test:2.0.0:2.0.0 -google-http-client-apache-v2:2.0.0:2.0.0 -google-http-client-apache-v5:2.0.0:2.0.0 -google-http-client-appengine:2.0.0:2.0.0 -google-http-client-assembly:2.0.0:2.0.0 -google-http-client-findbugs:2.0.0:2.0.0 -google-http-client-gson:2.0.0:2.0.0 -google-http-client-jackson2:2.0.0:2.0.0 -google-http-client-protobuf:2.0.0:2.0.0 -google-http-client-test:2.0.0:2.0.0 -google-http-client-xml:2.0.0:2.0.0 +google-http-client:2.0.0:2.0.1-SNAPSHOT +google-http-client-bom:2.0.0:2.0.1-SNAPSHOT +google-http-client-parent:2.0.0:2.0.1-SNAPSHOT +google-http-client-android:2.0.0:2.0.1-SNAPSHOT +google-http-client-android-test:2.0.0:2.0.1-SNAPSHOT +google-http-client-apache-v2:2.0.0:2.0.1-SNAPSHOT +google-http-client-apache-v5:2.0.0:2.0.1-SNAPSHOT +google-http-client-appengine:2.0.0:2.0.1-SNAPSHOT +google-http-client-assembly:2.0.0:2.0.1-SNAPSHOT +google-http-client-findbugs:2.0.0:2.0.1-SNAPSHOT +google-http-client-gson:2.0.0:2.0.1-SNAPSHOT +google-http-client-jackson2:2.0.0:2.0.1-SNAPSHOT +google-http-client-protobuf:2.0.0:2.0.1-SNAPSHOT +google-http-client-test:2.0.0:2.0.1-SNAPSHOT +google-http-client-xml:2.0.0:2.0.1-SNAPSHOT From c0af9bbd2ec1e0f7a669627ad88d12d14f5e9e68 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:32:26 +0000 Subject: [PATCH 976/983] chore(main): release 2.0.1 (#2117) :robot: I have created a release *beep* *boop* --- ## [2.0.1](https://github.com/googleapis/google-http-java-client/compare/v2.0.0...v2.0.1) (2025-09-24) ### Bug Fixes * UriTemplate expansion reserved ("+") and fragment("#") should not encode already percent encoded parts ([#2108](https://github.com/googleapis/google-http-java-client/issues/2108)) ([30766a8](https://github.com/googleapis/google-http-java-client/commit/30766a8a74df49c37e80ec41f1021d4ad69a8fda)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8f839750..2b6033562 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.1](https://github.com/googleapis/google-http-java-client/compare/v2.0.0...v2.0.1) (2025-09-24) + + +### Bug Fixes + +* UriTemplate expansion reserved ("+") and fragment("#") should not encode already percent encoded parts ([#2108](https://github.com/googleapis/google-http-java-client/issues/2108)) ([30766a8](https://github.com/googleapis/google-http-java-client/commit/30766a8a74df49c37e80ec41f1021d4ad69a8fda)) + ## [2.0.0](https://github.com/googleapis/google-http-java-client/compare/v1.47.1...v2.0.0) (2025-08-08) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 02ea56916..5364010b6 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 2.0.1-SNAPSHOT + 2.0.1 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 2.0.1-SNAPSHOT + 2.0.1 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 2.0.1-SNAPSHOT + 2.0.1 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index b5e38fd87..450dc2b7b 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-android - 2.0.1-SNAPSHOT + 2.0.1 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index af3384aa2..4717196ae 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-apache-v2 - 2.0.1-SNAPSHOT + 2.0.1 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 31a927b67..6973ee524 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-apache-v5 - 2.0.1-SNAPSHOT + 2.0.1 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 235d26977..63c96b131 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-appengine - 2.0.1-SNAPSHOT + 2.0.1 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index bbf146d10..2cd239148 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml com.google.http-client google-http-client-assembly - 2.0.1-SNAPSHOT + 2.0.1 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 920107cfb..60772596d 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 2.0.1-SNAPSHOT + 2.0.1 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-android - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-apache-v2 - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-apache-v5 - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-appengine - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-findbugs - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-gson - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-jackson2 - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-protobuf - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-test - 2.0.1-SNAPSHOT + 2.0.1 com.google.http-client google-http-client-xml - 2.0.1-SNAPSHOT + 2.0.1 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 284a8e2e1..fd781d240 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-findbugs - 2.0.1-SNAPSHOT + 2.0.1 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 04a0df4a6..1ddbd7018 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-gson - 2.0.1-SNAPSHOT + 2.0.1 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 276005278..cac5191d4 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-jackson2 - 2.0.1-SNAPSHOT + 2.0.1 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 758e7e333..7d2df7317 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-protobuf - 2.0.1-SNAPSHOT + 2.0.1 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 5a50ea665..75456117a 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-test - 2.0.1-SNAPSHOT + 2.0.1 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 76046dfde..2c4d8748f 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client-xml - 2.0.1-SNAPSHOT + 2.0.1 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index cc514c105..aefa21738 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../pom.xml google-http-client - 2.0.1-SNAPSHOT + 2.0.1 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 605d72b79..b62193526 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 2.0.1-SNAPSHOT + 2.0.1 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 706bac9bd..975ae1411 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 2.0.1-SNAPSHOT + 2.0.1 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 04836db4d..3783a5310 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:2.0.0:2.0.1-SNAPSHOT -google-http-client-bom:2.0.0:2.0.1-SNAPSHOT -google-http-client-parent:2.0.0:2.0.1-SNAPSHOT -google-http-client-android:2.0.0:2.0.1-SNAPSHOT -google-http-client-android-test:2.0.0:2.0.1-SNAPSHOT -google-http-client-apache-v2:2.0.0:2.0.1-SNAPSHOT -google-http-client-apache-v5:2.0.0:2.0.1-SNAPSHOT -google-http-client-appengine:2.0.0:2.0.1-SNAPSHOT -google-http-client-assembly:2.0.0:2.0.1-SNAPSHOT -google-http-client-findbugs:2.0.0:2.0.1-SNAPSHOT -google-http-client-gson:2.0.0:2.0.1-SNAPSHOT -google-http-client-jackson2:2.0.0:2.0.1-SNAPSHOT -google-http-client-protobuf:2.0.0:2.0.1-SNAPSHOT -google-http-client-test:2.0.0:2.0.1-SNAPSHOT -google-http-client-xml:2.0.0:2.0.1-SNAPSHOT +google-http-client:2.0.1:2.0.1 +google-http-client-bom:2.0.1:2.0.1 +google-http-client-parent:2.0.1:2.0.1 +google-http-client-android:2.0.1:2.0.1 +google-http-client-android-test:2.0.1:2.0.1 +google-http-client-apache-v2:2.0.1:2.0.1 +google-http-client-apache-v5:2.0.1:2.0.1 +google-http-client-appengine:2.0.1:2.0.1 +google-http-client-assembly:2.0.1:2.0.1 +google-http-client-findbugs:2.0.1:2.0.1 +google-http-client-gson:2.0.1:2.0.1 +google-http-client-jackson2:2.0.1:2.0.1 +google-http-client-protobuf:2.0.1:2.0.1 +google-http-client-test:2.0.1:2.0.1 +google-http-client-xml:2.0.1:2.0.1 From 4aba27c5f001b8e464d85852bcd6335d84d88668 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:35:42 -0400 Subject: [PATCH 977/983] ci: upgrade tests to JDK 25 (#2119) --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2915835ab..ed5494f3a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - java: [8, 11, 17, 24] + java: [8, 11, 17, 25] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11, 17, 24] + java: [8, 11, 17, 25] steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -110,4 +110,4 @@ jobs: distribution: temurin - run: .kokoro/build.sh env: - JOB_TYPE: test \ No newline at end of file + JOB_TYPE: test From 1d922d7f01f370bb174c50319ccc2eced8d51291 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 13 Oct 2025 20:01:34 +0100 Subject: [PATCH 978/983] build(deps): update dependency com.google.cloud:native-image-shared-config to v1.16.1 (#2123) --- .kokoro/presubmit/graalvm-native-a.cfg | 2 +- .kokoro/presubmit/graalvm-native-b.cfg | 2 +- .kokoro/presubmit/graalvm-native-c.cfg | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.kokoro/presubmit/graalvm-native-a.cfg b/.kokoro/presubmit/graalvm-native-a.cfg index 5f8ee7699..a32d8885e 100644 --- a/.kokoro/presubmit/graalvm-native-a.cfg +++ b/.kokoro/presubmit/graalvm-native-a.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.16.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:1.16.1" } diff --git a/.kokoro/presubmit/graalvm-native-b.cfg b/.kokoro/presubmit/graalvm-native-b.cfg index 1fd813105..5b32e297d 100644 --- a/.kokoro/presubmit/graalvm-native-b.cfg +++ b/.kokoro/presubmit/graalvm-native-b.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.16.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:1.16.1" } diff --git a/.kokoro/presubmit/graalvm-native-c.cfg b/.kokoro/presubmit/graalvm-native-c.cfg index db4b9721c..5178caf99 100644 --- a/.kokoro/presubmit/graalvm-native-c.cfg +++ b/.kokoro/presubmit/graalvm-native-c.cfg @@ -29,5 +29,5 @@ env_vars: { } container_properties { - docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:1.16.0" + docker_image: "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:1.16.1" } diff --git a/pom.xml b/pom.xml index b62193526..be7729e22 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ com.google.cloud native-image-shared-config - 1.16.0 + 1.16.1 + 2.0.2-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 2.0.1 + 2.0.2-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 2.0.1 + 2.0.2-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 450dc2b7b..5a1876b1a 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-android - 2.0.1 + 2.0.2-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index 4717196ae..dfd39e000 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 2.0.1 + 2.0.2-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 6973ee524..9d39115af 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 2.0.1 + 2.0.2-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 63c96b131..806e81be1 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-appengine - 2.0.1 + 2.0.2-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 2cd239148..d6d403864 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 2.0.1 + 2.0.2-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 60772596d..1650dc0ac 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 2.0.1 + 2.0.2-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-android - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-appengine - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-findbugs - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-gson - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-jackson2 - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-protobuf - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-test - 2.0.1 + 2.0.2-SNAPSHOT com.google.http-client google-http-client-xml - 2.0.1 + 2.0.2-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index fd781d240..492badbbc 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-findbugs - 2.0.1 + 2.0.2-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 1ddbd7018..76b00b7df 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-gson - 2.0.1 + 2.0.2-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index cac5191d4..b3bc1e861 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-jackson2 - 2.0.1 + 2.0.2-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 7d2df7317..8b40596f0 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-protobuf - 2.0.1 + 2.0.2-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 75456117a..b4ce4e43e 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-test - 2.0.1 + 2.0.2-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 2c4d8748f..fcbbe9951 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client-xml - 2.0.1 + 2.0.2-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index aefa21738..9f54791d0 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../pom.xml google-http-client - 2.0.1 + 2.0.2-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 1bd08574a..742aa4889 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 2.0.1 + 2.0.2-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 975ae1411..2ca288f96 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 2.0.1 + 2.0.2-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 3783a5310..f0606a855 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:2.0.1:2.0.1 -google-http-client-bom:2.0.1:2.0.1 -google-http-client-parent:2.0.1:2.0.1 -google-http-client-android:2.0.1:2.0.1 -google-http-client-android-test:2.0.1:2.0.1 -google-http-client-apache-v2:2.0.1:2.0.1 -google-http-client-apache-v5:2.0.1:2.0.1 -google-http-client-appengine:2.0.1:2.0.1 -google-http-client-assembly:2.0.1:2.0.1 -google-http-client-findbugs:2.0.1:2.0.1 -google-http-client-gson:2.0.1:2.0.1 -google-http-client-jackson2:2.0.1:2.0.1 -google-http-client-protobuf:2.0.1:2.0.1 -google-http-client-test:2.0.1:2.0.1 -google-http-client-xml:2.0.1:2.0.1 +google-http-client:2.0.1:2.0.2-SNAPSHOT +google-http-client-bom:2.0.1:2.0.2-SNAPSHOT +google-http-client-parent:2.0.1:2.0.2-SNAPSHOT +google-http-client-android:2.0.1:2.0.2-SNAPSHOT +google-http-client-android-test:2.0.1:2.0.2-SNAPSHOT +google-http-client-apache-v2:2.0.1:2.0.2-SNAPSHOT +google-http-client-apache-v5:2.0.1:2.0.2-SNAPSHOT +google-http-client-appengine:2.0.1:2.0.2-SNAPSHOT +google-http-client-assembly:2.0.1:2.0.2-SNAPSHOT +google-http-client-findbugs:2.0.1:2.0.2-SNAPSHOT +google-http-client-gson:2.0.1:2.0.2-SNAPSHOT +google-http-client-jackson2:2.0.1:2.0.2-SNAPSHOT +google-http-client-protobuf:2.0.1:2.0.2-SNAPSHOT +google-http-client-test:2.0.1:2.0.2-SNAPSHOT +google-http-client-xml:2.0.1:2.0.2-SNAPSHOT From 0ba715595e3551b068e0cd6149efebf34aa4ee12 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 17:35:21 -0400 Subject: [PATCH 982/983] chore(main): release 2.0.2 (#2125) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 18 files changed, 64 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b6033562..59dd55424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.0.2](https://github.com/googleapis/google-http-java-client/compare/v2.0.1...v2.0.2) (2025-10-13) + + +### Dependencies + +* Update dependency com.google.cloud:native-image-shared-config to v1.17.0 ([9efc208](https://github.com/googleapis/google-http-java-client/commit/9efc20820de4d48cf6b4375d26793094aef6696d)) + ## [2.0.1](https://github.com/googleapis/google-http-java-client/compare/v2.0.0...v2.0.1) (2025-09-24) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index a1f44b120..42f2b6184 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 2.0.2-SNAPSHOT + 2.0.2 apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 2.0.2-SNAPSHOT + 2.0.2 android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 2.0.2-SNAPSHOT + 2.0.2 junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index 5a1876b1a..b5260d691 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-android - 2.0.2-SNAPSHOT + 2.0.2 Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index dfd39e000..e3e0bdc95 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-apache-v2 - 2.0.2-SNAPSHOT + 2.0.2 Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index 9d39115af..d9bf5e8c3 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-apache-v5 - 2.0.2-SNAPSHOT + 2.0.2 Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index 806e81be1..cce774b01 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-appengine - 2.0.2-SNAPSHOT + 2.0.2 Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index d6d403864..6131e8246 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml com.google.http-client google-http-client-assembly - 2.0.2-SNAPSHOT + 2.0.2 pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 1650dc0ac..5d649b242 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 2.0.2-SNAPSHOT + 2.0.2 pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-android - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-apache-v2 - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-apache-v5 - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-appengine - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-findbugs - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-gson - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-jackson2 - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-protobuf - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-test - 2.0.2-SNAPSHOT + 2.0.2 com.google.http-client google-http-client-xml - 2.0.2-SNAPSHOT + 2.0.2 diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index 492badbbc..db7d65e4d 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-findbugs - 2.0.2-SNAPSHOT + 2.0.2 Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index 76b00b7df..a5bda931f 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-gson - 2.0.2-SNAPSHOT + 2.0.2 GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index b3bc1e861..5b364a94c 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-jackson2 - 2.0.2-SNAPSHOT + 2.0.2 Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 8b40596f0..4cddd5bec 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-protobuf - 2.0.2-SNAPSHOT + 2.0.2 Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index b4ce4e43e..3ca33ecad 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-test - 2.0.2-SNAPSHOT + 2.0.2 Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index fcbbe9951..1f0f95143 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client-xml - 2.0.2-SNAPSHOT + 2.0.2 XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 9f54791d0..298a0841a 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../pom.xml google-http-client - 2.0.2-SNAPSHOT + 2.0.2 Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index 742aa4889..f8e7c01f3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 2.0.2-SNAPSHOT + 2.0.2 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index 2ca288f96..fecb3e46c 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 2.0.2-SNAPSHOT + 2.0.2 ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index f0606a855..343e76adf 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:2.0.1:2.0.2-SNAPSHOT -google-http-client-bom:2.0.1:2.0.2-SNAPSHOT -google-http-client-parent:2.0.1:2.0.2-SNAPSHOT -google-http-client-android:2.0.1:2.0.2-SNAPSHOT -google-http-client-android-test:2.0.1:2.0.2-SNAPSHOT -google-http-client-apache-v2:2.0.1:2.0.2-SNAPSHOT -google-http-client-apache-v5:2.0.1:2.0.2-SNAPSHOT -google-http-client-appengine:2.0.1:2.0.2-SNAPSHOT -google-http-client-assembly:2.0.1:2.0.2-SNAPSHOT -google-http-client-findbugs:2.0.1:2.0.2-SNAPSHOT -google-http-client-gson:2.0.1:2.0.2-SNAPSHOT -google-http-client-jackson2:2.0.1:2.0.2-SNAPSHOT -google-http-client-protobuf:2.0.1:2.0.2-SNAPSHOT -google-http-client-test:2.0.1:2.0.2-SNAPSHOT -google-http-client-xml:2.0.1:2.0.2-SNAPSHOT +google-http-client:2.0.2:2.0.2 +google-http-client-bom:2.0.2:2.0.2 +google-http-client-parent:2.0.2:2.0.2 +google-http-client-android:2.0.2:2.0.2 +google-http-client-android-test:2.0.2:2.0.2 +google-http-client-apache-v2:2.0.2:2.0.2 +google-http-client-apache-v5:2.0.2:2.0.2 +google-http-client-appengine:2.0.2:2.0.2 +google-http-client-assembly:2.0.2:2.0.2 +google-http-client-findbugs:2.0.2:2.0.2 +google-http-client-gson:2.0.2:2.0.2 +google-http-client-jackson2:2.0.2:2.0.2 +google-http-client-protobuf:2.0.2:2.0.2 +google-http-client-test:2.0.2:2.0.2 +google-http-client-xml:2.0.2:2.0.2 From c4b34eb9efe960fc9a1ffeacb36e8a8bbea20a38 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 11:18:15 -0400 Subject: [PATCH 983/983] chore(main): release 2.0.3-SNAPSHOT (#2126) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-http-client-android-test/pom.xml | 6 ++-- google-http-client-android/pom.xml | 4 +-- google-http-client-apache-v2/pom.xml | 4 +-- google-http-client-apache-v5/pom.xml | 4 +-- google-http-client-appengine/pom.xml | 4 +-- google-http-client-assembly/pom.xml | 4 +-- google-http-client-bom/pom.xml | 24 +++++++-------- google-http-client-findbugs/pom.xml | 4 +-- google-http-client-gson/pom.xml | 4 +-- google-http-client-jackson2/pom.xml | 4 +-- google-http-client-protobuf/pom.xml | 4 +-- google-http-client-test/pom.xml | 4 +-- google-http-client-xml/pom.xml | 4 +-- google-http-client/pom.xml | 4 +-- pom.xml | 4 +-- .../dailymotion-simple-cmdline-sample/pom.xml | 2 +- versions.txt | 30 +++++++++---------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/google-http-client-android-test/pom.xml b/google-http-client-android-test/pom.xml index 42f2b6184..366d58d2d 100644 --- a/google-http-client-android-test/pom.xml +++ b/google-http-client-android-test/pom.xml @@ -4,7 +4,7 @@ google-http-client google-http-client-android-test Test project for google-http-client-android. - 2.0.2 + 2.0.3-SNAPSHOT apk @@ -53,7 +53,7 @@ com.google.http-client google-http-client-android - 2.0.2 + 2.0.3-SNAPSHOT android @@ -72,7 +72,7 @@ com.google.http-client google-http-client-test - 2.0.2 + 2.0.3-SNAPSHOT junit diff --git a/google-http-client-android/pom.xml b/google-http-client-android/pom.xml index b5260d691..b07364eea 100644 --- a/google-http-client-android/pom.xml +++ b/google-http-client-android/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-android - 2.0.2 + 2.0.3-SNAPSHOT Android Platform Extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v2/pom.xml b/google-http-client-apache-v2/pom.xml index e3e0bdc95..5c6e63b3e 100644 --- a/google-http-client-apache-v2/pom.xml +++ b/google-http-client-apache-v2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-apache-v2 - 2.0.2 + 2.0.3-SNAPSHOT Apache HTTP transport v2 for the Google HTTP Client Library for Java. diff --git a/google-http-client-apache-v5/pom.xml b/google-http-client-apache-v5/pom.xml index d9bf5e8c3..894859689 100644 --- a/google-http-client-apache-v5/pom.xml +++ b/google-http-client-apache-v5/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-apache-v5 - 2.0.2 + 2.0.3-SNAPSHOT Apache HTTP transport v5 for the Google HTTP Client Library for Java. diff --git a/google-http-client-appengine/pom.xml b/google-http-client-appengine/pom.xml index cce774b01..b6f1117a6 100644 --- a/google-http-client-appengine/pom.xml +++ b/google-http-client-appengine/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-appengine - 2.0.2 + 2.0.3-SNAPSHOT Google App Engine extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-assembly/pom.xml b/google-http-client-assembly/pom.xml index 6131e8246..6df92301b 100644 --- a/google-http-client-assembly/pom.xml +++ b/google-http-client-assembly/pom.xml @@ -4,12 +4,12 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml com.google.http-client google-http-client-assembly - 2.0.2 + 2.0.3-SNAPSHOT pom Assembly for the Google HTTP Client Library for Java diff --git a/google-http-client-bom/pom.xml b/google-http-client-bom/pom.xml index 5d649b242..c216762b0 100644 --- a/google-http-client-bom/pom.xml +++ b/google-http-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.http-client google-http-client-bom - 2.0.2 + 2.0.3-SNAPSHOT pom Google HTTP Client Library for Java BOM @@ -63,57 +63,57 @@ com.google.http-client google-http-client - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-android - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-apache-v2 - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-apache-v5 - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-appengine - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-findbugs - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-gson - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-jackson2 - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-protobuf - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-test - 2.0.2 + 2.0.3-SNAPSHOT com.google.http-client google-http-client-xml - 2.0.2 + 2.0.3-SNAPSHOT diff --git a/google-http-client-findbugs/pom.xml b/google-http-client-findbugs/pom.xml index db7d65e4d..cb7a614b0 100644 --- a/google-http-client-findbugs/pom.xml +++ b/google-http-client-findbugs/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-findbugs - 2.0.2 + 2.0.3-SNAPSHOT Google APIs Client Library Findbugs custom plugin. diff --git a/google-http-client-gson/pom.xml b/google-http-client-gson/pom.xml index a5bda931f..1a01263a2 100644 --- a/google-http-client-gson/pom.xml +++ b/google-http-client-gson/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-gson - 2.0.2 + 2.0.3-SNAPSHOT GSON extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-jackson2/pom.xml b/google-http-client-jackson2/pom.xml index 5b364a94c..9ec7e616a 100644 --- a/google-http-client-jackson2/pom.xml +++ b/google-http-client-jackson2/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-jackson2 - 2.0.2 + 2.0.3-SNAPSHOT Jackson 2 extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-protobuf/pom.xml b/google-http-client-protobuf/pom.xml index 4cddd5bec..c9b87f5fd 100644 --- a/google-http-client-protobuf/pom.xml +++ b/google-http-client-protobuf/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-protobuf - 2.0.2 + 2.0.3-SNAPSHOT Protocol Buffer extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client-test/pom.xml b/google-http-client-test/pom.xml index 3ca33ecad..457b74091 100644 --- a/google-http-client-test/pom.xml +++ b/google-http-client-test/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-test - 2.0.2 + 2.0.3-SNAPSHOT Shared classes used for testing of artifacts in the Google HTTP Client Library for Java. diff --git a/google-http-client-xml/pom.xml b/google-http-client-xml/pom.xml index 1f0f95143..31fd2e1c3 100644 --- a/google-http-client-xml/pom.xml +++ b/google-http-client-xml/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client-xml - 2.0.2 + 2.0.3-SNAPSHOT XML extensions to the Google HTTP Client Library for Java. diff --git a/google-http-client/pom.xml b/google-http-client/pom.xml index 298a0841a..cc35550de 100644 --- a/google-http-client/pom.xml +++ b/google-http-client/pom.xml @@ -4,11 +4,11 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../pom.xml google-http-client - 2.0.2 + 2.0.3-SNAPSHOT Google HTTP Client Library for Java Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, diff --git a/pom.xml b/pom.xml index f8e7c01f3..8ec5aa94d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT pom Parent for the Google HTTP Client Library for Java Google HTTP Client Library for Java @@ -547,7 +547,7 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 2.0.2 + 2.0.3-SNAPSHOT 2.0.32 UTF-8 3.0.2 diff --git a/samples/dailymotion-simple-cmdline-sample/pom.xml b/samples/dailymotion-simple-cmdline-sample/pom.xml index fecb3e46c..2341d4c98 100644 --- a/samples/dailymotion-simple-cmdline-sample/pom.xml +++ b/samples/dailymotion-simple-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.http-client google-http-client-parent - 2.0.2 + 2.0.3-SNAPSHOT ../../pom.xml dailymotion-simple-cmdline-sample diff --git a/versions.txt b/versions.txt index 343e76adf..46e2d6281 100644 --- a/versions.txt +++ b/versions.txt @@ -1,18 +1,18 @@ # Format: # module:released-version:current-version -google-http-client:2.0.2:2.0.2 -google-http-client-bom:2.0.2:2.0.2 -google-http-client-parent:2.0.2:2.0.2 -google-http-client-android:2.0.2:2.0.2 -google-http-client-android-test:2.0.2:2.0.2 -google-http-client-apache-v2:2.0.2:2.0.2 -google-http-client-apache-v5:2.0.2:2.0.2 -google-http-client-appengine:2.0.2:2.0.2 -google-http-client-assembly:2.0.2:2.0.2 -google-http-client-findbugs:2.0.2:2.0.2 -google-http-client-gson:2.0.2:2.0.2 -google-http-client-jackson2:2.0.2:2.0.2 -google-http-client-protobuf:2.0.2:2.0.2 -google-http-client-test:2.0.2:2.0.2 -google-http-client-xml:2.0.2:2.0.2 +google-http-client:2.0.2:2.0.3-SNAPSHOT +google-http-client-bom:2.0.2:2.0.3-SNAPSHOT +google-http-client-parent:2.0.2:2.0.3-SNAPSHOT +google-http-client-android:2.0.2:2.0.3-SNAPSHOT +google-http-client-android-test:2.0.2:2.0.3-SNAPSHOT +google-http-client-apache-v2:2.0.2:2.0.3-SNAPSHOT +google-http-client-apache-v5:2.0.2:2.0.3-SNAPSHOT +google-http-client-appengine:2.0.2:2.0.3-SNAPSHOT +google-http-client-assembly:2.0.2:2.0.3-SNAPSHOT +google-http-client-findbugs:2.0.2:2.0.3-SNAPSHOT +google-http-client-gson:2.0.2:2.0.3-SNAPSHOT +google-http-client-jackson2:2.0.2:2.0.3-SNAPSHOT +google-http-client-protobuf:2.0.2:2.0.3-SNAPSHOT +google-http-client-test:2.0.2:2.0.3-SNAPSHOT +google-http-client-xml:2.0.2:2.0.3-SNAPSHOT