Skip to content

Commit

Permalink
Rename function to convey more accurate checking
Browse files Browse the repository at this point in the history
> Signed-off-by: Miguel Ortega <miguel.ortega84@gmail.com>
  • Loading branch information
Miguel authored and mikomatic committed Sep 20, 2019
1 parent 4cad7cc commit 3fc50d0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ private SortedSet<String> packagesOf(Set<String> 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);
}
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 3fc50d0

Please sign in to comment.