R acceptApexVisitor(ApexVisitor super P, ? extends R> visitor, P data) {
+ return visitor.visit(this, data);
+ }
+
+
+ @Override
+ public String getImage() {
+ String apexName = getDefiningType();
+ return apexName.substring(apexName.lastIndexOf('.') + 1);
+ }
+}
diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java
index 8632675205..147c1ca998 100644
--- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java
+++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.java
@@ -52,4 +52,8 @@ public final class ASTReferenceExpression extends AbstractApexNode extends AstVisitor {
return visitApexNode(node, data);
}
+ default R visit(ASTInvalidDependentCompilation node, P data) {
+ return visitApexNode(node, data);
+ }
+
default R visit(ASTJavaMethodCallExpression node, P data) {
return visitApexNode(node, data);
}
diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/TestAccessEvaluator.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/TestAccessEvaluator.java
index 4ca7462bb0..50c4176d8b 100644
--- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/TestAccessEvaluator.java
+++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ast/TestAccessEvaluator.java
@@ -353,4 +353,9 @@ class TestAccessEvaluator implements AccessEvaluator {
public boolean hasNamespaceGuardedAccess(Namespace namespace, String arg1) {
return false;
}
+
+ @Override
+ public boolean isNamespaceGuardNamespace(Namespace arg0) {
+ return false;
+ }
}
diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/internal/Helper.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/internal/Helper.java
index 1901420c19..4be3586849 100644
--- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/internal/Helper.java
+++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/internal/Helper.java
@@ -38,6 +38,7 @@ import net.sourceforge.pmd.lang.apex.ast.ApexNode;
@InternalApi
public final class Helper {
public static final String ANY_METHOD = "*";
+ private static final String DATABASE_CLASS_NAME = "Database";
private Helper() {
throw new AssertionError("Can't instantiate helper classes");
@@ -165,10 +166,10 @@ public final class Helper {
public static boolean isSystemLevelClass(ASTUserClass node) {
List> searchList = [FIND 'map*' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead];
+ }
+ }
+}
+]]>
+