Skip to content

Commit ac4503a

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 9597586 commit ac4503a

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchTestBasePlugin.java

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -324,29 +324,30 @@ private static void configureEntitlements(Project project) {
324324
}
325325
FileCollection bridgeFiles = bridgeConfig;
326326

327-
project.getTasks().withType(Test.class)
327+
project.getTasks()
328+
.withType(Test.class)
328329
.matching(test -> TEST_TASKS_WITH_ENTITLEMENTS.contains(test.getName()))
329330
.configureEach(test -> {
330-
// See also SystemJvmOptions.maybeAttachEntitlementAgent.
331+
// See also SystemJvmOptions.maybeAttachEntitlementAgent.
331332

332-
// Agent
333-
if (agentFiles.isEmpty() == false) {
334-
test.getInputs().files(agentFiles);
335-
test.systemProperty("es.entitlement.agentJar", agentFiles.getAsPath());
336-
test.systemProperty("jdk.attach.allowAttachSelf", true);
337-
}
333+
// Agent
334+
if (agentFiles.isEmpty() == false) {
335+
test.getInputs().files(agentFiles);
336+
test.systemProperty("es.entitlement.agentJar", agentFiles.getAsPath());
337+
test.systemProperty("jdk.attach.allowAttachSelf", true);
338+
}
338339

339-
// Bridge
340-
if (bridgeFiles.isEmpty() == false) {
341-
String modulesContainingEntitlementInstrumentation = "java.logging,java.net.http,java.naming,jdk.net";
342-
test.getInputs().files(bridgeFiles);
343-
// Tests may not be modular, but the JDK still is
344-
test.jvmArgs(
345-
"--add-exports=java.base/org.elasticsearch.entitlement.bridge=ALL-UNNAMED,"
346-
+ modulesContainingEntitlementInstrumentation
347-
);
348-
}
349-
});
340+
// Bridge
341+
if (bridgeFiles.isEmpty() == false) {
342+
String modulesContainingEntitlementInstrumentation = "java.logging,java.net.http,java.naming,jdk.net";
343+
test.getInputs().files(bridgeFiles);
344+
// Tests may not be modular, but the JDK still is
345+
test.jvmArgs(
346+
"--add-exports=java.base/org.elasticsearch.entitlement.bridge=ALL-UNNAMED,"
347+
+ modulesContainingEntitlementInstrumentation
348+
);
349+
}
350+
});
350351
}
351352

352353
}

build-tools/src/main/java/org/elasticsearch/gradle/test/TestBuildInfoPlugin.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
import org.gradle.api.provider.ProviderFactory;
1919
import org.gradle.api.tasks.SourceSet;
2020
import org.gradle.api.tasks.SourceSetContainer;
21-
import org.gradle.api.tasks.testing.Test;
2221
import org.gradle.language.jvm.tasks.ProcessResources;
2322

24-
import java.util.List;
25-
2623
import javax.inject.Inject;
2724

2825
/**

0 commit comments

Comments
 (0)