Nullabbility.

This commit is contained in:
Mark Paluch
2025-02-18 15:28:58 +01:00
parent 60561c3051
commit e4b2fd1eb4
136 changed files with 345 additions and 214 deletions

14
.mvn/jvm.config Normal file
View File

@@ -0,0 +1,14 @@
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED

26
pom.xml
View File

@@ -23,6 +23,7 @@
<assertj-core.version>3.27.3</assertj-core.version>
<aws-java-sdk.version>2.31.29</aws-java-sdk.version>
<bcpkix-jdk18on.version>1.80</bcpkix-jdk18on.version>
<errorprone.version>2.36.0</errorprone.version>
<google-api-services-iam.version>v1-rev20221013-2.0.0
</google-api-services-iam.version>
<google-cloud-iamcredentials.version>2.60.0</google-cloud-iamcredentials.version>
@@ -39,6 +40,7 @@
<mockk.version>1.13.17</mockk.version>
<mockito-core.version>5.17.0</mockito-core.version>
<netty.version>4.1.121.Final</netty.version>
<nullaway.version>0.12.3</nullaway.version>
<okhttp3.version>3.14.9</okhttp3.version>
<spring.version>7.0.0-M2</spring.version>
<spring-data-bom.version>2025.1.0-M1</spring-data-bom.version>
@@ -379,9 +381,22 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
<parameters>true</parameters>
<release>${source.level}</release>
<showWarnings>true</showWarnings>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
<path>
<groupId>com.uber.nullaway</groupId>
<artifactId>nullaway</artifactId>
<version>${nullaway.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
@@ -398,6 +413,13 @@
<goals>
<goal>compile</goal>
</goals>
<configuration>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>--should-stop=ifError=FLOW</arg>
<arg>-Xplugin:ErrorProne -XepDisableAllChecks -Xep:NullAway:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:CustomContractAnnotations=org.springframework.lang.Contract</arg>
</compilerArgs>
</configuration>
</execution>
<execution>
<id>java-test-compile</id>

View File

@@ -135,6 +135,11 @@
<artifactId>kotlinx-coroutines-reactor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>1.0.0</version>
</dependency>
<!-- HTTP clients -->

View File

@@ -18,6 +18,8 @@ package org.springframework.vault.annotation;
import java.util.Map.Entry;
import java.util.function.Predicate;
import org.jspecify.annotations.Nullable;
import org.springframework.aot.generate.GenerationContext;
import org.springframework.beans.factory.aot.BeanRegistrationAotContribution;
import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor;
@@ -31,7 +33,6 @@ import org.springframework.beans.factory.config.RuntimeBeanReference;
import org.springframework.beans.factory.support.RegisteredBean;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.javapoet.CodeBlock;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
import org.springframework.vault.core.lease.domain.RequestedSecret;
import org.springframework.vault.core.lease.domain.RequestedSecret.Mode;
@@ -48,7 +49,7 @@ import org.springframework.vault.core.util.PropertyTransformers.NoOpPropertyTran
class PropertySourceAotProcessor implements BeanRegistrationAotProcessor {
@Override
public BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean) {
public @Nullable BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registeredBean) {
if (registeredBean.getBeanClass() == org.springframework.vault.core.env.LeaseAwareVaultPropertySource.class) {
return BeanRegistrationAotContribution.withCustomCodeFragments(AotContribution::new);

View File

@@ -113,7 +113,7 @@ public @interface VaultPropertySource {
*/
Renewal renewal() default Renewal.OFF;
public enum Renewal {
enum Renewal {
/**
* Do not renew leases associated with secrets.

View File

@@ -21,6 +21,8 @@ import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
@@ -36,7 +38,6 @@ import org.springframework.core.env.Environment;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.annotation.VaultPropertySource.Renewal;
@@ -200,9 +201,9 @@ class VaultPropertySourceRegistrar
Set<AnnotationAttributes> result = new LinkedHashSet<>();
addAttributesIfNotNull(result, metadata.getAnnotationAttributes(annotationClassName, false));
Map<String, Object> container = metadata.getAnnotationAttributes(containerClassName, false);
Map<String, @Nullable Object> container = metadata.getAnnotationAttributes(containerClassName, false);
if (container != null && container.containsKey("value")) {
for (Map<String, Object> containedAttributes : (Map<String, Object>[]) container.get("value")) {
for (Map<String, Object> containedAttributes : (Map<String, @Nullable Object>[]) container.get("value")) {
addAttributesIfNotNull(result, containedAttributes);
}
}
@@ -210,7 +211,7 @@ class VaultPropertySourceRegistrar
}
private static void addAttributesIfNotNull(Set<AnnotationAttributes> result,
@Nullable Map<String, Object> attributes) {
@Nullable Map<String, @Nullable Object> attributes) {
if (attributes != null) {
result.add(AnnotationAttributes.fromMap(attributes));
}

View File

@@ -1,6 +1,5 @@
/**
* Annotation support for the Spring Vault.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.annotation;

View File

@@ -18,6 +18,8 @@ package org.springframework.vault.aot;
import java.io.IOException;
import java.util.stream.Stream;
import org.jspecify.annotations.Nullable;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.ReflectionHints;
import org.springframework.aot.hint.RuntimeHints;
@@ -41,7 +43,7 @@ class VaultRuntimeHints implements RuntimeHintsRegistrar {
private final CachingMetadataReaderFactory factory = new CachingMetadataReaderFactory();
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(classLoader);

View File

@@ -1,6 +1,5 @@
/**
* Ahead-of-Time support.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.aot;

View File

@@ -20,12 +20,12 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.vault.authentication.AppRoleAuthenticationOptions.RoleId;
@@ -214,7 +214,7 @@ public class AppRoleAuthentication implements ClientAuthentication, Authenticati
ResponseEntity<VaultResponse> entity = this.restOperations.exchange(getRoleIdIdPath(this.options),
HttpMethod.GET, createHttpEntity(token), VaultResponse.class);
return (String) entity.getBody().getRequiredData().get("role_id");
return (String) ResponseUtil.getRequiredData(entity).get("role_id");
}
catch (HttpStatusCodeException e) {
throw new VaultLoginException("Cannot get Role id using AppRole: %s"
@@ -231,7 +231,7 @@ public class AppRoleAuthentication implements ClientAuthentication, Authenticati
ResponseEntity<VaultResponse> entity = this.restOperations.exchange(unwrappingEndpoints.getPath(),
unwrappingEndpoints.getUnwrapRequestMethod(), createHttpEntity(token), VaultResponse.class);
VaultResponse response = unwrappingEndpoints.unwrap(entity.getBody());
VaultResponse response = unwrappingEndpoints.unwrap(ResponseUtil.getRequiredBody(entity));
return (String) response.getRequiredData().get("role_id");
}
@@ -257,7 +257,7 @@ public class AppRoleAuthentication implements ClientAuthentication, Authenticati
try {
VaultResponse response = this.restOperations.postForObject(getSecretIdPath(this.options),
createHttpEntity(token), VaultResponse.class);
return (String) response.getRequiredData().get("secret_id");
return (String) ResponseUtil.getRequiredData(response).get("secret_id");
}
catch (HttpStatusCodeException e) {
throw new VaultLoginException("Cannot get Secret id using AppRole: %s"
@@ -275,7 +275,7 @@ public class AppRoleAuthentication implements ClientAuthentication, Authenticati
ResponseEntity<VaultResponse> entity = this.restOperations.exchange(unwrappingEndpoints.getPath(),
unwrappingEndpoints.getUnwrapRequestMethod(), createHttpEntity(token), VaultResponse.class);
VaultResponse response = unwrappingEndpoints.unwrap(entity.getBody());
VaultResponse response = unwrappingEndpoints.unwrap(ResponseUtil.getRequiredBody(entity));
return (String) response.getRequiredData().get("secret_id");
}

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.authentication;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.authentication.AppRoleTokens.AbsentSecretId;
import org.springframework.vault.authentication.AppRoleTokens.Provided;

View File

@@ -24,10 +24,11 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.support.VaultResponse;
import org.springframework.vault.support.VaultToken;
@@ -298,8 +299,7 @@ public class AuthenticationSteps {
@Nullable
String uriTemplate;
@Nullable
String[] urlVariables;
String @Nullable[] urlVariables;
@Nullable
HttpEntity<?> entity;
@@ -379,14 +379,14 @@ public class AuthenticationSteps {
this.uri = uri;
}
private HttpRequestBuilder(HttpMethod method, @Nullable String uriTemplate, @Nullable String[] urlVariables) {
private HttpRequestBuilder(HttpMethod method, @Nullable String uriTemplate, String @Nullable[] urlVariables) {
this.method = method;
this.uriTemplate = uriTemplate;
this.urlVariables = urlVariables;
}
private HttpRequestBuilder(HttpMethod method, @Nullable URI uri, @Nullable String uriTemplate,
@Nullable String[] urlVariables, @Nullable HttpEntity<?> entity) {
String @Nullable[] urlVariables, @Nullable HttpEntity<?> entity) {
this.method = method;
this.uri = uri;
this.uriTemplate = uriTemplate;
@@ -448,8 +448,8 @@ public class AuthenticationSteps {
@Nullable
final String uriTemplate;
@Nullable
final String[] urlVariables;
final String @Nullable[] urlVariables;
@Nullable
final HttpEntity<?> entity;
@@ -485,8 +485,7 @@ public class AuthenticationSteps {
return this.uriTemplate;
}
@Nullable
String[] getUrlVariables() {
String @Nullable[] getUrlVariables() {
return this.urlVariables;
}

View File

@@ -17,11 +17,11 @@ package org.springframework.vault.authentication;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.authentication.AuthenticationSteps.HttpRequest;
@@ -71,7 +71,6 @@ public class AuthenticationStepsExecutor implements ClientAuthentication {
}
@Override
@SuppressWarnings("unchecked")
public VaultToken login() throws VaultException {
Iterable<Node<?>> steps = this.chain.steps;

View File

@@ -155,6 +155,7 @@ public class AuthenticationStepsOperator implements VaultTokenSupplier {
return state;
}
@SuppressWarnings({"NullAway", "DataFlowIssue"})
private Mono<Object> doHttpRequest(HttpRequestNode<Object> step, Object state) {
HttpRequest<Object> definition = step.getDefinition();
@@ -164,7 +165,7 @@ public class AuthenticationStepsOperator implements VaultTokenSupplier {
if (definition.getUri() == null) {
spec = this.webClient.method(definition.getMethod())
.uri(definition.getUriTemplate(), definition.getUrlVariables());
.uri(definition.getUriTemplate(), (Object[]) definition.getUrlVariables());
}
else {
spec = this.webClient.method(definition.getMethod()).uri(definition.getUri());

View File

@@ -256,7 +256,7 @@ public class AwsEc2Authentication implements ClientAuthentication, Authenticatio
throw new HttpClientErrorException(exchange.getStatusCode());
}
return exchange.getBody();
return ResponseUtil.getRequiredBody(exchange);
}
catch (RestClientException e) {
throw new VaultLoginException(

View File

@@ -20,7 +20,8 @@ import java.time.Duration;
import java.util.Arrays;
import java.util.UUID;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -22,7 +22,6 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -230,14 +229,8 @@ public class AwsIamAuthentication implements ClientAuthentication, Authenticatio
.build();
SdkHttpFullRequest signedRequest = signer.sign(request, signerParams);
Map<String, Object> map = new LinkedHashMap<>();
for (Entry<String, List<String>> entry : signedRequest.headers().entrySet()) {
map.put(entry.getKey(), entry.getValue());
}
try {
return OBJECT_MAPPER.writeValueAsString(map);
return OBJECT_MAPPER.writeValueAsString(new LinkedHashMap<>(signedRequest.headers()));
}
catch (JsonProcessingException e) {
throw new IllegalStateException("Cannot serialize headers to JSON", e);

View File

@@ -17,6 +17,7 @@ package org.springframework.vault.authentication;
import java.net.URI;
import org.jspecify.annotations.Nullable;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
@@ -24,7 +25,6 @@ import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.regions.providers.AwsRegionProvider;
import software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -20,12 +20,12 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.authentication.AuthenticationSteps.HttpRequestBuilder;
@@ -190,7 +190,7 @@ public class AzureMsiAuthentication implements ClientAuthentication, Authenticat
ResponseEntity<Map> response = this.azureMetadataRestOperations
.exchange(this.options.getIdentityTokenServiceUri(), HttpMethod.GET, METADATA_HEADERS, Map.class);
return (String) response.getBody().get("access_token");
return (String) ResponseUtil.getRequiredBody(response).get("access_token");
}
private AzureVmEnvironment getVmEnvironment() {
@@ -205,7 +205,7 @@ public class AzureMsiAuthentication implements ClientAuthentication, Authenticat
ResponseEntity<Map> response = this.azureMetadataRestOperations
.exchange(this.options.getInstanceMetadataServiceUri(), HttpMethod.GET, METADATA_HEADERS, Map.class);
return toAzureVmEnvironment(response.getBody());
return toAzureVmEnvironment(ResponseUtil.getRequiredBody(response));
}
@SuppressWarnings("unchecked")

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.authentication;
import java.net.URI;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -108,6 +108,7 @@ public class ClientCertificateAuthentication implements ClientAuthentication, Au
VaultResponse response = this.restOperations
.postForObject(AuthenticationUtil.getLoginPath(this.options.getPath()), request, VaultResponse.class);
Assert.state(response != null, "Response must not be null");
Assert.state(response.getAuth() != null, "Auth field must not be null");
logger.debug("Login successful using TLS certificates");

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.authentication;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -23,7 +23,6 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.authentication.AuthenticationSteps.HttpRequest;
@@ -201,7 +200,6 @@ public class CubbyholeAuthentication implements ClientAuthentication, Authentica
return createAuthenticationSteps(this.options);
}
@Nullable
private VaultResponse lookupToken(String url) {
try {
@@ -210,9 +208,7 @@ public class CubbyholeAuthentication implements ClientAuthentication, Authentica
ResponseEntity<VaultResponse> entity = this.restOperations.exchange(url, unwrapMethod, requestEntity,
VaultResponse.class);
Assert.state(entity.getBody() != null, "Auth response must not be null");
return entity.getBody();
return ResponseUtil.getRequiredBody(entity);
}
catch (RestClientException e) {
throw VaultLoginException.create("Cubbyhole", e);

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.authentication;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.support.VaultToken;

View File

@@ -140,7 +140,7 @@ public class GcpComputeAuthentication extends GcpJwtAuthenticationSupport
ResponseEntity<String> response = this.googleMetadataRestOperations.exchange(COMPUTE_METADATA_URL_TEMPLATE,
HttpMethod.GET, entity, String.class, urlParameters);
return response.getBody();
return ResponseUtil.getRequiredBody(response);
}
catch (HttpStatusCodeException e) {
throw new VaultLoginException("Cannot obtain signed identity", e);

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.authentication;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -20,8 +20,8 @@ import java.time.Duration;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -20,8 +20,8 @@ import java.time.Duration;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.auth.oauth2.ServiceAccountCredentials;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.authentication;
import java.util.function.Supplier;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -20,8 +20,8 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.VaultException;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.authentication;
import java.util.function.Supplier;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.authentication;
import java.util.function.Supplier;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -203,7 +203,7 @@ public class LifecycleAwareSessionManager extends LifecycleAwareSessionManagerSu
this.logger.info("Renewing token");
Optional<TokenWrapper> token = getToken();
if (!token.isPresent()) {
if (token.isEmpty()) {
getSessionToken();
return RenewOutcome.TERMINAL_ERROR;
}
@@ -266,11 +266,11 @@ public class LifecycleAwareSessionManager extends LifecycleAwareSessionManagerSu
@Override
public VaultToken getSessionToken() {
if (!getToken().isPresent()) {
if (getToken().isEmpty()) {
this.lock.lock();
try {
if (!getToken().isPresent()) {
if (getToken().isEmpty()) {
doGetSessionToken();
}
}
@@ -339,7 +339,7 @@ public class LifecycleAwareSessionManager extends LifecycleAwareSessionManagerSu
Runnable task = () -> {
Optional<TokenWrapper> tokenWrapper = getToken();
if (!tokenWrapper.isPresent()) {
if (tokenWrapper.isEmpty()) {
return;
}

View File

@@ -24,8 +24,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;
@@ -181,8 +181,7 @@ public abstract class LifecycleAwareSessionManagerSupport extends Authentication
private final AtomicBoolean fired = new AtomicBoolean();
@Nullable
private final Instant nextExecutionTime;
private final @Nullable Instant nextExecutionTime;
public OneShotTrigger(@Nullable Date nextExecutionTime) {
this(nextExecutionTime != null ? nextExecutionTime.toInstant() : null);
@@ -193,7 +192,7 @@ public abstract class LifecycleAwareSessionManagerSupport extends Authentication
}
@Override
public Instant nextExecution(TriggerContext triggerContext) {
public @Nullable Instant nextExecution(TriggerContext triggerContext) {
return this.fired.compareAndSet(false, true) ? this.nextExecutionTime : null;
}

View File

@@ -18,7 +18,8 @@ package org.springframework.vault.authentication;
import java.time.Duration;
import java.util.Arrays;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.support.VaultToken;
@@ -205,8 +206,8 @@ public class LoginToken extends VaultToken {
*/
public static class LoginTokenBuilder {
@Nullable
private char[] token;
private char @Nullable[] token;
private boolean renewable;

View File

@@ -18,7 +18,8 @@ package org.springframework.vault.authentication;
import java.time.Clock;
import java.util.function.Supplier;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;

View File

@@ -0,0 +1,52 @@
/*
* Copyright 2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.vault.authentication;
import org.jspecify.annotations.Nullable;
import org.springframework.http.ResponseEntity;
import org.springframework.vault.support.VaultResponseSupport;
/**
* @author Mark Paluch
*/
class ResponseUtil {
public static <T> T getRequiredBody(ResponseEntity<T> entity) {
T body = entity.getBody();
if (body == null) {
throw new IllegalStateException("Expected non-null response body");
}
return body;
}
public static <T, R extends VaultResponseSupport<T>> T getRequiredData(ResponseEntity<R> entity) {
return getRequiredBody(entity).getRequiredData();
}
public static <T, R extends VaultResponseSupport<T>> T getRequiredData(@Nullable R response) {
if (response == null) {
throw new IllegalStateException("Expected non-null response body");
}
return response.getRequiredData();
}
}

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.authentication;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -1,6 +1,5 @@
/**
* Support classes for authentication application events.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.authentication.event;

View File

@@ -1,6 +1,5 @@
/**
* Support for authentication and session management.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.authentication;

View File

@@ -39,11 +39,11 @@ import org.apache.commons.logging.LogFactory;
import org.eclipse.jetty.client.transport.HttpClientTransportOverHTTP;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.jspecify.annotations.Nullable;
import reactor.netty.http.client.HttpClient;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.lang.Nullable;
import org.springframework.util.FileCopyUtils;
import org.springframework.util.StringUtils;
import org.springframework.vault.support.ClientOptions;
@@ -69,7 +69,7 @@ class ClientConfiguration {
}
static SSLContext getSSLContext(SslConfiguration.KeyStoreConfiguration keyStoreConfiguration,
SslConfiguration.KeyConfiguration keyConfiguration, @Nullable TrustManager[] trustManagers)
SslConfiguration.KeyConfiguration keyConfiguration, TrustManager @Nullable[] trustManagers)
throws GeneralSecurityException, IOException {
KeyManager[] keyManagers = keyStoreConfiguration.isPresent()
@@ -113,9 +113,9 @@ class ClientConfiguration {
return keyStore;
}
@Nullable
static TrustManager[] getTrustManagers(SslConfiguration sslConfiguration)
throws GeneralSecurityException, IOException {
static TrustManager @Nullable[] getTrustManagers(SslConfiguration sslConfiguration)
throws GeneralSecurityException, IOException {
return sslConfiguration.getTrustStoreConfiguration().isPresent()
? createTrustManagerFactory(sslConfiguration.getTrustStoreConfiguration()).getTrustManagers() : null;

View File

@@ -26,13 +26,14 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.support.ClientOptions;
import org.springframework.vault.support.SslConfiguration;

View File

@@ -19,6 +19,8 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestInterceptor;
@@ -26,7 +28,6 @@ import org.springframework.http.converter.ByteArrayHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.DefaultUriBuilderFactory;

View File

@@ -20,7 +20,8 @@ import java.net.MalformedURLException;
import java.net.URI;
import java.util.Objects;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -24,9 +24,10 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.support.ClientOptions;
import org.springframework.vault.support.SslConfiguration;

View File

@@ -1,6 +1,5 @@
/**
* Spring Vault Client abstraction.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.client;

View File

@@ -15,6 +15,8 @@
*/
package org.springframework.vault.config;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.DisposableBean;
@@ -26,7 +28,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.lang.Nullable;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.util.Assert;
import org.springframework.vault.authentication.ClientAuthentication;

View File

@@ -18,8 +18,9 @@ package org.springframework.vault.config;
import java.util.function.Consumer;
import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.lang.Nullable;
import org.springframework.vault.client.RestTemplateBuilder;
import org.springframework.vault.client.RestTemplateFactory;
import org.springframework.web.client.RestTemplate;

View File

@@ -18,8 +18,9 @@ package org.springframework.vault.config;
import java.util.function.Consumer;
import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.lang.Nullable;
import org.springframework.vault.client.WebClientBuilder;
import org.springframework.vault.client.WebClientFactory;
import org.springframework.web.reactive.function.client.WebClient;

View File

@@ -23,6 +23,7 @@ import java.util.stream.Collectors;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import org.springframework.beans.BeansException;
@@ -30,7 +31,6 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.Resource;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.authentication.*;

View File

@@ -1,6 +1,5 @@
/**
* Spring configuration for Vault.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.config;

View File

@@ -11,7 +11,8 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.support.DurationParser;

View File

@@ -23,7 +23,8 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;

View File

@@ -22,6 +22,7 @@ import java.util.function.Function;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.jspecify.annotations.Nullable;
import reactor.core.publisher.Mono;
import org.springframework.core.ParameterizedTypeReference;
@@ -29,7 +30,6 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.client.VaultResponses;

View File

@@ -17,11 +17,11 @@ package org.springframework.vault.core;
import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.lang.Nullable;
import org.springframework.vault.VaultException;
import org.springframework.vault.support.VaultResponse;
import org.springframework.vault.support.VaultResponseSupport;

View File

@@ -18,6 +18,7 @@ package org.springframework.vault.core;
import java.util.List;
import java.util.function.Function;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -25,7 +26,6 @@ import reactor.core.publisher.Mono;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.authentication.SessionManager;

View File

@@ -1,11 +1,12 @@
package org.springframework.vault.core;
import java.util.Map;
import org.springframework.lang.Nullable;
import reactor.core.publisher.Mono;
import org.springframework.vault.support.Versioned;
import org.springframework.vault.support.Versioned.Metadata;
import org.springframework.vault.support.Versioned.Version;
import reactor.core.publisher.Mono;
/**
* Interface that specifies a basic set of Vault operations using Vault's versioned

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.core;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.web.client.RestOperations;
/**

View File

@@ -19,8 +19,8 @@ import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.databind.JsonNode;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.support.VaultResponse;
import org.springframework.vault.support.VaultResponseSupport;

View File

@@ -19,9 +19,9 @@ import java.util.Collections;
import java.util.List;
import com.fasterxml.jackson.databind.JsonNode;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
import org.springframework.vault.support.VaultResponseSupport;
/**

View File

@@ -18,7 +18,8 @@ package org.springframework.vault.core;
import java.util.Collections;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.support.VaultResponse;

View File

@@ -23,6 +23,7 @@ import java.util.function.Function;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.jspecify.annotations.Nullable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
@@ -30,7 +31,6 @@ import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.client.VaultResponses;

View File

@@ -15,7 +15,8 @@
*/
package org.springframework.vault.core;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.support.VaultMetadataRequest;
import org.springframework.vault.support.VaultMetadataResponse;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.support.VaultResponse;
import org.springframework.vault.support.VaultResponseSupport;

View File

@@ -17,7 +17,7 @@ package org.springframework.vault.core;
import java.util.List;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
/**
* Interface that specifies a basic set of Vault operations using Vault's Key/Value secret

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.util.List;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.VaultException;
import org.springframework.vault.core.VaultKeyValueOperationsSupport.KeyValueBackend;
import org.springframework.vault.support.VaultResponse;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.io.InputStream;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.VaultException;
import org.springframework.vault.support.CertificateBundle;
import org.springframework.vault.support.VaultCertificateRequest;

View File

@@ -18,7 +18,8 @@ package org.springframework.vault.core;
import java.util.List;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.VaultException;
import org.springframework.vault.support.Policy;
import org.springframework.vault.support.VaultHealth;

View File

@@ -29,13 +29,13 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.jspecify.annotations.Nullable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.vault.VaultException;

View File

@@ -18,6 +18,8 @@ package org.springframework.vault.core;
import java.util.Collections;
import java.util.List;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.ParameterizedTypeReference;
@@ -26,7 +28,6 @@ import org.springframework.http.ResponseEntity;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.authentication.ClientAuthentication;
import org.springframework.vault.authentication.SessionManager;

View File

@@ -17,10 +17,11 @@ package org.springframework.vault.core;
import java.util.Collections;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.client.VaultResponses;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.util.List;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.support.*;
/**

View File

@@ -25,8 +25,8 @@ import java.util.Objects;
import java.util.function.Function;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.jspecify.annotations.Nullable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.support.Versioned;
import org.springframework.vault.support.Versioned.Metadata;
import org.springframework.vault.support.Versioned.Version;

View File

@@ -23,9 +23,9 @@ import java.util.Map;
import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.JsonNode;
import org.jspecify.annotations.Nullable;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.client.VaultResponses;
import org.springframework.vault.support.VaultResponse;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core;
import java.time.Duration;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.VaultException;
import org.springframework.vault.support.VaultResponse;
import org.springframework.vault.support.VaultResponseSupport;

View File

@@ -23,11 +23,12 @@ import java.util.Collections;
import java.util.Map;
import java.util.function.BiFunction;
import org.jspecify.annotations.Nullable;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.VaultException;

View File

@@ -23,10 +23,10 @@ import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.core.VaultOperations;
import org.springframework.vault.core.lease.SecretLeaseContainer;

View File

@@ -22,10 +22,10 @@ import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.core.VaultOperations;

View File

@@ -1,6 +1,5 @@
/**
* Spring Vault's environment abstraction consisting property source support.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core.env;

View File

@@ -38,12 +38,12 @@ import java.util.function.Predicate;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.SmartLifecycle;
import org.springframework.http.HttpStatus;
import org.springframework.lang.Nullable;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.Trigger;
import org.springframework.scheduling.TriggerContext;

View File

@@ -21,9 +21,9 @@ import java.util.concurrent.CopyOnWriteArraySet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jspecify.annotations.Nullable;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.core.lease.domain.Lease;
import org.springframework.vault.core.lease.domain.RequestedSecret;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core.lease.domain;
import java.time.Duration;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
/**

View File

@@ -1,6 +1,5 @@
/**
* Lease domain classes.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core.lease.domain;

View File

@@ -17,7 +17,8 @@ package org.springframework.vault.core.lease.event;
import java.io.Serial;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.vault.core.lease.domain.Lease;
import org.springframework.vault.core.lease.domain.RequestedSecret;

View File

@@ -17,8 +17,9 @@ package org.springframework.vault.core.lease.event;
import java.io.Serial;
import org.jspecify.annotations.Nullable;
import org.springframework.context.ApplicationEvent;
import org.springframework.lang.Nullable;
import org.springframework.vault.core.lease.domain.Lease;
import org.springframework.vault.core.lease.domain.RequestedSecret;

View File

@@ -1,6 +1,5 @@
/**
* Support classes for lease application events.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core.lease.event;

View File

@@ -1,6 +1,5 @@
/**
* The core package implementing lease renewal and secret rotation.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core.lease;

View File

@@ -1,6 +1,5 @@
/**
* Vault core support.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core;

View File

@@ -23,7 +23,7 @@ import java.util.function.Supplier;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.ConcurrentReferenceHashMap;
import org.springframework.util.StringUtils;
import org.springframework.vault.VaultException;

View File

@@ -1,6 +1,5 @@
/**
* Property transformer classes for Spring Vault core support.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault.core.util;

View File

@@ -1,6 +1,5 @@
/**
* Spring support for <a href="https://vaultproject.io">Hashicorp Vault</a>.
*/
@org.springframework.lang.NonNullApi
@org.springframework.lang.NonNullFields
@org.jspecify.annotations.NullMarked
package org.springframework.vault;

View File

@@ -1,5 +1,5 @@
/**
* Support infrastructure for the configuration of Vault specific repositories.
*/
@org.springframework.lang.NonNullApi
@org.jspecify.annotations.NullMarked
package org.springframework.vault.repository.configuration;

View File

@@ -19,6 +19,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.jspecify.annotations.Nullable;
import org.springframework.data.convert.DefaultTypeMapper;
import org.springframework.data.convert.SimpleTypeInformationMapper;
import org.springframework.data.convert.TypeAliasAccessor;
@@ -27,7 +29,6 @@ import org.springframework.data.mapping.Alias;
import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
/**
* Default implementation of {@link VaultTypeMapper} allowing configuration of the key to

View File

@@ -24,6 +24,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import org.jspecify.annotations.Nullable;
import org.springframework.core.CollectionFactory;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.data.mapping.MappingException;
@@ -36,7 +38,6 @@ import org.springframework.data.mapping.model.ParameterValueProvider;
import org.springframework.data.mapping.model.PersistentEntityParameterValueProvider;
import org.springframework.data.mapping.model.PropertyValueProvider;
import org.springframework.data.util.TypeInformation;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;

View File

@@ -18,7 +18,8 @@ package org.springframework.vault.repository.convert;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.vault.support.VaultResponse;

View File

@@ -20,7 +20,8 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.lang.Nullable;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.vault.repository.mapping.VaultPersistentProperty;

View File

@@ -23,10 +23,11 @@ import java.util.List;
import java.util.Locale;
import java.util.Set;
import org.jspecify.annotations.Nullable;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.GenericConverter;
import org.springframework.data.convert.WritingConverter;
import org.springframework.lang.Nullable;
import org.springframework.vault.repository.mapping.VaultSimpleTypes;
/**

View File

@@ -1,5 +1,5 @@
/**
* Spring Vault specific converter infrastructure.
*/
@org.springframework.lang.NonNullApi
@org.jspecify.annotations.NullMarked
package org.springframework.vault.repository.convert;

View File

@@ -23,10 +23,11 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import org.jspecify.annotations.Nullable;
import org.springframework.dao.OptimisticLockingFailureException;
import org.springframework.data.keyvalue.core.AbstractKeyValueAdapter;
import org.springframework.data.util.CloseableIterator;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.vault.VaultException;
import org.springframework.vault.core.VaultKeyValueOperations;

Some files were not shown because too many files have changed in this diff Show More