diff --git a/archunit/src/main/java/com/tngtech/archunit/library/Architectures.java b/archunit/src/main/java/com/tngtech/archunit/library/Architectures.java index 50d30309c5..7e35aa5041 100644 --- a/archunit/src/main/java/com/tngtech/archunit/library/Architectures.java +++ b/archunit/src/main/java/com/tngtech/archunit/library/Architectures.java @@ -271,11 +271,11 @@ private SortedSet packagesOf(Set allowedAccessorLayerNames) { @PublicAPI(usage = ACCESS) public LayerDependencySpecification whereLayer(String name) { - checkLayersExist(name); + checkLayerNameExist(name); return new LayerDependencySpecification(name); } - private void checkLayersExist(String... layerNames) { + private void checkLayerNameExist(String... layerNames) { for (String layerName : layerNames) { checkArgument(layerDefinitions.containsKey(layerName), "There is no layer named '%s'", layerName); } @@ -319,7 +319,7 @@ public LayeredArchitecture mayNotBeAccessedByAnyLayer() { @PublicAPI(usage = ACCESS) public LayeredArchitecture mayOnlyBeAccessedByLayers(String... layerNames) { - checkLayersExist(layerNames); + checkLayerNameExist(layerNames); allowedAccessors.addAll(asList(layerNames)); descriptionSuffix = String.format("may only be accessed by layers ['%s']", Joiner.on("', '").join(allowedAccessors));