diff --git a/build-tools-internal/build.gradle b/build-tools-internal/build.gradle
index c04ba9b90d5e..11f035e225db 100644
--- a/build-tools-internal/build.gradle
+++ b/build-tools-internal/build.gradle
@@ -381,7 +381,6 @@ tasks.named("jar") {
spotless {
java {
-
// workaround for https://github.com/diffplug/spotless/issues/2317
//toggleOffOn()
target project.fileTree("src/main/java") {
diff --git a/gradle/build.versions.toml b/gradle/build.versions.toml
index bf0e6873f907..07db2bb0116c 100644
--- a/gradle/build.versions.toml
+++ b/gradle/build.versions.toml
@@ -45,7 +45,7 @@ snakeyaml = { group = "org.yaml", name = "snakeyaml", version = { strictly = "2.
spock-core = { group = "org.spockframework", name="spock-core", version.ref="spock" }
spock-junit4 = { group = "org.spockframework", name="spock-junit4", version.ref="spock" }
spock-platform = { group = "org.spockframework", name="spock-bom", version.ref="spock" }
-spotless-plugin = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
+spotless-plugin = "com.diffplug.spotless:spotless-plugin-gradle:7.0.4"
wiremock = "com.github.tomakehurst:wiremock-jre8-standalone:2.23.2"
xmlunit-core = "org.xmlunit:xmlunit-core:2.8.2"
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index cf520c208cfd..1ca6ceea3cc5 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -201,6 +201,11 @@
+
+
+
+
+
@@ -211,34 +216,34 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -1423,6 +1428,11 @@
+
+
+
+
+
@@ -1781,6 +1791,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -2385,6 +2405,11 @@
+
+
+
+
+
@@ -3626,6 +3651,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3636,6 +3671,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3746,6 +3791,11 @@
+
+
+
+
+
@@ -3766,6 +3816,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3776,6 +3836,11 @@
+
+
+
+
+
@@ -3796,6 +3861,11 @@
+
+
+
+
+
@@ -3806,6 +3876,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3816,6 +3896,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3826,6 +3916,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3836,6 +3936,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3846,6 +3956,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3856,6 +3976,11 @@
+
+
+
+
+
@@ -3866,6 +3991,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3876,6 +4011,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3886,6 +4031,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3901,6 +4056,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -3911,6 +4076,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/huggingface/response/HuggingFaceRerankResponseEntityTests.java b/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/huggingface/response/HuggingFaceRerankResponseEntityTests.java
index 5d1b14c46f09..ccea9663d4cf 100644
--- a/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/huggingface/response/HuggingFaceRerankResponseEntityTests.java
+++ b/x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/huggingface/response/HuggingFaceRerankResponseEntityTests.java
@@ -134,8 +134,8 @@ public class HuggingFaceRerankResponseEntityTests extends ESTestCase {
assertThat(thrownException.getMessage(), is("Required [" + missingField + "]"));
}
- private void assertTopNLimit(
- Integer topN, String responseJson, List expectation) throws IOException {
+ private void assertTopNLimit(Integer topN, String responseJson, List expectation)
+ throws IOException {
when(REQUEST_MOCK.getTopN()).thenReturn(topN);
RankedDocsResults parsedResults = HuggingFaceRerankResponseEntity.fromResponse(
diff --git a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/MockWritableIndexExpander.java b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/MockWritableIndexExpander.java
index a2cf4479db0d..d32f84e2ded5 100644
--- a/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/MockWritableIndexExpander.java
+++ b/x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/job/retention/MockWritableIndexExpander.java
@@ -30,10 +30,8 @@ public class MockWritableIndexExpander {
}
private static void mockWhenIndicesAreNotWritable(WritableIndexExpander writableIndexExpander) {
- when(writableIndexExpander.getWritableIndices(anyString()))
- .thenReturn(new ArrayList<>());
- when(writableIndexExpander.getWritableIndices(ArgumentMatchers.>any()))
- .thenReturn(new ArrayList<>());
+ when(writableIndexExpander.getWritableIndices(anyString())).thenReturn(new ArrayList<>());
+ when(writableIndexExpander.getWritableIndices(ArgumentMatchers.>any())).thenReturn(new ArrayList<>());
}
private static void mockWhenIndicesAreWritable(WritableIndexExpander writableIndexExpander) {
diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java
index 1b5bbd4de9a4..345bc3dbef36 100644
--- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java
+++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authc/AuthenticationServiceTests.java
@@ -791,7 +791,7 @@ public class AuthenticationServiceTests extends ESTestCase {
public void testAuthenticateNonExistentRestRequestUserThrowsAuthenticationException() throws Exception {
when(firstRealm.token(threadContext)).thenReturn(
- new UsernamePasswordToken("idonotexist", new SecureString("passwd".toCharArray()))
+ new UsernamePasswordToken("idonotexist", new SecureString("passwd".toCharArray()))
);
try {
authenticateBlocking(restRequest, null);
@@ -2069,23 +2069,23 @@ public class AuthenticationServiceTests extends ESTestCase {
when(projectIndex.indexExists()).thenReturn(true);
User user = new User("_username", "r1");
final Authentication expected = AuthenticationTestHelper.builder()
- .user(user)
- .realmRef(new RealmRef("realm", "custom", "node"))
- .build(false);
+ .user(user)
+ .realmRef(new RealmRef("realm", "custom", "node"))
+ .build(false);
PlainActionFuture tokenFuture = new PlainActionFuture<>();
Tuple newTokenBytes = tokenService.getRandomTokenBytes(randomBoolean());
try (ThreadContext.StoredContext ctx = threadContext.stashContext()) {
Authentication originatingAuth = AuthenticationTestHelper.builder()
- .user(new User("creator"))
- .realmRef(new RealmRef("test", "test", "test"))
- .build(false);
+ .user(new User("creator"))
+ .realmRef(new RealmRef("test", "test", "test"))
+ .build(false);
tokenService.createOAuth2Tokens(
- newTokenBytes.v1(),
- newTokenBytes.v2(),
- expected,
- originatingAuth,
- Collections.emptyMap(),
- tokenFuture
+ newTokenBytes.v1(),
+ newTokenBytes.v2(),
+ expected,
+ originatingAuth,
+ Collections.emptyMap(),
+ tokenFuture
);
}
String token = tokenFuture.get().getAccessToken();
@@ -2104,8 +2104,8 @@ public class AuthenticationServiceTests extends ESTestCase {
}
threadContext.putHeader("Authorization", "Bearer " + token);
ElasticsearchSecurityException e = expectThrows(
- ElasticsearchSecurityException.class,
- () -> authenticateBlocking("_action", transportRequest, null, null)
+ ElasticsearchSecurityException.class,
+ () -> authenticateBlocking("_action", transportRequest, null, null)
);
if (requestIdAlreadyPresent) {
assertThat(expectAuditRequestId(threadContext), is(reqId.get()));