No more preview features since those broke things

This commit is contained in:
Johannes Frohnmeyer 2022-10-27 22:47:41 +02:00
parent 31fb8b3b2a
commit 11c0a8a144
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 9 additions and 16 deletions

View File

@ -26,7 +26,3 @@ dependencies {
tasks.runShadow {
args("8002")
}
tasks.compileJava {
options.compilerArgs.add("--enable-preview")
}

View File

@ -34,20 +34,17 @@ record PipelineUnpacker(AtomicBoolean changed) implements BiConsumer<Pipeline, C
}
changed.set(true);
// Send included
switch (include) {
case Scalar str -> download(str.value(), null, pipelineConsumer);
case YamlMapping map -> {
for (YamlNode key : map.keys()) {
download(map.string(key), key.asScalar().value(), pipelineConsumer);
}
//TODO switch back to switch pattern matching once that is available
if (include instanceof Scalar str) download(str.value(), null, pipelineConsumer);
else if (include instanceof YamlMapping map) {
for (YamlNode key : map.keys()) {
download(map.string(key), key.asScalar().value(), pipelineConsumer);
}
case YamlSequence seq -> {
for (YamlNode node : seq) {
download(node.asScalar().value(), null, pipelineConsumer);
}
} else if (include instanceof YamlSequence seq) {
for (YamlNode node : seq) {
download(node.asScalar().value(), null, pipelineConsumer);
}
default -> throw new IllegalStateException("Unexpected value: " + include);
}
} else throw new IllegalStateException("Unexpected value: " + include);
// Remove include from original
Pipeline filtered = new Pipeline();
filtered.name = pipeline.name;