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 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; + } } diff --git a/owlbot.py b/owlbot.py index 44a59dd69..6c8dbbb8a 100644 --- a/owlbot.py +++ b/owlbot.py @@ -29,6 +29,7 @@ "license-checks.xml", ".github/workflows/samples.yaml", ".kokoro/build.sh", - "renovate.json" + "renovate.json", + ".github/workflows/ci.yaml" ] )