[apex] Update apex-jorje to 2020-09-10-5a5192 (Winter 21, Version 50)

Fixes #2839
This commit is contained in:
Andreas Dangel 2020-10-22 19:12:42 +02:00
parent 47d3e1b9f9
commit 9eeea472ac
10 changed files with 59 additions and 12 deletions

View File

@ -14,7 +14,7 @@
<properties>
<java.version>8</java.version>
<apex.jorje.version>2020-06-04-ba31c0</apex.jorje.version>
<apex.jorje.version>2020-09-10-5a5192</apex.jorje.version>
</properties>
<build>

View File

@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-lsp-minimized</artifactId>
<version>2020-06-04-ba31c0</version>
<version>2020-09-10-5a5192</version>
<description>POM was created from install:install-file</description>
</project>

View File

@ -3,10 +3,10 @@
<groupId>apex</groupId>
<artifactId>apex-jorje-lsp-minimized</artifactId>
<versioning>
<release>2020-06-04-ba31c0</release>
<release>2020-09-10-5a5192</release>
<versions>
<version>2020-06-04-ba31c0</version>
<version>2020-09-10-5a5192</version>
</versions>
<lastUpdated>20200724082242</lastUpdated>
<lastUpdated>20201022163714</lastUpdated>
</versioning>
</metadata>

View File

