diff --git a/start-site/src/main/java/io/spring/start/site/extension/dependency/springmodulith/SpringModulithBuildCustomizer.java b/start-site/src/main/java/io/spring/start/site/extension/dependency/springmodulith/SpringModulithBuildCustomizer.java index f01b1a44f9..91604af4cd 100644 --- a/start-site/src/main/java/io/spring/start/site/extension/dependency/springmodulith/SpringModulithBuildCustomizer.java +++ b/start-site/src/main/java/io/spring/start/site/extension/dependency/springmodulith/SpringModulithBuildCustomizer.java @@ -92,17 +92,11 @@ private boolean addEventExternalizationDependency(Build build) { } private String getModulithBrokerKey(String broker) { - - switch (broker) { - case "kafka": - case "amqp": - return broker; - case "artemis": - case "activemq": - return "jms"; - default: - throw new IllegalArgumentException("Unsupported broker!"); - } + return switch (broker) { + case "kafka", "amqp" -> broker; + case "artemis", "activemq" -> "jms"; + default -> throw new IllegalArgumentException("Unsupported broker!"); + }; } }