From e0eb36b195c204dcc6653bca6a315be56ae6cef6 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 9 Feb 2024 12:16:38 +0100 Subject: [PATCH] [apex] FieldDeclarationsShouldBeAtStartRule - remove STATIC_INITIALIZER_METHOD_NAME --- docs/pages/release_notes.md | 5 ++++- .../rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 6fbcc8b0ce..b80dbce011 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -250,9 +250,12 @@ The following previously deprecated classes have been removed: **Removed classes, interfaces and methods (not previously deprecated)** * pmd-apex - * The method `isSynthetic()` in {%jdoc apex::net.sourceforge.pmd.lang.apex.ast.ASTMethod %} has been removed. + * The method `isSynthetic()` in {%jdoc apex::lang.apex.ast.ASTMethod %} has been removed. With the switch from Jorje to Summit AST as underlying parser, no synthetic methods are generated by the parser anymore. This also means, that there is no XPath attribute `@Synthetic` anymore. + * The constant `STATIC_INITIALIZER_METHOD_NAME` in {%jdoc apex::lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule %} + has been removed. It was used to filter out synthetic methods, but these are not generated anymore with the + new parser. * pmd-java * The interface `FinalizableNode` (introduced in 7.0.0-rc1) has been removed. Its method `isFinal()` has been moved down to the diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java index fba20f0c17..d9d9e42916 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.java @@ -26,11 +26,6 @@ public class FieldDeclarationsShouldBeAtStartRule extends AbstractApexRule { Comparator .>comparingInt(ApexNode::getBeginLine) .thenComparing(ApexNode::getBeginColumn); - /** - * @deprecated not used anymore, see also {@link ASTMethod#STATIC_INIT_ID} - */ - @Deprecated - public static final String STATIC_INITIALIZER_METHOD_NAME = ""; @Override protected @NonNull RuleTargetSelector buildTargetSelector() {