From 516c8e1271655a983bd5d21b920eb5f5937bfba1 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 13:42:59 -0500 Subject: [PATCH 01/23] chore: Add initial pom.xml --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a09410d53..517384895 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ tmp_gh-pages # Vim *.sw* + +target/ From 28f97630517824a2233c0f2aa936e76969c86501 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 15:16:27 -0500 Subject: [PATCH 02/23] chore: Convert workflows to maven --- .github/workflows/ci.yaml | 67 +++++++++++++++++++++++++-------------- .kokoro/build.sh | 48 ++++++++++++++++++++++++---- pom.xml | 14 +++++++- 3 files changed, 97 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89788f258..de4d512ef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,28 +7,47 @@ name: ci jobs: units: runs-on: ubuntu-latest - env: - # Customize the JVM maximum heap limit - JVM_OPTS: -Xmx3200m - TERM: dumb steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - name: Gradle Assemble - run: ./gradlew assemble - - name: Gradle Test - run: ./gradlew test - - name: Gradle Build - run: ./gradlew build publishToMavenLocal - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Java Linter - run: ./gradlew googleJavaFormat + strategy: + fail-fast: false + matrix: + java: [ 8, 11, 17 ] + steps: + - name: Get current week within the year + id: date + run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: ${{matrix.java}} + - run: java -version + - uses: actions/cache@v3 + id: mvn-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} + - run: .kokoro/build.sh + env: + JOB_TYPE: test + JOB_NAME: units-${{matrix.java}} + lint: + runs-on: ubuntu-latest + steps: + - name: Get current week within the year + id: date + run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + - run: java -version + - uses: actions/cache@v3 + id: mvn-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} + - run: java -version + - run: mvn -B -ntp com.coveo:fmt-maven-plugin:check + - run: mvn -B -ntp checkstyle:check@checkstyle diff --git a/.kokoro/build.sh b/.kokoro/build.sh index fbf2695f4..3d07ea2f2 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. @@ -15,11 +15,45 @@ set -eo pipefail -cd github/api-common-java/ +## 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 -java -version -echo $JOB_TYPE +# include common functions +source ${scriptDir}/common.sh -./gradlew assemble -./gradlew build install +RETURN_CODE=0 + +case ${JOB_TYPE} in + test) + retry_with_backoff 3 10 \ + mvn -B -ntp \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dcheckstyle.skip=true \ + -Dflatten.skip=true \ + -Danimal.sniffer.skip=true \ + -Dmaven.wagon.http.retryHandler.count=5 \ + test + RETURN_CODE=$? + echo "Finished running unit tests" + ;; + *) ;; + +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_FLAKYBOT}" == "true" ]]; then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-cloud-java +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1873277ea..718bcdb65 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 com.google.api api-common @@ -89,6 +90,17 @@ + + com.coveo + fmt-maven-plugin + + + + check + + + + org.apache.maven.plugins maven-jar-plugin From ce05fee406b3b55098ef1b92f39631f18b0714c4 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 15:24:51 -0500 Subject: [PATCH 03/23] chore: Cleanup the existing workflows --- .kokoro/build.bat | 3 - .kokoro/build.sh | 5 +- .kokoro/continuous/common.cfg | 25 -------- .kokoro/continuous/java11.cfg | 7 --- .kokoro/continuous/java7.cfg | 7 --- .kokoro/continuous/java8.cfg | 12 ---- .kokoro/dependencies.sh | 90 --------------------------- .kokoro/nightly/common.cfg | 25 -------- .kokoro/nightly/integration.cfg | 37 ----------- .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 | 12 ---- .kokoro/nightly/samples.cfg | 38 ----------- .kokoro/presubmit/dependencies.cfg | 12 ---- .kokoro/presubmit/integration.cfg | 33 ---------- .kokoro/presubmit/java11.cfg | 7 --- .kokoro/presubmit/java7.cfg | 7 --- .kokoro/presubmit/java8-osx.cfg | 3 - .kokoro/presubmit/java8-win.cfg | 3 - .kokoro/presubmit/java8.cfg | 12 ---- .kokoro/presubmit/linkage-monitor.cfg | 12 ---- .kokoro/presubmit/lint.cfg | 13 ---- .kokoro/presubmit/samples.cfg | 33 ---------- .kokoro/release/bump_snapshot.cfg | 53 ---------------- .kokoro/release/drop.cfg | 6 -- .kokoro/release/drop.sh | 19 ------ .kokoro/release/promote.cfg | 6 -- .kokoro/release/promote.sh | 31 --------- .kokoro/release/snapshot.cfg | 6 -- .kokoro/release/snapshot.sh | 29 --------- 32 files changed, 4 insertions(+), 562 deletions(-) delete mode 100644 .kokoro/build.bat delete mode 100644 .kokoro/continuous/common.cfg delete mode 100644 .kokoro/continuous/java11.cfg delete mode 100644 .kokoro/continuous/java7.cfg delete mode 100644 .kokoro/continuous/java8.cfg delete mode 100755 .kokoro/dependencies.sh delete mode 100644 .kokoro/nightly/common.cfg delete mode 100644 .kokoro/nightly/integration.cfg delete mode 100644 .kokoro/nightly/java11.cfg delete mode 100644 .kokoro/nightly/java7.cfg delete mode 100644 .kokoro/nightly/java8-osx.cfg delete mode 100644 .kokoro/nightly/java8-win.cfg delete mode 100644 .kokoro/nightly/java8.cfg delete mode 100644 .kokoro/nightly/samples.cfg delete mode 100644 .kokoro/presubmit/dependencies.cfg delete mode 100644 .kokoro/presubmit/integration.cfg delete mode 100644 .kokoro/presubmit/java11.cfg delete mode 100644 .kokoro/presubmit/java7.cfg delete mode 100644 .kokoro/presubmit/java8-osx.cfg delete mode 100644 .kokoro/presubmit/java8-win.cfg delete mode 100644 .kokoro/presubmit/java8.cfg delete mode 100644 .kokoro/presubmit/linkage-monitor.cfg delete mode 100644 .kokoro/presubmit/lint.cfg delete mode 100644 .kokoro/presubmit/samples.cfg delete mode 100644 .kokoro/release/bump_snapshot.cfg 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/snapshot.cfg delete mode 100755 .kokoro/release/snapshot.sh diff --git a/.kokoro/build.bat b/.kokoro/build.bat deleted file mode 100644 index 05826ad93..000000000 --- a/.kokoro/build.bat +++ /dev/null @@ -1,3 +0,0 @@ -:: See documentation in type-shell-output.bat - -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 3d07ea2f2..6b6c30a0c 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -37,7 +37,10 @@ case ${JOB_TYPE} in -Dmaven.wagon.http.retryHandler.count=5 \ test RETURN_CODE=$? - echo "Finished running unit tests" + ;; + clirr) + mvn -B -ntp -Denforcer.skip=true clirr:check + RETURN_CODE=$? ;; *) ;; diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg deleted file mode 100644 index c690aeb8a..000000000 --- a/.kokoro/continuous/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "api-common-java/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/api-common-java/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} 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.cfg b/.kokoro/continuous/java8.cfg deleted file mode 100644 index 495cc7bac..000000000 --- a/.kokoro/continuous/java8.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: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh deleted file mode 100755 index 59d2aafc7..000000000 --- a/.kokoro/dependencies.sh +++ /dev/null @@ -1,90 +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 - -## 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 -echo $JOB_TYPE - -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" - -# this should run maven enforcer -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 - -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/\\s--\\smodule.*// >.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 $(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/common.cfg b/.kokoro/nightly/common.cfg deleted file mode 100644 index c690aeb8a..000000000 --- a/.kokoro/nightly/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "api-common-java/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/api-common-java/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg deleted file mode 100644 index 0048c8ece..000000000 --- a/.kokoro/nightly/integration.cfg +++ /dev/null @@ -1,37 +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: "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: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg deleted file mode 100644 index 709f2b4c7..000000000 --- a/.kokoro/nightly/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/nightly/java7.cfg b/.kokoro/nightly/java7.cfg deleted file mode 100644 index cb24f44ee..000000000 --- a/.kokoro/nightly/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/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg deleted file mode 100644 index affd3b901..000000000 --- a/.kokoro/nightly/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "api-common-java/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg deleted file mode 100644 index 590450c23..000000000 --- a/.kokoro/nightly/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "api-common-java/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg deleted file mode 100644 index 495cc7bac..000000000 --- a/.kokoro/nightly/java8.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: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg deleted file mode 100644 index f25429314..000000000 --- a/.kokoro/nightly/samples.cfg +++ /dev/null @@ -1,38 +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" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} - -env_vars: { - key: "ENABLE_BUILD_COP" - value: "true" -} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg deleted file mode 100644 index 701ec13bd..000000000 --- a/.kokoro/presubmit/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/api-common-java/.kokoro/dependencies.sh" -} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg deleted file mode 100644 index dded67a9d..000000000 --- a/.kokoro/presubmit/integration.cfg +++ /dev/null @@ -1,33 +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: "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: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg deleted file mode 100644 index 709f2b4c7..000000000 --- a/.kokoro/presubmit/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/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg deleted file mode 100644 index cb24f44ee..000000000 --- a/.kokoro/presubmit/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/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg deleted file mode 100644 index affd3b901..000000000 --- a/.kokoro/presubmit/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "api-common-java/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg deleted file mode 100644 index 590450c23..000000000 --- a/.kokoro/presubmit/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "api-common-java/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg deleted file mode 100644 index 495cc7bac..000000000 --- a/.kokoro/presubmit/java8.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: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg deleted file mode 100644 index edd98254e..000000000 --- a/.kokoro/presubmit/linkage-monitor.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/api-common-java/.kokoro/linkage-monitor.sh" -} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg deleted file mode 100644 index 6d323c8ae..000000000 --- a/.kokoro/presubmit/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/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg deleted file mode 100644 index 01e096004..000000000 --- a/.kokoro/presubmit/samples.cfg +++ /dev/null @@ -1,33 +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" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} \ No newline at end of file diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg deleted file mode 100644 index 4d600c86c..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: "api-common-java/.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/api-common-java/.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/drop.cfg b/.kokoro/release/drop.cfg deleted file mode 100644 index 456a07816..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/api-common-java/.kokoro/release/drop.sh" -} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh deleted file mode 100755 index ce6ae7543..000000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 - -echo "This dropping a staged repo does not appear supported by the gradle-nexus-staging-plugin" -exit 1 diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg deleted file mode 100644 index 418890c65..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/api-common-java/.kokoro/release/promote.sh" -} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh deleted file mode 100755 index 2dcfd256d..000000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 - -# 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 -mkdir -p ${HOME}/.gradle -create_gradle_properties_file "${HOME}/.gradle/gradle.properties" - -./gradlew closeAndReleaseRepository diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg deleted file mode 100644 index a1fb5ce3c..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/api-common-java/.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 53a904a1c..000000000 --- a/.kokoro/release/snapshot.sh +++ /dev/null @@ -1,29 +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 -mkdir -p ${HOME}/.gradle -create_gradle_properties_file "${HOME}/.gradle/gradle.properties" - -./gradlew assemble publish From 2366969a91871fe74e9af4e77b4b825c16351b7d Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 22:08:27 -0500 Subject: [PATCH 04/23] chore: Fix format of ci.yaml --- .github/workflows/ci.yaml | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de4d512ef..9993e4abd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,23 +31,23 @@ jobs: env: JOB_TYPE: test JOB_NAME: units-${{matrix.java}} - lint: - runs-on: ubuntu-latest - steps: - - name: Get current week within the year - id: date - run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 8 - - run: java -version - - uses: actions/cache@v3 - id: mvn-cache - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} - - run: java -version - - run: mvn -B -ntp com.coveo:fmt-maven-plugin:check - - run: mvn -B -ntp checkstyle:check@checkstyle + lint: + runs-on: ubuntu-latest + steps: + - name: Get current week within the year + id: date + run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + - run: java -version + - uses: actions/cache@v3 + id: mvn-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} + - run: java -version + - run: mvn -B -ntp com.coveo:fmt-maven-plugin:check + - run: mvn -B -ntp checkstyle:check@checkstyle From 0ad81c9683f1d7b5e4946d4068e3f09b6b08ff68 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 22:11:55 -0500 Subject: [PATCH 05/23] chore: Fix format of ci.yaml --- .github/workflows/ci.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9993e4abd..2c3e1669e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,12 +7,11 @@ name: ci jobs: units: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [ 8, 11, 17 ] steps: - strategy: - fail-fast: false - matrix: - java: [ 8, 11, 17 ] - steps: - name: Get current week within the year id: date run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" From aec693d28418db48df3c49d732a77f266a45b9e6 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 22:26:51 -0500 Subject: [PATCH 06/23] chore: Use seperate job for java 8 --- .github/workflows/ci.yaml | 29 ++++++++++++++++++++++++++++- .kokoro/build.sh | 22 ++++++++++++++++++++++ .kokoro/coerce_logs.sh | 6 +++++- 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c3e1669e..d61855465 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,12 +5,39 @@ on: pull_request: name: ci jobs: + units-8: + name: units (8) + runs-on: ubuntu-latest + steps: + - name: Get current week within the year + id: date + run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: 8 + distribution: zulu + - run: echo "JAVA8_HOME=${JAVA_HOME}" >> $GITHUB_ENV + - uses: actions/setup-java@v3 + with: + java-version: 11 + distribution: zulu + - run: echo "JAVA11_HOME=${JAVA_HOME}" >> $GITHUB_ENV + - uses: actions/cache@v3 + id: mvn-cache + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.week_of_year }} + - run: .kokoro/build.sh + env: + JOB_TYPE: test + JOB_NAME: units-8 units: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - java: [ 8, 11, 17 ] + java: [ 11, 17 ] steps: - name: Get current week within the year id: date diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 6b6c30a0c..8e67c67ea 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -23,6 +23,28 @@ cd ${scriptDir}/.. # include common functions source ${scriptDir}/common.sh +function setJava() { + export JAVA_HOME=$1 + export PATH=${JAVA_HOME}/bin:$PATH +} + +# This project requires compiling the classes in JDK 11 or higher for GraalVM +# classes. Compiling this project with Java 8 or earlier would fail with "class +# file has wrong version 55.0, should be 53.0" and "unrecognized --release 8 +# option" (set in build.gradle). +if [ ! -z "${JAVA11_HOME}" ]; then + setJava "${JAVA11_HOME}" +fi + +echo "Compiling using Java:" +java -version +mvn clean install -B -Dcheckstyle.skip -Dfmt.skip + +# We ensure the generated class files are compatible with Java 8 +if [ ! -z "${JAVA8_HOME}" ]; then + setJava "${JAVA8_HOME}" +fi + RETURN_CODE=0 case ${JOB_TYPE} in diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh index 5cf7ba49e..7b153733d 100755 --- a/.kokoro/coerce_logs.sh +++ b/.kokoro/coerce_logs.sh @@ -23,7 +23,11 @@ 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}) +if [ -z "${KOKORO_JOB_NAME}" ]; then + job="${JOB_NAME}" +else + job=$(basename ${KOKORO_JOB_NAME}) +fi echo "coercing sponge logs..." for xml in `find . -name *-sponge_log.xml` From 3ce6058d99ddd5ff3030f640b24ba092a09677c6 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 17 Nov 2022 22:33:31 -0500 Subject: [PATCH 07/23] chore: Update required status checks --- .github/sync-repo-settings.yaml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 2fdb4a472..522f7e1bd 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -5,8 +5,9 @@ branchProtectionRules: - pattern: main isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -14,8 +15,9 @@ branchProtectionRules: - pattern: 1.10.1-sp isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -23,8 +25,9 @@ branchProtectionRules: - pattern: java7 isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -32,8 +35,9 @@ branchProtectionRules: - pattern: 2.0.x isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -41,8 +45,9 @@ branchProtectionRules: - pattern: 2.1.x isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -50,8 +55,9 @@ branchProtectionRules: - pattern: 2.2.x isAdminEnforced: true requiredStatusCheckContexts: - - units - - format + - units (8) + - units (11) + - units (17) - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true From 553535e59dc5f4ae085aba9a60c8283549b59d79 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 11:57:02 -0500 Subject: [PATCH 08/23] chore: Run java formatter --- .../google/api/core/AbstractApiFuture.java | 4 +- .../com/google/api/core/ApiAsyncFunction.java | 6 +- .../java/com/google/api/core/ApiClock.java | 14 +- .../java/com/google/api/core/ApiFunction.java | 3 +- .../java/com/google/api/core/ApiFuture.java | 2 +- .../google/api/core/ApiFutureCallback.java | 3 +- .../api/core/ApiFutureToListenableFuture.java | 4 +- .../java/com/google/api/core/ApiService.java | 98 ++++----- .../java/com/google/api/core/BetaApi.java | 22 +- .../java/com/google/api/core/InternalApi.java | 12 +- .../api/core/InternalExtensionOnly.java | 22 +- .../api/core/ListenableFutureToApiFuture.java | 4 +- .../google/api/pathtemplate/PathTemplate.java | 195 ++++++++---------- .../pathtemplate/TemplatedResourceName.java | 44 ++-- .../api/pathtemplate/ValidationException.java | 8 +- .../api/resourcenames/ResourceName.java | 4 +- .../UntypedResourceNameTest.java | 4 +- 17 files changed, 189 insertions(+), 260 deletions(-) diff --git a/src/main/java/com/google/api/core/AbstractApiFuture.java b/src/main/java/com/google/api/core/AbstractApiFuture.java index 64196a1f1..04d17bb01 100644 --- a/src/main/java/com/google/api/core/AbstractApiFuture.java +++ b/src/main/java/com/google/api/core/AbstractApiFuture.java @@ -37,9 +37,7 @@ import java.util.concurrent.TimeoutException; import javax.annotation.Nullable; -/** - * Abstract implementation of ApiFuture that mirrors {@code AbstractFuture} in Guava. - */ +/** Abstract implementation of ApiFuture that mirrors {@code AbstractFuture} in Guava. */ public abstract class AbstractApiFuture implements ApiFuture { private final InternalSettableFuture impl = new InternalSettableFuture(); diff --git a/src/main/java/com/google/api/core/ApiAsyncFunction.java b/src/main/java/com/google/api/core/ApiAsyncFunction.java index 54554c5be..deb8d48e3 100644 --- a/src/main/java/com/google/api/core/ApiAsyncFunction.java +++ b/src/main/java/com/google/api/core/ApiAsyncFunction.java @@ -32,16 +32,14 @@ /** * Transforms a value, possibly asynchronously. * - *

