Skip to content

Commit b94cd10

Browse files
Merge branch 'main' into jdbc/feature-branch-otel
2 parents 474c626 + 5f2e056 commit b94cd10

2,375 files changed

Lines changed: 905754 additions & 1540 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/create_additional_release_tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
3131
run: |
32-
ARTIFACT_IDS=('google-cloud-shared-dependencies' 'api-common' 'gax' 'google-cloud-bigtable' 'libraries-bom')
32+
ARTIFACT_IDS=('google-cloud-shared-dependencies' 'api-common' 'gax' 'google-cloud-bigtable' 'libraries-bom' 'gapic-generator-java')
3333
for ARTIFACT_ID in "${ARTIFACT_IDS[@]}"; do
3434
VERSION=$(grep "^${ARTIFACT_ID}:" versions.txt | cut -d':' -f2 | tr -d '[:space:]')
3535
TAG_NAME="${ARTIFACT_ID}/v$VERSION"

gapic-libraries-bom/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,13 @@
13531353
<type>pom</type>
13541354
<scope>import</scope>
13551355
</dependency>
1356+
<dependency>
1357+
<groupId>com.google.cloud</groupId>
1358+
<artifactId>google-cloud-sql-bom</artifactId>
1359+
<version>0.1.0-SNAPSHOT</version><!-- {x-version-update:google-cloud-sql:current} -->
1360+
<type>pom</type>
1361+
<scope>import</scope>
1362+
</dependency>
13561363
<dependency>
13571364
<groupId>com.google.cloud</groupId>
13581365
<artifactId>google-cloud-storage-bom</artifactId>

google-auth-library-java/appengine/java/com/google/auth/appengine/AppEngineCredentials.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@
4848
import java.util.Collection;
4949
import java.util.Date;
5050
import java.util.Objects;
51+
import org.jspecify.annotations.NullMarked;
52+
import org.jspecify.annotations.Nullable;
5153

