Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Sep 9, 2017
1 parent 93c3b0b commit 371a51f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static org.apiguardian.api.API.Status.STABLE;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Objects;

import org.apiguardian.api.API;
Expand Down Expand Up @@ -90,12 +91,7 @@ public static boolean isValid(String name) {
}

private static boolean doesNotContainReservedCharacter(String str) {
for (String reservedCharacter : RESERVED_CHARACTERS) {
if (str.contains(reservedCharacter)) {
return false;
}
}
return true;
return Arrays.stream(RESERVED_CHARACTERS).noneMatch(str::contains);
}

/**
Expand Down

0 comments on commit 371a51f

Please sign in to comment.