[apex] Update Apex Support to version 48 (Spring '20)

This commit is contained in:
Andreas Dangel
2020-01-17 12:10:11 +01:00
parent 6950d2d9d4
commit 1617aa5311
8 changed files with 20 additions and 8 deletions

View File

@ -204,7 +204,7 @@ accordingly and this rule won't be executed.
The specific version of a language to be used is selected via the `sourceLanguage`
nested element. Possible values are:
<sourceLanguage name="apex" version="45"/>
<sourceLanguage name="apex" version="48"/>
<sourceLanguage name="ecmascript" version="3"/>
<sourceLanguage name="java" version="1.3"/>
<sourceLanguage name="java" version="1.4"/>

View File

@ -37,6 +37,11 @@ useful. A short description how to use it is available under [Creating XML dump
Any feedback about it, especially about your use cases, is highly appreciated.
#### Updated Apex Support
* The Apex language support has been bumped to version 48 (Spring '20). All new language features are now properly
parsed and processed.
#### Modified Rules
* The Java rule {% rule "java/errorprone/AvoidLiteralsInIfCondition" %} (`java-errorprone`) has a new property

View File

@ -16,7 +16,7 @@
<!-- Workaround for https://youtrack.jetbrains.com/issue/IDEA-188690 -->
<maven.compiler.source>1.${java.version}</maven.compiler.source>
<maven.compiler.target>1.${java.version}</maven.compiler.target>
<apex.jorje.version>2019-01-18-a041d7</apex.jorje.version>
<apex.jorje.version>2019-11-07-964d4a</apex.jorje.version>
</properties>
<build>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>apex</groupId>
<artifactId>apex-jorje-lsp-minimized</artifactId>
<version>2019-01-18-a041d7</version>
<version>2019-11-07-964d4a</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>2019-01-18-a041d7</release>
<release>2019-11-07-964d4a</release>
<versions>
<version>2019-01-18-a041d7</version>
<version>2019-11-07-964d4a</version>
</versions>
<lastUpdated>20190118084525</lastUpdated>
<lastUpdated>20200117105703</lastUpdated>
</versioning>
</metadata>

View File

@ -7,6 +7,8 @@ package net.sourceforge.pmd.lang.apex;
import net.sourceforge.pmd.lang.BaseLanguageModule;
import net.sourceforge.pmd.lang.apex.rule.ApexRuleChainVisitor;
import apex.jorje.services.Version;
public class ApexLanguageModule extends BaseLanguageModule {
public static final String NAME = "Apex";
@ -15,6 +17,6 @@ public class ApexLanguageModule extends BaseLanguageModule {
public ApexLanguageModule() {
super(NAME, null, TERSE_NAME, ApexRuleChainVisitor.class, EXTENSIONS);
addVersion("45", new ApexHandler(), true);
addVersion(String.valueOf((int) Version.CURRENT.getExternal()), new ApexHandler(), true);
}
}

View File

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