summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-06 13:13:10 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-06 14:46:56 +0200
commit47357afd16f928260db34d4dd3e686fb9ee7c5ff (patch)
tree950ba678869ec868c26ab3b95b57e4cabadb23c7 /opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org
parent402a8f55342c4565431c2a2e7287a70592f3fe33 (diff)
build: Switch to Spotless for formatting
This change updates the build configuration to use Spotless for code formating of both Kotlin and Java.
Diffstat (limited to 'opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org')
-rw-r--r--opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org/opendc/web/runner/deployment/OpenDCRunnerProcessor.java39
1 files changed, 19 insertions, 20 deletions
diff --git a/opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org/opendc/web/runner/deployment/OpenDCRunnerProcessor.java b/opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org/opendc/web/runner/deployment/OpenDCRunnerProcessor.java
index 94921454..85a973e7 100644
--- a/opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org/opendc/web/runner/deployment/OpenDCRunnerProcessor.java
+++ b/opendc-web/opendc-web-runner-quarkus-deployment/src/main/java/org/opendc/web/runner/deployment/OpenDCRunnerProcessor.java
@@ -22,6 +22,8 @@
package org.opendc.web.runner.deployment;
+import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;
+
import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
@@ -30,19 +32,15 @@ import io.quarkus.deployment.builditem.*;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.deployment.util.ServiceUtil;
import io.quarkus.runtime.RuntimeValue;
+import java.io.IOException;
+import java.util.Set;
+import java.util.function.BooleanSupplier;
import org.opendc.trace.spi.TraceFormat;
import org.opendc.web.runner.JobManager;
import org.opendc.web.runner.OpenDCRunner;
import org.opendc.web.runner.runtime.OpenDCRunnerRecorder;
import org.opendc.web.runner.runtime.OpenDCRunnerRuntimeConfig;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Set;
-import java.util.function.BooleanSupplier;
-
-import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT;
-
/**
* Build processor for the OpenDC web runner Quarkus extension.
*/
@@ -65,12 +63,11 @@ public class OpenDCRunnerProcessor {
void registerTraceFormats(BuildProducer<ServiceProviderBuildItem> services) throws IOException {
String service = "META-INF/services/" + TraceFormat.class.getName();
- Set<String> implementations = ServiceUtil.classNamesNamedIn(Thread.currentThread().getContextClassLoader(),
- service);
+ Set<String> implementations =
+ ServiceUtil.classNamesNamedIn(Thread.currentThread().getContextClassLoader(), service);
services.produce(
- new ServiceProviderBuildItem(TraceFormat.class.getName(),
- implementations.toArray(new String[0])));
+ new ServiceProviderBuildItem(TraceFormat.class.getName(), implementations.toArray(new String[0])));
}
/**
@@ -86,9 +83,10 @@ public class OpenDCRunnerProcessor {
*/
@BuildStep(onlyIf = IsIncluded.class)
@Record(RUNTIME_INIT)
- ServiceStartBuildItem createRunnerService(OpenDCRunnerRecorder recorder,
- OpenDCRunnerRuntimeConfig config,
- BuildProducer<OpenDCRunnerBuildItem> runnerBuildItem) {
+ ServiceStartBuildItem createRunnerService(
+ OpenDCRunnerRecorder recorder,
+ OpenDCRunnerRuntimeConfig config,
+ BuildProducer<OpenDCRunnerBuildItem> runnerBuildItem) {
RuntimeValue<OpenDCRunner> runner = recorder.createRunner(config);
runnerBuildItem.produce(new OpenDCRunnerBuildItem(runner));
return new ServiceStartBuildItem("OpenDCRunnerService");
@@ -99,12 +97,13 @@ public class OpenDCRunnerProcessor {
*/
@BuildStep(onlyIf = IsIncluded.class)
@Record(RUNTIME_INIT)
- void startRunnerService(ApplicationStartBuildItem start,
- OpenDCRunnerBuildItem runnerBuildItem,
- OpenDCRunnerRecorder recorder,
- OpenDCRunnerRuntimeConfig config,
- ShutdownContextBuildItem shutdownContextBuildItem) {
- recorder.startRunner(runnerBuildItem.getRunner(), config,shutdownContextBuildItem);
+ void startRunnerService(
+ ApplicationStartBuildItem start,
+ OpenDCRunnerBuildItem runnerBuildItem,
+ OpenDCRunnerRecorder recorder,
+ OpenDCRunnerRuntimeConfig config,
+ ShutdownContextBuildItem shutdownContextBuildItem) {
+ recorder.startRunner(runnerBuildItem.getRunner(), config, shutdownContextBuildItem);
}
/**