Skip to content

Commit

Permalink
[apex] Update apex-jorje to 2020-09-10-5a5192 (Winter 21, Version 50)
Browse files Browse the repository at this point in the history
Fixes #2839
  • Loading branch information
adangel committed Oct 22, 2020
1 parent 47d3e1b commit 9eeea47
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pmd-apex-jorje/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ public Object visit(ASTInstanceOfExpression node, Object data) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand Down Expand Up @@ -156,19 +157,24 @@ 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);
register(FieldDeclaration.class, ASTFieldDeclaration.class);
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);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,9 @@ public boolean useTestValueForAnonymousScriptLengthLimit() {
public boolean hasNamespaceGuardedAccess(Namespace namespace, String arg1) {
return false;
}

@Override
public boolean isNamespaceGuardNamespace(Namespace arg0) {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
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;
Expand Down Expand Up @@ -393,6 +394,11 @@ public Object visit(ASTInstanceOfExpression node, Object data) {
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);
Expand Down

0 comments on commit 9eeea47

Please sign in to comment.