diff --git a/src/main/java/com/enofex/taikai/Taikai.java b/src/main/java/com/enofex/taikai/Taikai.java index c61bf0c..919af7a 100644 --- a/src/main/java/com/enofex/taikai/Taikai.java +++ b/src/main/java/com/enofex/taikai/Taikai.java @@ -33,11 +33,9 @@ private Taikai(Builder builder) { this.namespace = builder.namespace; this.excludedClasses = requireNonNullElse(builder.excludedClasses, Collections.emptySet()); this.rules = Stream.concat( - builder.configurers.all() - .stream() - .flatMap(configurer -> configurer.rules().stream()), - builder.rules.stream() - ).toList(); + builder.configurers.all().stream().flatMap(configurer -> configurer.rules().stream()), + builder.rules.stream()) + .toList(); ArchConfiguration.get() .setProperty("archRule.failOnEmptyShould", Boolean.toString(this.failOnEmpty)); diff --git a/src/main/java/com/enofex/taikai/TaikaiRule.java b/src/main/java/com/enofex/taikai/TaikaiRule.java index e49b551..681da98 100644 --- a/src/main/java/com/enofex/taikai/TaikaiRule.java +++ b/src/main/java/com/enofex/taikai/TaikaiRule.java @@ -75,7 +75,8 @@ private Set allExcludedClasses(Set excludedClasses) { this.configuration.excludedClasses != null ? this.configuration.excludedClasses.stream() : Stream.empty(), excludedClasses != null - ? excludedClasses.stream() : Stream.empty()).collect(Collectors.toSet()); + ? excludedClasses.stream() : Stream.empty()) + .collect(Collectors.toSet()); } public static final class Configuration { @@ -88,8 +89,7 @@ public static final class Configuration { private Configuration(String namespace, Namespace.IMPORT namespaceImport, JavaClasses javaClasses, Set excludedClasses) { this.namespace = namespace; - this.namespaceImport = requireNonNullElse(namespaceImport, - Namespace.IMPORT.WITHOUT_TESTS); + this.namespaceImport = requireNonNullElse(namespaceImport, Namespace.IMPORT.WITHOUT_TESTS); this.javaClasses = javaClasses; this.excludedClasses = excludedClasses != null ? excludedClasses : Collections.emptySet(); } @@ -150,7 +150,5 @@ public static Configuration of(JavaClasses javaClasses, Set excludedClas public static Configuration of(Set excludedClasses) { return new Configuration(null, null, null, excludedClasses); } - - } }