@ -0,0 +1,27 @@
/*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.apex.ast;
import apex.jorje.semantic.ast.compilation.InvalidDependentCompilation;
public final class ASTInvalidDependentCompilation extends ApexRootNode<InvalidDependentCompilation> {
ASTInvalidDependentCompilation(InvalidDependentCompilation userClass) {
super(userClass);
}
@Override
public Object jjtAccept(ApexParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
@Override
public String getImage() {
String apexName = getDefiningType();
return apexName.substring(apexName.lastIndexOf('.') + 1);
}
}

View File

@ -88,6 +88,8 @@ public interface ApexParserVisitor {
Object visit(ASTInstanceOfExpression node, Object data);
Object visit(ASTInvalidDependentCompilation node, Object data);
Object visit(ASTJavaMethodCallExpression node, Object data);
Object visit(ASTJavaVariableExpression node, Object data);

View File

@ -254,6 +254,11 @@ public class ApexParserVisitorAdapter implements ApexParserVisitor {
return visit((ApexNode<?>) node, data);
}
@Override
public Object visit(ASTInvalidDependentCompilation node, Object data) {
return visit((ApexNode<?>) node, data);
}
@Override
public Object visit(ASTJavaMethodCallExpression node, Object data) {
return visit((ApexNode<?>) node, data);

View File

@ -26,6 +26,7 @@ import apex.jorje.parser.impl.ApexLexer;
import apex.jorje.semantic.ast.AstNode;
import apex.jorje.semantic.ast.compilation.AnonymousClass;
import apex.jorje.semantic.ast.compilation.ConstructorPreamble;
import apex.jorje.semantic.ast.compilation.InvalidDependentCompilation;
import apex.jorje.semantic.ast.compilation.UserClass;
import apex.jorje.semantic.ast.compilation.UserClassMethods;
import apex.jorje.semantic.ast.compilation.UserEnum;
@ -156,6 +157,8 @@ public final class ApexTreeBuilder extends AstVisitor<AdditionalPassScope> {
register(DmlUpdateStatement.class, ASTDmlUpdateStatement.class);
register(DmlUpsertStatement.class, ASTDmlUpsertStatement.class);
register(DoLoopStatement.class, ASTDoLoopStatement.class);
register(ElseWhenBlock.class, ASTElseWhenBlock.class);
register(EmptyReferenceExpression.class, ASTEmptyReferenceExpression.class);
register(Expression.class, ASTExpression.class);
register(ExpressionStatement.class, ASTExpressionStatement.class);
register(Field.class, ASTField.class);
@ -163,12 +166,15 @@ public final class ApexTreeBuilder extends AstVisitor<AdditionalPassScope> {
register(FieldDeclarationStatements.class, ASTFieldDeclarationStatements.class);
register(ForEachStatement.class, ASTForEachStatement.class);
register(ForLoopStatement.class, ASTForLoopStatement.class);
register(IdentifierCase.class, ASTIdentifierCase.class);
register(IfBlockStatement.class, ASTIfBlockStatement.class);
register(IfElseBlockStatement.class, ASTIfElseBlockStatement.class);
register(IllegalStoreExpression.class, ASTIllegalStoreExpression.class);
register(InstanceOfExpression.class, ASTInstanceOfExpression.class);
register(InvalidDependentCompilation.class, ASTInvalidDependentCompilation.class);
register(JavaMethodCallExpression.class, ASTJavaMethodCallExpression.class);
register(JavaVariableExpression.class, ASTJavaVariableExpression.class);
register(LiteralCase.class, ASTLiteralCase.class);
register(LiteralExpression.class, ASTLiteralExpression.class);
register(MapEntryNode.class, ASTMapEntryNode.class);
register(Method.class, ASTMethod.class);
@ -203,29 +209,25 @@ public final class ApexTreeBuilder extends AstVisitor<AdditionalPassScope> {
register(StatementExecuted.class, ASTStatementExecuted.class);
register(SuperMethodCallExpression.class, ASTSuperMethodCallExpression.class);
register(SuperVariableExpression.class, ASTSuperVariableExpression.class);
register(SwitchStatement.class, ASTSwitchStatement.class);
register(TernaryExpression.class, ASTTernaryExpression.class);
register(ThisMethodCallExpression.class, ASTThisMethodCallExpression.class);
register(ThisVariableExpression.class, ASTThisVariableExpression.class);
register(ThrowStatement.class, ASTThrowStatement.class);
register(TriggerVariableExpression.class, ASTTriggerVariableExpression.class);
register(TryCatchFinallyBlockStatement.class, ASTTryCatchFinallyBlockStatement.class);
register(TypeWhenBlock.class, ASTTypeWhenBlock.class);
register(UserClass.class, ASTUserClass.class);
register(UserClassMethods.class, ASTUserClassMethods.class);
register(UserExceptionMethods.class, ASTUserExceptionMethods.class);
register(UserEnum.class, ASTUserEnum.class);
register(UserInterface.class, ASTUserInterface.class);
register(UserTrigger.class, ASTUserTrigger.class);
register(ValueWhenBlock.class, ASTValueWhenBlock.class);
register(VariableDeclaration.class, ASTVariableDeclaration.class);
register(VariableDeclarationStatements.class, ASTVariableDeclarationStatements.class);
register(VariableExpression.class, ASTVariableExpression.class);
register(WhileLoopStatement.class, ASTWhileLoopStatement.class);
register(SwitchStatement.class, ASTSwitchStatement.class);
register(ElseWhenBlock.class, ASTElseWhenBlock.class);
register(TypeWhenBlock.class, ASTTypeWhenBlock.class);
register(ValueWhenBlock.class, ASTValueWhenBlock.class);
register(LiteralCase.class, ASTLiteralCase.class);
register(IdentifierCase.class, ASTIdentifierCase.class);
register(EmptyReferenceExpression.class, ASTEmptyReferenceExpression.class);
}
private static <T extends AstNode> void register(Class<T> nodeType,

View File

@ -357,4 +357,9 @@ public class TestAccessEvaluator implements AccessEvaluator {
public boolean hasNamespaceGuardedAccess(Namespace namespace, String arg1) {
return false;
}
@Override
public boolean isNamespaceGuardNamespace(Namespace arg0) {
return false;
}
}

View File

@ -51,6 +51,7 @@ import net.sourceforge.pmd.lang.apex.ast.ASTIfBlockStatement;
import net.sourceforge.pmd.lang.apex.ast.ASTIfElseBlockStatement;
import net.sourceforge.pmd.lang.apex.ast.ASTIllegalStoreExpression;
import net.sourceforge.pmd.lang.apex.ast.ASTInstanceOfExpression;
import net.sourceforge.pmd.lang.apex.ast.ASTInvalidDependentCompilation;
import net.sourceforge.pmd.lang.apex.ast.ASTJavaMethodCallExpression;
import net.sourceforge.pmd.lang.apex.ast.ASTJavaVariableExpression;
import net.sourceforge.pmd.lang.apex.ast.ASTLiteralCase;
@ -393,6 +394,11 @@ public abstract class AbstractApexRule extends AbstractRule
return visit((ApexNode<?>) node, data);
}
@Override
public Object visit(ASTInvalidDependentCompilation node, Object data) {
return visit((ApexNode<?>) node, data);
}
@Override
public Object visit(ASTJavaMethodCallExpression node, Object data) {
return visit((ApexNode<?>) node, data);