Issue #1566: partial fix of ReturnCount violations

This commit is contained in:
Ruslan Diachenko 2015-08-26 22:22:11 +01:00 committed by Roman Ivanov
parent 044889b26a
commit adebc9da6f
1 changed files with 7 additions and 3 deletions

View File

@ -119,9 +119,12 @@ public class AvoidStaticImportCheck
* @return true if except false if not
*/
private boolean isExempt(String classOrStaticMember) {
boolean exempt = false;
for (String exclude : excludes) {
if (classOrStaticMember.equals(exclude)) {
return true;
exempt = true;
break;
}
else if (exclude.endsWith(".*")) {
//this section allows explicit imports
@ -136,11 +139,12 @@ public class AvoidStaticImportCheck
excludeMinusDotStar.length() + 1);
//if it contains a dot then it is not a member but a package
if (member.indexOf('.') == -1) {
return true;
exempt = true;
break;
}
}
}
}
return false;
return exempt;
}
}