Skip to content

Commit 51c3239

Browse files
committed
Upgrade to Spring Javaformat 0.0.47.
See gh-935
1 parent 5585a40 commit 51c3239

File tree

69 files changed

+244
-419
lines changed

Some content is hidden

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

69 files changed

+244
-419
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
<plugin>
351351
<groupId>io.spring.javaformat</groupId>
352352
<artifactId>spring-javaformat-maven-plugin</artifactId>
353-
<version>0.0.38</version>
353+
<version>0.0.47</version>
354354
<executions>
355355
<execution>
356356
<phase>validate</phase>

spring-vault-core/src/main/java/org/springframework/vault/authentication/AppRoleAuthenticationOptions.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public class AppRoleAuthenticationOptions {
5858
/**
5959
* Role name used to get roleId and secretID
6060
*/
61-
@Nullable
62-
private final String appRole;
61+
private final @Nullable String appRole;
6362

6463
/**
6564
* Unwrapping endpoint to cater for functionality across various Vault versions.
@@ -108,8 +107,7 @@ public SecretId getSecretId() {
108107
* @return the bound AppRole.
109108
* @since 1.1
110109
*/
111-
@Nullable
112-
public String getAppRole() {
110+
public @Nullable String getAppRole() {
113111
return this.appRole;
114112
}
115113

spring-vault-core/src/main/java/org/springframework/vault/authentication/AuthenticationSteps.java

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -293,17 +293,13 @@ public static class HttpRequestBuilder {
293293

294294
HttpMethod method;
295295

296-
@Nullable
297-
URI uri;
296+
@Nullable URI uri;
298297

299-
@Nullable
300-
String uriTemplate;
298+
@Nullable String uriTemplate;
301299

302-
@Nullable
303-
String[] urlVariables = new String[0];
300+
@Nullable String[] urlVariables = new String[0];
304301

305-
@Nullable
306-
HttpEntity<?> entity;
302+
@Nullable HttpEntity<?> entity;
307303

308304
/**
309305
* Builder entry point to {@code GET} from {@code uriTemplate}.
@@ -443,16 +439,13 @@ public static class HttpRequest<T> {
443439

444440
final HttpMethod method;
445441

446-
@Nullable
447-
final URI uri;
442+
@Nullable final URI uri;
448443

449-
@Nullable
450-
final String uriTemplate;
444+
@Nullable final String uriTemplate;
451445

452446
final @Nullable String[] urlVariables;
453447

454-
@Nullable
455-
final HttpEntity<?> entity;
448+
@Nullable final HttpEntity<?> entity;
456449

457450
final Class<T> responseType;
458451

@@ -475,23 +468,19 @@ HttpMethod getMethod() {
475468
return this.method;
476469
}
477470

478-
@Nullable
479-
URI getUri() {
471+
@Nullable URI getUri() {
480472
return this.uri;
481473
}
482474

483-
@Nullable
484-
String getUriTemplate() {
475+
@Nullable String getUriTemplate() {
485476
return this.uriTemplate;
486477
}
487478

488-
@Nullable
489-
String[] getUrlVariables() {
479+
@Nullable String[] getUrlVariables() {
490480
return this.urlVariables;
491481
}
492482

493-
@Nullable
494-
HttpEntity<?> getEntity() {
483+
@Nullable HttpEntity<?> getEntity() {
495484
return this.entity;
496485
}
497486

spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsEc2AuthenticationOptions.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ public class AwsEc2AuthenticationOptions {
6969
/**
7070
* EC2 instance role name. May be {@literal null} if none.
7171
*/
72-
@Nullable
73-
private final String role;
72+
private final @Nullable String role;
7473

7574
/**
7675
* Authentication nonce.
@@ -136,8 +135,7 @@ public URI getIdentityDocumentUri() {
136135
/**
137136
* @return the role, may be {@literal null} if none.
138137
*/
139-
@Nullable
140-
public String getRole() {
138+
public @Nullable String getRole() {
141139
return this.role;
142140
}
143141

@@ -181,8 +179,7 @@ public static class AwsEc2AuthenticationOptionsBuilder {
181179

182180
private URI identityDocumentUri = DEFAULT_PKCS7_IDENTITY_DOCUMENT_URI;
183181

184-
@Nullable
185-
private String role;
182+
private @Nullable String role;
186183

187184
private Nonce nonce = Nonce.generated();
188185

spring-vault-core/src/main/java/org/springframework/vault/authentication/AwsIamAuthenticationOptions.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ public class AwsIamAuthenticationOptions {
6464
* specified, the friendly name (i.e., role name or username) of the IAM principal
6565
* authenticated. If a matching role is not found, login fails.
6666
*/
67-
@Nullable
68-
private final String role;
67+
private final @Nullable String role;
6968

7069
/**
7170
* Server name to mitigate risk of replay attacks, preferably set to Vault server's
7271
* DNS name. Used for {@literal Vault-AWS-IAM-Server-ID} header.
7372
*/
74-
@Nullable
75-
private final String serverId;
73+
private final @Nullable String serverId;
7674

7775
/**
7876
* STS server URI.
@@ -123,8 +121,7 @@ public AwsRegionProvider getRegionProvider() {
123121
/**
124122
* @return the role, may be {@literal null} if none.
125123
*/
126-
@Nullable
127-
public String getRole() {
124+
public @Nullable String getRole() {
128125
return this.role;
129126
}
130127

@@ -134,8 +131,7 @@ public String getRole() {
134131
* {@literal Vault-AWS-IAM-Server-ID} header.
135132
* @since 2.0
136133
*/
137-
@Nullable
138-
public String getServerId() {
134+
public @Nullable String getServerId() {
139135
return this.serverId;
140136
}
141137

@@ -153,16 +149,13 @@ public static class AwsIamAuthenticationOptionsBuilder {
153149

154150
private String path = DEFAULT_AWS_AUTHENTICATION_PATH;
155151

156-
@Nullable
157-
private AwsCredentialsProvider credentialsProvider;
152+
private @Nullable AwsCredentialsProvider credentialsProvider;
158153

159154
private AwsRegionProvider regionProvider = DefaultAwsRegionProviderChain.builder().build();
160155

161-
@Nullable
162-
private String role;
156+
private @Nullable String role;
163157

164-
@Nullable
165-
private String serverId;
158+
private @Nullable String serverId;
166159

167160
private URI endpointUri = URI.create("https://sts.amazonaws.com/");
168161

spring-vault-core/src/main/java/org/springframework/vault/authentication/AzureMsiAuthenticationOptions.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public class AzureMsiAuthenticationOptions {
6767
/**
6868
* Optional {@link AzureVmEnvironment}.
6969
*/
70-
@Nullable
71-
private final AzureVmEnvironment vmEnvironment;
70+
private final @Nullable AzureVmEnvironment vmEnvironment;
7271

7372
private AzureMsiAuthenticationOptions(String path, String role, URI instanceMetadataServiceUri,
7473
URI identityTokenServiceUri, @Nullable AzureVmEnvironment vmEnvironment) {
@@ -106,8 +105,7 @@ public String getRole() {
106105
* retrieved from the {@link #getInstanceMetadataServiceUri() VM instance metadata
107106
* service}.
108107
*/
109-
@Nullable
110-
public AzureVmEnvironment getVmEnvironment() {
108+
public @Nullable AzureVmEnvironment getVmEnvironment() {
111109
return this.vmEnvironment;
112110
}
113111

@@ -132,11 +130,9 @@ public static class AzureMsiAuthenticationOptionsBuilder {
132130

133131
private String path = DEFAULT_AZURE_AUTHENTICATION_PATH;
134132

135-
@Nullable
136-
private String role;
133+
private @Nullable String role;
137134

138-
@Nullable
139-
private AzureVmEnvironment vmEnvironment;
135+
private @Nullable AzureVmEnvironment vmEnvironment;
140136

141137
private URI instanceMetadataServiceUri = DEFAULT_INSTANCE_METADATA_SERVICE_URI;
142138

spring-vault-core/src/main/java/org/springframework/vault/authentication/ClientCertificateAuthenticationOptions.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ public class ClientCertificateAuthenticationOptions {
4444
/**
4545
* Named certificate role to authenticate against. Can be {@literal null}.
4646
*/
47-
@Nullable
48-
private final String role;
47+
private final @Nullable String role;
4948

5049
private ClientCertificateAuthenticationOptions(String path, @Nullable String role) {
5150
this.path = path;
@@ -70,8 +69,7 @@ public String getPath() {
7069
* @return the optional named certificate role to authenticate against.
7170
* @since 2.3.4
7271
*/
73-
@Nullable
74-
public String getRole() {
72+
public @Nullable String getRole() {
7573
return this.role;
7674
}
7775

@@ -82,8 +80,7 @@ public static class ClientCertificateAuthenticationOptionsBuilder {
8280

8381
private String path = DEFAULT_CERT_PATH;
8482

85-
@Nullable
86-
private String role;
83+
private @Nullable String role;
8784

8885
ClientCertificateAuthenticationOptionsBuilder() {
8986
}

spring-vault-core/src/main/java/org/springframework/vault/authentication/CubbyholeAuthenticationOptions.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ public boolean isSelfLookup() {
122122
*/
123123
public static class CubbyholeAuthenticationOptionsBuilder {
124124

125-
@Nullable
126-
private VaultToken initialToken;
125+
private @Nullable VaultToken initialToken;
127126

128-
@Nullable
129-
private String path;
127+
private @Nullable String path;
130128

131129
private UnwrappingEndpoints endpoints = UnwrappingEndpoints.SysWrapping;
132130

spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpComputeAuthenticationOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ public static class GcpComputeAuthenticationOptionsBuilder {
9393

9494
private String path = DEFAULT_GCP_AUTHENTICATION_PATH;
9595

96-
@Nullable
97-
private String role;
96+
private @Nullable String role;
9897

9998
private String serviceAccount = "default";
10099

spring-vault-core/src/main/java/org/springframework/vault/authentication/GcpIamCredentialsAuthenticationOptions.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,9 @@ public static class GcpIamCredentialsAuthenticationOptionsBuilder {
8888

8989
private String path = DEFAULT_GCP_AUTHENTICATION_PATH;
9090

91-
@Nullable
92-
private String role;
91+
private @Nullable String role;
9392

94-
@Nullable
95-
private GoogleCredentialsSupplier credentialsSupplier;
93+
private @Nullable GoogleCredentialsSupplier credentialsSupplier;
9694

9795
private Duration jwtValidity = Duration.ofMinutes(15);
9896

0 commit comments

Comments
 (0)