5254
/**
5355
* OAuth2 credentials representing the built-in service account for Google App Engine. You should
5456
* only use this class if you are running on AppEngine and are using urlfetch.
5557
*
5658
* <p>Fetches access tokens from the App Identity service.
5759
*/
60+
@NullMarked
5861
public class AppEngineCredentials extends GoogleCredentials implements ServiceAccountSigner {
5962

6063
private static final long serialVersionUID = -2627708355455064660L;
@@ -122,7 +125,7 @@ public String toString() {
122125
}
123126

124127
@Override
125-
public boolean equals(Object obj) {
128+
public boolean equals(@Nullable Object obj) {
126129
if (!(obj instanceof AppEngineCredentials)) {
127130
return false;
128131
}

google-auth-library-java/appengine/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,9 @@
9393
<artifactId>error_prone_annotations</artifactId>
9494
<scope>compile</scope>
9595
</dependency>
96+
<dependency>
97+
<groupId>org.jspecify</groupId>
98+
<artifactId>jspecify</artifactId>
99+
</dependency>
96100
</dependencies>
97101
</project>

google-auth-library-java/cab-token-generator/java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
import java.util.Date;
7979
import java.util.List;
8080
import java.util.concurrent.ExecutionException;
81+
import org.jspecify.annotations.NullMarked;
82+
import org.jspecify.annotations.Nullable;
8183

8284
/**
8385
* A factory for generating downscoped access tokens using a client-side approach.
@@ -136,6 +138,7 @@
136138
* token, allowing for automatic token refreshes by providing a {@link
137139
* OAuth2CredentialsWithRefresh.OAuth2RefreshHandler}.
138140
*/
141+
@NullMarked
139142
public class ClientSideCredentialAccessBoundaryFactory {
140143
static final Duration DEFAULT_REFRESH_MARGIN = Duration.ofMinutes(45);
141144
static final Duration DEFAULT_MINIMUM_TOKEN_LIFETIME = Duration.ofMinutes(30);
@@ -144,9 +147,9 @@ public class ClientSideCredentialAccessBoundaryFactory {
144147
private final String tokenExchangeEndpoint;
145148
private final Duration minimumTokenLifetime;
146149
private final Duration refreshMargin;
147-
private RefreshTask refreshTask;
150+
private @Nullable RefreshTask refreshTask;
148151
private final Object refreshLock = new byte[0];
149-
private volatile IntermediateCredentials intermediateCredentials = null;
152+
private volatile @Nullable IntermediateCredentials intermediateCredentials = null;
150153
private final Clock clock;
151154
private final CelCompiler celCompiler;
152155

google-auth-library-java/cab-token-generator/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
<groupId>com.google.crypto.tink</groupId>
6161
<artifactId>tink</artifactId>
6262
</dependency>
63+
<dependency>
64+
<groupId>org.jspecify</groupId>
65+
<artifactId>jspecify</artifactId>
66+
</dependency>
6367

6468
<dependency>
6569
<groupId>junit</groupId>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
java_library(
22
name = "credentials",
33
srcs = glob(["java/**/*.java"]),
4+
deps = [
5+
"@org_jspecify_jspecify//jar",
6+
],
47
visibility = ["//visibility:public"],
58
)

google-auth-library-java/credentials/java/com/google/auth/ApiKeyCredentials.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
import java.util.Collections;
3636
import java.util.List;
3737
import java.util.Map;
38+
import org.jspecify.annotations.NullMarked;
39+
import org.jspecify.annotations.Nullable;
3840

3941
/**
4042
* Credentials class for calling Google APIs using an API key.
@@ -49,6 +51,7 @@
4951
* Credentials credentials = ApiKeyCredentials.create("your api key");
5052
* </code></pre>
5153
*/
54+
@NullMarked
5255
public class ApiKeyCredentials extends Credentials {
5356
static final String API_KEY_HEADER_KEY = "x-goog-api-key";
5457
private final String apiKey;
@@ -70,7 +73,7 @@ public String getAuthenticationType() {
7073
}
7174

7275
@Override
73-
public Map<String, List<String>> getRequestMetadata(URI uri) throws IOException {
76+
public Map<String, List<String>> getRequestMetadata(@Nullable URI uri) throws IOException {
7477
return Collections.singletonMap(API_KEY_HEADER_KEY, Collections.singletonList(apiKey));
7578
}
7679

google-auth-library-java/credentials/java/com/google/auth/CredentialTypeForMetrics.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131

3232
package com.google.auth;
3333

34+
import org.jspecify.annotations.NullMarked;
35+
3436
/**
3537
* Defines the different types of credentials that can be used for metrics.
3638
*
@@ -44,6 +46,7 @@
4446
*
4547
* @see #getLabel()
4648
*/
49+
@NullMarked
4750
public enum CredentialTypeForMetrics {
4851
USER_CREDENTIALS("u"),
4952
SERVICE_ACCOUNT_CREDENTIALS_AT("sa"),

google-auth-library-java/credentials/java/com/google/auth/Credentials.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@
3737
import java.util.List;
3838
import java.util.Map;
3939
import java.util.concurrent.Executor;
40+
import org.jspecify.annotations.NullMarked;
41+
import org.jspecify.annotations.Nullable;
4042

4143
/** Represents an abstract authorized identity instance. */
44+
@NullMarked
4245
public abstract class Credentials implements Serializable {
4346

4447
private static final long serialVersionUID = 808575179767517313L;
@@ -161,7 +164,8 @@ protected final void blockingGetToCallback(URI uri, RequestMetadataCallback call
161164
* implement {@link Retryable} and {@code isRetryable()} will return true if the operation may
162165
* be retried.
163166
*/
164-
public abstract Map<String, List<String>> getRequestMetadata(URI uri) throws IOException;
167+
public abstract Map<String, List<String>> getRequestMetadata(@Nullable URI uri)
168+
throws IOException;
165169

166170
/**
167171
* Whether the credentials have metadata entries that should be added to each request.

0 commit comments

Comments
 (0)