Skip to content

Commit

Permalink
Polish "Automatically add Spring Modulith event externalization depen…
Browse files Browse the repository at this point in the history
…dency"

See gh-1528
  • Loading branch information
mhalbritter committed Jul 3, 2024
1 parent d9bc915 commit bc87b20
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
};
}

}

0 comments on commit bc87b20

Please sign in to comment.