Minor: refactoring of TreeWalker to increase readability
This commit is contained in:
parent
6f7dfc3c69
commit
ed280ebd0b
|
|
@ -305,8 +305,8 @@ public final class TreeWalker
|
|||
* @throws CheckstyleException when validation of default tokens fails
|
||||
*/
|
||||
private static void validateDefaultTokens(Check check) throws CheckstyleException {
|
||||
final int[] defaultTokens = check.getDefaultTokens();
|
||||
if (check.getRequiredTokens().length != 0) {
|
||||
final int[] defaultTokens = check.getDefaultTokens();
|
||||
Arrays.sort(defaultTokens);
|
||||
for (final int token : check.getRequiredTokens()) {
|
||||
if (Arrays.binarySearch(defaultTokens, token) < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue