This commit is contained in:
Sergey
2016-11-29 16:18:41 -08:00
committed by Juan Martín Sotuyo Dodero
parent 1e5cbb8d25
commit 7f63914846

View File

@@ -241,7 +241,8 @@ public class ApexCRUDViolationRule extends AbstractApexRule {
final ASTMethod wrappingMethod = node.getFirstParentOfType(ASTMethod.class);
final ASTUserClass wrappingClass = node.getFirstParentOfType(ASTUserClass.class);
if (Helper.isTestMethodOrClass(wrappingClass) || Helper.isTestMethodOrClass(wrappingMethod)) {
if ((wrappingClass != null && Helper.isTestMethodOrClass(wrappingClass))
|| (wrappingMethod != null && Helper.isTestMethodOrClass(wrappingMethod))) {
return;
}
@@ -322,7 +323,8 @@ public class ApexCRUDViolationRule extends AbstractApexRule {
final ASTMethod wrappingMethod = node.getFirstParentOfType(ASTMethod.class);
final ASTUserClass wrappingClass = node.getFirstParentOfType(ASTUserClass.class);
if (Helper.isTestMethodOrClass(wrappingClass) || Helper.isTestMethodOrClass(wrappingMethod)) {
if ((wrappingClass != null && Helper.isTestMethodOrClass(wrappingClass))
|| (wrappingMethod != null && Helper.isTestMethodOrClass(wrappingMethod))) {
return;
}
@@ -346,7 +348,7 @@ public class ApexCRUDViolationRule extends AbstractApexRule {
if (varToTypeMapping.containsKey(variableWithClass.toString())) {
String type = varToTypeMapping.get(variableWithClass.toString());
validateCRUDCheckPresent(node, data, ANY, type);
}