- * It is similar to Guava's {@code AsyncFunction}, redeclared so that Guava can be shaded. + *

It is similar to Guava's {@code AsyncFunction}, redeclared so that Guava can be shaded. */ public interface ApiAsyncFunction { /** * Returns an output Future to use in place of the given input. The output Future need not be * done, making AsyncFunction suitable for asynchronous derivations. * - *

- * Throwing an exception from this method is equivalent to returning a failing Future. + *

Throwing an exception from this method is equivalent to returning a failing Future. */ ApiFuture apply(I input) throws Exception; } diff --git a/src/main/java/com/google/api/core/ApiClock.java b/src/main/java/com/google/api/core/ApiClock.java index 0c3893ad9..c90e80332 100644 --- a/src/main/java/com/google/api/core/ApiClock.java +++ b/src/main/java/com/google/api/core/ApiClock.java @@ -32,20 +32,16 @@ /** * An interface for getting the current value of a high-resolution time source, in nanoseconds. * - * Clocks other than {@link NanoClock} are typically used only for testing. + *

Clocks other than {@link NanoClock} are typically used only for testing. * - * This interface is required in addition to Java 8's Clock, because nanoTime is required to compare - * values with io.grpc.CallOptions.getDeadlineNanoTime(). + *

This interface is required in addition to Java 8's Clock, because nanoTime is required to + * compare values with io.grpc.CallOptions.getDeadlineNanoTime(). */ public interface ApiClock { - /** - * Returns the current value of this clock's high-resolution time source, in nanoseconds. - */ + /** Returns the current value of this clock's high-resolution time source, in nanoseconds. */ long nanoTime(); - /** - * Returns the current value of this clock's high-resolution time source, in milliseconds. - */ + /** Returns the current value of this clock's high-resolution time source, in milliseconds. */ long millisTime(); } diff --git a/src/main/java/com/google/api/core/ApiFunction.java b/src/main/java/com/google/api/core/ApiFunction.java index 749b534a2..d03d93493 100644 --- a/src/main/java/com/google/api/core/ApiFunction.java +++ b/src/main/java/com/google/api/core/ApiFunction.java @@ -32,8 +32,7 @@ /** * Legacy version of Function. * - *

- * It is similar to Guava's {@code Function}, redeclared so that Guava can be shaded. + *

It is similar to Guava's {@code Function}, redeclared so that Guava can be shaded. */ public interface ApiFunction { T apply(F input); diff --git a/src/main/java/com/google/api/core/ApiFuture.java b/src/main/java/com/google/api/core/ApiFuture.java index de16aceb6..523747585 100644 --- a/src/main/java/com/google/api/core/ApiFuture.java +++ b/src/main/java/com/google/api/core/ApiFuture.java @@ -35,7 +35,7 @@ /** * A Future that can have a listener added. * - * Similar to Guava's {@code ListenableFuture}, but redeclared so that Guava could be shaded. + *

Similar to Guava's {@code ListenableFuture}, but redeclared so that Guava could be shaded. */ public interface ApiFuture extends Future { void addListener(Runnable listener, Executor executor); diff --git a/src/main/java/com/google/api/core/ApiFutureCallback.java b/src/main/java/com/google/api/core/ApiFutureCallback.java index 4c0fdd002..78c0defe8 100644 --- a/src/main/java/com/google/api/core/ApiFutureCallback.java +++ b/src/main/java/com/google/api/core/ApiFutureCallback.java @@ -32,8 +32,7 @@ /** * A callback for accepting the results of an {@link ApiFuture}. * - *

- * It is similar to Guava's {@code FutureCallback}, redeclared so that Guava can be shaded. + *

It is similar to Guava's {@code FutureCallback}, redeclared so that Guava can be shaded. */ public interface ApiFutureCallback { void onFailure(Throwable t); diff --git a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java index 2903877bd..e7c6e9f78 100644 --- a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java +++ b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java @@ -35,9 +35,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -/** - * INTERNAL USE ONLY. Adapter from ApiFuture to Guava ListenableFuture. - */ +/** INTERNAL USE ONLY. Adapter from ApiFuture to Guava ListenableFuture. */ @InternalApi public class ApiFutureToListenableFuture implements ListenableFuture { private final ApiFuture apiFuture; diff --git a/src/main/java/com/google/api/core/ApiService.java b/src/main/java/com/google/api/core/ApiService.java index 713c244f6..ee49e78f3 100644 --- a/src/main/java/com/google/api/core/ApiService.java +++ b/src/main/java/com/google/api/core/ApiService.java @@ -34,35 +34,32 @@ import java.util.concurrent.TimeoutException; /** - * An object with an operational state, plus asynchronous {@link #startAsync()} and - * {@link #stopAsync()} lifecycle methods to transition between states. Example services include + * An object with an operational state, plus asynchronous {@link #startAsync()} and {@link + * #stopAsync()} lifecycle methods to transition between states. Example services include * webservers, RPC servers and timers. * - *

- * The normal lifecycle of a service is: + *

The normal lifecycle of a service is: * *

    - *
  • {@linkplain State#NEW NEW} -> - *
  • {@linkplain State#STARTING STARTING} -> - *
  • {@linkplain State#RUNNING RUNNING} -> - *
  • {@linkplain State#STOPPING STOPPING} -> - *
  • {@linkplain State#TERMINATED TERMINATED} + *
  • {@linkplain State#NEW NEW} -> + *
  • {@linkplain State#STARTING STARTING} -> + *
  • {@linkplain State#RUNNING RUNNING} -> + *
  • {@linkplain State#STOPPING STOPPING} -> + *
  • {@linkplain State#TERMINATED TERMINATED} *
* - *

- * There are deviations from this if there are failures or if {@link ApiService#stopAsync} is called - * before the {@link ApiService} reaches the {@linkplain State#RUNNING RUNNING} state. The set of - * legal transitions form a DAG, - * therefore every method of the listener will be called at most once. N.B. The {@link State#FAILED} - * and {@link State#TERMINATED} states are terminal states, once a service enters either of these - * states it cannot ever leave them. + *

There are deviations from this if there are failures or if {@link ApiService#stopAsync} is + * called before the {@link ApiService} reaches the {@linkplain State#RUNNING RUNNING} state. The + * set of legal transitions form a DAG, therefore every method of the + * listener will be called at most once. N.B. The {@link State#FAILED} and {@link State#TERMINATED} + * states are terminal states, once a service enters either of these states it cannot ever leave + * them. * - *

- * Implementors of this interface are strongly encouraged to extend {@link AbstractApiService} which - * implement this interface and make the threading and state management easier. + *

Implementors of this interface are strongly encouraged to extend {@link AbstractApiService} + * which implement this interface and make the threading and state management easier. * - *

- * Similar to Guava's {@code Service}, but redeclared so that Guava could be shaded. + *

Similar to Guava's {@code Service}, but redeclared so that Guava could be shaded. */ public interface ApiService { /** @@ -71,17 +68,15 @@ public interface ApiService { * service changes state. The listener will not have previous state changes replayed, so it is * suggested that listeners are added before the service starts. * - *

- * {@code addListener} guarantees execution ordering across calls to a given listener but not + *

{@code addListener} guarantees execution ordering across calls to a given listener but not * across calls to multiple listeners. Specifically, a given listener will have its callbacks * invoked in the same order as the underlying service enters those states. Additionally, at most * one of the listener's callbacks will execute at once. However, multiple listeners' callbacks * may execute concurrently, and listeners may execute in an order different from the one in which * they were registered. * - *

- * RuntimeExceptions thrown by a listener will be caught and logged. Any exception thrown during - * {@code Executor.execute} (e.g., a {@code RejectedExecutionException}) will be caught and + *

RuntimeExceptions thrown by a listener will be caught and logged. Any exception thrown + * during {@code Executor.execute} (e.g., a {@code RejectedExecutionException}) will be caught and * logged. * * @param listener the listener to run when the service changes state is complete @@ -93,8 +88,8 @@ public interface ApiService { * Waits for the {@link ApiService} to reach the {@linkplain State#RUNNING running state}. * * @throws IllegalStateException if the service reaches a state from which it is not possible to - * enter the {@link State#RUNNING} state. e.g. if the {@code state} is {@code State#TERMINATED} - * when this method is called then this will throw an IllegalStateException. + * enter the {@link State#RUNNING} state. e.g. if the {@code state} is {@code + * State#TERMINATED} when this method is called then this will throw an IllegalStateException. */ void awaitRunning(); @@ -106,9 +101,8 @@ public interface ApiService { * @param unit the time unit of the timeout argument * @throws TimeoutException if the service has not reached the given state within the deadline * @throws IllegalStateException if the service reaches a state from which it is not possible to - * enter the {@link State#RUNNING RUNNING} state. e.g. if the {@code state} is - * {@code State#TERMINATED} when this method is called then this will throw an - * IllegalStateException. + * enter the {@link State#RUNNING RUNNING} state. e.g. if the {@code state} is {@code + * State#TERMINATED} when this method is called then this will throw an IllegalStateException. */ void awaitRunning(long timeout, TimeUnit unit) throws TimeoutException; @@ -154,10 +148,10 @@ public interface ApiService { /** * If the service is {@linkplain State#STARTING starting} or {@linkplain State#RUNNING running}, - * this initiates service shutdown and returns immediately. If the service is - * {@linkplain State#NEW new}, it is {@linkplain State#TERMINATED terminated} without having been - * started nor stopped. If the service has already been stopped, this method returns immediately - * without taking action. + * this initiates service shutdown and returns immediately. If the service is {@linkplain + * State#NEW new}, it is {@linkplain State#TERMINATED terminated} without having been started nor + * stopped. If the service has already been stopped, this method returns immediately without + * taking action. * * @return this */ @@ -166,9 +160,8 @@ public interface ApiService { /** * The lifecycle states of a service. * - *

- * The ordering of the {@link State} enum is defined such that if there is a state transition from - * {@code A -> B} then {@code A.compareTo(B) < 0}. N.B. The converse is not true, i.e. if + *

The ordering of the {@link State} enum is defined such that if there is a state transition + * from {@code A -> B} then {@code A.compareTo(B) < 0}. N.B. The converse is not true, i.e. if * {@code A.compareTo(B) < 0} then there is not guaranteed to be a valid state transition * {@code A -> B}. */ @@ -203,8 +196,7 @@ enum State { * A listener for the various state changes that a {@link ApiService} goes through in its * lifecycle. * - *

- * All methods are no-ops by default, implementors should override the ones they care about. + *

All methods are no-ops by default, implementors should override the ones they care about. */ @BetaApi abstract class Listener { @@ -214,29 +206,29 @@ abstract class Listener { * Therefore, if this method is called, no other methods will be called on the {@link Listener}. * * @param from The previous state that is being transitioned from. Failure can occur in any - * state with the exception of {@linkplain State#NEW NEW} or {@linkplain State#TERMINATED - * TERMINATED}. + * state with the exception of {@linkplain State#NEW NEW} or {@linkplain State#TERMINATED + * TERMINATED}. * @param failure The exception that caused the failure. */ public void failed(State from, Throwable failure) {} /** - * Called when the service transitions from {@linkplain State#STARTING STARTING} to - * {@linkplain State#RUNNING RUNNING}. This occurs when a service has successfully started. + * Called when the service transitions from {@linkplain State#STARTING STARTING} to {@linkplain + * State#RUNNING RUNNING}. This occurs when a service has successfully started. */ public void running() {} /** - * Called when the service transitions from {@linkplain State#NEW NEW} to - * {@linkplain State#STARTING STARTING}. This occurs when {@link ApiService#startAsync} is - * called the first time. + * Called when the service transitions from {@linkplain State#NEW NEW} to {@linkplain + * State#STARTING STARTING}. This occurs when {@link ApiService#startAsync} is called the first + * time. */ public void starting() {} /** * Called when the service transitions to the {@linkplain State#STOPPING STOPPING} state. The - * only valid values for {@code from} are {@linkplain State#STARTING STARTING} or - * {@linkplain State#RUNNING RUNNING}. This occurs when {@link ApiService#stopAsync} is called. + * only valid values for {@code from} are {@linkplain State#STARTING STARTING} or {@linkplain + * State#RUNNING RUNNING}. This occurs when {@link ApiService#stopAsync} is called. * * @param from The previous state that is being transitioned from. */ @@ -245,12 +237,12 @@ public void stopping(State from) {} /** * Called when the service transitions to the {@linkplain State#TERMINATED TERMINATED} state. * The {@linkplain State#TERMINATED TERMINATED} state is a terminal state in the transition - * diagram. Therefore, if this method is called, no other methods will be called on the - * {@link Listener}. + * diagram. Therefore, if this method is called, no other methods will be called on the {@link + * Listener}. * * @param from The previous state that is being transitioned from. The only valid values for - * this are {@linkplain State#NEW NEW}, {@linkplain State#RUNNING RUNNING} or - * {@linkplain State#STOPPING STOPPING}. + * this are {@linkplain State#NEW NEW}, {@linkplain State#RUNNING RUNNING} or {@linkplain + * State#STOPPING STOPPING}. */ public void terminated(State from) {} } diff --git a/src/main/java/com/google/api/core/BetaApi.java b/src/main/java/com/google/api/core/BetaApi.java index 0c1d349ee..4b6491b73 100644 --- a/src/main/java/com/google/api/core/BetaApi.java +++ b/src/main/java/com/google/api/core/BetaApi.java @@ -39,16 +39,16 @@ * Indicates a public API that can change at any time, and has no guarantee of API stability and * backward-compatibility. * - *

- * Usage guidelines: + *

Usage guidelines: + * *

    - *
  1. This annotation is used only on APIs with public visibility. Internal interfaces should not - * use it.
  2. - *
  3. This annotation should only be added to new APIs. Adding it to an existing API is considered - * API-breaking.
  4. - *
  5. Removing this annotation from an API gives it stable status, assuming the API doesn't have - * other annotations denoting instability (such as {@link InternalApi} or - * {@link InternalExtensionOnly}).
  6. + *
  7. This annotation is used only on APIs with public visibility. Internal interfaces should not + * use it. + *
  8. This annotation should only be added to new APIs. Adding it to an existing API is + * considered API-breaking. + *
  9. Removing this annotation from an API gives it stable status, assuming the API doesn't have + * other annotations denoting instability (such as {@link InternalApi} or {@link + * InternalExtensionOnly}). *
*/ @BetaApi @@ -63,8 +63,6 @@ }) @Documented public @interface BetaApi { - /** - * Context information such as links to a discussion thread, tracking issue, etc. - */ + /** Context information such as links to a discussion thread, tracking issue, etc. */ String value() default ""; } diff --git a/src/main/java/com/google/api/core/InternalApi.java b/src/main/java/com/google/api/core/InternalApi.java index 67161bcbd..80b76706c 100644 --- a/src/main/java/com/google/api/core/InternalApi.java +++ b/src/main/java/com/google/api/core/InternalApi.java @@ -39,12 +39,10 @@ * Annotates a program element (class, method, package etc) which is internal to its containing * library, not part of the public API, and should not be used by users of the library. * - *

- * This annotation only makes sense on APIs that are not private. Its existence is necessary because - * Java does not have a visibility level for code within a compilation unit. + *

This annotation only makes sense on APIs that are not private. Its existence is necessary + * because Java does not have a visibility level for code within a compilation unit. * - *

- * Adding this annotation to an API is considered API-breaking. + *

Adding this annotation to an API is considered API-breaking. */ @BetaApi @Retention(RetentionPolicy.RUNTIME) @@ -58,8 +56,6 @@ }) @Documented public @interface InternalApi { - /** - * Context information such as "internal to library", "for testing", etc. - */ + /** Context information such as "internal to library", "for testing", etc. */ String value() default ""; } diff --git a/src/main/java/com/google/api/core/InternalExtensionOnly.java b/src/main/java/com/google/api/core/InternalExtensionOnly.java index 5b410e2c8..2304f77d6 100644 --- a/src/main/java/com/google/api/core/InternalExtensionOnly.java +++ b/src/main/java/com/google/api/core/InternalExtensionOnly.java @@ -39,20 +39,18 @@ * Indicates a public API that is stable for callers to use, but has no guarantee of stability for * extension. Consequently, the API should only be extended within the package containing the API. * - *

- * For example: + *

For example: + * *

    - *
  • An interface marked with this annotation can have new methods added to it.
  • - *
  • A non-final class with this annotation can be marked final.
  • - *
  • A class with this annotation can have new abstract methods added.
  • - *
  • a non-final method with this annotation can be marked final.
  • + *
  • An interface marked with this annotation can have new methods added to it. + *
  • A non-final class with this annotation can be marked final. + *
  • A class with this annotation can have new abstract methods added. + *
  • a non-final method with this annotation can be marked final. *
* - *

- * The list above is just for illustration purposes and is not exhaustive. + *

The list above is just for illustration purposes and is not exhaustive. * - *

- * Adding this annotation to an API is considered API-breaking. + *

Adding this annotation to an API is considered API-breaking. */ @BetaApi @Retention(RetentionPolicy.RUNTIME) @@ -66,8 +64,6 @@ }) @Documented public @interface InternalExtensionOnly { - /** - * Context information on why the interface/class is annotated with InternalExtensionOnly. - */ + /** Context information on why the interface/class is annotated with InternalExtensionOnly. */ String value() default ""; } diff --git a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java index 7bf9fabc4..fe77f56d3 100644 --- a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java +++ b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java @@ -32,9 +32,7 @@ import com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture; import com.google.common.util.concurrent.ListenableFuture; -/** - * INTERNAL USE ONLY. Adapter from Guava ListenableFuture to ApiFuture. - */ +/** INTERNAL USE ONLY. Adapter from Guava ListenableFuture to ApiFuture. */ @InternalApi public class ListenableFutureToApiFuture extends SimpleForwardingListenableFuture implements ApiFuture { diff --git a/src/main/java/com/google/api/pathtemplate/PathTemplate.java b/src/main/java/com/google/api/pathtemplate/PathTemplate.java index b23430e6e..cc9f4c110 100644 --- a/src/main/java/com/google/api/pathtemplate/PathTemplate.java +++ b/src/main/java/com/google/api/pathtemplate/PathTemplate.java @@ -52,54 +52,51 @@ /** * Represents a path template. * - *

- * Templates use the syntax of the API platform; see the protobuf of HttpRule for details. A + *

Templates use the syntax of the API platform; see the protobuf of HttpRule for details. A * template consists of a sequence of literals, wildcards, and variable bindings, where each binding - * can have a sub-path. A string representation can be parsed into an instance of - * {@link PathTemplate}, which can then be used to perform matching and instantiation. + * can have a sub-path. A string representation can be parsed into an instance of {@link + * PathTemplate}, which can then be used to perform matching and instantiation. * - *

- * Matching and instantiation deals with unescaping and escaping using URL encoding rules. For - * example, if a template variable for a single segment is instantiated with a string like - * {@code "a/b"}, the slash will be escaped to {@code "%2f"}. (Note that slash will not be escaped - * for a multiple-segment variable, but other characters will). The literals in the template itself - * are not escaped automatically, and must be already URL encoded. + *

Matching and instantiation deals with unescaping and escaping using URL encoding rules. For + * example, if a template variable for a single segment is instantiated with a string like {@code + * "a/b"}, the slash will be escaped to {@code "%2f"}. (Note that slash will not be escaped for a + * multiple-segment variable, but other characters will). The literals in the template itself are + * not escaped automatically, and must be already URL encoded. * - *

- * Here is an example for a template using simple variables: + *

Here is an example for a template using simple variables: * *

{@code
- *   PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
- *   assert template.matches("v2/shelves") == false;
- *   Map<String, String> values = template.match("v1/shelves/s1/books/b1");
- *   Map<String, String> expectedValues = new HashMap<>();
- *   expectedValues.put("shelf", "s1");
- *   expectedValues.put("book", "b1");
- *   assert values.equals(expectedValues);
- *   assert template.instantiate(values).equals("v1/shelves/s1/books/b1");
+ * PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
+ * assert template.matches("v2/shelves") == false;
+ * Map<String, String> values = template.match("v1/shelves/s1/books/b1");
+ * Map<String, String> expectedValues = new HashMap<>();
+ * expectedValues.put("shelf", "s1");
+ * expectedValues.put("book", "b1");
+ * assert values.equals(expectedValues);
+ * assert template.instantiate(values).equals("v1/shelves/s1/books/b1");
  * }
* * Templates can use variables which match sub-paths. Example: * *
{@code
- *   PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}"};
- *   assert template.match("v1/shelves/books/b1") == null;
- *   Map<String, String> expectedValues = new HashMap<>();
- *   expectedValues.put("name", "shelves/s1/books/b1");
- *   assert template.match("v1/shelves/s1/books/b1").equals(expectedValues);
+ * PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}"};
+ * assert template.match("v1/shelves/books/b1") == null;
+ * Map<String, String> expectedValues = new HashMap<>();
+ * expectedValues.put("name", "shelves/s1/books/b1");
+ * assert template.match("v1/shelves/s1/books/b1").equals(expectedValues);
  * }
* * Path templates can also be used with only wildcards. Each wildcard is associated with an implicit * variable {@code $n}, where n is the zero-based position of the wildcard. Example: * *
{@code
- *   PathTemplate template = PathTemplate.create("shelves/*/books/*"};
- *   assert template.match("shelves/books/b1") == null;
- *   Map<String, String> values = template.match("v1/shelves/s1/books/b1");
- *   Map<String, String> expectedValues = new HashMap<>();
- *   expectedValues.put("$0", s1");
- *   expectedValues.put("$1", "b1");
- *   assert values.equals(expectedValues);
+ * PathTemplate template = PathTemplate.create("shelves/*/books/*"};
+ * assert template.match("shelves/books/b1") == null;
+ * Map<String, String> values = template.match("v1/shelves/s1/books/b1");
+ * Map<String, String> expectedValues = new HashMap<>();
+ * expectedValues.put("$0", s1");
+ * expectedValues.put("$1", "b1");
+ * assert values.equals(expectedValues);
  * }
* * Paths input to matching can use URL relative syntax to indicate a host name by prefixing the host @@ -108,14 +105,14 @@ * for URL relative syntax and simple path syntax: * *
{@code
- *   PathTemplate template = PathTemplate.create("shelves/*"};
- *   Map<String, String> expectedValues = new HashMap<>();
- *   expectedValues.put(PathTemplate.HOSTNAME_VAR, "//somewhere.io");
- *   expectedValues.put("$0", s1");
- *   assert template.match("//somewhere.io/shelves/s1").equals(expectedValues);
- *   expectedValues.clear();
- *   expectedValues.put("$0", s1");
- *   assert template.match("shelves/s1").equals(expectedValues);
+ * PathTemplate template = PathTemplate.create("shelves/*"};
+ * Map<String, String> expectedValues = new HashMap<>();
+ * expectedValues.put(PathTemplate.HOSTNAME_VAR, "//somewhere.io");
+ * expectedValues.put("$0", s1");
+ * assert template.match("//somewhere.io/shelves/s1").equals(expectedValues);
+ * expectedValues.clear();
+ * expectedValues.put("$0", s1");
+ * assert template.match("shelves/s1").equals(expectedValues);
  * }
* * For the representation of a resource name see {@link TemplatedResourceName}, which is @@ -124,9 +121,8 @@ public class PathTemplate { /** - * A constant identifying the special variable used for endpoint bindings in the result of - * {@link #matchFromFullName(String)}. It may also contain protocol string, if its provided in the - * input. + * A constant identifying the special variable used for endpoint bindings in the result of {@link + * #matchFromFullName(String)}. It may also contain protocol string, if its provided in the input. */ public static final String HOSTNAME_VAR = "$hostname"; @@ -347,16 +343,15 @@ public PathTemplate withoutVars() { * Returns a path template for the sub-path of the given variable. Example: * *
{@code
-   *   PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}");
-   *   assert template.subTemplate("name").toString().equals("shelves/*/books/*");
+   * PathTemplate template = PathTemplate.create("v1/{name=shelves/*/books/*}");
+   * assert template.subTemplate("name").toString().equals("shelves/*/books/*");
    * }
* * The returned template will never have named variables, but only wildcards, which are dealt with - * in matching and instantiation using '$n'-variables. See the documentation of - * {@link #match(String)} and {@link #instantiate(Map)}, respectively. + * in matching and instantiation using '$n'-variables. See the documentation of {@link + * #match(String)} and {@link #instantiate(Map)}, respectively. * - *

- * For a variable which has no sub-path, this returns a path template with a single wildcard + *

For a variable which has no sub-path, this returns a path template with a single wildcard * ('*'). * * @throws ValidationException if the variable does not exist in the template. @@ -422,9 +417,7 @@ public void validate(String path, String exceptionMessagePrefix) { throw new ValidationException( String.format( "%s: Parameter \"%s\" must be in the form \"%s\"", - exceptionMessagePrefix, - path, - this.toString())); + exceptionMessagePrefix, path, this.toString())); } } @@ -434,30 +427,27 @@ public void validate(String path, String exceptionMessagePrefix) { * throws a ValidationException. The exceptionMessagePrefix parameter will be prepended to the * ValidationException message. * - *

- * If the path starts with '//', the first segment will be interpreted as a host name and stored - * in the variable {@link #HOSTNAME_VAR}. + *

If the path starts with '//', the first segment will be interpreted as a host name and + * stored in the variable {@link #HOSTNAME_VAR}. * - *

- * See the {@link PathTemplate} class documentation for examples. + *

See the {@link PathTemplate} class documentation for examples. * - *

- * For free wildcards in the template, the matching process creates variables named '$n', where + *

For free wildcards in the template, the matching process creates variables named '$n', where * 'n' is the wildcard's position in the template (starting at n=0). For example: * *

{@code
-   *   PathTemplate template = PathTemplate.create("shelves/*/books/*");
-   *   Map<String, String> expectedValues = new HashMap<>();
-   *   expectedValues.put("$0", "s1");
-   *   expectedValues.put("$1", "b1");
-   *   assert template.validatedMatch("shelves/s1/books/b2", "User exception string")
-   *              .equals(expectedValues);
-   *   expectedValues.clear();
-   *   expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
-   *   expectedValues.put("$0", "s1");
-   *   expectedValues.put("$1", "b1");
-   *   assert template.validatedMatch("//somewhere.io/shelves/s1/books/b2", "User exception string")
-   *              .equals(expectedValues);
+   * PathTemplate template = PathTemplate.create("shelves/*/books/*");
+   * Map<String, String> expectedValues = new HashMap<>();
+   * expectedValues.put("$0", "s1");
+   * expectedValues.put("$1", "b1");
+   * assert template.validatedMatch("shelves/s1/books/b2", "User exception string")
+   *            .equals(expectedValues);
+   * expectedValues.clear();
+   * expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
+   * expectedValues.put("$0", "s1");
+   * expectedValues.put("$1", "b1");
+   * assert template.validatedMatch("//somewhere.io/shelves/s1/books/b2", "User exception string")
+   *            .equals(expectedValues);
    * }
* * All matched values will be properly unescaped using URL encoding rules (so long as URL encoding @@ -469,9 +459,7 @@ public Map validatedMatch(String path, String exceptionMessagePr throw new ValidationException( String.format( "%s: Parameter \"%s\" must be in the form \"%s\"", - exceptionMessagePrefix, - path, - this.toString())); + exceptionMessagePrefix, path, this.toString())); } return matchMap; } @@ -486,28 +474,25 @@ public boolean matches(String path) { * will be properly unescaped using URL encoding rules. If the path does not match the template, * null is returned. * - *

- * If the path starts with '//', the first segment will be interpreted as a host name and stored - * in the variable {@link #HOSTNAME_VAR}. + *

If the path starts with '//', the first segment will be interpreted as a host name and + * stored in the variable {@link #HOSTNAME_VAR}. * - *

- * See the {@link PathTemplate} class documentation for examples. + *

See the {@link PathTemplate} class documentation for examples. * - *

- * For free wildcards in the template, the matching process creates variables named '$n', where + *

For free wildcards in the template, the matching process creates variables named '$n', where * 'n' is the wildcard's position in the template (starting at n=0). For example: * *

{@code
-   *   PathTemplate template = PathTemplate.create("shelves/*/books/*");
-   *   Map<String, String> expectedValues = new HashMap<>();
-   *   expectedValues.put("$0", "s1");
-   *   expectedValues.put("$1", "b1");
-   *   assert template.match("shelves/s1/books/b2").equals(expectedValues);
-   *   expectedValues.clear();
-   *   expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
-   *   expectedValues.put("$0", "s1");
-   *   expectedValues.put("$1", "b1");
-   *   assert template.match("//somewhere.io/shelves/s1/books/b2").equals(expectedValues);
+   * PathTemplate template = PathTemplate.create("shelves/*/books/*");
+   * Map<String, String> expectedValues = new HashMap<>();
+   * expectedValues.put("$0", "s1");
+   * expectedValues.put("$1", "b1");
+   * assert template.match("shelves/s1/books/b2").equals(expectedValues);
+   * expectedValues.clear();
+   * expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
+   * expectedValues.put("$0", "s1");
+   * expectedValues.put("$1", "b1");
+   * assert template.match("//somewhere.io/shelves/s1/books/b2").equals(expectedValues);
    * }
* * All matched values will be properly unescaped using URL encoding rules (so long as URL encoding @@ -523,11 +508,11 @@ public Map match(String path) { * it starts with '//' or not. Example: * *
{@code
-   *   Map<String, String> expectedValues = new HashMap<>();
-   *   expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
-   *   expectedValues.put("name", "shelves/s1");
-   *   assert template("{name=shelves/*}").matchFromFullName("somewhere.io/shelves/s1")
-   *            .equals(expectedValues);
+   * Map<String, String> expectedValues = new HashMap<>();
+   * expectedValues.put(HOSTNAME_VAR, "//somewhere.io");
+   * expectedValues.put("name", "shelves/s1");
+   * assert template("{name=shelves/*}").matchFromFullName("somewhere.io/shelves/s1")
+   *          .equals(expectedValues);
    * }
*/ @Nullable @@ -696,10 +681,9 @@ private static String concatCaptures(@Nullable String cur, String next) { * Instantiate the template based on the given variable assignment. Performs proper URL escaping * of variable assignments. * - *

- * Note that free wildcards in the template must have bindings of '$n' variables, where 'n' is the - * position of the wildcard (starting at 0). See the documentation of {@link #match(String)} for - * details. + *

Note that free wildcards in the template must have bindings of '$n' variables, where 'n' is + * the position of the wildcard (starting at 0). See the documentation of {@link #match(String)} + * for details. * * @throws ValidationException if a variable occurs in the template without a binding. */ @@ -721,10 +705,10 @@ public String instantiate(String... keysAndValues) { * using their original syntax. Example: * *

{@code
-   *   PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
-   *   Map<String, String> partialMap = new HashMap<>();
-   *   partialMap.put("shelf", "s1");
-   *   assert template.instantiatePartial(partialMap).equals("v1/shelves/s1/books/{book}");
+   * PathTemplate template = PathTemplate.create("v1/shelves/{shelf}/books/{book}");
+   * Map<String, String> partialMap = new HashMap<>();
+   * partialMap.put("shelf", "s1");
+   * assert template.instantiatePartial(partialMap).equals("v1/shelves/s1/books/{book}");
    * }
* * The result of this call can be used to create a new template. @@ -1020,7 +1004,8 @@ private static boolean isSegmentBeginOrEndInvalid(String seg) { // A segment can start with a delimiter, as long as there is no { right after it. // A segment can end with a delimiter, as long as there is no } right before it. // e.g. Invalid: .{well}-{known}, {well}-{known}- - // Valid: .well-known, .well-{known}, .-~{well-known}, these segments are all considered as literals for matching + // Valid: .well-known, .well-{known}, .-~{well-known}, these segments are all considered as + // literals for matching return (COMPLEX_DELIMITER_PATTERN.matcher(seg.substring(0, 1)).find() && seg.charAt(1) == '{') || (COMPLEX_DELIMITER_PATTERN.matcher(seg.substring(seg.length() - 1)).find() && seg.charAt(seg.length() - 2) == '}'); diff --git a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java index 98312e342..f448f9677 100644 --- a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java +++ b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java @@ -30,7 +30,6 @@ package com.google.api.pathtemplate; -import com.google.api.core.BetaApi; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; @@ -43,25 +42,22 @@ /** * Class for representing and working with resource names. * - *

- * A resource name is represented by {@link PathTemplate}, an assignment to variables in the + *

A resource name is represented by {@link PathTemplate}, an assignment to variables in the * template, and an optional endpoint. The {@code ResourceName} class implements the map interface * (unmodifiable) to work with the variable assignments, and has methods to reproduce the string * representation of the name, to construct new names, and to dereference names into resources. * - *

- * As a resource name essentially represents a match of a path template against a string, it can be - * also used for other purposes than naming resources. However, not all provided methods may make + *

As a resource name essentially represents a match of a path template against a string, it can + * be also used for other purposes than naming resources. However, not all provided methods may make * sense in all applications. * - *

- * Usage examples: + *

Usage examples: * *

{@code
- *   PathTemplate template = PathTemplate.create("shelves/*/books/*");
- *   TemplatedResourceName resourceName = TemplatedResourceName.create(template, "shelves/s1/books/b1");
- *   assert resourceName.get("$1").equals("b1");
- *   assert resourceName.parentName().toString().equals("shelves/s1/books");
+ * PathTemplate template = PathTemplate.create("shelves/*/books/*");
+ * TemplatedResourceName resourceName = TemplatedResourceName.create(template, "shelves/s1/books/b1");
+ * assert resourceName.get("$1").equals("b1");
+ * assert resourceName.parentName().toString().equals("shelves/s1/books");
  * }
*/ public class TemplatedResourceName implements Map { @@ -69,13 +65,9 @@ public class TemplatedResourceName implements Map { // ResourceName Resolver // ===================== - /** - * Represents a resource name resolver which can be registered with this class. - */ + /** Represents a resource name resolver which can be registered with this class. */ public interface Resolver { - /** - * Resolves the resource name into a resource by calling the underlying API. - */ + /** Resolves the resource name into a resource by calling the underlying API. */ T resolve(Class resourceType, TemplatedResourceName name, @Nullable String version); } @@ -180,31 +172,23 @@ public int hashCode() { return Objects.hash(template, endpoint, values); } - /** - * Gets the template associated with this resource name. - */ + /** Gets the template associated with this resource name. */ public PathTemplate template() { return template; } - /** - * Checks whether the resource name has an endpoint. - */ + /** Checks whether the resource name has an endpoint. */ public boolean hasEndpoint() { return endpoint != null; } - /** - * Returns the endpoint of this resource name, or null if none is defined. - */ + /** Returns the endpoint of this resource name, or null if none is defined. */ @Nullable public String endpoint() { return endpoint; } - /** - * Returns a resource name with specified endpoint. - */ + /** Returns a resource name with specified endpoint. */ public TemplatedResourceName withEndpoint(String endpoint) { return new TemplatedResourceName(template, values, Preconditions.checkNotNull(endpoint)); } diff --git a/src/main/java/com/google/api/pathtemplate/ValidationException.java b/src/main/java/com/google/api/pathtemplate/ValidationException.java index 0db919306..3efa388f5 100644 --- a/src/main/java/com/google/api/pathtemplate/ValidationException.java +++ b/src/main/java/com/google/api/pathtemplate/ValidationException.java @@ -68,9 +68,7 @@ public String get() { }); } - /** - * Clears the validation context. - */ + /** Clears the validation context. */ public static void popCurrentThreadValidationContext() { Stack stack = contextLocal.get(); if (stack != null) { @@ -78,9 +76,7 @@ public static void popCurrentThreadValidationContext() { } } - /** - * Construct validation exception with implicit context. - */ + /** Construct validation exception with implicit context. */ public ValidationException(String format, Object... args) { super(message(contextLocal.get(), format, args)); } diff --git a/src/main/java/com/google/api/resourcenames/ResourceName.java b/src/main/java/com/google/api/resourcenames/ResourceName.java index bb88cebe3..e1c54663d 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceName.java +++ b/src/main/java/com/google/api/resourcenames/ResourceName.java @@ -35,9 +35,7 @@ /** An interface that generated resource name types must implement. */ public interface ResourceName { - /** - * Return the map of each field name to its value. - */ + /** Return the map of each field name to its value. */ Map getFieldValuesMap(); /** diff --git a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java index b796f54f5..c0615da41 100644 --- a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java +++ b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java @@ -39,9 +39,7 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** - * Tests for {@link UntypedResourceNameTest}. - */ +/** Tests for {@link UntypedResourceNameTest}. */ @RunWith(JUnit4.class) public class UntypedResourceNameTest { private static final String NAME_STRING = "sunshine"; From 486131ff2abe1f0701eeef874307d779ac185a7f Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 13:03:09 -0500 Subject: [PATCH 09/23] chore: Resolve checkstyle issues --- .kokoro/release/common.sh | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 2 +- .kokoro/trampoline.sh | 2 +- LICENSE | 4 +-- build.gradle | 2 +- java.header | 36 +++++++++++++------ license-checks.xml | 2 +- license-header-javadoc.txt | 4 +-- .../google/api/core/AbstractApiFuture.java | 4 +-- .../google/api/core/AbstractApiService.java | 4 +-- .../com/google/api/core/ApiAsyncFunction.java | 4 +-- .../java/com/google/api/core/ApiClock.java | 4 +-- .../java/com/google/api/core/ApiFunction.java | 4 +-- .../java/com/google/api/core/ApiFuture.java | 4 +-- .../google/api/core/ApiFutureCallback.java | 4 +-- .../api/core/ApiFutureToListenableFuture.java | 4 +-- .../java/com/google/api/core/ApiFutures.java | 4 +-- .../java/com/google/api/core/ApiService.java | 4 +-- .../java/com/google/api/core/BetaApi.java | 4 +-- .../google/api/core/CurrentMillisClock.java | 4 +-- .../google/api/core/ForwardingApiFuture.java | 4 +-- .../java/com/google/api/core/InternalApi.java | 4 +-- .../api/core/InternalExtensionOnly.java | 4 +-- .../api/core/ListenableFutureToApiFuture.java | 4 +-- .../java/com/google/api/core/NanoClock.java | 4 +-- .../google/api/core/SettableApiFuture.java | 4 +-- .../google/api/pathtemplate/PathTemplate.java | 4 +-- .../pathtemplate/TemplatedResourceName.java | 4 +-- .../api/pathtemplate/ValidationException.java | 4 +-- .../api/resourcenames/ResourceName.java | 4 +-- .../resourcenames/ResourceNameFactory.java | 4 +-- .../resourcenames/UntypedResourceName.java | 4 +-- .../com/google/api/core/ApiFuturesTest.java | 4 +-- .../com/google/api/core/ApiServiceTest.java | 4 +-- .../core/ListenableFutureToApiFutureTest.java | 4 +-- .../api/core/SettableApiFutureTest.java | 4 +-- .../api/pathtemplate/PathTemplateTest.java | 4 +-- .../TemplatedResourceNameTest.java | 4 +-- .../UntypedResourceNameTest.java | 4 +-- 41 files changed, 98 insertions(+), 84 deletions(-) diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index 92716fa0b..ebdda7bd8 100755 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.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_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 09e830704..1768db580 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 1e8bb68a9..d22c01248 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.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/stage.sh b/.kokoro/release/stage.sh index ab598b823..17683ae47 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.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/trampoline.sh b/.kokoro/trampoline.sh index e422a90dd..141210d77 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.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/LICENSE b/LICENSE index b442fc4b6..fcb6a6276 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2016, Google Inc. +Copyright 2016 Google LLC Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +9,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/build.gradle b/build.gradle index bed03198f..3717c23d0 100644 --- a/build.gradle +++ b/build.gradle @@ -272,7 +272,7 @@ afterEvaluate { name = 'GoogleAPIs' email = 'googleapis@googlegroups.com' url = 'https://github.com/googleapis' - organization = 'Google, Inc.' + organization = 'Google, LLC' organizationUrl = 'https://www.google.com' } } diff --git a/java.header b/java.header index 3a9b503aa..0ae9545db 100644 --- a/java.header +++ b/java.header @@ -1,15 +1,29 @@ ^/\*$ -^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \* Copyright 20\d\d 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$ +^ \* Redistribution and use in source and binary forms, with or without$ +^ \* modification, are permitted provided that the following conditions are$ +^ \* met:$ ^ \*$ -^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \* \* Redistributions of source code must retain the above copyright$ +^ \* notice, this list of conditions and the following disclaimer.$ +^ \* \* Redistributions in binary form must reproduce the above$ +^ \* copyright notice, this list of conditions and the following disclaimer$ +^ \* in the documentation and/or other materials provided with the$ +^ \* distribution.$ +^ \* \* Neither the name of Google LLC nor the names of its$ +^ \* contributors may be used to endorse or promote products derived from$ +^ \* this software without specific prior written permission.$ ^ \*$ -^ \* 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 SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS$ +^ \* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT$ +^ \* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR$ +^ \* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT$ +^ \* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,$ +^ \* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \(INCLUDING, BUT NOT$ +^ \* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,$ +^ \* DATA, OR PROFITS; OR BUSINESS INTERRUPTION\) HOWEVER CAUSED AND ON ANY$ +^ \* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT$ +^ \* \(INCLUDING NEGLIGENCE OR OTHERWISE\) ARISING IN ANY WAY OUT OF THE USE$ +^ \* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.$ +^ \*/$ \ No newline at end of file diff --git a/license-checks.xml b/license-checks.xml index 6597fced8..a800d524d 100644 --- a/license-checks.xml +++ b/license-checks.xml @@ -5,6 +5,6 @@ - + diff --git a/license-header-javadoc.txt b/license-header-javadoc.txt index 924e0da02..d31410dc3 100644 --- a/license-header-javadoc.txt +++ b/license-header-javadoc.txt @@ -1,5 +1,5 @@ /* - * Copyright 20xx, Google Inc. + * Copyright 20xx Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/AbstractApiFuture.java b/src/main/java/com/google/api/core/AbstractApiFuture.java index 04d17bb01..412f1882b 100644 --- a/src/main/java/com/google/api/core/AbstractApiFuture.java +++ b/src/main/java/com/google/api/core/AbstractApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/AbstractApiService.java b/src/main/java/com/google/api/core/AbstractApiService.java index ce6cc6673..67f2e1d1a 100644 --- a/src/main/java/com/google/api/core/AbstractApiService.java +++ b/src/main/java/com/google/api/core/AbstractApiService.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiAsyncFunction.java b/src/main/java/com/google/api/core/ApiAsyncFunction.java index deb8d48e3..5aa8949b9 100644 --- a/src/main/java/com/google/api/core/ApiAsyncFunction.java +++ b/src/main/java/com/google/api/core/ApiAsyncFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiClock.java b/src/main/java/com/google/api/core/ApiClock.java index c90e80332..c10f5106b 100644 --- a/src/main/java/com/google/api/core/ApiClock.java +++ b/src/main/java/com/google/api/core/ApiClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFunction.java b/src/main/java/com/google/api/core/ApiFunction.java index d03d93493..8fe7bc2d9 100644 --- a/src/main/java/com/google/api/core/ApiFunction.java +++ b/src/main/java/com/google/api/core/ApiFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFuture.java b/src/main/java/com/google/api/core/ApiFuture.java index 523747585..c03693379 100644 --- a/src/main/java/com/google/api/core/ApiFuture.java +++ b/src/main/java/com/google/api/core/ApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutureCallback.java b/src/main/java/com/google/api/core/ApiFutureCallback.java index 78c0defe8..7cfda8f9f 100644 --- a/src/main/java/com/google/api/core/ApiFutureCallback.java +++ b/src/main/java/com/google/api/core/ApiFutureCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java index e7c6e9f78..8c7ad8742 100644 --- a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java +++ b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutures.java b/src/main/java/com/google/api/core/ApiFutures.java index 2189a5e53..d423cb732 100644 --- a/src/main/java/com/google/api/core/ApiFutures.java +++ b/src/main/java/com/google/api/core/ApiFutures.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiService.java b/src/main/java/com/google/api/core/ApiService.java index ee49e78f3..5f6beabb2 100644 --- a/src/main/java/com/google/api/core/ApiService.java +++ b/src/main/java/com/google/api/core/ApiService.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/BetaApi.java b/src/main/java/com/google/api/core/BetaApi.java index 4b6491b73..4b548ce50 100644 --- a/src/main/java/com/google/api/core/BetaApi.java +++ b/src/main/java/com/google/api/core/BetaApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/CurrentMillisClock.java b/src/main/java/com/google/api/core/CurrentMillisClock.java index 62d2efa39..87f1d7055 100644 --- a/src/main/java/com/google/api/core/CurrentMillisClock.java +++ b/src/main/java/com/google/api/core/CurrentMillisClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ForwardingApiFuture.java b/src/main/java/com/google/api/core/ForwardingApiFuture.java index 1d814f4bf..f8b994731 100644 --- a/src/main/java/com/google/api/core/ForwardingApiFuture.java +++ b/src/main/java/com/google/api/core/ForwardingApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/InternalApi.java b/src/main/java/com/google/api/core/InternalApi.java index 80b76706c..8b9326755 100644 --- a/src/main/java/com/google/api/core/InternalApi.java +++ b/src/main/java/com/google/api/core/InternalApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/InternalExtensionOnly.java b/src/main/java/com/google/api/core/InternalExtensionOnly.java index 2304f77d6..3bc6a4030 100644 --- a/src/main/java/com/google/api/core/InternalExtensionOnly.java +++ b/src/main/java/com/google/api/core/InternalExtensionOnly.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java index fe77f56d3..8222a9949 100644 --- a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java +++ b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/NanoClock.java b/src/main/java/com/google/api/core/NanoClock.java index 27d587a7c..bb4f6f20f 100644 --- a/src/main/java/com/google/api/core/NanoClock.java +++ b/src/main/java/com/google/api/core/NanoClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/SettableApiFuture.java b/src/main/java/com/google/api/core/SettableApiFuture.java index babcdd6d4..c7cc46b2f 100644 --- a/src/main/java/com/google/api/core/SettableApiFuture.java +++ b/src/main/java/com/google/api/core/SettableApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/PathTemplate.java b/src/main/java/com/google/api/pathtemplate/PathTemplate.java index cc9f4c110..2d2c40e4e 100644 --- a/src/main/java/com/google/api/pathtemplate/PathTemplate.java +++ b/src/main/java/com/google/api/pathtemplate/PathTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java index f448f9677..98a5075e1 100644 --- a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java +++ b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/ValidationException.java b/src/main/java/com/google/api/pathtemplate/ValidationException.java index 3efa388f5..aaef88e68 100644 --- a/src/main/java/com/google/api/pathtemplate/ValidationException.java +++ b/src/main/java/com/google/api/pathtemplate/ValidationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/ResourceName.java b/src/main/java/com/google/api/resourcenames/ResourceName.java index e1c54663d..327d9fca4 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceName.java +++ b/src/main/java/com/google/api/resourcenames/ResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java index 8f0099ce4..8eea3dc37 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java +++ b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2018, Google Inc. + * Copyright 2018 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java index 2dcf7fd3d..6e5ba3a6a 100644 --- a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java +++ b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ApiFuturesTest.java b/src/test/java/com/google/api/core/ApiFuturesTest.java index 34dc41dda..7b697abc6 100644 --- a/src/test/java/com/google/api/core/ApiFuturesTest.java +++ b/src/test/java/com/google/api/core/ApiFuturesTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ApiServiceTest.java b/src/test/java/com/google/api/core/ApiServiceTest.java index 19b10af47..28c02b172 100644 --- a/src/test/java/com/google/api/core/ApiServiceTest.java +++ b/src/test/java/com/google/api/core/ApiServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java index 9bc06dae0..78fe043ba 100644 --- a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java +++ b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/SettableApiFutureTest.java b/src/test/java/com/google/api/core/SettableApiFutureTest.java index a4cff9b08..4ece8ab4b 100644 --- a/src/test/java/com/google/api/core/SettableApiFutureTest.java +++ b/src/test/java/com/google/api/core/SettableApiFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017, Google Inc. + * Copyright 2017 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java index 47747a115..37f1c26fc 100644 --- a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java +++ b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java index bb143932f..6dda9b662 100644 --- a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java +++ b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016, Google Inc. + * Copyright 2016 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java index c0615da41..8253171b5 100644 --- a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java +++ b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018, Google Inc. + * Copyright 2018 Google LLC * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google Inc. nor the names of its + * * Neither the name of Google LLC nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * From 3349e12fef1d75aa0e27255cafe8f633111f1b50 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 13:12:38 -0500 Subject: [PATCH 10/23] chore: Empty commit From a25d2665d24d11e55caa27ddba29ea951b0393da Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 13:17:49 -0500 Subject: [PATCH 11/23] chore: Run on java 11 or lint job --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d61855465..c178bb7a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,7 +67,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: temurin - java-version: 8 + java-version: 11 - run: java -version - uses: actions/cache@v3 id: mvn-cache From 27ebf3bfe0a7ec9e311510aede3a16d8eef9088c Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 13:20:46 -0500 Subject: [PATCH 12/23] chore: Change to use temurin --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/downstream.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c178bb7a7..dafb0a458 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,12 +16,12 @@ jobs: - uses: actions/setup-java@v3 with: java-version: 8 - distribution: zulu + distribution: temurin - run: echo "JAVA8_HOME=${JAVA_HOME}" >> $GITHUB_ENV - uses: actions/setup-java@v3 with: java-version: 11 - distribution: zulu + distribution: temurin - run: echo "JAVA11_HOME=${JAVA_HOME}" >> $GITHUB_ENV - uses: actions/cache@v3 id: mvn-cache diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index a61ff8d7a..250194a16 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -136,7 +136,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v3 with: - distribution: zulu + distribution: temurin java-version: ${{matrix.java}} - run: java -version - run: sudo apt-get update -y From ef10974317b5eb040b1513172fccf8a740baad03 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Fri, 18 Nov 2022 13:12:38 -0500 Subject: [PATCH 13/23] chore: Empty commit From 40cb729d15e7685e0c353b25febea04f42d4fbca Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 22 Nov 2022 15:24:18 -0500 Subject: [PATCH 14/23] chore: Update for PR comments --- .github/sync-repo-settings.yaml | 6 ++++++ .kokoro/build.sh | 16 ---------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 522f7e1bd..a1587888c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -8,6 +8,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -18,6 +19,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -28,6 +30,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -38,6 +41,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -48,6 +52,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true @@ -58,6 +63,7 @@ branchProtectionRules: - units (8) - units (11) - units (17) + - lint - cla/google requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 8e67c67ea..ac6bd2521 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -65,20 +65,4 @@ case ${JOB_TYPE} in 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_FLAKYBOT}" == "true" ]]; then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot - ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-cloud-java -fi - -echo "exiting with ${RETURN_CODE}" -exit ${RETURN_CODE} \ No newline at end of file From 9eecd527e1a2962085f798051647f01f03683103 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 22 Nov 2022 15:29:34 -0500 Subject: [PATCH 15/23] chore: Add clirr check in GH actions --- .github/workflows/ci.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dafb0a458..663e62aaf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,23 @@ on: pull_request: name: ci jobs: + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 8 + - run: echo "JAVA8_HOME=${JAVA_HOME}" >> $GITHUB_ENV + - uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + - run: echo "JAVA11_HOME=${JAVA_HOME}" >> $GITHUB_ENV + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr units-8: name: units (8) runs-on: ubuntu-latest From 8c30df33b61b21e6c8851824d59e7444ca21b72b Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 22 Nov 2022 15:30:50 -0500 Subject: [PATCH 16/23] chore: Revert build.gradle to google, inc --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2b200571f..feb8de784 100644 --- a/build.gradle +++ b/build.gradle @@ -272,7 +272,7 @@ afterEvaluate { name = 'GoogleAPIs' email = 'googleapis@googlegroups.com' url = 'https://github.com/googleapis' - organization = 'Google, LLC' + organization = 'Google, Inc.' organizationUrl = 'https://www.google.com' } } From ad1987ef8b698028e740bd3b88ff1fa00e79ff27 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 28 Nov 2022 13:24:03 -0500 Subject: [PATCH 17/23] chore: Revert license to Inc. --- .kokoro/coerce_logs.sh | 2 +- .kokoro/common.sh | 2 +- .kokoro/downstream-client-library-check.sh | 2 +- .kokoro/populate-secrets.sh | 2 +- .kokoro/release/common.sh | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 2 +- .kokoro/trampoline.sh | 2 +- LICENSE | 2 +- java.header | 2 +- license-header-javadoc.txt | 2 +- src/main/java/com/google/api/core/AbstractApiFuture.java | 2 +- src/main/java/com/google/api/core/AbstractApiService.java | 2 +- src/main/java/com/google/api/core/ApiAsyncFunction.java | 2 +- src/main/java/com/google/api/core/ApiClock.java | 2 +- src/main/java/com/google/api/core/ApiFunction.java | 2 +- src/main/java/com/google/api/core/ApiFuture.java | 2 +- src/main/java/com/google/api/core/ApiFutureCallback.java | 2 +- .../java/com/google/api/core/ApiFutureToListenableFuture.java | 2 +- src/main/java/com/google/api/core/ApiFutures.java | 2 +- src/main/java/com/google/api/core/ApiService.java | 2 +- src/main/java/com/google/api/core/BetaApi.java | 2 +- src/main/java/com/google/api/core/CurrentMillisClock.java | 2 +- src/main/java/com/google/api/core/ForwardingApiFuture.java | 2 +- src/main/java/com/google/api/core/InternalApi.java | 2 +- src/main/java/com/google/api/core/InternalExtensionOnly.java | 2 +- .../java/com/google/api/core/ListenableFutureToApiFuture.java | 2 +- src/main/java/com/google/api/core/NanoClock.java | 2 +- src/main/java/com/google/api/core/SettableApiFuture.java | 2 +- src/main/java/com/google/api/pathtemplate/PathTemplate.java | 2 +- .../java/com/google/api/pathtemplate/TemplatedResourceName.java | 2 +- .../java/com/google/api/pathtemplate/ValidationException.java | 2 +- src/main/java/com/google/api/resourcenames/ResourceName.java | 2 +- .../java/com/google/api/resourcenames/ResourceNameFactory.java | 2 +- .../java/com/google/api/resourcenames/UntypedResourceName.java | 2 +- src/test/java/com/google/api/core/ApiFuturesTest.java | 2 +- src/test/java/com/google/api/core/ApiServiceTest.java | 2 +- .../com/google/api/core/ListenableFutureToApiFutureTest.java | 2 +- src/test/java/com/google/api/core/SettableApiFutureTest.java | 2 +- src/test/java/com/google/api/pathtemplate/PathTemplateTest.java | 2 +- .../com/google/api/pathtemplate/TemplatedResourceNameTest.java | 2 +- .../com/google/api/resourcenames/UntypedResourceNameTest.java | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh index 7b153733d..a12d0ebce 100755 --- a/.kokoro/coerce_logs.sh +++ b/.kokoro/coerce_logs.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45a..7c9b9cb30 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2020, Google Inc. # # 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/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index b3751f630..ac3136585 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC +# Copyright 2020, Google Inc. # # 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/populate-secrets.sh b/.kokoro/populate-secrets.sh index f52514257..5dcbfc242 100755 --- a/.kokoro/populate-secrets.sh +++ b/.kokoro/populate-secrets.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020 Google LLC. +# Copyright 2020, Google Inc.. # # 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/common.sh b/.kokoro/release/common.sh index ebdda7bd8..8c1e765f0 100755 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 1768db580..0ea821fc4 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index d22c01248..2f38b9fe2 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 17683ae47..15aea0052 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index 141210d77..6dbda32ae 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019 Google LLC +# 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. diff --git a/LICENSE b/LICENSE index fcb6a6276..12d5b0ff7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2016 Google LLC +Copyright 2016, Google Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/java.header b/java.header index 0ae9545db..999dc8d7c 100644 --- a/java.header +++ b/java.header @@ -1,5 +1,5 @@ ^/\*$ -^ \* Copyright 20\d\d Google LLC$ +^ \* Copyright 20\d\d, Google Inc.$ ^ \*$ ^ \* Redistribution and use in source and binary forms, with or without$ ^ \* modification, are permitted provided that the following conditions are$ diff --git a/license-header-javadoc.txt b/license-header-javadoc.txt index d31410dc3..980e106f8 100644 --- a/license-header-javadoc.txt +++ b/license-header-javadoc.txt @@ -1,5 +1,5 @@ /* - * Copyright 20xx Google LLC + * Copyright 20xx, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/AbstractApiFuture.java b/src/main/java/com/google/api/core/AbstractApiFuture.java index 412f1882b..522f63865 100644 --- a/src/main/java/com/google/api/core/AbstractApiFuture.java +++ b/src/main/java/com/google/api/core/AbstractApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/AbstractApiService.java b/src/main/java/com/google/api/core/AbstractApiService.java index 67f2e1d1a..c397fed7b 100644 --- a/src/main/java/com/google/api/core/AbstractApiService.java +++ b/src/main/java/com/google/api/core/AbstractApiService.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiAsyncFunction.java b/src/main/java/com/google/api/core/ApiAsyncFunction.java index 5aa8949b9..af3afc9d9 100644 --- a/src/main/java/com/google/api/core/ApiAsyncFunction.java +++ b/src/main/java/com/google/api/core/ApiAsyncFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiClock.java b/src/main/java/com/google/api/core/ApiClock.java index c10f5106b..0a0fa6805 100644 --- a/src/main/java/com/google/api/core/ApiClock.java +++ b/src/main/java/com/google/api/core/ApiClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiFunction.java b/src/main/java/com/google/api/core/ApiFunction.java index 8fe7bc2d9..114ecbc8f 100644 --- a/src/main/java/com/google/api/core/ApiFunction.java +++ b/src/main/java/com/google/api/core/ApiFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiFuture.java b/src/main/java/com/google/api/core/ApiFuture.java index c03693379..337345abe 100644 --- a/src/main/java/com/google/api/core/ApiFuture.java +++ b/src/main/java/com/google/api/core/ApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiFutureCallback.java b/src/main/java/com/google/api/core/ApiFutureCallback.java index 7cfda8f9f..09234676c 100644 --- a/src/main/java/com/google/api/core/ApiFutureCallback.java +++ b/src/main/java/com/google/api/core/ApiFutureCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java index 8c7ad8742..a89c95429 100644 --- a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java +++ b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiFutures.java b/src/main/java/com/google/api/core/ApiFutures.java index d423cb732..dd6c368a1 100644 --- a/src/main/java/com/google/api/core/ApiFutures.java +++ b/src/main/java/com/google/api/core/ApiFutures.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ApiService.java b/src/main/java/com/google/api/core/ApiService.java index 5f6beabb2..670d1ecb5 100644 --- a/src/main/java/com/google/api/core/ApiService.java +++ b/src/main/java/com/google/api/core/ApiService.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/BetaApi.java b/src/main/java/com/google/api/core/BetaApi.java index 4b548ce50..3ab98573e 100644 --- a/src/main/java/com/google/api/core/BetaApi.java +++ b/src/main/java/com/google/api/core/BetaApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/CurrentMillisClock.java b/src/main/java/com/google/api/core/CurrentMillisClock.java index 87f1d7055..d8b7b5acf 100644 --- a/src/main/java/com/google/api/core/CurrentMillisClock.java +++ b/src/main/java/com/google/api/core/CurrentMillisClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ForwardingApiFuture.java b/src/main/java/com/google/api/core/ForwardingApiFuture.java index f8b994731..053972fc7 100644 --- a/src/main/java/com/google/api/core/ForwardingApiFuture.java +++ b/src/main/java/com/google/api/core/ForwardingApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/InternalApi.java b/src/main/java/com/google/api/core/InternalApi.java index 8b9326755..8b7032476 100644 --- a/src/main/java/com/google/api/core/InternalApi.java +++ b/src/main/java/com/google/api/core/InternalApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/InternalExtensionOnly.java b/src/main/java/com/google/api/core/InternalExtensionOnly.java index 3bc6a4030..e1491b8a5 100644 --- a/src/main/java/com/google/api/core/InternalExtensionOnly.java +++ b/src/main/java/com/google/api/core/InternalExtensionOnly.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java index 8222a9949..1fa62d9e8 100644 --- a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java +++ b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/NanoClock.java b/src/main/java/com/google/api/core/NanoClock.java index bb4f6f20f..ccc6be4c1 100644 --- a/src/main/java/com/google/api/core/NanoClock.java +++ b/src/main/java/com/google/api/core/NanoClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/core/SettableApiFuture.java b/src/main/java/com/google/api/core/SettableApiFuture.java index c7cc46b2f..38c265a99 100644 --- a/src/main/java/com/google/api/core/SettableApiFuture.java +++ b/src/main/java/com/google/api/core/SettableApiFuture.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/pathtemplate/PathTemplate.java b/src/main/java/com/google/api/pathtemplate/PathTemplate.java index 2d2c40e4e..922a91838 100644 --- a/src/main/java/com/google/api/pathtemplate/PathTemplate.java +++ b/src/main/java/com/google/api/pathtemplate/PathTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java index 98a5075e1..5802e4e59 100644 --- a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java +++ b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/pathtemplate/ValidationException.java b/src/main/java/com/google/api/pathtemplate/ValidationException.java index aaef88e68..25f56d24a 100644 --- a/src/main/java/com/google/api/pathtemplate/ValidationException.java +++ b/src/main/java/com/google/api/pathtemplate/ValidationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/resourcenames/ResourceName.java b/src/main/java/com/google/api/resourcenames/ResourceName.java index 327d9fca4..3c9f66f37 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceName.java +++ b/src/main/java/com/google/api/resourcenames/ResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java index 8eea3dc37..6b2047a9a 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java +++ b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Google LLC + * Copyright 2018, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java index 6e5ba3a6a..95b35cb19 100644 --- a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java +++ b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/core/ApiFuturesTest.java b/src/test/java/com/google/api/core/ApiFuturesTest.java index 7b697abc6..d5e7e6a59 100644 --- a/src/test/java/com/google/api/core/ApiFuturesTest.java +++ b/src/test/java/com/google/api/core/ApiFuturesTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/core/ApiServiceTest.java b/src/test/java/com/google/api/core/ApiServiceTest.java index 28c02b172..c5b97f2c5 100644 --- a/src/test/java/com/google/api/core/ApiServiceTest.java +++ b/src/test/java/com/google/api/core/ApiServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java index 78fe043ba..cb8c40b43 100644 --- a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java +++ b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/core/SettableApiFutureTest.java b/src/test/java/com/google/api/core/SettableApiFutureTest.java index 4ece8ab4b..821cebc0a 100644 --- a/src/test/java/com/google/api/core/SettableApiFutureTest.java +++ b/src/test/java/com/google/api/core/SettableApiFutureTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 Google LLC + * Copyright 2017, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java index 37f1c26fc..59b9dbb64 100644 --- a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java +++ b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java index 6dda9b662..3f75238ba 100644 --- a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java +++ b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google LLC + * Copyright 2016, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are diff --git a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java index 8253171b5..a62935996 100644 --- a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java +++ b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Google LLC + * Copyright 2018, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are From bc30ea9ca8f9352cc7b73744a5b0ab9045d7b992 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 28 Nov 2022 13:25:46 -0500 Subject: [PATCH 18/23] chore: Revert license to Inc. --- LICENSE | 2 +- java.header | 2 +- license-header-javadoc.txt | 2 +- src/main/java/com/google/api/core/AbstractApiFuture.java | 2 +- src/main/java/com/google/api/core/AbstractApiService.java | 2 +- src/main/java/com/google/api/core/ApiAsyncFunction.java | 2 +- src/main/java/com/google/api/core/ApiClock.java | 2 +- src/main/java/com/google/api/core/ApiFunction.java | 2 +- src/main/java/com/google/api/core/ApiFuture.java | 2 +- src/main/java/com/google/api/core/ApiFutureCallback.java | 2 +- .../java/com/google/api/core/ApiFutureToListenableFuture.java | 2 +- src/main/java/com/google/api/core/ApiFutures.java | 2 +- src/main/java/com/google/api/core/ApiService.java | 2 +- src/main/java/com/google/api/core/BetaApi.java | 2 +- src/main/java/com/google/api/core/CurrentMillisClock.java | 2 +- src/main/java/com/google/api/core/ForwardingApiFuture.java | 2 +- src/main/java/com/google/api/core/InternalApi.java | 2 +- src/main/java/com/google/api/core/InternalExtensionOnly.java | 2 +- .../java/com/google/api/core/ListenableFutureToApiFuture.java | 2 +- src/main/java/com/google/api/core/NanoClock.java | 2 +- src/main/java/com/google/api/core/SettableApiFuture.java | 2 +- src/main/java/com/google/api/pathtemplate/PathTemplate.java | 2 +- .../java/com/google/api/pathtemplate/TemplatedResourceName.java | 2 +- .../java/com/google/api/pathtemplate/ValidationException.java | 2 +- src/main/java/com/google/api/resourcenames/ResourceName.java | 2 +- .../java/com/google/api/resourcenames/ResourceNameFactory.java | 2 +- .../java/com/google/api/resourcenames/UntypedResourceName.java | 2 +- src/test/java/com/google/api/core/ApiFuturesTest.java | 2 +- src/test/java/com/google/api/core/ApiServiceTest.java | 2 +- .../com/google/api/core/ListenableFutureToApiFutureTest.java | 2 +- src/test/java/com/google/api/core/SettableApiFutureTest.java | 2 +- src/test/java/com/google/api/pathtemplate/PathTemplateTest.java | 2 +- .../com/google/api/pathtemplate/TemplatedResourceNameTest.java | 2 +- .../com/google/api/resourcenames/UntypedResourceNameTest.java | 2 +- 34 files changed, 34 insertions(+), 34 deletions(-) diff --git a/LICENSE b/LICENSE index 12d5b0ff7..b442fc4b6 100644 --- a/LICENSE +++ b/LICENSE @@ -9,7 +9,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google LLC nor the names of its + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/java.header b/java.header index 999dc8d7c..7530699a3 100644 --- a/java.header +++ b/java.header @@ -11,7 +11,7 @@ ^ \* copyright notice, this list of conditions and the following disclaimer$ ^ \* in the documentation and/or other materials provided with the$ ^ \* distribution.$ -^ \* \* Neither the name of Google LLC nor the names of its$ +^ \* \* Neither the name of Google Inc. nor the names of its$ ^ \* contributors may be used to endorse or promote products derived from$ ^ \* this software without specific prior written permission.$ ^ \*$ diff --git a/license-header-javadoc.txt b/license-header-javadoc.txt index 980e106f8..924e0da02 100644 --- a/license-header-javadoc.txt +++ b/license-header-javadoc.txt @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/AbstractApiFuture.java b/src/main/java/com/google/api/core/AbstractApiFuture.java index 522f63865..04d17bb01 100644 --- a/src/main/java/com/google/api/core/AbstractApiFuture.java +++ b/src/main/java/com/google/api/core/AbstractApiFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/AbstractApiService.java b/src/main/java/com/google/api/core/AbstractApiService.java index c397fed7b..ce6cc6673 100644 --- a/src/main/java/com/google/api/core/AbstractApiService.java +++ b/src/main/java/com/google/api/core/AbstractApiService.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiAsyncFunction.java b/src/main/java/com/google/api/core/ApiAsyncFunction.java index af3afc9d9..deb8d48e3 100644 --- a/src/main/java/com/google/api/core/ApiAsyncFunction.java +++ b/src/main/java/com/google/api/core/ApiAsyncFunction.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiClock.java b/src/main/java/com/google/api/core/ApiClock.java index 0a0fa6805..c90e80332 100644 --- a/src/main/java/com/google/api/core/ApiClock.java +++ b/src/main/java/com/google/api/core/ApiClock.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFunction.java b/src/main/java/com/google/api/core/ApiFunction.java index 114ecbc8f..d03d93493 100644 --- a/src/main/java/com/google/api/core/ApiFunction.java +++ b/src/main/java/com/google/api/core/ApiFunction.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFuture.java b/src/main/java/com/google/api/core/ApiFuture.java index 337345abe..523747585 100644 --- a/src/main/java/com/google/api/core/ApiFuture.java +++ b/src/main/java/com/google/api/core/ApiFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutureCallback.java b/src/main/java/com/google/api/core/ApiFutureCallback.java index 09234676c..78c0defe8 100644 --- a/src/main/java/com/google/api/core/ApiFutureCallback.java +++ b/src/main/java/com/google/api/core/ApiFutureCallback.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java index a89c95429..e7c6e9f78 100644 --- a/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java +++ b/src/main/java/com/google/api/core/ApiFutureToListenableFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiFutures.java b/src/main/java/com/google/api/core/ApiFutures.java index dd6c368a1..2189a5e53 100644 --- a/src/main/java/com/google/api/core/ApiFutures.java +++ b/src/main/java/com/google/api/core/ApiFutures.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ApiService.java b/src/main/java/com/google/api/core/ApiService.java index 670d1ecb5..ee49e78f3 100644 --- a/src/main/java/com/google/api/core/ApiService.java +++ b/src/main/java/com/google/api/core/ApiService.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/BetaApi.java b/src/main/java/com/google/api/core/BetaApi.java index 3ab98573e..4b6491b73 100644 --- a/src/main/java/com/google/api/core/BetaApi.java +++ b/src/main/java/com/google/api/core/BetaApi.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/CurrentMillisClock.java b/src/main/java/com/google/api/core/CurrentMillisClock.java index d8b7b5acf..62d2efa39 100644 --- a/src/main/java/com/google/api/core/CurrentMillisClock.java +++ b/src/main/java/com/google/api/core/CurrentMillisClock.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ForwardingApiFuture.java b/src/main/java/com/google/api/core/ForwardingApiFuture.java index 053972fc7..1d814f4bf 100644 --- a/src/main/java/com/google/api/core/ForwardingApiFuture.java +++ b/src/main/java/com/google/api/core/ForwardingApiFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/InternalApi.java b/src/main/java/com/google/api/core/InternalApi.java index 8b7032476..80b76706c 100644 --- a/src/main/java/com/google/api/core/InternalApi.java +++ b/src/main/java/com/google/api/core/InternalApi.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/InternalExtensionOnly.java b/src/main/java/com/google/api/core/InternalExtensionOnly.java index e1491b8a5..2304f77d6 100644 --- a/src/main/java/com/google/api/core/InternalExtensionOnly.java +++ b/src/main/java/com/google/api/core/InternalExtensionOnly.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java index 1fa62d9e8..fe77f56d3 100644 --- a/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java +++ b/src/main/java/com/google/api/core/ListenableFutureToApiFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/NanoClock.java b/src/main/java/com/google/api/core/NanoClock.java index ccc6be4c1..27d587a7c 100644 --- a/src/main/java/com/google/api/core/NanoClock.java +++ b/src/main/java/com/google/api/core/NanoClock.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/core/SettableApiFuture.java b/src/main/java/com/google/api/core/SettableApiFuture.java index 38c265a99..babcdd6d4 100644 --- a/src/main/java/com/google/api/core/SettableApiFuture.java +++ b/src/main/java/com/google/api/core/SettableApiFuture.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/PathTemplate.java b/src/main/java/com/google/api/pathtemplate/PathTemplate.java index 922a91838..cc9f4c110 100644 --- a/src/main/java/com/google/api/pathtemplate/PathTemplate.java +++ b/src/main/java/com/google/api/pathtemplate/PathTemplate.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java index 5802e4e59..f448f9677 100644 --- a/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java +++ b/src/main/java/com/google/api/pathtemplate/TemplatedResourceName.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/pathtemplate/ValidationException.java b/src/main/java/com/google/api/pathtemplate/ValidationException.java index 25f56d24a..3efa388f5 100644 --- a/src/main/java/com/google/api/pathtemplate/ValidationException.java +++ b/src/main/java/com/google/api/pathtemplate/ValidationException.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/ResourceName.java b/src/main/java/com/google/api/resourcenames/ResourceName.java index 3c9f66f37..e1c54663d 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceName.java +++ b/src/main/java/com/google/api/resourcenames/ResourceName.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java index 6b2047a9a..8f0099ce4 100644 --- a/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java +++ b/src/main/java/com/google/api/resourcenames/ResourceNameFactory.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java index 95b35cb19..2dcf7fd3d 100644 --- a/src/main/java/com/google/api/resourcenames/UntypedResourceName.java +++ b/src/main/java/com/google/api/resourcenames/UntypedResourceName.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ApiFuturesTest.java b/src/test/java/com/google/api/core/ApiFuturesTest.java index d5e7e6a59..34dc41dda 100644 --- a/src/test/java/com/google/api/core/ApiFuturesTest.java +++ b/src/test/java/com/google/api/core/ApiFuturesTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ApiServiceTest.java b/src/test/java/com/google/api/core/ApiServiceTest.java index c5b97f2c5..19b10af47 100644 --- a/src/test/java/com/google/api/core/ApiServiceTest.java +++ b/src/test/java/com/google/api/core/ApiServiceTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java index cb8c40b43..9bc06dae0 100644 --- a/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java +++ b/src/test/java/com/google/api/core/ListenableFutureToApiFutureTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/core/SettableApiFutureTest.java b/src/test/java/com/google/api/core/SettableApiFutureTest.java index 821cebc0a..a4cff9b08 100644 --- a/src/test/java/com/google/api/core/SettableApiFutureTest.java +++ b/src/test/java/com/google/api/core/SettableApiFutureTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java index 59b9dbb64..47747a115 100644 --- a/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java +++ b/src/test/java/com/google/api/pathtemplate/PathTemplateTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java index 3f75238ba..bb143932f 100644 --- a/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java +++ b/src/test/java/com/google/api/pathtemplate/TemplatedResourceNameTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java index a62935996..c0615da41 100644 --- a/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java +++ b/src/test/java/com/google/api/resourcenames/UntypedResourceNameTest.java @@ -11,7 +11,7 @@ * copyright notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. - * * Neither the name of Google LLC nor the names of its + * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * From e5357ad6eba46703955ab9bce9c25b09704baf61 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 28 Nov 2022 13:32:37 -0500 Subject: [PATCH 19/23] chore: Update license in files --- .kokoro/build.sh | 2 +- .kokoro/coerce_logs.sh | 2 +- .kokoro/common.sh | 2 +- .kokoro/downstream-client-library-check.sh | 2 +- java.header | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index ac6bd2521..ba6d6192a 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2022 Google LLC +# 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/coerce_logs.sh b/.kokoro/coerce_logs.sh index a12d0ebce..7b153733d 100755 --- a/.kokoro/coerce_logs.sh +++ b/.kokoro/coerce_logs.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/common.sh b/.kokoro/common.sh index 7c9b9cb30..ace89f45a 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020, Google Inc. +# 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. diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh index ac3136585..b3751f630 100755 --- a/.kokoro/downstream-client-library-check.sh +++ b/.kokoro/downstream-client-library-check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020, Google Inc. +# 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. diff --git a/java.header b/java.header index 7530699a3..7e518c100 100644 --- a/java.header +++ b/java.header @@ -1,5 +1,5 @@ ^/\*$ -^ \* Copyright 20\d\d, Google Inc.$ +^ \* Copyright 20\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ ^ \*$ ^ \* Redistribution and use in source and binary forms, with or without$ ^ \* modification, are permitted provided that the following conditions are$ @@ -11,7 +11,7 @@ ^ \* copyright notice, this list of conditions and the following disclaimer$ ^ \* in the documentation and/or other materials provided with the$ ^ \* distribution.$ -^ \* \* Neither the name of Google Inc. nor the names of its$ +^ \* \* Neither the name of Google (Inc\.|LLC) nor the names of its$ ^ \* contributors may be used to endorse or promote products derived from$ ^ \* this software without specific prior written permission.$ ^ \*$ From 24f802901024a0caf3b68bb22e0217fb3bb923b2 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 28 Nov 2022 13:39:52 -0500 Subject: [PATCH 20/23] chore: Update the rest of the files to correct license --- .kokoro/populate-secrets.sh | 2 +- .kokoro/release/common.sh | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 2 +- .kokoro/trampoline.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh index 5dcbfc242..f52514257 100755 --- a/.kokoro/populate-secrets.sh +++ b/.kokoro/populate-secrets.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2020, Google Inc.. +# 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. diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh index 8c1e765f0..92716fa0b 100755 --- a/.kokoro/release/common.sh +++ b/.kokoro/release/common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019, Google Inc. +# 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. diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 0ea821fc4..09e830704 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 Inc. # # 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 2f38b9fe2..1e8bb68a9 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019, Google Inc. +# 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. diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 15aea0052..ab598b823 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019, Google Inc. +# 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. diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh index 6dbda32ae..e422a90dd 100644 --- a/.kokoro/trampoline.sh +++ b/.kokoro/trampoline.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019, Google Inc. +# 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. From 037acc95bb41f19ee9cd9367f32bcbfb11907eb2 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 29 Nov 2022 10:21:31 -0500 Subject: [PATCH 21/23] chore: temp add in old ci workflows for status checks --- .github/workflows/ci.yaml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 663e62aaf..25f2d16c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,25 @@ on: pull_request: name: ci jobs: + units: + runs-on: ubuntu-latest + env: + # Customize the JVM maximum heap limit + JVM_OPTS: -Xmx3200m + TERM: dumb + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 clirr: runs-on: ubuntu-latest steps: @@ -23,7 +42,7 @@ jobs: env: JOB_TYPE: clirr units-8: - name: units (8) + name: units (8) - Maven runs-on: ubuntu-latest steps: - name: Get current week within the year @@ -49,7 +68,7 @@ jobs: env: JOB_TYPE: test JOB_NAME: units-8 - units: + units-maven: runs-on: ubuntu-latest strategy: fail-fast: false From e9b99578da93a5061cdfa39808ad808f9ecfac71 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 29 Nov 2022 10:27:38 -0500 Subject: [PATCH 22/23] chore: temp remove required status checks --- .github/sync-repo-settings.yaml | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index a1587888c..4a0fba9f7 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -5,9 +5,9 @@ branchProtectionRules: - pattern: main isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -16,9 +16,9 @@ branchProtectionRules: - pattern: 1.10.1-sp isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -27,9 +27,9 @@ branchProtectionRules: - pattern: java7 isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -38,9 +38,9 @@ branchProtectionRules: - pattern: 2.0.x isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -49,9 +49,9 @@ branchProtectionRules: - pattern: 2.1.x isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -60,9 +60,9 @@ branchProtectionRules: - pattern: 2.2.x isAdminEnforced: true requiredStatusCheckContexts: - - units (8) - - units (11) - - units (17) +# - units (8) +# - units (11) +# - units (17) - lint - cla/google requiredApprovingReviewCount: 1 From b5cb7b27ddf30449a3ee9516a29fa1ab28b33dfb Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 29 Nov 2022 10:29:45 -0500 Subject: [PATCH 23/23] chore: revert previous commit --- .github/sync-repo-settings.yaml | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4a0fba9f7..a1587888c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -5,9 +5,9 @@ branchProtectionRules: - pattern: main isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -16,9 +16,9 @@ branchProtectionRules: - pattern: 1.10.1-sp isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -27,9 +27,9 @@ branchProtectionRules: - pattern: java7 isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -38,9 +38,9 @@ branchProtectionRules: - pattern: 2.0.x isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -49,9 +49,9 @@ branchProtectionRules: - pattern: 2.1.x isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1 @@ -60,9 +60,9 @@ branchProtectionRules: - pattern: 2.2.x isAdminEnforced: true requiredStatusCheckContexts: -# - units (8) -# - units (11) -# - units (17) + - units (8) + - units (11) + - units (17) - lint - cla/google requiredApprovingReviewCount: 1