* [JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)](https://openjdk.org/jeps/463) (Java 21 and 22)
In order to analyze a project with PMD that uses these preview language features,
you'll need to enable it via the environment variable `PMD_JAVA_OPTS` and select the new language
version `22-preview`:
export PMD_JAVA_OPTS=--enable-preview
pmd check --use-version java-22-preview ...
Note: Support for Java 19 and Java 20 preview language features have been removed. The versions "19-preview" and
"20-preview" are no longer available.
### New: Kotlin support
PMD now supports Kotlin as an additional language for analyzing source code. It is based on
the official kotlin Antlr grammar for Kotlin 1.8. Java-based rules and XPath-based rules are supported.
We are shipping the following rules:
* [`FunctionNameTooShort`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort) finds functions with a too
short name.
* [`OverrideBothEqualsAndHashcode`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode) finds classes with only
either `equals` or `hashCode` overridden, but not both. This leads to unexpected behavior once instances
of such classes are used in collections (Lists, HashMaps, ...).
[Peter Paul Bakker](https://github.com/stokpop) (@stokpop)
### New: Swift support
Given the full Antlr support, PMD now fully supports Swift for creating rules. Previously only CPD was supported.
Note: There is only limited support for newer Swift language features in the parser, e.g. Swift 5.9 (Macro Expansions)
are supported, but other features are not.
We are pleased to announce we are shipping a number of rules starting with PMD 7.
* [`ForceCast`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcecast) flags all force casts, making sure you are
defensively considering all types. Having the application crash shouldn't be an option.
* [`ForceTry`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcetry) flags all force tries, making sure you are
defensively handling exceptions. Having the application crash shouldn't be an option.
* [`ProhibitedInterfaceBuilder`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder) flags any usage of interface
builder. Interface builder files are prone to merge conflicts, and are impossible to code review, so larger
teams usually try to avoid it or reduce its usage.
* [`UnavailableFunction`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#unavailablefunction) flags any function throwing
a `fatalError` not marked as `@available(*, unavailable)` to ensure no calls are actually performed in
and the new [Null Coalescing Operator `??`](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_NullCoalescingOperator.htm)
can be parsed now. PMD should be able to parse Apex code up to version 60.0 (Spring '24).
See [#3766](https://github.com/pmd/pmd/issues/3766) for details.
### Changed: CPP can now ignore identifiers in sequences (CPD)
* New command line option for CPD: `--ignore-sequences`.
* This option is used for CPP only: with the already existing option `--ignore-literal-sequences`, only
literals were ignored. The new option additionally ignores identifiers as well in sequences.
* See [PR #4470](https://github.com/pmd/pmd/pull/4470) for details.
### Changed: Groovy Support (CPD)
* We now support parsing all Groovy features from Groovy 3 and 4.
* We now support [suppression](pmd_userdocs_cpd.html#suppression) through `CPD-ON`/`CPD-OFF` comment pairs.
* See [PR #4726](https://github.com/pmd/pmd/pull/4726) for details.
### Changed: HTML support
Support for HTML was introduced in PMD 6.55.0 as an experimental feature. With PMD 7.0.0 this
is now considered stable.
### Changed: JavaScript support
The JS specific parser options have been removed. The parser now always retains comments and uses version ES6.
The language module registers a couple of different versions. The latest version, which supports ES6 and also some
new constructs (see [Rhino](https://github.com/mozilla/rhino)), is the default. This should be fine for most
use cases.
### Changed: Language versions
We revisited the versions that were defined by each language module. Now many more versions are defined for each
language. In general, you can expect that PMD can parse all these different versions. There might be situations
where this fails and this can be considered a bug. Usually the latest version is selected as the default
language version.
The language versions can be used to mark rules to be useful only for a specific language version via
the `minimumLanguageVersion` and `maximumLanguageVersion` attributes. While this feature is currently only used by
the Java module, listing all possible versions enables other languages as well to use this feature.
Related issue: [[core] Explicitly name all language versions (#4120)](https://github.com/pmd/pmd/issues/4120)
### Changed: Rule properties
* The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.
* All properties which accept multiple values now use a comma (`,`) as a delimiter. The previous default was a
pipe character (`|`). The delimiter is not configurable anymore. If needed, the comma can be escaped
with a backslash.
* The `min` and `max` attributes in property definitions in the XML are now optional and can appear separately
or be omitted.
### Changed: Velocity Template Language (VTL)
The module was named just "vm" which was not a good name. Its module name, language id and
package names have been renamed to "velocity".
If you import rules, you also need to adjust the paths, e.g.
*`category/vm/...` ➡️ `category/velocity/...`
### Changed: Visualforce
There was an inconsistency between the naming of the maven module and the language id. The language id
used the abbreviation "vf", while the maven module used the longer name "visualforce". This has been
solved by renaming the language module to its full name "visualforce". The java packages have
been renamed as well.
If you import rules, you also need to adjust the paths, e.g.
* [`OperationWithHighCostInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithhighcostinloop) finds Schema class methods called in a loop, which is a
potential performance issue.
* [`UnusedMethod`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_design.html#unusedmethod) finds unused methods in your code.
**Java**
* [`UnnecessaryBoxing`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing) reports boxing and unboxing conversions that may be made implicit.
* [`UseExplicitTypes`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#useexplicittypes) reports usages of `var` keyword, which was introduced with Java 10.
**Kotlin**
* [`FunctionNameTooShort`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_bestpractices.html#functionnametooshort) finds functions with a too short name.
* [`OverrideBothEqualsAndHashcode`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_kotlin_errorprone.html#overridebothequalsandhashcode) finds classes with only
either `equals` or `hashCode` overridden, but not both. This leads to unexpected behavior once instances
of such classes are used in collections (Lists, HashMaps, ...).
**Swift**
* [`ForceCast`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcecast) flags all force casts, making sure you are
defensively considering all types. Having the application crash shouldn't be an option.
* [`ForceTry`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_errorprone.html#forcetry) flags all force tries, making sure you are
defensively handling exceptions. Having the application crash shouldn't be an option.
* [`ProhibitedInterfaceBuilder`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#prohibitedinterfacebuilder) flags any usage of interface
builder. Interface builder files are prone to merge conflicts, and are impossible to code review, so larger
teams usually try to avoid it or reduce its usage.
* [`UnavailableFunction`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_swift_bestpractices.html#unavailablefunction) flags any function throwing
a `fatalError` not marked as `@available(*, unavailable)` to ensure no calls are actually performed in
the codebase.
**XML**
* [`MissingEncoding`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_xml_bestpractices.html#missingencoding) finds XML files without explicit encoding.
### Changed Rules
**General changes**
* All statistical rules (like ExcessiveClassLength, ExcessiveParameterList) have been simplified and unified.
The properties `topscore` and `sigma` have been removed. The property `minimum` is still there, however the type is not
a decimal number anymore but has been changed to an integer. This affects rules in the languages Apex, Java, PLSQL
* The general property `violationSuppressXPath` which is available for all rules to
[suppress warnings](pmd_userdocs_suppressing_warnings.html) now uses XPath version 3.1 by default.
This version of the XPath language is mostly identical to XPath 2.0. In PMD 6, XPath 1.0 has been used.
If you upgrade from PMD 6, you need to verify your `violationSuppressXPath` properties.
**Apex General changes**
* The properties `cc_categories`, `cc_remediation_points_multiplier`, `cc_block_highlighting` have been removed
from all rules. These properties have been deprecated since PMD 6.13.0.
See [issue #1648](https://github.com/pmd/pmd/issues/1648) for more details.
**Apex Codestyle**
* [`MethodNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#methodnamingconventions): The deprecated rule property `skipTestMethodUnderscores` has
been removed. It was actually deprecated since PMD 6.15.0, but was not mentioned in the release notes
back then. Use the property `testPattern` instead to configure valid names for test methods.
**Java General changes**
* Violations reported on methods or classes previously reported the line range of the entire method
or class. With PMD 7.0.0, the reported location is now just the identifier of the method or class.
This affects various rules, e.g. [`CognitiveComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cognitivecomplexity).
The report location is controlled by the overrides of the method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#getReportLocation()"><code>Node#getReportLocation</code></a>
in different node types.
See [issue #4439](https://github.com/pmd/pmd/issues/4439) and [issue #730](https://github.com/pmd/pmd/issues/730)
for more details.
**Java Best Practices**
* [`ArrayIsStoredDirectly`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#arrayisstoreddirectly): Violations are now reported on the assignment and not
anymore on the formal parameter. The reported line numbers will probably move.
* [`AvoidReassigningLoopVariables`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#avoidreassigningloopvariables): This rule might not report anymore all
reassignments of the control variable in for-loops when the property `forReassign` is set to `skip`.
See [issue #4500](https://github.com/pmd/pmd/issues/4500) for more details.
* [`LooseCoupling`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#loosecoupling): The rule has a new property to allow some types to be coupled
to (`allowedTypes`).
* [`UnusedLocalVariable`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#unusedlocalvariable): This rule has some important false-negatives fixed
and finds many more cases now. For details see issues [#2130](https://github.com/pmd/pmd/issues/2130),
[#4516](https://github.com/pmd/pmd/issues/4516), and [#4517](https://github.com/pmd/pmd/issues/4517).
**Java Codestyle**
* [`MethodNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#methodnamingconventions): The property `checkNativeMethods` has been removed. The
property was deprecated since PMD 6.3.0. Use the property `nativePattern` to control whether native methods
should be considered or not.
* [`ShortVariable`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#shortvariable): This rule now also reports short enum constant names.
* [`UseDiamondOperator`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#usediamondoperator): The property `java7Compatibility` has been removed. The rule now
handles Java 7 properly without a property.
* [`UnnecessaryFullyQualifiedName`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryfullyqualifiedname): The rule has two new properties,
to selectively disable reporting on static field and method qualifiers. The rule also has been improved
to be more precise.
* [`UselessParentheses`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#uselessparentheses): The rule has two new properties which control how strict
the rule should be applied. With `ignoreClarifying` (default: true) parentheses that are strictly speaking
not necessary are allowed, if they separate expressions of different precedence.
The other property `ignoreBalancing` (default: true) is similar, in that it allows parentheses that help
reading and understanding the expressions.
* [`EmptyControlStatement`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#emptycontrolstatement): The rule has a new property to allow empty blocks when
they contain a comment (`allowCommentedBlocks`).
**Java Design**
* [`CyclomaticComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cyclomaticcomplexity): The property `reportLevel` has been removed. The property was
deprecated since PMD 6.0.0. The report level can now be configured separated for classes and methods using
`classReportLevel` and `methodReportLevel` instead.
* [`ImmutableField`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#immutablefield): The property `ignoredAnnotations` has been removed. The property was
deprecated since PMD 6.52.0.
* [`LawOfDemeter`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#lawofdemeter): The rule has a new property `trustRadius`. This defines the maximum degree
of trusted data. The default of 1 is the most restrictive.
* [`NPathComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#npathcomplexity): The property `minimum` has been removed. It was deprecated since PMD 6.0.0.
Use the property `reportLevel` instead.
* [`SingularField`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#singularfield): The properties `checkInnerClasses` and `disallowNotAssignment` have been removed.
The rule is now more precise and will check these cases properly.
* [`UseUtilityClass`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#useutilityclass): The property `ignoredAnnotations` has been removed.
**Java Documentation**
* [`CommentContent`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentcontent): The properties `caseSensitive` and `disallowedTerms` are removed. The
new property `forbiddenRegex` can be used now to define the disallowed terms with a single regular
* Overridden methods are now detected even without the `@Override`
annotation. This is relevant for the property `methodWithOverrideCommentRequirement`.
See also [pull request #3757](https://github.com/pmd/pmd/pull/3757).
* Elements in annotation types are now detected as well. This might lead to an increased number of violations
for missing public method comments.
* The deprecated property `headerCommentRequirement` has been removed. Use the property `classCommentRequirement`
instead.
* [`CommentSize`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_documentation.html#commentsize): When determining the line-length of a comment, the leading comment
prefix markers (e.g. `*` or `//`) are ignored and don't add up to the line-length.
See also [pull request #4369](https://github.com/pmd/pmd/pull/4369).
**Java Error Prone**
* [`AvoidDuplicateLiterals`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#avoidduplicateliterals): The property `exceptionfile` has been removed. The property was
deprecated since PMD 6.10.0. Use the property `exceptionList` instead.
* [`DontImportSun`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#dontimportsun): `sun.misc.Signal` is not special-cased anymore.
* [`EmptyCatchBlock`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#emptycatchblock): `CloneNotSupportedException` and `InterruptedException` are not
special-cased anymore. Rename the exception parameter to `ignored` to ignore them.
* [`ImplicitSwitchFallThrough`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#implicitswitchfallthrough): Violations are now reported on the case statements
rather than on the switch statements. This is more accurate but might result in more violations now.
* [`NonSerializableClass`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#nonserializableclass): The deprecated property `prefix` has been removed
without replacement. In a serializable class all fields have to be serializable regardless of the name.
### Deprecated Rules
In PMD 7.0.0, there are no deprecated rules.
### Removed Rules
The following previously deprecated rules have been finally removed:
**Apex**
* performance.xml/AvoidSoqlInLoops <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`OperationWithLimitsInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop)
* performance.xml/AvoidSoslInLoops <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`OperationWithLimitsInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop)
* performance.xml/AvoidDmlStatementsInLoops <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`OperationWithLimitsInLoop`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_performance.html#operationwithlimitsinloop)
* codestyle.xml/VariableNamingConventions <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`FieldNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_apex_codestyle.html#fieldnamingconventions),
use [`ReturnEmptyCollectionRatherThanNull`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_errorprone.html#returnemptycollectionratherthannull)
* performance.xml/ShortInstantiation <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`UnnecessaryBoxing`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing)
and [`PrimitiveWrapperInstantiation`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#primitivewrapperinstantiation)
* design.xml/SimplifyBooleanAssertion <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`SimplifiableTestAssertion`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion)
* performance.xml/SimplifyStartsWith <spanstyle='font-size: small;'>(deleted)</span> ➡️ not replaced
* design.xml/StdCyclomaticComplexity <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`CyclomaticComplexity`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_design.html#cyclomaticcomplexity)
* codestyle.xml/SuspiciousConstantFieldName <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`FieldNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#fieldnamingconventions)
* performance.xml/UnnecessaryWrapperObjectCreation <spanstyle='font-size: small;'>(deleted)</span> ➡️ use the new rule [`UnnecessaryBoxing`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryboxing)
* multithreading.xml/UnsynchronizedStaticDateFormatter <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`UnsynchronizedStaticFormatter`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter)
* bestpractices.xml/UnusedImports <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`UnnecessaryImport`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#unnecessaryimport)
* bestpractices.xml/UseAssertEqualsInsteadOfAssertTrue <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`SimplifiableTestAssertion`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion)
* bestpractices.xml/UseAssertNullInsteadOfAssertEquals <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`SimplifiableTestAssertion`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion)
* bestpractices.xml/UseAssertSameInsteadOfAssertEquals <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`SimplifiableTestAssertion`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion)
* bestpractices.xml/UseAssertTrueInsteadOfAssertEquals <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`SimplifiableTestAssertion`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion)
* codestyle.xml/VariableNamingConventions <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`FieldNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#fieldnamingconventions),
[`FormalParameterNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#formalparameternamingconventions), or [`LocalVariableNamingConventions`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#localvariablenamingconventions)
* codestyle.xml/WhileLoopsMustUseBraces <spanstyle='font-size: small;'>(deleted)</span> ➡️ use [`ControlStatementBraces`](https://docs.pmd-code.org/pmd-doc-7.0.0/pmd_rules_java_codestyle.html#controlstatementbraces)
### Removed rulesets
The following previously deprecated rulesets have been removed. These were the left-over rulesets from PMD 5.
The rules have been moved into categories with PMD 6.
The full detailed documentation of the changes are available in the
[Migration Guide for PMD 7](pmd_userdocs_migrating_to_pmd7.html)
</div>
### For endusers
* PMD 7 requires Java 8 or above to execute.
* CLI changed: Custom scripts need to be updated (`run.sh pmd ...` ➡️ `pmd check ...`, `run.sh cpd ...` ➡️ `pmd cpd ...`).
* Java module revamped: Custom rules need to be updated.
* Removed rules: Custom rulesets need to be reviewed. See above for a list of new and removed rules.
* XPath 1.0 and 2.0 support is removed, `violationSuppressXPath` now requires XPath 3.1: Custom rulesets need
to be reviewed.
* Custom rules using rulechains: Need to override <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#buildTargetSelector()"><code>AbstractRule#buildTargetSelector</code></a>
using <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleTargetSelector.html#forTypes(java.lang.Class,java.lang.Class...)"><code>RuleTargetSelector#forTypes</code></a>.
* The asset filenames of PMD on [GitHub Releases](https://github.com/pmd/pmd/releases) are
now `pmd-dist-<version>-bin.zip`, `pmd-dist-<version>-src.zip` and `pmd-dist-<version>-doc.zip`.
Keep that in mind, if you have an automated download script.
The structure inside the ZIP files stay the same, e.g. we still provide inside the binary distribution
ZIP file the base directory `pmd-bin-<version>`.
* For maven-pmd-plugin usage, see [Using PMD 7 with maven-pmd-plugin](pmd_userdocs_tools_maven.html#using-pmd-7-with-maven-pmd-plugin).
* For gradle users, at least gradle 8.6 is required for PMD 7.
### For integrators
* PMD 7 is a major release where many things have been moved or rewritten.
* All integrators will require some level of change to adapt to the change in the API.
* For more details look at the deprecations notes of the past PMD 6 releases. These are collected below
under [API Changes](#api-changes).
* The PMD Ant tasks, which were previously in the module `pmd-core` has been moved into its own module `pmd-ant`,
which needs to be added explicitly now as an additional dependency.
* The CLI classes have also been moved out of `pmd-core` into its own module `pmd-cli`. The old entry point, the
main class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> is gone.
## 🚨 API
The API of PMD has been growing over the years and needed some cleanup. The goal is, to
have a clear separation between a well-defined API and the implementation, which is internal.
This should help us in future development.
This however entails some incompatibilities and deprecations.
See [ADR 3 - API evolution principles](pmd_projectdocs_decisions_adr_3.html) and
Properties "cc_categories", "cc_remediation_points_multiplier", "cc_block_highlighting" can no longer be overridden in rulesets.
They were deprecated without replacement.
* The old GUI applications accessible through `run.sh designerold` and `run.sh bgastviewer`
(and corresponding Batch scripts) have been removed from the PMD distribution. Please use the newer rule designer
with `pmd designer`. The corresponding classes in packages `java.net.sourceforge.pmd.util.viewer` and
`java.net.sourceforge.pmd.util.designer` have all been removed.
* All API related to XPath support has been moved to the package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.xpath</code></a>.
This includes API that was previously dispersed over `net.sourceforge.pmd.lang`, `net.sourceforge.pmd.lang.ast.xpath`,
`net.sourceforge.pmd.lang.rule.xpath`, `net.sourceforge.pmd.lang.rule`, and various language-specific packages
(which were made internal).
* The implementation of the Ant integration has been moved from the module `pmd-core` to a new module `pmd-ant`.
This involves classes in package <ahref="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/package-summary.html#"><code>net.sourceforge.pmd.ant</code></a>. The ant CPDTask class `net.sourceforge.pmd.cpd.CPDTask`
has been moved into the same package <ahref="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/package-summary.html#"><code>net.sourceforge.pmd.ant</code></a>. You'll need to update your taskdef entries in your
build.xml files with the FQCN <ahref="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/CPDTask.html#"><code>net.sourceforge.pmd.ant.CPDTask</code></a> if you use it anywhere.
* Utility classes in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a>, that have previously marked as `@InternalApi` have been finally
moved to an internal sub package and are now longer available.
This includes ClasspathClassLoader, FileFinder, FileUtil, and IOUtil.
* The following utility classes in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a> are now considered public API:
* Moved the two classes <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/AntlrCpdLexer.html#"><code>AntlrCpdLexer</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/JavaccCpdLexer.html#"><code>JavaccCpdLexer</code></a> from
`internal` package into package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/impl/package-summary.html#"><code>net.sourceforge.pmd.cpd.impl</code></a>. These two classes are part of the API and
are base classes for CPD language implementations. Since 7.0.0-rc2.
Note: These two classes have been previously called "AntlrTokenizer" and "JavaCCTokenizer".
*`AntlrBaseRule` is gone in favor of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractVisitorRule.html#"><code>AbstractVisitorRule</code></a>. Since 7.0.0-rc2.
* The classes `net.sourceforge.pmd.lang.kotlin.ast.KotlinInnerNode` and
`net.sourceforge.pmd.lang.swift.ast.SwiftInnerNode` are package-private now. Since 7.0.0-rc2.
### XPath 3.1 support
Support for XPath versions 1.0, 1.0-compatibility, 2.0 was removed. The default
(and only) supported XPath version is now XPath 3.1. This version of the XPath language is mostly identical to
XPath 2.0.
Notable changes:
* The deprecated support for sequence-valued attributes is removed. Sequence-valued properties are still supported.
* Refer to [the Saxonica documentation](https://www.saxonica.com/html/documentation/expressions/xpath31new.html) for
an introduction to new features in XPath 3.1.
### Node stream API for AST traversal
This version includes a powerful API to navigate trees, similar in usage to the Java 8 Stream API:
A pipeline like shown here traverses the tree lazily, which is more efficient than traversing eagerly to put all
descendants in a list. It is also much easier to change than the old imperative way.
To make this API as accessible as possible, the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface has been fitted with new
methods producing node streams. Those methods replace previous tree traversal methods like `Node#findDescendantsOfType`.
In all cases, they should be more efficient and more convenient.
See <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/NodeStream.html#"><code>NodeStream</code></a> for more details.
The metrics framework has been made simpler and more general.
* The metric interface takes an additional type parameter, representing the result type of the metric. This is
usually `Integer` or `Double`. It avoids widening the result to a `double` just to narrow it down.
This makes it so, that `Double.NaN` is not an appropriate sentinel value to represent "not supported" anymore.
Instead, `computeFor` may return `null` in that case (or a garbage value). The value `null` may have caused
problems with the narrowing casts, which through unboxing, might have thrown an NPE. But when we deprecated
the language-specific metrics façades to replace them with the generic <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#"><code>MetricsUtil</code></a>,
we took care of making
the new methods throw an exception if the metric cannot be computed on the parameter. This forces you to guard
calls to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#computeMetric(net.sourceforge.pmd.lang.metrics.Metric,N)"><code>MetricsUtil#computeMetric</code></a> (and other overloads)
with something like `if (metric.supports(node))`. If you're following
this pattern, then you won't observe the undefined behavior.
* The `MetricKey` interface is not so useful and has been merged into the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a>
interface and removed. So the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a> interface has the new method
* The framework is not tied to at most 2 node types per language anymore. Previously those were nodes for
classes and for methods/constructors. Instead, many metrics support more node types. For example, NCSS can
be computed on any code block.
For that reason, keeping around a hard distinction between "class metrics" and "operation metrics" is not
useful. So in the Java framework for example, we removed the interfaces `JavaClassMetric`, `JavaOperationMetric`,
abstract classes for those, `JavaClassMetricKey`, and `JavaOperationMetricKey`. Metric constants are now all
inside the <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a> utility class. The same was done in the Apex framework.
We don't really need abstract classes for metrics now. So `AbstractMetric` is also removed from pmd-core.
There is a factory method on the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/Metric.html#"><code>Metric</code></a> interface to create a metric easily.
* This makes it so, that <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/LanguageMetricsProvider.html#"><code>LanguageMetricsProvider</code></a> does not need type parameters.
It can just return a `Set<Metric<?, ?>>` to list available metrics.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/metrics/Signature.html#"><code>Signature</code></a>s, their implementations, and the interface `SignedNode` have been
removed. Node streams allow replacing their usages very easily.
### Testing framework
* PMD 7 has been upgraded to use JUnit 5 only. That means, that JUnit4 related classes have been removed, namely
* Rule tests, that use <ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/SimpleAggregatorTst.html#"><code>SimpleAggregatorTst</code></a> or
<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/PmdRuleTst.html#"><code>PmdRuleTst</code></a> work as before without change, but use
now JUnit5 under the hood. If you added additional JUnit4 tests to your rule test classes, then you'll
need to upgrade them to use JUnit5.
### Language Lifecycle and Language Properties
* Language modules now provide a proper lifecycle and can store global information. This enables the implementation
of multifile analysis.
* Language modules can define [custom language properties](pmd_languages_configuration.html)
which can be set via environment variables. This allows to add and use language specific configuration options
without the need to change pmd-core.
The documentation page has been updated:
[Adding a new language with JavaCC](pmd_devdocs_major_adding_new_language_javacc.html)
and [Adding a new language with ANTLR](pmd_devdocs_major_adding_new_language_antlr.html)
Related issue: [[core] Language lifecycle (#3782)](https://github.com/pmd/pmd/issues/3782)
### Rule properties
* The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.
* All properties which accept multiple values now use a comma (`,`) as a delimiter. The previous default was a
pipe character (`|`). The delimiter is not configurable anymore. If needed, the comma can be escaped
with a backslash.
* The `min` and `max` attributes in property definitions in the XML are now optional and can appear separately
or be omitted.
### New Programmatic API for CPD
This release introduces a new programmatic API to replace the old class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#"><code>CPD</code></a>. The new API uses a similar model to
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a> and is called <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a>. Programmatic execution of CPD should now be
done with a <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a> and a <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a>, for instance:
- method `getParenthesisDepth()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#"><code>ASTTemplateFragment</code></a>: To get the content of the template, use now
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTemplateFragment.html#getContent()"><code>getContent</code></a> or `@Content` instead of `getImage()`/`@Image`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnnamedPattern.html#"><code>ASTUnnamedPattern</code></a> is not experimental anymore. The language feature
has been standardized with Java 22.
**New API**
The API around <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/treeexport/TreeRenderer.html#"><code>TreeRenderer</code></a> has been declared as stable. It was previously
experimental. It can be used via the CLI subcommand `ast-dump` or programmatically, as described
on [Creating XML dump of the AST](pmd_userdocs_extending_ast_dump.html).
**General AST Changes to avoid `@Image`**
See [General AST Changes to avoid @Image](pmd_userdocs_migrating_to_pmd7.html#general-ast-changes-to-avoid-image)
in the migration guide for details.
**XPath Rules**
* The property `version` was already deprecated and has finally been removed. Please don't define the version
property anymore in your custom XPath rules. By default, the latest XPath version will be used, which
is XPath 3.1.
**Moved classes/consolidated packages**
* pmd-core
* Many types have been moved from the base package `net.sourceforge.pmd` into subpackage <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/package-summary.html#"><code>net.sourceforge.pmd.lang.rule</code></a>
* Many types have been moved from the base package `net.sourceforge.pmd` into subpackage <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/package-summary.html#"><code>net.sourceforge.pmd.reporting</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathRule.html#"><code>XPathRule</code></a> has been moved into subpackage <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.xpath</code></a>.
* pmd-html
*`net.sourceforge.pmd.lang.html.ast.HtmlCpdLexer` moved into package `cpd`: <ahref="https://docs.pmd-code.org/apidocs/pmd-html/7.0.0/net/sourceforge/pmd/lang/html/cpd/HtmlCpdLexer.html#"><code>HtmlCpdLexer</code></a>.
* pmd-lang-test: All types have been moved under the new base package <ahref="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/package-summary.html#"><code>net.sourceforge.pmd.lang.test</code></a>:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/AbstractMetricTestRule.html#"><code>AbstractMetricTestRule</code></a> (moved from `net.sourceforge.pmd.test.AbstractMetricTestRule`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/BaseTextComparisonTest.html#"><code>BaseTextComparisonTest</code></a> (moved from `net.sourceforge.pmd.test.BaseTextComparisonTest`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/cpd/CpdTextComparisonTest.html#"><code>CpdTextComparisonTest</code></a> (moved from `net.sourceforge.pmd.cpd.test.CpdTextComparisonTest`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-lang-test/7.0.0/net/sourceforge/pmd/lang/test/ast/BaseTreeDumpTest.html#"><code>BaseTreeDumpTest</code></a> (moved from `net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest`)
* And many other types have been moved from `net.sourceforge.pmd.lang.ast.test` to `net.sourceforge.pmd.lang.test`.
* pmd-scala
*<ahref="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaCpdLexer.html#"><code>ScalaCpdLexer</code></a> (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaCpdLexer`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/cpd/ScalaTokenAdapter.html#"><code>ScalaTokenAdapter</code></a> (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaTokenAdapter`)
* pmd-test
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/lang/rule/AbstractRuleSetFactoryTest.html#"><code>AbstractRuleSetFactoryTest</code></a> (moved from `net.sourceforge.pmd.lang.rule.AbstractRuleSetFactoryTest`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/AbstractAntTestHelper.html#"><code>AbstractAntTestHelper</code></a> (moved from `net.sourceforge.pmd.ant.AbstractAntTestHelper`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/AbstractLanguageVersionTest.html#"><code>AbstractLanguageVersionTest</code></a> (moved from `net.sourceforge.pmd.AbstractLanguageVersionTest`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/PmdRuleTst.html#"><code>PmdRuleTst</code></a> (moved from `net.sourceforge.pmd.testframework.PmdRuleTst`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/RuleTst.html#"><code>RuleTst</code></a> (moved from `net.sourceforge.pmd.testframework.RuleTst`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/7.0.0/net/sourceforge/pmd/test/SimpleAggregatorTst.html#"><code>SimpleAggregatorTst</code></a> (moved from `net.sourceforge.pmd.testframework.SimpleAggregatorTst`)
* pmd-xml
*<ahref="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/pom/PomLanguageModule.html#"><code>PomLanguageModule</code></a> (moved from `net.sourceforge.pmd.lang.pom.PomLanguageModule`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/wsdl/WsdlLanguageModule.html#"><code>WsdlLanguageModule</code></a> (moved from `net.sourceforge.pmd.lang.wsdl.WsdlLanguageModule`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-xml/7.0.0/net/sourceforge/pmd/lang/xml/xsl/XslLanguageModule.html#"><code>XslLanguageModule</code></a> (moved from `net.sourceforge.pmd.lang.xsl.XslLanguageModule`)
* pmd-visualforce
* The package `net.sourceforge.pmd.lang.vf` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/package-summary.html#"><code>net.sourceforge.pmd.lang.visualforce</code></a>.
* The language id of visualforce has been changed to `visualforce` (it was previously just "vf")
* The ruleset changed: `category/vf/security.xml` ➡️ `category/visualforce/security.xml`
* pmd-velocity (renamed from pmd-vm)
* The package `net.sourceforge.pmd.lang.vm` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/package-summary.html#"><code>net.sourceforge.pmd.lang.velocity</code></a>.
* The language id of the Velocity module has been changed to `velocity` (it was previously just "vm")
* The rulesets changed: `category/vm/...` ➡️ `category/velocity/...`
* Many classes used the prefix `Vm`, e.g. `VmLanguageModule`. This has been changed to be `Vtl`:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/AbstractAccumulatingRenderer.html#renderFileReport(net.sourceforge.pmd.reporting.Report)"><code>renderFileReport</code></a> - this method is now final
* Method `create(FileAnalysisListener listener, Rule rule)` has been removed.
*`net.sourceforge.pmd.rules.RuleFactory`: moved into subpackage `lang.rule` and made package private.
It has now been hidden completely from public API.
* Many types have been moved from into subpackage `lang.rule.internal`.
*`net.sourceforge.pmd.RuleSetReference`
*`net.sourceforge.pmd.RuleSetReferenceId`
*`net.sourceforge.pmd.RuleSets`
*`net.sourceforge.pmd.lang.rule.ParametricRuleViolation` is now package private and moved to `net.sourceforge.pmd.reporting.ParametricRuleViolation`.
The only public API is <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#"><code>RuleViolation</code></a>.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/LexException.html#"><code>net.sourceforge.pmd.lang.ast.LexException</code></a> - the constructor `LexException(boolean, String, int, int, String, char)` is now package private.
It is only used by JavaCC-generated token managers.
* Method `setAnalysisCache(AnalysisCache)` is now package private. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setAnalysisCacheLocation(java.lang.String)"><code>setAnalysisCacheLocation</code></a> instead.
* Method `getAnalysisCache()` is now package private.
* Method `newCollector(LanguageVersionDiscoverer, PmdReporter)` is now package private.
* Method `newCollector(PmdReporter)` is now package private.
* In order to create a FileCollector, use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#files()"><code>files</code></a> instead.
* Method `replacementIfDeprecated()` is now package private.
*`net.sourceforge.pmd.properties.PropertyTypeId` - moved in subpackage `internal`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>net.sourceforge.pmd.properties.PropertyDescriptor</code></a> - method `getTypeId()` is now package private.
* pmd-doc
* The whole maven module `pmd-doc` is now considered internal API even though it was not declared so before.
It's used to generate the rule documentation for the built-in rules.
* All the classes have been moved into package `net.sourceforge.pmd.doc.internal`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/InternalApiBridge.html#"><code>net.sourceforge.pmd.lang.modelica.ast.InternalApiBridge</code></a> renamed from `InternalModelicaNodeApi`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/resolver/InternalApiBridge.html#"><code>net.sourceforge.pmd.lang.modelica.resolver.InternalApiBridge</code></a> renamed from `InternalModelicaResolverApi`.
*`net.sourceforge.pmd.lang.modelica.resolver.ModelicaSymbolFacade` has been removed.
*`net.sourceforge.pmd.lang.modelica.resolver.ResolutionContext` (moved to internal)
*`net.sourceforge.pmd.lang.modelica.resolver.ResolutionState` (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi.
*`net.sourceforge.pmd.lang.modelica.resolver.Watchdog` (moved to internal). Note: it was not previously marked with @<!-- -->InternalApi.
* pmd-plsql
*`net.sourceforge.pmd.lang.plsql.rule.design.AbstractNcssCountRule` is now package private.
* Method `dialectOf(LanguageVersion)` has been removed.
**Removed classes and members (previously deprecated)**
The annotation `@DeprecatedUntil700` has been removed.
* pmd-core
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLanguageProperties.html#"><code>CpdLanguageProperties</code></a>. The field `DEFAULT_SKIP_BLOCKS_PATTERN` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/antlr4/BaseAntlrNode.html#"><code>BaseAntlrNode</code></a> - method `joinTokenText()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> - many methods have been removed:
*`getNthParent(int)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors()"><code>ancestors</code></a> instead, e.g. `node.ancestors().get(n-1)`
*`getFirstParentOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors(java.lang.Class)"><code>ancestors</code></a> instead, e.g. `node.ancestors(parentType).first()`
*`getParentsOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors(java.lang.Class)"><code>ancestors</code></a> instead, e.g. `node.ancestors(parentType).toList()`
*`findChildrenOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#children(java.lang.Class)"><code>children</code></a> instead, e.g. `node.children(childType).toList()`
*`findDescendantsOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. `node.descendants(targetType).toList()`
*`findDescendantsOfType(Class,boolean)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. `node.descendants(targetType).crossFindBoundaries(b).toList()`
*`getFirstChildOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#firstChild(java.lang.Class)"><code>firstChild</code></a> instead
*`getFirstDescendantOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. `node.descendants(targetType).first()`
*`hasDescendantOfType(Class)` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#descendants(java.lang.Class)"><code>descendants</code></a> instead, e.g. `node.descendants(targetType).nonEmpty()`
*`findChildNodesWithXPath(String)` - Use the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/NodeStream.html#"><code>NodeStream</code></a> API instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/impl/GenericNode.html#"><code>GenericNode</code></a> - method `getNthParent(int)` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#ancestors()"><code>ancestors</code></a> instead, e.g. `node.ancestors().get(n-1)`
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#"><code>FileCollector</code></a> - method `addZipFile(java.nio.file.Path)` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>addZipFileWithContent</code></a> instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#"><code>TextDocument</code></a> - method `readOnlyString(CharSequence,String,LanguageVersion)` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#readOnlyString(java.lang.CharSequence,net.sourceforge.pmd.lang.document.FileId,net.sourceforge.pmd.lang.LanguageVersion)"><code>readOnlyString</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> - method `dataSourceCompat(DataSource,PMDConfiguration)` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> directly, e.g. <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#forPath(java.nio.file.Path,java.nio.charset.Charset,net.sourceforge.pmd.lang.LanguageVersion)"><code>forPath</code></a>
* Only XPath version 3.1 is now supported. This version of the XPath language is mostly identical to
XPath 2.0. XPath rules by default use now <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/XPathVersion.html#XPATH_3_1"><code>XPATH_3_1</code></a>.
*`net.sourceforge.pmd.lang.rule.AbstractDelegateRule` removed. It has been merged with <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a>.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#"><code>AbstractRule</code></a> - the following methods have been removed:
*`deepCopyValuesTo(AbstractRule)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#deepCopy()"><code>deepCopy</code></a> instead.
*`addRuleChainVisit(Class)` - override <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#buildTargetSelector()"><code>buildTargetSelector</code></a> in order to register nodes for rule chain visits.
*`addViolation(...)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#addViolation(net.sourceforge.pmd.lang.ast.Node)"><code>addViolation</code></a> instead, e.g. via `asCtx(data).addViolation(...)`.
Note: These methods were only marked as deprecated in javadoc.
*`addViolationWithMessage(...)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleContext.html#addViolationWithMessage(net.sourceforge.pmd.lang.ast.Node,java.lang.String)"><code>addViolationWithMessage</code></a> instead, e.g. via
`asCtx(data).addViolationWithMessage(...)`. Note: These methods were only marked as deprecated in javadoc.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a> - the following methods have been removed:
*`setRuleSetReference(RuleSetReference)` - without replacement. Just construct new <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>RuleReference</code></a> instead.
*`hasOverriddenProperty(PropertyDescriptor)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleReference.html#isPropertyOverridden(net.sourceforge.pmd.properties.PropertyDescriptor)"><code>isPropertyOverridden</code></a> instead.
* The constant `XPATH_DESCRIPTOR` has been made private and is not accessible anymore.
* The default constructor has been made package-private and is not accessible anymore.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#"><code>Language</code></a> - method `getTerseName()` removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#getId()"><code>getId</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#"><code>LanguageModuleBase</code></a> - method `getTerseName()` removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageModuleBase.html#getId()"><code>getId</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code>LanguageRegistry</code></a> - the following methods have been removed:
*`getLanguage(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getLanguageByFullName(java.lang.String)"><code>getLanguageByFullName</code></a>
via <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#PMD"><code>PMD</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#CPD"><code>CPD</code></a> instead.
*`findLanguageByTerseName(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#getLanguageById(java.lang.String)"><code>getLanguageById</code></a>
via <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#PMD"><code>PMD</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageRegistry.html#CPD"><code>CPD</code></a> instead.
*`findByExtension(String)` - removed without replacement.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionDiscoverer.html#getLanguagesForFile(java.lang.String)"><code>getLanguagesForFile</code></a> instead.
* field `propertyDescriptors` has been made private and is not accessible anymore.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertyDescriptors()"><code>getPropertyDescriptors</code></a> instead.
* field `propertyValuesByDescriptor` has been made private and is not accessible anymore.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertiesByPropertyDescriptor()"><code>getPropertiesByPropertyDescriptor</code></a>
or <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getOverriddenPropertiesByPropertyDescriptor()"><code>getOverriddenPropertiesByPropertyDescriptor</code></a> instead.
* method `copyPropertyDescriptors()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertyDescriptors()"><code>getPropertyDescriptors</code></a> instead.
* method `copyPropertyValues()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getPropertiesByPropertyDescriptor()"><code>getPropertiesByPropertyDescriptor</code></a>
or <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#getOverriddenPropertiesByPropertyDescriptor()"><code>getOverriddenPropertiesByPropertyDescriptor</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#"><code>Reportable</code></a> - the following methods have been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Reportable.html#getReportLocation()"><code>getReportLocation</code></a> instead
*`getBeginLine()`
*`getBeginColumn()`
*`getEndLine()`
*`getEndColumn()`
*`net.sourceforge.pmd.util.datasource.DataSource` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#"><code>AbstractConfiguration</code></a> - the following methods have been removed:
*`setIgnoreFilePath(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setIgnoreFilePath(java.nio.file.Path)"><code>setIgnoreFilePath</code></a> instead.
*`setInputFilePath(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputFilePath(java.nio.file.Path)"><code>setInputFilePath</code></a> instead.
*`setInputPaths(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputPathList(java.util.List)"><code>setInputPathList</code></a> or
*`setInputUri(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setInputUri(java.net.URI)"><code>setInputUri</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a> - the following methods have been removed
*`prependClasspath(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#prependAuxClasspath(java.lang.String)"><code>prependAuxClasspath</code></a> instead.
*`getRuleSets()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()"><code>getRuleSetPaths</code></a> instead.
*`setRuleSets(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.util.List)"><code>setRuleSets</code></a> or
*`setReportFile(String)` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.nio.file.Path)"><code>setReportFile</code></a> instead.
*`getReportFile()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>getReportFilePath</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#"><code>Report</code></a> - method `merge(Report)` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.reporting.Report)"><code>union</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a> - method `toFactory()` has been made package private and is not accessible anymore.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#"><code>RuleViolation</code></a> - the following methods have been removed:
*`getPackageName()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#PACKAGE_NAME"><code>PACKAGE_NAME</code></a> instead, e.g. `getAdditionalInfo().get(PACKAGE_NAME)`.
*`getClassName()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#CLASS_NAME"><code>CLASS_NAME</code></a> instead, e.g. `getAdditionalInfo().get(CLASS_NAME)`.
*`getMethodName()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#METHOD_NAME"><code>METHOD_NAME</code></a> instead, e.g. `getAdditionalInfo().get(METHOD_NAME)`.
*`getVariableName()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getAdditionalInfo()"><code>getAdditionalInfo</code></a> with <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#VARIABLE_NAME"><code>VARIABLE_NAME</code></a> instead, e.g. `getAdditionalInfo().get(VARIABLE_NAME)`.
* pmd-apex
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTApexFile.html#"><code>ASTApexFile</code></a>
*`#getApexVersion()`: In PMD 6, this method has been deprecated but was defined in the class `ApexRootNode`.
The version returned is always "Version.CURRENT", as the apex compiler integration
doesn't use additional information which Apex version actually is used. Therefore, this method can't be
used to determine the Apex version of the project that is being analyzed.
If the current version is needed, then `Node.getTextDocument().getLanguageVersion()` can be used. This
is the version that has been selected via CLI `--use-version` parameter.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
* method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a> - method `getNode()` is now package private.
AST nodes still have access to the underlying Jorje node via the protected property `node`.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexVisitor.html#"><code>ApexVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexVisitorBase.html#"><code>ApexVisitorBase</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTAssignmentExpression.html#getOp()"><code>getOp</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBinaryExpression.html#getOp()"><code>getOp</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTBooleanExpression.html#getOp()"><code>getOp</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPostfixExpression.html#getOp()"><code>getOp</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTPrefixExpression.html#getOp()"><code>getOp</code></a> instead.
*`net.sourceforge.pmd.lang.apex.rule.security.Helper` removed. This was actually internal API.
* pmd-java
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/AbstractPackageNameModuleDirective.html#"><code>AbstractPackageNameModuleDirective</code></a> - method `getImage()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/AbstractPackageNameModuleDirective.html#getPackageName()"><code>getPackageName</code></a> instead.
*`AbstractTypeDeclaration` - method `getImage()` has been removed.
Use `getSimpleName()` instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotation.html#"><code>ASTAnnotation</code></a> - method `getAnnotationName()` has been removed.
* constructor `ASTClassType(java.lang.String)` has been removed.
* method `getImage()` has been removed.
* method `isReferenceToClassSameCompilationUnit()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> - method `getVariableName()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLiteral.html#"><code>ASTLiteral</code></a> - the following methods have been removed:
*`isStringLiteral()` - use `node instanceof ASTStringLiteral` instead.
*`isCharLiteral()` - use `node instanceof ASTCharLiteral` instead.
*`isNullLiteral()` - use `node instanceof ASTNullLiteral` instead.
*`isBooleanLiteral()` - use `node instanceof ASTBooleanLiteral` instead.
*`isNumericLiteral()` - use `node instanceof ASTNumericLiteral` instead.
*`isIntLiteral()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isIntLiteral()"><code>isIntLiteral</code></a> instead.
*`isLongLiteral()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isLongLiteral()"><code>isLongLiteral</code></a> instead.
*`isFloatLiteral()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isFloatLiteral()"><code>isFloatLiteral</code></a> instead.
*`isDoubleLiteral()` - use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTNumericLiteral.html#isDoubleLiteral()"><code>isDoubleLiteral</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#"><code>ASTMethodDeclaration</code></a> - methods `getImage()` and `getMethodName()` have been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getName()"><code>getName</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodReference.html#"><code>ASTMethodReference</code></a> - method `getImage()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTModuleName.html#"><code>ASTModuleName</code></a> - method `getImage()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTPrimitiveType.html#"><code>ASTPrimitiveType</code></a> - method `getImage()` has been removed.
*`getArrayDepth()` has been removed. It's only available for arrays: <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTArrayType.html#getArrayDepth()"><code>getArrayDepth</code></a>.
*`isPrimitiveType()` - use `node instanceof ASTPrimitiveType` instead.
*`isArrayType()` - use `node instanceof ASTArrayType` instead.
*`isClassOrInterfaceType()` - use `node instanceof ASTClassType` instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#"><code>ASTTypeDeclaration</code></a> - method `getImage()` has been removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnaryExpression.html#"><code>ASTUnaryExpression</code></a> - method `isPrefix()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTUnaryExpression.html#getOperator()"><code>getOperator</code></a>`.isPrefix()` instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a> - methods `getImage()` and `getVariableName()` have been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#getName()"><code>getName</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaComment.html#"><code>JavaComment</code></a> - method `getImage()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaComment.html#getText()"><code>getText</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code>JavaNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaVisitor.html#"><code>JavaVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaVisitorBase.html#"><code>JavaVisitorBase</code></a> instead.
*`isFinal()` - This is still available in various subtypes, where it makes sense, e.g. <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#isFinal()"><code>isFinal</code></a>.
*`isAbstract()` - This is still available in subtypes, e.g. <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#isAbstract()"><code>isAbstract</code></a>.
*`isStrictfp()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. `hasModifiers(STRICTFP)`.
*`isSynchronized()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. `hasModifiers(SYNCHRONIZED)`.
*`isNative()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. `hasModifiers(NATIVE)`.
*`isStatic()` - This is still available in subtypes, e.g. <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#isStatic()"><code>isStatic</code></a>.
*`isVolatile()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. `hasModifiers(VOLATILE)`.
*`isTransient()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasModifiers</code></a> instead, e.g. `hasModifiers(TRANSIENT)`.
*`isPrivate()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. `getVisibility() == Visibility.V_PRIVATE`.
*`isPublic()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. `getVisibility() == Visibility.V_PUBLIC`.
*`isProtected()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. `getVisibility() == Visibility.V_PROTECTED`.
*`isPackagePrivate()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#getVisibility()"><code>getVisibility</code></a> instead, e.g. `getVisibility() == Visibility.V_PACKAGE`.
*`isSyntacticallyAbstract()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. `hasExplicitModifiers(ABSTRACT)`.
*`isSyntacticallyPublic()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. `hasExplicitModifiers(PUBLIC)`.
*`isSyntacticallyStatic()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. `hasExplicitModifiers(STATIC)`.
*`isSyntacticallyFinal()` - Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasExplicitModifiers(net.sourceforge.pmd.lang.java.ast.JModifier,net.sourceforge.pmd.lang.java.ast.JModifier...)"><code>hasExplicitModifiers</code></a> instead, e.g. `hasExplicitModifiers(FINAL)`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a> - method `getType()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#getTypeMirror()"><code>getTypeMirror</code></a> instead.
* pmd-javascript
*<ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/AbstractEcmascriptNode.html#"><code>AbstractEcmascriptNode</code></a> - method `getNode()` has been removed.
AST nodes still have access to the underlying Rhino node via the protected property `node`.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.html#getBody()"><code>getBody</code></a> instead.
* method `isCatch()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.html#hasCatch()"><code>hasCatch</code></a> instead.
* method `isFinally()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/ASTTryStatement.html#hasFinally()"><code>hasFinally</code></a> instead.
* method `jjtAccept()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
* method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptVisitor.html#"><code>EcmascriptVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptVisitorBase.html#"><code>EcmascriptVisitorBase</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspVisitor.html#"><code>JspVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspVisitorBase.html#"><code>JspVisitorBase</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaVisitor.html#"><code>ModelicaVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaVisitorBase.html#"><code>ModelicaVisitorBase</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/ast/ModelicaNode.html#"><code>ModelicaNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/AmbiguousResolutionRule.html#"><code>AmbiguousResolutionRule</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/7.0.0/net/sourceforge/pmd/lang/modelica/rule/bestpractices/ConnectUsingNonConnectorRule.html#"><code>ConnectUsingNonConnectorRule</code></a>
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitor.html#"><code>PlsqlVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PlsqlVisitorBase.html#"><code>PlsqlVisitorBase</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/PLSQLNode.html#"><code>PLSQLNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
* pmd-scala
* The maven module `pmd-scala` has been removed. Use `pmd-scala_2.13` or `pmd-scala_2.12` instead.
* Method `accept()` has been removed. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
* Method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations.
*`AbstractScalaNode` - method `getNode()` has been removed. AST nodes still have access
to the underlying Scala node via the protected property `node`.
* pmd-visualforce
*<ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfNode.html#"><code>VfNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfVisitor.html#"><code>VfVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfVisitorBase.html#"><code>VfVisitorBase</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#"><code>DataType</code></a> - method `fromBasicType(BasicType)` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/DataType.html#fromTypeName(java.lang.String)"><code>fromTypeName</code></a> instead.
* pmd-velocity (previously pmd-vm)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> - method `jjtAccept()` has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#acceptVisitor(net.sourceforge.pmd.lang.ast.AstVisitor,P)"><code>acceptVisitor</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlVisitor.html#"><code>VtlVisitor</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlVisitorBase.html#"><code>VtlVisitorBase</code></a> instead.
**Removed classes, interfaces and methods (not previously deprecated)**
* pmd-apex
* The method `isSynthetic()` in <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTMethod.html#"><code>ASTMethod</code></a> 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 <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/rule/codestyle/FieldDeclarationsShouldBeAtStartRule.html#"><code>FieldDeclarationsShouldBeAtStartRule</code></a>
has been removed. It was used to filter out synthetic methods, but these are not generated anymore with the
new parser.
* The method `getContext()` in <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTReferenceExpression.html#"><code>ASTReferenceExpression</code></a> has been removed.
It was not used and always returned `null`.
* The method `getNamespace()` in all AST nodes (defined in <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a>) has
been removed, as it was never fully implemented. It always returned an empty string.
* The method `getNameSpace()` in <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexQualifiedName.html#"><code>ApexQualifiedName</code></a> has been removed.
* The class `net.sourceforge.pmd.lang.apex.ast.ASTBridgeMethodCreator` has been removed. This was a node that has
been generated by the old Jorje parser only.
* pmd-apex-jorje
* With the switch from Jorje to Summit AST, this maven module is no longer needed and has been removed.
* pmd-core
*`net.sourceforge.pmd.util.Predicate` has been removed. It was marked as Experimental before. Use
`java.util.function.Predicate` instead.
* pmd-java
* The interface `FinalizableNode` (introduced in 7.0.0-rc1) has been removed.
Its method `isFinal()` has been moved down to the
nodes where needed, e.g. <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#isFinal()"><code>ASTLocalVariableDeclaration#isFinal</code></a>.
* The method `isPackagePrivate()` in <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassDeclaration.html#"><code>ASTClassDeclaration</code></a> (formerly ASTClassOrInterfaceDeclaration)
has been removed.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#hasVisibility(net.sourceforge.pmd.lang.java.ast.ModifierOwner.Visibility)"><code>hasVisibility</code></a> instead,
which can correctly differentiate between local and package private classes.
**Renamed classes, interfaces, methods**
* pmd-core
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/log/MessageReporter.html#"><code>MessageReporter</code></a> has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/log/PmdReporter.html#"><code>PmdReporter</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/TokenMgrError.html#"><code>TokenMgrError</code></a> has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/LexException.html#"><code>LexException</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/Tokenizer.html#"><code>Tokenizer</code></a> has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdLexer.html#"><code>CpdLexer</code></a>. Along with this rename,
all the implementations have been renamed as well (`Tokenizer` -> `CpdLexer`), e.g. "CppCpdLexer", "JavaCpdLexer".
This affects all language modules.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/AnyTokenizer.html#"><code>AnyTokenizer</code></a> has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>.
* pmd-java
* The interface `AccessNode` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ModifierOwner.html#"><code>ModifierOwner</code></a>. This is only relevant
for Java rules, which use that type directly e.g. through downcasting.
Or when using the XPath function `pmd-java:nodeIs()`.
* The node `ASTClassOrInterfaceType` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassType.html#"><code>ASTClassType</code></a>. XPath rules
need to be adjusted.
* The node `ASTClassOrInterfaceDeclaration` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassDeclaration.html#"><code>ASTClassDeclaration</code></a>.
XPath rules need to be adjusted.
* The interface `ASTAnyTypeDeclaration` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypeDeclaration.html#"><code>ASTTypeDeclaration</code></a>.
This is only relevant for Java rules, which use that type directly, e.g. through downcasting.
Or when using the XPath function `pmd-java:nodeIs()`.
* The interface `ASTMethodOrConstructorDeclaration` has been renamed to
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTExecutableDeclaration.html#"><code>ASTExecutableDeclaration</code></a>. This is only relevant for Java rules, which use that type
directly, e.g. through downcasting. Or when using the XPath function `pmd-java:nodeIs()`.
* The node `ASTVariableDeclaratorId` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a>. XPath rules
need to be adjusted.
* The node `ASTClassOrInterfaceBody` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTClassBody.html#"><code>ASTClassBody</code></a>. XPath rules
need to be adjusted.
* pmd-scala
* The interface `ScalaParserVisitor` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ast/ScalaVisitor.html#"><code>ScalaVisitor</code></a> in order
to align the naming scheme for the different language modules.
* The class `ScalaParserVisitorAdapter` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-scala_2.13/7.0.0/net/sourceforge/pmd/lang/scala/ast/ScalaVisitorBase.html#"><code>ScalaVisitorBase</code></a> in order
to align the naming scheme for the different language modules.
**New API**
These were annotated with `@Experimental`, but can now be considered stable.
* The CLI parameter `--no-ruleset-compatibility` has been removed. It was only used to allow loading
some rulesets originally written for PMD 5 also in PMD 6 without fixing the rulesets.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#"><code>RuleSetFactoryCompatibility</code></a> has been removed without replacement.
The different ways to enable/disable this filter in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a>
(Property "RuleSetFactoryCompatibilityEnabled") and
<ahref="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/PMDTask.html#"><code>PMDTask</code></a> (Property "noRuleSetCompatibility") have been removed as well.
*`textcolor` renderer (<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/TextColorRenderer.html#"><code>TextColorRenderer</code></a>) now renders always in color.
The property `color` has been removed. The possibility to override this with the system property `pmd.color`
has been removed as well. If you don't want colors, use `text` renderer (<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/TextRenderer.html#"><code>TextRenderer</code></a>).
#### 7.0.0-rc4
**pmd-java**
* Support for Java 19 preview language features have been removed. The version "19-preview" is no longer available.
**Rule properties**
* The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> to create properties.
* All properties which accept multiple values now use a comma (`,`) as a delimiter. The previous default was a
pipe character (`|`). The delimiter is not configurable anymore. If needed, the comma can be escaped
with a backslash.
* The `min` and `max` attributes in property definitions in the XML are now optional and can appear separately
or be omitted.
**New Programmatic API for CPD**
See [Detailed Release Notes for PMD 7](pmd_release_notes_pmd7.html#new-programmatic-api-for-cpd)
and [PR #4397](https://github.com/pmd/pmd/pull/4397) for details.
**Removed classes and methods**
The following previously deprecated classes have been removed:
* pmd-core
*`net.sourceforge.pmd.cpd.AbstractTokenizer` ➡️ use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a> instead (previously known as AnyTokenizer)
*`net.sourceforge.pmd.cpd.CPD` ➡️ use <ahref="https://docs.pmd-code.org/apidocs/pmd-cli/7.0.0/net/sourceforge/pmd/cli/PmdCli.html#"><code>PmdCli</code></a> from `pmd-cli` module for CLI support or use
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdAnalysis.html#"><code>CpdAnalysis</code></a> for programmatic API
➡️ use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#getSourceCodeSlice(net.sourceforge.pmd.cpd.Mark)"><code>CPDReport#getSourceCodeSlice</code></a> instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-ant/7.0.0/net/sourceforge/pmd/ant/ReportException.html#"><code>ReportException</code></a> (old package: `net.sourceforge.pmd.cpd`, moved to module `pmd-ant`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a> is now a class (was an interface)
* previously this method took a simple String for the encoding.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#"><code>PMDConfiguration</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#"><code>CPDConfiguration</code></a>
* many getters and setters have been moved to the parent class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#"><code>AbstractConfiguration</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#getNumberOfTokensPerFile()"><code>CPDReport#getNumberOfTokensPerFile</code></a> returns a `Map` of `FileId,Integer` instead of `String`
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(java.util.function.Predicate)"><code>CPDReport#filterMatches</code></a> now takes a `java.util.function.Predicate`
* constants are now <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a> instead of `String`,
changed parameters. Now takes a <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextDocument.html#"><code>TextDocument</code></a> and a <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/TokenFactory.html#"><code>TokenFactory</code></a>
* method `#createProcessor(LanguagePropertyBundle)` moved to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/PmdCapableLanguage.html#"><code>PmdCapableLanguage</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/util/StringUtil.html#linesWithTrimIndent(net.sourceforge.pmd.lang.document.Chars)"><code>StringUtil#linesWithTrimIndent</code></a> now takes a `Chars`
instead of a `String`.
* All language modules (like pmd-apex, pmd-cpp, ...)
* adapted to use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CpdCapableLanguage.html#"><code>CpdCapableLanguage</code></a>
* consistent static method `#getInstance()`
* removed constants like `ID`, `TERSE_NAME` or `NAME`. Use `getInstance().getName()` etc. instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/Language.html#getTerseName()"><code>Language#getTerseName</code></a> ➡️ use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/Language.html#getId()"><code>getId</code></a> instead
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTPattern.html#getParenthesisDepth()"><code>ASTPattern#getParenthesisDepth</code></a> has been deprecated and will be removed.
It was introduced for supporting parenthesized patterns, but that was removed with Java 21. It is only used when
parsing code as java-19-preview.
**Experimental APIs**
* To support the Java preview language features "String Templates" and "Unnamed Patterns and Variables", the following
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTPatternList.html#"><code>ASTPatternList</code></a> (Note: it was renamed from `ASTComponentPatternList`)
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTGuard.html#"><code>ASTGuard</code></a> (Note: it was renamed from `ASTSwitchGuard`)
#### 7.0.0-rc3
**PMD Distribution**
* The asset filenames of PMD on [GitHub Releases](https://github.com/pmd/pmd/releases) are
now `pmd-dist-<version>-bin.zip`, `pmd-dist-<version>-src.zip` and `pmd-dist-<version>-doc.zip`.
Keep that in mind, if you have an automated download script.
The structure inside the ZIP files stay the same, e.g. we still provide inside the binary distribution
ZIP file the base directory `pmd-bin-<version>`.
**CLI**
* The CLI option `--stress` (or `-stress`) has been removed without replacement.
* The CLI option `--minimum-priority` was changed with 7.0.0-rc1 to only take the following values:
High, Medium High, Medium, Medium Low, Low. With 7.0.0-rc2 compatibility has been restored, so that the equivalent
integer values (1 to 5) are supported as well.
**pmd-core**
* Replaced `RuleViolation::getFilename` with new <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#getFileId()"><code>RuleViolation#getFileId</code></a>, that returns a
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileId.html#"><code>FileId</code></a>. This is an identifier for a <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a>
and could represent a path name. This allows to have a separate display name, e.g. renderers use
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/FileNameRenderer.html#"><code>FileNameRenderer</code></a> to either display the full path name or a relative path name
(see <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/renderers/Renderer.html#setFileNameRenderer(net.sourceforge.pmd.reporting.FileNameRenderer)"><code>Renderer#setFileNameRenderer</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/ConfigurableFileNameRenderer.html#"><code>ConfigurableFileNameRenderer</code></a>). Many places where we used a simple String for
a path-like name before have been adapted to use the new <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileId.html#"><code>FileId</code></a>.
See [PR #4425](https://github.com/pmd/pmd/pull/4425) for details.
#### 7.0.0-rc2
**Removed classes and methods**
The following previously deprecated classes have been removed:
* Support for Java 18 preview language features have been removed. The version "18-preview" is no longer available.
* The experimental class `net.sourceforge.pmd.lang.java.ast.ASTGuardedPattern` has been removed.
#### 6.54.0
**PMD CLI**
* PMD now supports a new `--relativize-paths-with` flag (or short `-z`), which replaces `--short-names`.
It serves the same purpose: Shortening the pathnames in the reports. However, with the new flag it's possible
to explicitly define one or more pathnames that should be used as the base when creating relative paths.
The old flag `--short-names` is deprecated.
**Deprecated APIs**
**For removal**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexRootNode.html#getApexVersion()"><code>ApexRootNode#getApexVersion()</code></a> has been deprecated for removal. The version returned is
always `Version.CURRENT`, as the apex compiler integration doesn't use additional information which Apex version
actually is used. Therefore, this method can't be used to determine the Apex version of the project
that is being analyzed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#setEncoding(java.lang.String)"><code>CPDConfiguration#setEncoding</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDConfiguration.html#getEncoding()"><code>CPDConfiguration#getEncoding</code></a>. Use the methods
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#getSourceEncoding()"><code>getSourceEncoding</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#setSourceEncoding(java.nio.charset.Charset)"><code>setSourceEncoding</code></a> instead. Both are available
for `CPDConfiguration` which extends `AbstractConfiguration`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCLITest.html#"><code>BaseCLITest</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#"><code>BaseCPDCLITest</code></a> have been deprecated for removal without
replacement. CLI tests should be done in pmd-core only (and in PMD7 in pmd-cli). Individual language modules
shouldn't need to test the CLI integration logic again. Instead, the individual language modules should test their
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFile(java.nio.file.Path)"><code>FileCollector#addZipFile</code></a> has been deprecated. It is replaced
by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#addZipFileWithContent(java.nio.file.Path)"><code>FileCollector#addZipFileWithContent</code></a> which directly adds the
content of the zip file for analysis.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setReportShortNames(boolean)"><code>PMDConfiguration#setReportShortNames</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isReportShortNames()"><code>PMDConfiguration#isReportShortNames</code></a> have been deprecated for removal.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/AbstractConfiguration.html#addRelativizeRoot(java.nio.file.Path)"><code>AbstractConfiguration#addRelativizeRoot</code></a> instead.
* Some fields in <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/ant/AbstractAntTestHelper.html"><code>AbstractAntTestHelper</code></a>
**Experimental APIs**
* CPDReport has a new method which limited mutation of a given report:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDReport.html#filterMatches(net.sourceforge.pmd.util.Predicate)"><code>filterMatches</code></a> creates a new CPD report
with some matches removed with a given predicate based filter.
#### 6.53.0
**Deprecated APIs**
**For removal**
These classes / APIs have been deprecated and will be removed with PMD 7.0.0.
* PMD now supports a new `--use-version` flag, which receives a language-version pair (such as `java-8` or `apex-54`).
This supersedes the usage of `-language` / `-l` and `-version` / `-v`, allowing for multiple versions to be set in a single run.
PMD 7 will completely remove support for `-language` and `-version` in favor of this new flag.
* Support for `-V` is being deprecated in favor of `--verbose` in preparation for PMD 7.
In PMD 7, `-v` will enable verbose mode and `-V` will show the PMD version for consistency with most Unix/Linux tools.
* Support for `-min` is being deprecated in favor of `--minimum-priority` for consistency with most Unix/Linux tools, where `-min` would be equivalent to `-m -i -n`.
**CPD CLI**
* CPD now supports using `-d` or `--dir` as an alias to `--files`, in favor of consistency with PMD.
PMD 7 will remove support for `--files` in favor of these new flags.
**Linux run.sh parameters**
* Using `run.sh cpdgui` will now warn about it being deprecated. Use `run.sh cpd-gui` instead.
* The old designer (`run.sh designerold`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer`.
* The old visual AST viewer (`run.sh bgastviewer`) is completely deprecated and will be removed in PMD 7. Switch to the new JavaFX designer: `run.sh designer` for a visual tool, or use `run.sh ast-dump` for a text-based alternative.
**Deprecated API**
* The following core APIs have been marked as deprecated for removal in PMD 7:
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> and `PMD.StatusCode` - PMD 7 will ship with a revamped CLI split from pmd-core. To programmatically launch analysis you can use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#"><code>PmdAnalysis</code></a>.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getAllInputPaths()"><code>PMDConfiguration#getAllInputPaths</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPathList()"><code>PMDConfiguration#getInputPathList</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.util.List)"><code>PMDConfiguration#setInputPaths</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPathList(java.util.List)"><code>PMDConfiguration#setInputPathList</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(java.lang.String)"><code>PMDConfiguration#addInputPath</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#addInputPath(java.nio.file.Path)"><code>PMDConfiguration#addInputPath</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFilePath()"><code>PMDConfiguration#getInputFilePath</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getInputFile()"><code>PMDConfiguration#getInputFile</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFilePath()"><code>PMDConfiguration#getIgnoreFilePath</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getIgnoreFile()"><code>PMDConfiguration#getIgnoreFile</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(java.lang.String)"><code>PMDConfiguration#setInputFilePath</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputFilePath(java.nio.file.Path)"><code>PMDConfiguration#setInputFilePath</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.lang.String)"><code>PMDConfiguration#setIgnoreFilePath</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setIgnoreFilePath(java.nio.file.Path)"><code>PMDConfiguration#setIgnoreFilePath</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputUri()"><code>PMDConfiguration#getInputUri</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getUri()"><code>PMDConfiguration#getUri</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.lang.String)"><code>PMDConfiguration#setInputUri</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setInputUri(java.net.URI)"><code>PMDConfiguration#setInputUri</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFile()"><code>PMDConfiguration#getReportFile</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getReportFilePath()"><code>PMDConfiguration#getReportFilePath</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.lang.String)"><code>PMDConfiguration#setReportFile</code></a> - It is now superseded by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#setReportFile(java.nio.file.Path)"><code>PMDConfiguration#setReportFile</code></a>
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isStressTest()"><code>PMDConfiguration#isStressTest</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setStressTest(boolean)"><code>PMDConfiguration#setStressTest</code></a> - Will be removed with no replacement.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#isBenchmark()"><code>PMDConfiguration#isBenchmark</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setBenchmark(boolean)"><code>PMDConfiguration#setBenchmark</code></a> - Will be removed with no replacement, the CLI will still support it.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#"><code>CPD</code></a> and `CPD.StatusCode` - PMD 7 will ship with a revamped CLI split from pmd-core. An alternative to programmatically launch CPD analysis will be added in due time.
* In order to reduce the dependency on Apex Jorje classes, the method <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/DataType.html#fromBasicType(apex.jorje.semantic.symbol.type.BasicType)"><code>DataType#fromBasicType</code></a>
has been deprecated. The equivalent method <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/DataType.html#fromTypeName(java.lang.String)"><code>fromTypeName</code></a> should be used instead.
#### 6.51.0
No changes.
#### 6.50.0
**CPD CLI**
* CPD now supports the `--ignore-literal-sequences` argument when analyzing Lua code.
#### 6.49.0
**Deprecated API**
* In order to reduce the dependency on Apex Jorje classes, the following methods have been deprecated.
These methods all leaked internal Jorje enums. These enums have been replaced now by enums the
All these classes have now a new `getOp()` method. Existing code should be refactored to use this method instead.
It returns the new enums, like <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/AssignmentOperator.html#"><code>AssignmentOperator</code></a>, and avoids
the dependency to Jorje.
#### 6.48.0
**CPD CLI**
* CPD has a new CLI option `--debug`. This option has the same behavior as in PMD. It enables more verbose
logging output.
**Rule Test Framework**
* The module "pmd-test", which contains support classes to write rule tests, now **requires Java 8**. If you depend on
this module for testing your own custom rules, you'll need to make sure to use at least Java 8.
* The new module "pmd-test-schema" contains now the XSD schema and the code to parse the rule test XML files. The
schema has been extracted in order to easily share it with other tools like the Rule Designer or IDE plugins.
* Test schema changes:
* The attribute `isRegressionTest` of `test-code` is deprecated. The new
attribute `disabled` should be used instead for defining whether a rule test should be skipped or not.
* The attributes `reinitializeRule` and `useAuxClasspath` of `test-code` are deprecated and assumed true.
They will not be replaced.
* The new attribute `focused` of `test-code` allows disabling all tests except the focused one temporarily.
* More information about the rule test framework can be found in the documentation:
[Testing your rules](pmd_userdocs_extending_testing.html)
**Deprecated API**
* The experimental Java AST class `net.sourceforge.pmd.lang.java.ast.ASTGuardedPattern` has been deprecated and
will be removed. It was introduced for Java 17 and Java 18 Preview as part of pattern matching for switch,
but it is no longer supported with Java 19 Preview.
* The interface <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/renderer/CPDRenderer.html#"><code>CPDRenderer</code></a> is deprecated. For custom CPD renderers
the new interface <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/CPDReportRenderer.html#"><code>CPDReportRenderer</code></a> should be used.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/TestDescriptor.html#"><code>TestDescriptor</code></a> is deprecated, replaced with <ahref="https://docs.pmd-code.org/apidocs/pmd-test-schema/7.0.0/net/sourceforge/pmd/test/schema/RuleTestDescriptor.html#"><code>RuleTestDescriptor</code></a>.
* Many methods of <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/RuleTst.html#"><code>RuleTst</code></a> have been deprecated as internal API.
**Experimental APIs**
* To support the Java preview language features "Pattern Matching for Switch" and "Record Patterns", the following
Ruleset references with the following formats are now deprecated and will produce a warning
when used on the CLI or in a ruleset XML file:
-`<lang-name>-<ruleset-name>`, eg `java-basic`, which resolves to `rulesets/java/basic.xml`
- the internal release number, eg `600`, which resolves to `rulesets/releases/600.xml`
Use the explicit forms of these references to be compatible with PMD 7.
**Deprecated API**
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReferenceId.html#toString()"><code>toString</code></a> is now deprecated. The format of this
method will remain the same until PMD 7. The deprecation is intended to steer users
away from relying on this format, as it may be changed in PMD 7.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getInputPaths()"><code>getInputPaths</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setInputPaths(java.lang.String)"><code>setInputPaths</code></a> are now deprecated.
A new set of methods have been added, which use lists and do not rely on comma splitting.
**Internal API**
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPDCommandLineInterface.html#"><code>CPDCommandLineInterface</code></a> has been internalized. In order to execute CPD either
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#runCpd(java.lang.String...)"><code>CPD#runCpd</code></a> or <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/CPD.html#main(java.lang.String[])"><code>CPD#main</code></a>
should be used.
- Several members of <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCPDCLITest.html#"><code>BaseCPDCLITest</code></a> have been deprecated with replacements.
- The methods <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#start(java.lang.String)"><code>Formatter#start</code></a>,
and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ant/Formatter.html#isNoOutputSupplied()"><code>Formatter#isNoOutputSupplied</code></a> have been internalized.
#### 6.45.0
**Experimental APIs**
* Report has two new methods which allow limited mutations of a given report:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#filterViolations(java.util.function.Predicate)"><code>Report#filterViolations</code></a> creates a new report with
some violations removed with a given predicate based filter.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#union(net.sourceforge.pmd.reporting.Report)"><code>Report#union</code></a> can combine two reports into a single new Report.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/Predicate.html#"><code>net.sourceforge.pmd.util.Predicate</code></a> will be replaced in PMD7 with the standard Predicate interface from java8.
* The module `pmd-html` is entirely experimental right now. Anything in the package
`net.sourceforge.pmd.lang.html` should be used cautiously.
#### 6.44.0
**Deprecated API**
* Several members of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> have been newly deprecated, including:
-`PMD#EOL`: use `System#lineSeparator()`
-`PMD#SUPPRESS_MARKER`: use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#DEFAULT_SUPPRESS_MARKER"><code>DEFAULT_SUPPRESS_MARKER</code></a>
-`PMD#processFiles`: use the new programmatic API
-`PMD#getApplicableFiles`: is internal
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#prependClasspath(java.lang.String)"><code>PMDConfiguration#prependClasspath</code></a> is deprecated
in favour of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#prependAuxClasspath(java.lang.String)"><code>prependAuxClasspath</code></a>.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#setRuleSets(java.lang.String)"><code>PMDConfiguration#setRuleSets</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSets()"><code>getRuleSets</code></a> are deprecated. Use instead
and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDConfiguration.html#getRuleSetPaths()"><code>getRuleSetPaths</code></a>.
* Several members of <ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/cli/BaseCLITest.html#"><code>BaseCLITest</code></a> have been deprecated with replacements.
* Several members of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDCommandLineInterface.html#"><code>PMDCommandLineInterface</code></a> have been explicitly deprecated.
The whole class however was deprecated long ago already with 6.30.0. It is internal API and should
not be used.
* In modelica, the rule classes <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/6.55.0/net/sourceforge/pmd/lang/modelica/rule/AmbiguousResolutionRule.html#"><code>AmbiguousResolutionRule</code></a>
and <ahref="https://docs.pmd-code.org/apidocs/pmd-modelica/6.55.0/net/sourceforge/pmd/lang/modelica/rule/ConnectUsingNonConnector.html#"><code>ConnectUsingNonConnector</code></a> have been deprecated,
since they didn't comply to the usual rule class naming conventions yet.
The replacements are in the subpackage `bestpractices`.
**Experimental APIs**
* Together with the new programmatic API the interface
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/TextFile.html#"><code>TextFile</code></a> has been added as *experimental*. It intends
to replace <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/datasource/DataSource.html#"><code>DataSource</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/SourceCode.html#"><code>SourceCode</code></a> in the long term.
This interface will change in PMD 7 to support read/write operations
and other things. You don't need to use it in PMD 6, as <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/document/FileCollector.html#"><code>FileCollector</code></a>
decouples you from this. A file collector is available through <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PmdAnalysis.html#files()"><code>PmdAnalysis#files</code></a>.
#### 6.43.0
**Deprecated API**
Some API deprecations were performed in core PMD classes, to improve compatibility with PMD 7.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#"><code>Report</code></a>: the constructor and other construction methods like addViolation or createReport
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#"><code>RuleContext</code></a>: all constructors, getters and setters. A new set
of stable methods, matching those in PMD 7, was added to replace the `addViolation`
overloads of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/AbstractRule.html#"><code>AbstractRule</code></a>. In PMD 7, `RuleContext` will
be the API to report violations, and it can already be used as such in PMD 6.
- The field <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#configuration"><code>configuration</code></a> is unused and will be removed.
**Internal API**
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a>: methods that serve to apply rules, including `apply`, `start`, `end`, `removeDysfunctionalRules`
-<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/AbstractAccumulatingRenderer.html#renderFileReport(Report)"><code>AbstractAccumulatingRenderer#renderFileReport</code></a> is internal API
and should not be overridden in own renderers.
**Changed API**
It is now forbidden to report a violation:
- With a `null` node
- With a `null` message
- With a `null` set of format arguments (prefer a zero-length array)
Note that the message is set from the XML rule declaration, so this is only relevant
if you instantiate rules manually.
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#"><code>RuleContext</code></a> now requires setting the current rule before calling
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#apply(java.util.List,net.sourceforge.pmd.RuleContext)"><code>apply</code></a>. This is
done automatically by `RuleSet#apply` and such. Creating and configuring a
`RuleContext` manually is strongly advised against, as the lifecycle of `RuleContext`
will change drastically in PMD 7.
#### 6.42.0
No changes.
#### 6.41.0
**Command Line Interface**
The command line options for PMD and CPD now use GNU-syle long options format. E.g. instead of `-rulesets` the
preferred usage is now `--rulesets`. Alternatively one can still use the short option `-R`.
Some options also have been renamed to a more consistent casing pattern at the same time
(`--fail-on-violation` instead of `-failOnViolation`).
The old single-dash options are still supported but are deprecated and will be removed with PMD 7.
This change makes the command line interface more consistent within PMD and also less surprising
* The interface <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTCommentContainer.html#"><code>ASTCommentContainer</code></a> has been added to the Apex AST.
It provides a way to check whether a node contains at least one comment. Currently, this is only implemented for
<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ASTCatchBlockStatement.html#"><code>ASTCatchBlockStatement</code></a> and used by the rule
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
* The inner class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/TokenEntry.State.html#"><code>net.sourceforge.pmd.cpd.TokenEntry.State</code></a> is considered to be internal API.
It will probably be moved away with PMD 7.
#### 6.36.0
No changes.
#### 6.35.0
**Deprecated API**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#doPMD(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#doPMD</code></a> is deprecated.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(net.sourceforge.pmd.PMDConfiguration)"><code>PMD#runPmd</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#run(java.lang.String[])"><code>PMD#run</code></a> is deprecated.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#runPmd(java.lang.String...)"><code>PMD#runPmd</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ThreadSafeReportListener.html#"><code>ThreadSafeReportListener</code></a> and the methods to use them in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#"><code>Report</code></a>
are deprecated. This functionality will be replaced by another TBD mechanism in PMD 7.
#### 6.34.0
No changes.
#### 6.33.0
No changes.
#### 6.32.0
**Experimental APIs**
* The experimental class `ASTTypeTestPattern` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTTypePattern.html#"><code>ASTTypePattern</code></a>
in order to align the naming to the JLS.
* The experimental class `ASTRecordConstructorDeclaration` has been renamed to <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTCompactConstructorDeclaration.html#"><code>ASTCompactConstructorDeclaration</code></a>
in order to align the naming to the JLS.
* The AST types and APIs around Pattern Matching and Records are not experimental anymore:
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
* The protected or public member of the Java rule <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/bestpractices/AvoidUsingHardCodedIPRule.html#"><code>AvoidUsingHardCodedIPRule</code></a>
are deprecated and considered to be internal API. They will be removed with PMD 7.
* A few methods of <ahref="https://docs.pmd-code.org/apidocs/pmd-xml/6.55.0/net/sourceforge/pmd/lang/xml/rule/AbstractXmlRule.html#"><code>AbstractXmlRule</code></a>
**Experimental APIs**
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/GenericToken.html#getKind()"><code>GenericToken#getKind</code></a> has been added as experimental. This
unifies the token interface for both JavaCC and Antlr. The already existing method
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getKind()"><code>AntlrToken#getKind</code></a> is therefore experimental as well. The
returned constant depends on the actual language and might change whenever the grammar
of the language is changed.
#### 6.30.0
**Deprecated API**
**Around RuleSet parsing**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> have been deprecated in favor of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSetLoader.html#"><code>RuleSetLoader</code></a>. This is easier to configure, and more maintainable than the multiple overloads of `RulesetsFactoryUtils`.
* Some static creation methods have been added to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#"><code>RuleSet</code></a> for simple cases, eg <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/RuleSet.html#forSingleRule(net.sourceforge.pmd.lang.rule.Rule)"><code>forSingleRule</code></a>. These replace some counterparts in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>
* Since <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a> is also deprecated, many APIs that require a RuleSets instance now are deprecated, and have a counterpart that expects a `List<RuleSet>`.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReferenceId.html#"><code>RuleSetReferenceId</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetReference.html#"><code>RuleSetReference</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactoryCompatibility.html#"><code>RuleSetFactoryCompatibility</code></a> are deprecated. They are most likely not relevant outside of the implementation of pmd-core.
**Around the `PMD` class**
Many classes around PMD's entry point (<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a>) have been deprecated as internal, including:
* The contents of the packages <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/package-summary.html"><code>net.sourceforge.pmd.cli</code></a> in pmd-core, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/processor/package-summary.html"><code>net.sourceforge.pmd.processor</code></a>
* The constructors of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#"><code>PMD</code></a> (the class will be made a utility class)
and <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceBody.html#isEnumChild()"><code>ASTClassOrInterfaceBody#isEnumChild</code></a>,
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolationComparator.html#"><code>net.sourceforge.pmd.RuleViolationComparator</code></a>. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/RuleViolation.html#DEFAULT_COMPARATOR"><code>RuleViolation#DEFAULT_COMPARATOR</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/AbstractTokenizer.html#"><code>net.sourceforge.pmd.cpd.AbstractTokenizer</code></a>. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>net.sourceforge.pmd.cpd.AnyCpdLexer</code></a> instead (previously called AnyTokenizer).
*<ahref="https://docs.pmd-code.org/apidocs/pmd-fortran/6.55.0/net/sourceforge/pmd/cpd/FortranTokenizer.html#"><code>net.sourceforge.pmd.cpd.FortranTokenizer</code></a>. Was replaced by an <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-fortran/7.0.0/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>FortranLanguageModule#createCpdLexer</code></a> anyway.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-perl/6.55.0/net/sourceforge/pmd/cpd/PerlTokenizer.html#"><code>net.sourceforge.pmd.cpd.PerlTokenizer</code></a>. Was replaced by an <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-perl/7.0.0/net/sourceforge/pmd/lang/perl/PerlLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>PerlLanguageModule#createCpdLexer</code></a> anyway.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-ruby/6.55.0/net/sourceforge/pmd/cpd/RubyTokenizer.html#"><code>net.sourceforge.pmd.cpd.RubyTokenizer</code></a>. Was replaced by an <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/cpd/AnyCpdLexer.html#"><code>AnyCpdLexer</code></a>. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-ruby/7.0.0/net/sourceforge/pmd/lang/ruby/RubyLanguageModule.html#createCpdLexer(net.sourceforge.pmd.lang.LanguagePropertyBundle)"><code>RubyLanguageModule#createCpdLexer</code></a> anyway.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleReference.html#getOverriddenLanguage()"><code>RuleReference#getOverriddenLanguage</code></a> and
*<ahref="https://docs.pmd-code.org/apidocs/pmd-cs/6.55.0/net/sourceforge/pmd/lang/cs/antlr4/CSharpLexer.html#"><code>net.sourceforge.pmd.lang.cs.antlr4.CSharpLexer</code></a> will be moved to package `net.sourceforge.pmd.lang.cs.ast` with PMD 7.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-dart/6.55.0/net/sourceforge/pmd/lang/dart/antlr4/Dart2Lexer.html#"><code>net.sourceforge.pmd.lang.dart.antlr4.Dart2Lexer</code></a> will be renamed to `DartLexer` and moved to package
`net.sourceforge.pmd.lang.dart.ast` with PMD 7. All other classes in the old package will be removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-go/6.55.0/net/sourceforge/pmd/lang/go/antlr4/GolangLexer.html#"><code>net.sourceforge.pmd.lang.go.antlr4.GolangLexer</code></a> will be moved to package
`net.sourceforge.pmd.lang.go.ast` with PMD 7. All other classes in the old package will be removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-kotlin/6.55.0/net/sourceforge/pmd/lang/kotlin/antlr4/Kotlin.html#"><code>net.sourceforge.pmd.lang.kotlin.antlr4.Kotlin</code></a> will be renamed to `KotlinLexer` and moved to package
`net.sourceforge.pmd.lang.kotlin.ast` with PMD 7.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-lua/6.55.0/net/sourceforge/pmd/lang/lua/antlr4/LuaLexer.html#"><code>net.sourceforge.pmd.lang.lua.antlr4.LuaLexer</code></a> will be moved to package
`net.sourceforge.pmd.lang.lua.ast` with PMD 7. All other classes in the old package will be removed.
#### 6.27.0
* XML rule definition in rulesets: In PMD 7, the `language` attribute will be required on all `rule`
elements that declare a new rule. Some base rule classes set the language implicitly in their
constructor, and so this is not required in all cases for the rule to work. But this
behavior will be discontinued in PMD 7, so missing `language` attributes are now
* Properties of <ahref="https://docs.pmd-code.org/apidocs/pmd-xml/6.55.0/net/sourceforge/pmd/lang/xml/rule/AbstractXmlRule.html#"><code>AbstractXmlRule</code></a>
* Many methods of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#"><code>net.sourceforge.pmd.Report</code></a>. They are replaced by accessors
that produce a List. For example, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#iterator()"><code>iterator()</code></a>
(and implementing Iterable) and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#isEmpty()"><code>isEmpty()</code></a> are both
replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/reporting/Report.html#getViolations()"><code>getViolations()</code></a>.
* The dataflow codebase is deprecated for removal in PMD 7. This includes all code in the following packages, and their subpackages:
* and the class <ahref="https://docs.pmd-code.org/apidocs/pmd-plsql/6.55.0/net/sourceforge/pmd/lang/plsql/PLSQLDataFlowHandler.html#"><code>PLSQLDataFlowHandler</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a> is deprecated in
favor of <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/types/TypeTestUtil.html#"><code>TypeTestUtil</code></a>, which has the
same functionality, but a slightly changed API.
* Many of the classes in <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/symboltable/package-summary.html"><code>net.sourceforge.pmd.lang.java.symboltable</code></a>
are deprecated as internal API.
#### 6.26.0
**Deprecated API**
**For removal**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleChainVisitor.html#"><code>RuleChainVisitor</code></a> and all implementations in language modules
*<ahref="https://docs.pmd-code.org/apidocs/pmd-test/6.55.0/net/sourceforge/pmd/testframework/AbstractTokenizerTest.html#"><code>AbstractTokenizerTest</code></a>. Use CpdTextComparisonTest in module pmd-lang-test instead.
For details see
[Testing your implementation](pmd_devdocs_major_adding_new_cpd_language.html#testing-your-implementation)
* Some members of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/TokenMgrError.html#"><code>TokenMgrError</code></a>, in particular, a new constructor is available
**Note:** Experimental APIs are identified with the annotation <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/Experimental.html#"><code>Experimental</code></a>,
see its javadoc for details
* The experimental methods in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/BaseLanguageModule.html#"><code>BaseLanguageModule</code></a> have been replaced by a
definitive API.
#### 6.23.0
**Deprecated APIs**
**Internal API**
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
As part of the changes we'd like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated in the **Apex**, **Javascript**, **PL/SQL**, **Scala** and **Visualforce** ASTs:
* Manual instantiation of nodes. **Constructors of node classes are deprecated** and
marked <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.
***Subclassing of abstract node classes, or usage of their type**. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
* In the meantime you should use interfaces like <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/7.0.0/net/sourceforge/pmd/lang/visualforce/ast/VfNode.html#"><code>VfNode</code></a> or
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.
* Concrete node classes will **be made final** with 7.0.0.
* Setters found in any node class or interface. **Rules should consider the AST immutable**.
We will make those setters package private with 7.0.0.
* The implementation classes of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Parser.html#"><code>Parser</code></a> (eg <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/VfParser.html#"><code>VfParser</code></a>) are deprecated and should not be used directly.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.
* The implementation classes of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/TokenManager.html#"><code>TokenManager</code></a> (eg <ahref="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.55.0/net/sourceforge/pmd/lang/vf/VfTokenManager.html#"><code>VfTokenManager</code></a>) are deprecated and should not be used outside of our implementation.
**This also affects CPD-only modules**.
These deprecations are added to the following language modules in this release.
Please look at the package documentation to find out the full list of deprecations.
* Java Server Pages: <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html"><code>net.sourceforge.pmd.lang.jsp.ast</code></a>
In the **Java AST** the following attributes are deprecated and will issue a warning when used in XPath rules:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAdditiveExpression.html#getImage()"><code>ASTAdditiveExpression#getImage</code></a> - use `getOperator()` instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getImage()"><code>ASTVariableDeclaratorId#getImage</code></a> - use `getName()` instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getVariableName()"><code>ASTVariableDeclaratorId#getVariableName</code></a> - use `getName()` instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/token/AntlrToken.html#getType()"><code>AntlrToken#getType</code></a> - use `getKind()` instead.
* Multiple fields, constructors and methods in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/XPathRule.html#"><code>XPathRule</code></a>. See javadoc for details.
#### 6.22.0
**Deprecated APIs**
**Internal API**
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
* Implementations of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
language module, eg <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
See javadoc of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.
* Implementations of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
eg <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
* Constructors of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related `visit`
methods on <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/7.0.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.
**For removal**
* pmd-core
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/DFAGraphRule.html#"><code>DFAGraphRule</code></a> and its implementations
* Many methods on the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.
* Many APIs of `net.sourceforge.pmd.lang.metrics`, though most of them were internal and
probably not used directly outside of PMD. Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#"><code>MetricsUtil</code></a> as
a replacement for the language-specific façades too.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code>net.sourceforge.pmd.lang.java.qname</code></a> and its contents
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code>ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use `getSimpleName()`
instead. This affects <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
* Several methods of <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute `@Finally`, replace it with a test for `child::FinallyStatement`.
* Several methods named `getGuardExpressionNode` are replaced with `getCondition`. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a>
anymore come 7.0.0. Test the type of the expression nested within it.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#size()"><code>size</code></a> instead.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFormalParameters.html#size()"><code>size</code></a> instead.
As part of the changes we'd like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated **in the JSP AST** (with other languages to come):
* Manual instantiation of nodes. **Constructors of node classes are deprecated** and
marked <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.
***Subclassing of abstract node classes, or usage of their type**. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
* In the meantime you should use interfaces like <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/7.0.0/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> or
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.
* Concrete node classes will **be made final** with 7.0.0.
* Setters found in any node class or interface. **Rules should consider the AST immutable**.
We will make those setters package private with 7.0.0.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/JspParser.html#"><code>JspParser</code></a> is deprecated and should not be used directly.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.
Please look at <ahref="https://docs.pmd-code.org/apidocs/pmd-jsp/6.55.0/net/sourceforge/pmd/lang/jsp/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.jsp.ast</code></a> to find out the full list of deprecations.
**In ASTs (Velocity)**
As part of the changes we'd like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated **in the VM AST** (with other languages to come):
* Manual instantiation of nodes. **Constructors of node classes are deprecated** and
marked <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser,
which for rules, means that they never need to instantiate node themselves.
Those constructors will be made package private with 7.0.0.
***Subclassing of abstract node classes, or usage of their type**. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
* In the meantime you should use interfaces like <ahref="https://docs.pmd-code.org/apidocs/pmd-velocity/7.0.0/net/sourceforge/pmd/lang/velocity/ast/VtlNode.html#"><code>VtlNode</code></a> or
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.
* Concrete node classes will **be made final** with 7.0.0.
* Setters found in any node class or interface. **Rules should consider the AST immutable**.
We will make those setters package private with 7.0.0.
* The package <ahref="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/directive/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.directive</code></a> as well as the classes
<ahref="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.html#"><code>DirectiveMapper</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/util/LogUtil.html#"><code>LogUtil</code></a> are deprecated
for removal. They were only used internally during parsing.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/VmParser.html#"><code>VmParser</code></a> is deprecated and should not be used directly.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser()"><code>LanguageVersionHandler#getParser</code></a> instead.
Please look at <ahref="https://docs.pmd-code.org/apidocs/pmd-vm/6.55.0/net/sourceforge/pmd/lang/vm/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.ast</code></a> to find out the full list of deprecations.
**PLSQL AST**
The production and node <ahref="https://javadoc.io/doc/net.sourceforge.pmd/pmd-plsql/6.21.0/net/sourceforge/pmd/lang/plsql/ast/ASTCursorBody.html"><code>ASTCursorBody</code></a> was unnecessary, not used and has been removed. Cursors have been already
parsed as <ahref="https://docs.pmd-code.org/apidocs/pmd-plsql/7.0.0/net/sourceforge/pmd/lang/plsql/ast/ASTCursorSpecification.html#"><code>ASTCursorSpecification</code></a>.
#### 6.21.0
**Deprecated APIs**
**Internal API**
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
* Implementations of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
language module, eg <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
See javadoc of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.
* Implementations of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
eg <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
* Constructors of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related `visit`
methods on <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
Use <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/SimpleCharStream.html#"><code>SimpleCharStream</code></a>: these are APIs used by our JavaCC
implementations and that will be moved/refactored for PMD 7.0.0. They should not
be used, extended or implemented directly.
* All classes generated by JavaCC, eg <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JJTJavaParserState.html#"><code>JJTJavaParserState</code></a>.
This includes token classes, which will be replaced with a single implementation, and
subclasses of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/ParseException.html#"><code>ParseException</code></a>, whose usages will be replaced
by just that superclass.
**For removal**
* pmd-core
* Many methods on the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code>net.sourceforge.pmd.lang.java.qname</code></a> and its contents
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code>ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use `getSimpleName()`
instead. This affects <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
* Several methods of <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute `@Finally`, replace it with a test for `child::FinallyStatement`.
* Several methods named `getGuardExpressionNode` are replaced with `getCondition`. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a>
anymore come 7.0.0. Test the type of the expression nested within it.
#### 6.20.0
No changes.
#### 6.19.0
**Deprecated APIs**
**For removal**
* pmd-core
* All the package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/dcd/package-summary.html#"><code>net.sourceforge.pmd.dcd</code></a> and its subpackages. See <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/dcd/DCD.html#"><code>DCD</code></a>.
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code>LanguageRegistry</code></a>:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getExcludePatterns()"><code>RuleSet#getExcludePatterns</code></a>. Use the new method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getFileExclusions()"><code>getFileExclusions</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getIncludePatterns()"><code>RuleSet#getIncludePatterns</code></a>. Use the new method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#getFileInclusions()"><code>getFileInclusions</code></a> instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleBuilder.html#<init>(java.lang.String,java.lang.String,java.lang.String)"><code>RuleBuilder#RuleBuilder</code></a>. Use the new constructor with the correct ResourceLoader instead.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/rules/RuleFactory.html#<init>()"><code>RuleFactory#RuleFactory</code></a>. Use the new constructor with the correct ResourceLoader instead.
* pmd-java
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations
*<ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations
* All the package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a> and its subpackages,
except <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/datasource/package-summary.html#"><code>net.sourceforge.pmd.util.datasource</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/util/database/package-summary.html#"><code>net.sourceforge.pmd.util.database</code></a>.
* Each renderer has now a new method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/Renderer.html#setUseShortNames(java.util.List)"><code>Renderer#setUseShortNames</code></a> which
is used for implementing the "shortnames" CLI option. The method is automatically called by PMD, if this
CLI option is in use. When rendering filenames to the report, the new helper method
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/AbstractRenderer.html#determineFileName(java.lang.String)"><code>AbstractRenderer#determineFileName</code></a> should be used. This will change
the filename to a short name, if the CLI option "shortnames" is used.
Not adjusting custom renderers will make them render always the full file names and not honoring the
CLI option "shortnames".
**Deprecated APIs**
**For removal**
* The methods <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()"><code>ASTImportDeclaration#getImportedNameNode</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getPackage()"><code>ASTImportDeclaration#getPackage</code></a> have been deprecated and
will be removed with PMD 7.0.0.
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFilename(java.lang.String)"><code>RuleContext#setSourceCodeFilename</code></a> has been deprecated
and will be removed. The already existing method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#setSourceCodeFile(java.io.File)"><code>RuleContext#setSourceCodeFile</code></a>
should be used instead. The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleContext.html#getSourceCodeFilename()"><code>RuleContext#getSourceCodeFilename</code></a> still
exists and returns just the filename without the full path.
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/processor/AbstractPMDProcessor.html#filenameFrom(net.sourceforge.pmd.util.datasource.DataSource)"><code>AbstractPMDProcessor#filenameFrom</code></a> has been
deprecated. It was used to determine a "short name" of the file being analyzed, so that the report
can use short names. However, this logic has been moved to the renderers.
* The methods <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#metrics()"><code>Report#metrics</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#hasMetrics()"><code>Report#hasMetrics</code></a> have
been deprecated. They were leftovers from a previous deprecation round targeting
Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0. You can identify them with the `@InternalApi` annotation. You'll also get a deprecation warning.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/package-summary.html#"><code>net.sourceforge.pmd.lang.java.typeresolution</code></a>: Everything, including
subpackages, except <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a> and
> Reminder: Please don't use members marked with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>, as they will
> likely be removed, hidden, or otherwise intentionally broken with 7.0.0.
**In ASTs**
As part of the changes we'd like to do to AST classes for 7.0.0, we would like to
hide some methods and constructors that rule writers should not have access to.
The following usages are now deprecated **in the Java AST** (with other languages to come):
* Manual instantiation of nodes. **Constructors of node classes are deprecated** and marked
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/annotation/InternalApi.html#"><code>InternalApi</code></a>. Nodes should only be obtained from the parser, which for rules, means
that never need to instantiate node themselves. Those constructors will be made package private with 7.0.0.
* **Subclassing of abstract node classes, or usage of their type**. Version 7.0.0 will bring a new set of abstractions
that will be public API, but the base classes are and will stay internal. You should not couple your code to them.
* In the meantime you should use interfaces like <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code>JavaNode</code></a> or
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package, to refer to nodes generically.
* Concrete node classes will **be made final** with 7.0.0.
* Setters found in any node class or interface. **Rules should consider the AST immutable**. We will make those
setters package private with 7.0.0.
Please look at <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a> to find out the full list
of deprecations.
#### 6.15.0
**Deprecated APIs**
**For removal**
* The `DumpFacades` in all languages, that could be used to transform a AST into a textual representation,
will be removed with PMD 7. The rule designer is a better way to inspect nodes.
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDumpFacade(java.io.Writer,java.lang.String,boolean)"><code>LanguageVersionHandler#getDumpFacade</code></a> will be
removed as well. It is deprecated, along with all its implementations in the subclasses of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>.
#### 6.14.0
No changes.
#### 6.13.0
**Command Line Interface**
The start scripts `run.sh`, `pmd.bat` and `cpd.bat` support the new environment variable `PMD_JAVA_OPTS`.
This can be used to set arbitrary JVM options for running PMD, such as memory settings (e.g. `PMD_JAVA_OPTS=-Xmx512m`)
or enable preview language features (e.g. `PMD_JAVA_OPTS=--enable-preview`).
The previously available variables such as `OPTS` or `HEAPSIZE` are deprecated and will be removed with PMD 7.0.0.
**Deprecated API**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/renderers/CodeClimateRule.html#"><code>CodeClimateRule</code></a> is deprecated in 7.0.0 because it was unused for 2 years and
created an unwanted dependency.
Properties "cc_categories", "cc_remediation_points_multiplier", "cc_block_highlighting" will also be removed.
See [#1702](https://github.com/pmd/pmd/pull/1702) for more.
* The Apex ruleset `rulesets/apex/ruleset.xml` has been deprecated and will be removed in 7.0.0. Please use the new
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code>StatisticalRule</code></a> and the related helper classes and base rule classes
are deprecated for removal in 7.0.0. This includes all of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/stat/package-summary.html#"><code>net.sourceforge.pmd.stat</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/stat/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.stat</code></a>,
and also <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/rule/AbstractStatisticalJavaRule.html#"><code>AbstractStatisticalJavaRule</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-apex/6.55.0/net/sourceforge/pmd/lang/apex/rule/AbstractStatisticalApexRule.html#"><code>AbstractStatisticalApexRule</code></a> and the like.
The methods <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Report.html#addMetric(net.sourceforge.pmd.stat.Metric)"><code>Report#addMetric</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/ThreadSafeReportListener.html#metricAdded(net.sourceforge.pmd.stat.Metric)"><code>metricAdded</code></a>
will also be removed.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertySource.html#setProperty(net.sourceforge.pmd.properties.MultiValuePropertyDescriptor,V...)"><code>setProperty</code></a> is deprecated,
because <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> is deprecated as well.
#### 6.10.0
**Properties framework**
The properties framework is about to get a lifting, and for that reason, we need to deprecate a lot of APIs
to remove them in 7.0.0. The proposed changes to the API are described [on the wiki](https://github.com/pmd/pmd/wiki/Property-framework-7-0-0)
**Changes to how you define properties**
* Construction of property descriptors has been possible through builders since 6.0.0. The 7.0.0 API will only allow
construction through builders. The builder hierarchy, currently found in the package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code>net.sourceforge.pmd.properties.builders</code></a>,
is being replaced by the simpler <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyBuilder.html#"><code>PropertyBuilder</code></a>. Their APIs enjoy a high degree of source compatibility.
* Concrete property classes like <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code>StringMultiProperty</code></a> will gradually
all be deprecated until 7.0.0. Their usages should be replaced by direct usage of the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a>
interface, e.g. `PropertyDescriptor<Integer>` or `PropertyDescriptor<List<String>>`.
* Instead of spreading properties across countless classes, the utility class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#"><code>PropertyFactory</code></a> will become
from 7.0.0 on the only provider for property descriptor builders. Each current property type will be replaced
by a corresponding method on `PropertyFactory`:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intProperty(java.lang.String)"><code>PropertyFactory#intProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/IntegerMultiProperty.html#"><code>IntegerMultiProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#intListProperty(java.lang.String)"><code>PropertyFactory#intListProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FloatProperty.html#"><code>FloatProperty</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/DoubleProperty.html#"><code>DoubleProperty</code></a> are both replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleProperty(java.lang.String)"><code>PropertyFactory#doubleProperty</code></a>.
Having a separate property for floats wasn't that useful.
* Similarly, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FloatMultiProperty.html#"><code>FloatMultiProperty</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/DoubleMultiProperty.html#"><code>DoubleMultiProperty</code></a> are replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#doubleListProperty(java.lang.String)"><code>PropertyFactory#doubleListProperty</code></a>.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringProperty.html#"><code>StringProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringProperty(java.lang.String)"><code>PropertyFactory#stringProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code>StringMultiProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#stringListProperty(java.lang.String)"><code>PropertyFactory#stringListProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/RegexProperty.html#"><code>RegexProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#regexProperty(java.lang.String)"><code>PropertyFactory#regexProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#enumListProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumListProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/BooleanProperty.html#"><code>BooleanProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#booleanProperty(java.lang.String)"><code>PropertyFactory#booleanProperty</code></a>
* Its multi-valued counterpart, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/BooleanMultiProperty.html#"><code>BooleanMultiProperty</code></a>, is not replaced, because it doesn't have a use case.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/CharacterProperty.html#"><code>CharacterProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#charProperty(java.lang.String)"><code>PropertyFactory#charProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/CharacterMultiProperty.html#"><code>CharacterMultiProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#charListProperty(java.lang.String)"><code>PropertyFactory#charListProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongProperty.html#"><code>LongProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntProperty(java.lang.String)"><code>PropertyFactory#longIntProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/LongMultiProperty.html#"><code>LongMultiProperty</code></a> is replaced by <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyFactory.html#longIntListProperty(java.lang.String)"><code>PropertyFactory#longIntListProperty</code></a>
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MethodProperty.html#"><code>MethodProperty</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/FileProperty.html#"><code>FileProperty</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/TypeProperty.html#"><code>TypeProperty</code></a> and their multi-valued counterparts
are discontinued for lack of a use-case, and have no planned replacement in 7.0.0 for now.
and the related builders (in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/package-summary.html#"><code>net.sourceforge.pmd.properties.builders</code></a>) will be removed.
These specialized interfaces allowed additional constraints to be enforced on the
value of a property, but made the property class hierarchy very large and impractical
to maintain. Their functionality will be mapped uniformly to <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/properties/PropertyConstraint.html#"><code>PropertyConstraint</code></a>s,
which will allow virtually any constraint to be defined, and improve documentation and error reporting. The
related methods <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyNumeric()"><code>PropertyTypeId#isPropertyNumeric</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyPackaged()"><code>PropertyTypeId#isPropertyPackaged</code></a> are also deprecated.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/SingleValuePropertyDescriptor.html#"><code>SingleValuePropertyDescriptor</code></a>
are deprecated. 7.0.0 will introduce a new XML syntax which will remove the need for such a divide
between single- and multi-valued properties. The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>PropertyDescriptor#isMultiValue</code></a> will be removed
accordingly.
**Changes to the PropertyDescriptor interface**
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#preferredRowCount()"><code>preferredRowCount</code></a> is deprecated with no intended replacement. It was never implemented, and does not belong
in this interface. The methods <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#uiOrder()"><code>uiOrder</code></a> and `compareTo(PropertyDescriptor)` are deprecated for the
same reason. These methods mix presentation logic with business logic and are not necessary for PropertyDescriptors to work.
`PropertyDescriptor` will not extend `Comparable<PropertyDescriptor>` anymore come 7.0.0.
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#propertyErrorFor(net.sourceforge.pmd.Rule)"><code>propertyErrorFor</code></a> is deprecated and will be removed with no intended
replacement. It's really just a shortcut for `prop.errorFor(rule.getProperty(prop))`.
*`T `<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#valueFrom(java.lang.String)"><code>valueFrom(String)</code></a> and `String `<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#asDelimitedString(java.lang.Object)"><code>asDelimitedString</code></a>`(T)` are deprecated and will be removed. These were
used to serialize and deserialize properties to/from a string, but 7.0.0 will introduce a more flexible
XML syntax which will make them obsolete.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>isMultiValue</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#type()"><code>type</code></a> are deprecated and won't be replaced. The new XML syntax will remove the need
for a divide between multi- and single-value properties, and will allow arbitrary types to be represented.
Since arbitrary types may be represented, `type` will become obsolete as it can't represent generic types,
which will nevertheless be representable with the XML syntax. It was only used for documentation, but a
new way to document these properties exhaustively will be added with 7.0.0.
*<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#errorFor(java.lang.Object)"><code>errorFor</code></a> is deprecated as its return type will be changed to `Optional<String>` with the shift to Java 8.
**Deprecated APIs**
**For internalization**
* The implementation of the adapters for the XPath engines Saxon and Jaxen (package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.ast.xpath</code></a>)
are now deprecated. They'll be moved to an internal package come 7.0.0. Only <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/rule/xpath/Attribute.html#"><code>Attribute</code></a> remains public API.
* The classes <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptorField.html#"><code>PropertyDescriptorField</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/builders/PropertyDescriptorBuilderConversionWrapper.html#"><code>PropertyDescriptorBuilderConversionWrapper</code></a>, and the methods
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#attributeValuesById()"><code>PropertyDescriptor#attributeValuesById</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyDescriptor.html#isDefinedExternally()"><code>PropertyDescriptor#isDefinedExternally</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertyTypeId.html#getFactory()"><code>PropertyTypeId#getFactory</code></a>.
These were used to read and write properties to and from XML, but were not intended as public API.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/ValueParserConstants.html#"><code>ValueParserConstants</code></a> and the interface <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/ValueParser.html#"><code>ValueParser</code></a>.
* All classes from <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/metrics/impl/visitors/package-summary.html#"><code>net.sourceforge.pmd.lang.java.metrics.impl.visitors</code></a> are now considered internal API. They're deprecated
and will be moved into an internal package with 7.0.0. To implement your own metrics visitors,
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorAdapter.html#"><code>JavaParserVisitorAdapter</code></a> should be directly subclassed.
* All classes from <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/modules/package-summary.html#"><code>net.sourceforge.pmd.properties.modules</code></a> will be removed.
* The interface <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/Dimensionable.html#"><code>Dimensionable</code></a> has been deprecated.
It gets in the way of a grammar change for 7.0.0 and won't be needed anymore (see [#997](https://github.com/pmd/pmd/issues/997)).
* Several methods from <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#"><code>ASTLocalVariableDeclaration</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> have
also been deprecated:
*<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> won't be a <ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a> come 7.0.0, so
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getType()"><code>getType</code></a> and
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getTypeDefinition()"><code>getTypeDefinition</code></a> are deprecated.
* The method `getVariableName` on those two nodes will be removed, too.
* All these are deprecated because those nodes may declare several variables at once, possibly
with different types (and obviously with different names). They both implement `Iterator<`<ahref="https://docs.pmd-code.org/apidocs/pmd-java/7.0.0/net/sourceforge/pmd/lang/java/ast/ASTVariableId.html#"><code>ASTVariableId</code></a>`>`
though, so you should iterate on each declared variable. See [#910](https://github.com/pmd/pmd/issues/910).
* Visitor decorators are now deprecated and will be removed in PMD 7.0.0. They were originally a way to write
composable visitors, used in the metrics framework, but they didn't prove cost-effective.
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a>: <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserDecoratedVisitor.html#"><code>JavaParserDecoratedVisitor</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitor.html#"><code>JavaParserControllessVisitor</code></a>,
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitorAdapter.html#"><code>JavaParserControllessVisitorAdapter</code></a>, and <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorDecorator.html#"><code>JavaParserVisitorDecorator</code></a> are deprecated with no intended replacement.
* The LanguageModules of several languages, that only support CPD execution, have been deprecated. These languages
are not fully supported by PMD, so having a language module does not make sense. The functionality of CPD is
not affected by this change. The following classes have been deprecated and will be removed with PMD 7.0.0:
* Optional AST processing stages like symbol table, type resolution or data-flow analysis will be reified
in 7.0.0 to factorise common logic and make them extensible. Further explanations about this change can be
found on [#1426](https://github.com/pmd/pmd/pull/1426). Consequently, the following APIs are deprecated for
removal:
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#"><code>Rule</code></a>: <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isDfa()"><code>isDfa()</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isTypeResolution()"><code>isTypeResolution()</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/Rule.html#isMultifile()"><code>isMultifile()</code></a> and their
respective setters.
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a>: <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSet.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a>
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a>: <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/RuleSets.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a>
* In <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>: <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowFacade()"><code>getDataFlowFacade()</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade()"><code>getSymbolFacade()</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade(java.lang.ClassLoader)"><code>getSymbolFacade(ClassLoader)</code></a>,
* A couple of methods and fields in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/AbstractPropertySource.html#"><code>net.sourceforge.pmd.properties.AbstractPropertySource</code></a> have been
deprecated, as they are replaced by already existing functionality or expose internal implementation
* Some methods in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/properties/PropertySource.html#"><code>net.sourceforge.pmd.properties.PropertySource</code></a> have been deprecated as well:
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/AbstractDelegateRule.html#"><code>net.sourceforge.pmd.lang.rule.AbstractDelegateRule</code></a> has been deprecated and will
be removed with PMD 7.0.0. It is internally only in use by RuleReference.
* The default constructor of <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/rule/RuleReference.html#"><code>net.sourceforge.pmd.lang.rule.RuleReference</code></a> has been deprecated
and will be removed with PMD 7.0.0. RuleReferences should only be created by providing a Rule and
a RuleSetReference. Furthermore, the following methods are deprecated: `setRuleReference()`,
* All classes in the package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/report/package-summary.html#"><code>net.sourceforge.pmd.lang.dfa.report</code></a> have been deprecated and will be removed
with PMD 7.0.0. This includes the class <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/dfa/report/ReportTree.html#"><code>net.sourceforge.pmd.lang.dfa.report.ReportTree</code></a>. The reason is,
that this class is very specific to Java and not suitable for other languages. It has only been used for
`YAHTMLRenderer`, which has been rewritten to work without these classes.
* The nodes RUNSIGNEDSHIFT and RSIGNEDSHIFT are deprecated and will be removed from the AST with PMD 7.0.0.
These represented the operator of ShiftExpression in two cases out of three, but they're not needed and
make ShiftExpression inconsistent. The operator of a ShiftExpression is now accessible through
ShiftExpression#getOperator.
#### 6.5.0
* The utility class <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/CommentUtil.html#"><code>CommentUtil</code></a> has been deprecated and will be removed
with PMD 7.0.0. Its methods have been intended to parse javadoc tags. A more useful solution will be added
around the AST node `FormalComment`, which contains as children `JavadocElement` nodes, which in
turn provide access to the `JavadocTag`.
All comment AST nodes (`FormalComment`, `MultiLineComment`, `SingleLineComment`) have a new method
`getFilteredComment()` which provide access to the comment text without the leading `/*` markers.
* The method `AbstractCommentRule.tagsIndicesIn()` has been deprecated and will be removed with
PMD 7.0.0. It is not very useful, since it doesn't extract the information
in a useful way. You would still need check, which tags have been found, and with which
data they might be accompanied.
#### 6.4.0
* The following classes in package <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/package-summary.html#"><code>net.sourceforge.pmd.benchmark</code></a> have been deprecated: <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/Benchmark.html#"><code>Benchmark</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/Benchmarker.html#"><code>Benchmarker</code></a>,
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/BenchmarkReport.html#"><code>BenchmarkReport</code></a>, <code>BenchmarkResult</code>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/RuleDuration.html#"><code>RuleDuration</code></a>, <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/StringBuilderCR.html#"><code>StringBuilderCR</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/benchmark/TextReport.html#"><code>TextReport</code></a>. Their API is not supported anymore
and is disconnected from the internals of PMD. Use the newer API based around <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/benchmark/TimeTracker.html#"><code>TimeTracker</code></a> instead, which can be found
in the same package.
* The class <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/TypeOfFunction.html#"><code>TypeOfFunction</code></a> has been deprecated. Use the newer <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/TypeIsFunction.html#"><code>TypeIsFunction</code></a> in the same package.
* The `typeof` methods in <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/xpath/JavaFunctions.html#"><code>JavaFunctions</code></a> have been deprecated.
Use the newer `typeIs` method in the same class instead.
* The methods `isA`, `isEither` and `isNeither` of <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a>.
Use the new `isExactlyAny` and `isExactlyNone` methods in the same class instead.
#### 6.2.0
* The static method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDParameters.html#transformParametersIntoConfiguration(net.sourceforge.pmd.cli.PMDParameters)"><code>PMDParameters#transformParametersIntoConfiguration</code></a> is now deprecated,
for removal in 7.0.0. The new instance method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cli/PMDParameters.html#toConfiguration()"><code>toConfiguration</code></a> replaces it.
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getParameters()"><code>ASTConstructorDeclaration#getParameters</code></a> has been deprecated in favor of the new method
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getFormalParameters()"><code>getFormalParameters</code></a>. This method is available for both
<ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#"><code>ASTConstructorDeclaration</code></a> and <ahref="https://docs.pmd-code.org/apidocs/pmd-java/6.55.0/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#"><code>ASTMethodDeclaration</code></a>.
#### 6.1.0
* The method <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#getXPathNodeName()"><code>getXPathNodeName</code></a> is added to the <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface, which removes the
use of `toString` of a node to get its XPath element name (see [#569](https://github.com/pmd/pmd/issues/569)).
* The default implementation provided in <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a>, will be removed with 7.0.0
* With 7.0.0, the `Node.toString` method will not necessarily provide its XPath node
name anymore.
* The interface <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/Renderer.html#"><code>net.sourceforge.pmd.cpd.Renderer</code></a> has been deprecated. A new interface
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/renderer/CPDRenderer.html#"><code>CPDRenderer</code></a> has been introduced to replace it. The main
difference is that the new interface is meant to render directly to a `java.io.Writer`
rather than to a String. This allows to greatly reduce the memory footprint of CPD, as on
large projects, with many duplications, it was causing `OutOfMemoryError`s (see [#795](https://github.com/pmd/pmd/issues/795)).
<ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/cpd/FileReporter.html#"><code>net.sourceforge.pmd.cpd.FileReporter</code></a> has also been deprecated as part of this change, as it's no longer needed.
#### 6.0.1
* The constant <ahref="https://docs.pmd-code.org/apidocs/pmd-core/6.55.0/net/sourceforge/pmd/PMD.html#VERSION"><code>PMD#VERSION</code></a> has been deprecated and will be removed with PMD 7.0.0.
Please use <ahref="https://docs.pmd-code.org/apidocs/pmd-core/7.0.0/net/sourceforge/pmd/PMDVersion.html#VERSION"><code>PMDVersion#VERSION</code></a> instead.
## 🐛 Fixed Issues
* miscellaneous
* [#881](https://github.com/pmd/pmd/issues/881): \[all] Breaking API changes for 7.0.0
* [#896](https://github.com/pmd/pmd/issues/896): \[all] Use slf4j
* [#1431](https://github.com/pmd/pmd/pull/1431): \[ui] Remove old GUI applications (designerold, bgastviewer)
* [#1451](https://github.com/pmd/pmd/issues/1451): \[core] RulesetFactoryCompatibility stores the whole ruleset file in memory as a string
* [#2496](https://github.com/pmd/pmd/issues/2496): Update PMD 7 Logo on landing page
* [#2497](https://github.com/pmd/pmd/issues/2497): PMD 7 Logo page
* [#2498](https://github.com/pmd/pmd/issues/2498): Update PMD 7 Logo in documentation
* [#3797](https://github.com/pmd/pmd/issues/3797): \[all] Use JUnit5
* [#4462](https://github.com/pmd/pmd/issues/4462): Provide Software Bill of Materials (SBOM)
* [#3766](https://github.com/pmd/pmd/issues/3766): \[apex] Replace Jorje with fully open source front-end
* [#3973](https://github.com/pmd/pmd/issues/3973): \[apex] Update parser to support new 'as user' keywords (User Mode for Database Operations)
* [#4427](https://github.com/pmd/pmd/issues/4427): \[apex] ApexBadCrypto test failing to detect inline code
* [#4453](https://github.com/pmd/pmd/issues/4453): \[apex] \[7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812)
* [#4828](https://github.com/pmd/pmd/issues/4828): \[apex] Support null coalescing operator ?? (apex 60)
* [#4845](https://github.com/pmd/pmd/issues/4845): \[apex] Use same ANLTR version for apex-parser
* apex-design
* [#2667](https://github.com/pmd/pmd/issues/2667): \[apex] Integrate nawforce/ApexLink to build robust Unused rule
* [#2819](https://github.com/pmd/pmd/issues/2819): \[java] GLB bugs in pmd 7
* [#3642](https://github.com/pmd/pmd/issues/3642): \[java] Parse error on rare extra dimensions on method return type on annotation methods
* [#3763](https://github.com/pmd/pmd/issues/3763): \[java] Ambiguous reference error in valid code
* [#3749](https://github.com/pmd/pmd/issues/3749): \[java] Improve `isOverridden` in ASTMethodDeclaration
* [#3750](https://github.com/pmd/pmd/issues/3750): \[java] Make symbol table support instanceof pattern bindings
* [#3751](https://github.com/pmd/pmd/issues/3751): \[java] Rename some node types
* [#3752](https://github.com/pmd/pmd/issues/3752): \[java] Expose annotations in symbol API
* [#4237](https://github.com/pmd/pmd/pull/4237): \[java] Cleanup handling of Java comments
* [#4317](https://github.com/pmd/pmd/issues/4317): \[java] Some AST nodes should not be TypeNodes
* [#4359](https://github.com/pmd/pmd/issues/4359): \[java] Type resolution fails with NPE when the scope is not a type declaration
* [#4367](https://github.com/pmd/pmd/issues/4367): \[java] Move testrule TypeResTest into internal
* [#4383](https://github.com/pmd/pmd/issues/4383): \[java] IllegalStateException: Object is not an array type!
* [#4401](https://github.com/pmd/pmd/issues/4401): \[java] PMD 7 fails to build under Java 19
* [#4405](https://github.com/pmd/pmd/issues/4405): \[java] Processing error with ArrayIndexOutOfBoundsException
* [#4583](https://github.com/pmd/pmd/issues/4583): \[java] Support JDK 21 (LTS)
* [#4628](https://github.com/pmd/pmd/pull/4628): \[java] Support loading classes from java runtime images
* [#4753](https://github.com/pmd/pmd/issues/4753): \[java] PMD crashes while using generics and wildcards
* [#4757](https://github.com/pmd/pmd/issues/4757): \[java] Intermittent NPEs while analyzing Java code
* [#4794](https://github.com/pmd/pmd/issues/4794): \[java] Support JDK 22
* java-bestpractices
* [#342](https://github.com/pmd/pmd/issues/342): \[java] AccessorMethodGeneration: Name clash with another public field not properly handled
* [#755](https://github.com/pmd/pmd/issues/755): \[java] AccessorClassGeneration false positive for private constructors
* [#770](https://github.com/pmd/pmd/issues/770): \[java] UnusedPrivateMethod yields false positive for counter-variant arguments
* [#807](https://github.com/pmd/pmd/issues/807): \[java] AccessorMethodGeneration false positive with overloads
* [#833](https://github.com/pmd/pmd/issues/833): \[java] ForLoopCanBeForeach should consider iterating on this
* [#1189](https://github.com/pmd/pmd/issues/1189): \[java] UnusedPrivateMethod false positive from inner class via external class
* [#1205](https://github.com/pmd/pmd/issues/1205): \[java] Improve ConstantsInInterface message to mention alternatives
* [#1212](https://github.com/pmd/pmd/issues/1212): \[java] Don't raise JUnitTestContainsTooManyAsserts on JUnit 5's assertAll
* [#1422](https://github.com/pmd/pmd/issues/1422): \[java] JUnitTestsShouldIncludeAssert false positive with inherited @<!-- -->Rule field
* [#1455](https://github.com/pmd/pmd/issues/1455): \[java] JUnitTestsShouldIncludeAssert: False positives for assert methods named "check" and "verify"
* [#1563](https://github.com/pmd/pmd/issues/1563): \[java] ForLoopCanBeForeach false positive with method call using index variable
* [#1565](https://github.com/pmd/pmd/issues/1565): \[java] JUnitAssertionsShouldIncludeMessage false positive with AssertJ
* [#1969](https://github.com/pmd/pmd/issues/1969): \[java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class
* [#2822](https://github.com/pmd/pmd/issues/2822): \[java] LooseCoupling rule: Extend to cover user defined implementations and interfaces
* [#2843](https://github.com/pmd/pmd/pull/2843): \[java] Fix UnusedAssignment FP with field accesses
* [#2882](https://github.com/pmd/pmd/issues/2882): \[java] UseTryWithResources - false negative for explicit close
* [#2883](https://github.com/pmd/pmd/issues/2883): \[java] JUnitAssertionsShouldIncludeMessage false positive with method call
* [#2890](https://github.com/pmd/pmd/issues/2890): \[java] UnusedPrivateMethod false positive with generics
* [#2946](https://github.com/pmd/pmd/issues/2946): \[java] SwitchStmtsShouldHaveDefault false positive on enum inside enums
* [#3672](https://github.com/pmd/pmd/pull/3672): \[java] LooseCoupling - fix false positive with generics
* [#3675](https://github.com/pmd/pmd/pull/3675): \[java] MissingOverride - fix false positive with mixing type vars
* [#3858](https://github.com/pmd/pmd/issues/3858): \[java] UseCollectionIsEmpty should infer local variable type from method invocation
* [#4433](https://github.com/pmd/pmd/issues/4433): \[java] \[7.0-rc1] ReplaceHashtableWithMap on java.util.Properties
* [#4492](https://github.com/pmd/pmd/issues/4492): \[java] GuardLogStatement gives false positive when argument is a Java method reference
* [#4503](https://github.com/pmd/pmd/issues/4503): \[java] JUnitTestsShouldIncludeAssert: false negative with TestNG
* [#4516](https://github.com/pmd/pmd/issues/4516): \[java] UnusedLocalVariable: false-negative with try-with-resources
* [#4517](https://github.com/pmd/pmd/issues/4517): \[java] UnusedLocalVariable: false-negative with compound assignments
* [#4518](https://github.com/pmd/pmd/issues/4518): \[java] UnusedLocalVariable: false-positive with multiple for-loop indices
* [#4603](https://github.com/pmd/pmd/issues/4603): \[java] UnusedAssignment false positive in record compact constructor
* [#4625](https://github.com/pmd/pmd/issues/4625): \[java] UnusedPrivateMethod false positive: Autoboxing into Number
* [#4634](https://github.com/pmd/pmd/issues/4634): \[java] JUnit4TestShouldUseTestAnnotation false positive with TestNG
* [#4817](https://github.com/pmd/pmd/issues/4817): \[java] UnusedPrivateMethod false-positive used in lambda
* java-codestyle
* [#1208](https://github.com/pmd/pmd/issues/1208): \[java] PrematureDeclaration rule false-positive on variable declared to measure time
* [#1429](https://github.com/pmd/pmd/issues/1429): \[java] PrematureDeclaration as result of method call (false positive)
* [#1480](https://github.com/pmd/pmd/issues/1480): \[java] IdenticalCatchBranches false positive with return expressions
* [#1673](https://github.com/pmd/pmd/issues/1673): \[java] UselessParentheses false positive with conditional operator
* [#1790](https://github.com/pmd/pmd/issues/1790): \[java] UnnecessaryFullyQualifiedName false positive with enum constant
* [#1918](https://github.com/pmd/pmd/issues/1918): \[java] UselessParentheses false positive with boolean operators
* [#2134](https://github.com/pmd/pmd/issues/2134): \[java] PreserveStackTrace not handling `Throwable.addSuppressed(...)`
* [#2299](https://github.com/pmd/pmd/issues/2299): \[java] UnnecessaryFullyQualifiedName false positive with similar package name
* [#2391](https://github.com/pmd/pmd/issues/2391): \[java] UseDiamondOperator FP when expected type and constructed type have a different parameterization
* [#2528](https://github.com/pmd/pmd/issues/2528): \[java] MethodNamingConventions - JUnit 5 method naming not support ParameterizedTest
* [#2739](https://github.com/pmd/pmd/issues/2739): \[java] UselessParentheses false positive for string concatenation
* [#2748](https://github.com/pmd/pmd/issues/2748): \[java] UnnecessaryCast false positive with unchecked cast
* [#2847](https://github.com/pmd/pmd/issues/2847): \[java] New Rule: Use Explicit Types
* [#2973](https://github.com/pmd/pmd/issues/2973): \[java] New rule: UnnecessaryBoxing
* [#3195](https://github.com/pmd/pmd/pull/3195): \[java] Improve rule UnnecessaryReturn to detect more cases
* [#3218](https://github.com/pmd/pmd/pull/3218): \[java] Generalize UnnecessaryCast to flag all unnecessary casts
* [#3221](https://github.com/pmd/pmd/issues/3221): \[java] PrematureDeclaration false positive for unused variables
* [#3238](https://github.com/pmd/pmd/issues/3238): \[java] Improve ExprContext, fix FNs of UnnecessaryCast
* [#3500](https://github.com/pmd/pmd/pull/3500): \[java] UnnecessaryBoxing - check for Integer.valueOf(String) calls
* [#4239](https://github.com/pmd/pmd/issues/4239): \[java] UnnecessaryLocalBeforeReturn - false positive with catch clause
* [#4268](https://github.com/pmd/pmd/issues/4268): \[java] CommentDefaultAccessModifier: false positive with TestNG annotations
* [#4273](https://github.com/pmd/pmd/issues/4273): \[java] CommentDefaultAccessModifier ignoredAnnotations should include "org.junit.jupiter.api.extension.RegisterExtension" by default
* [#4357](https://github.com/pmd/pmd/pull/4357): \[java] Fix IllegalStateException in UseDiamondOperator rule
* [#4432](https://github.com/pmd/pmd/issues/4432): \[java] \[7.0-rc1] UnnecessaryImport - Unused static import is being used
* [#4455](https://github.com/pmd/pmd/issues/4455): \[java] FieldNamingConventions: false positive with lombok's @<!-- -->UtilityClass
* [#4487](https://github.com/pmd/pmd/issues/4487): \[java] UnnecessaryConstructor: false-positive with @<!-- -->Inject and @<!-- -->Autowired
* [#4816](https://github.com/pmd/pmd/issues/4816): \[java] UnnecessaryImport false-positive on generic method call with on lambda
* java-design
* [#174](https://github.com/pmd/pmd/issues/174): \[java] SingularField false positive with switch in method that both assigns and reads field
* [#1014](https://github.com/pmd/pmd/issues/1014): \[java] LawOfDemeter: False positive with lambda expression
* [#1605](https://github.com/pmd/pmd/issues/1605): \[java] LawOfDemeter: False positive for standard UTF-8 charset name
* [#2160](https://github.com/pmd/pmd/issues/2160): \[java] Issues with Law of Demeter
* [#2175](https://github.com/pmd/pmd/issues/2175): \[java] LawOfDemeter: False positive for chained methods with generic method call
* [#2179](https://github.com/pmd/pmd/issues/2179): \[java] LawOfDemeter: False positive with static property access - should treat class-level property as global object, not dot-accessed property
* [#2180](https://github.com/pmd/pmd/issues/2180): \[java] LawOfDemeter: False positive with Thread and ThreadLocalRandom
* [#2182](https://github.com/pmd/pmd/issues/2182): \[java] LawOfDemeter: False positive with package-private access
* [#2188](https://github.com/pmd/pmd/issues/2188): \[java] LawOfDemeter: False positive with fields assigned to local vars
* [#2536](https://github.com/pmd/pmd/issues/2536): \[java] ClassWithOnlyPrivateConstructorsShouldBeFinal can't detect inner class
* [#1899](https://github.com/pmd/pmd/issues/1899): \[java] Recognize @<!-- -->SuppressWanings("fallthrough") for MissingBreakInSwitch
* [#2320](https://github.com/pmd/pmd/issues/2320): \[java] NullAssignment - FP with ternary and null as method argument
* [#2532](https://github.com/pmd/pmd/issues/2532): \[java] AvoidDecimalLiteralsInBigDecimalConstructor can not detect the case `new BigDecimal(Expression)`
* [#2579](https://github.com/pmd/pmd/issues/2579): \[java] MissingBreakInSwitch detects the lack of break in the last case
* [#2880](https://github.com/pmd/pmd/issues/2880): \[java] CompareObjectsWithEquals - false negative with type res
* [#2893](https://github.com/pmd/pmd/issues/2893): \[java] Remove special cases from rule EmptyCatchBlock
* [#3400](https://github.com/pmd/pmd/issues/3400): \[java] AvoidUsingOctalValues FN with underscores
* [#3843](https://github.com/pmd/pmd/issues/3843): \[java] UseEqualsToCompareStrings should consider return type
* [#4063](https://github.com/pmd/pmd/issues/4063): \[java] AvoidBranchingStatementAsLastInLoop: False-negative about try/finally block
* [#4356](https://github.com/pmd/pmd/pull/4356): \[java] Fix NPE in CloseResourceRule
* [#4449](https://github.com/pmd/pmd/issues/4449): \[java] AvoidAccessibilityAlteration: Possible false positive in AvoidAccessibilityAlteration rule when using Lambda expression
* [#4457](https://github.com/pmd/pmd/issues/4457): \[java] OverrideBothEqualsAndHashcode: false negative with anonymous classes
* [#4493](https://github.com/pmd/pmd/issues/4493): \[java] MissingStaticMethodInNonInstantiatableClass: false-positive about @<!-- -->Inject
* [#4505](https://github.com/pmd/pmd/issues/4505): \[java] ImplicitSwitchFallThrough NPE in PMD 7.0.0-rc1
* [#4510](https://github.com/pmd/pmd/issues/4510): \[java] ConstructorCallsOverridableMethod: false positive with lombok's @<!-- -->Value
* [#4513](https://github.com/pmd/pmd/issues/4513): \[java] UselessOperationOnImmutable various false negatives with String
* [#4514](https://github.com/pmd/pmd/issues/4514): \[java] AvoidLiteralsInIfCondition false positive and negative for String literals when ignoreExpressions=true
* [#4546](https://github.com/pmd/pmd/issues/4546): \[java] OverrideBothEqualsAndHashCode ignores records
* [#4719](https://github.com/pmd/pmd/pull/4719): \[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string
* java-multithreading
* [#2537](https://github.com/pmd/pmd/issues/2537): \[java] DontCallThreadRun can't detect the case that call run() in `this.run()`
* [#2538](https://github.com/pmd/pmd/issues/2538): \[java] DontCallThreadRun can't detect the case that call run() in `foo.bar.run()`
* [#2577](https://github.com/pmd/pmd/issues/2577): \[java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: `foo.notify(bar)`
* [#4483](https://github.com/pmd/pmd/issues/4483): \[java] NonThreadSafeSingleton false positive with double-checked locking
* java-performance
* [#1224](https://github.com/pmd/pmd/issues/1224): \[java] InefficientEmptyStringCheck false negative in anonymous class
* [#2587](https://github.com/pmd/pmd/issues/2587): \[java] AvoidArrayLoops could also check for list copy through iterated List.add()
* [#2712](https://github.com/pmd/pmd/issues/2712): \[java] SimplifyStartsWith false-positive with AssertJ
* [#1658](https://github.com/pmd/pmd/pull/1658): \[core] Node support for Antlr-based languages - [Matías Fraga](https://github.com/matifraga) (@matifraga)
* [#1698](https://github.com/pmd/pmd/pull/1698): \[core] [swift] Antlr Base Parser adapter and Swift Implementation - [Lucas Soncini](https://github.com/lsoncini) (@lsoncini)
* [#4402](https://github.com/pmd/pmd/pull/4402): \[javascript] CPD: add support for Typescript using antlr4 grammar - [Paul Guyot](https://github.com/pguyot) (@pguyot)
* [#4403](https://github.com/pmd/pmd/pull/4403): \[julia] CPD: Add support for Julia code duplication - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
* [#4412](https://github.com/pmd/pmd/pull/4412): \[doc] Added new error msg to ConstantsInInterface - [David Ljunggren](https://github.com/dague1) (@dague1)
* [#4426](https://github.com/pmd/pmd/pull/4426): \[cpd] New XML to HTML XLST report format for PMD CPD - [mohan-chinnappan-n](https://github.com/mohan-chinnappan-n) (@mohan-chinnappan-n)
* [#4428](https://github.com/pmd/pmd/pull/4428): \[apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values - [Steven Stearns](https://github.com/sfdcsteve) (@sfdcsteve)
* [#4431](https://github.com/pmd/pmd/pull/4431): \[coco] CPD: Coco support for code duplication detection - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
* [#4470](https://github.com/pmd/pmd/pull/4470): \[cpp] CPD: Added strings as literal and ignore identifiers in sequences - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
* [#4474](https://github.com/pmd/pmd/pull/4474): \[java] ImmutableField: False positive with lombok (fixes #4254) - [Pim van der Loos](https://github.com/PimvanderLoos) (@PimvanderLoos)
* [#4479](https://github.com/pmd/pmd/pull/4479): \[apex] Merge main (7.x) branch into experimental-apex-parser and fix tests - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
* [#4488](https://github.com/pmd/pmd/pull/4488): \[java] Fix #4477: A false-positive about SignatureDeclareThrowsException - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4494](https://github.com/pmd/pmd/pull/4494): \[java] Fix #4487: A false-positive about UnnecessaryConstructor and @<!-- -->Inject and @<!-- -->Autowired - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4495](https://github.com/pmd/pmd/pull/4495): \[java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @<!-- -->Inject - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4507](https://github.com/pmd/pmd/pull/4507): \[java] Fix #4503: A false negative about JUnitTestsShouldIncludeAssert and testng - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4520](https://github.com/pmd/pmd/pull/4520): \[doc] Fix typo: missing closing quotation mark after CPD-END - [João Dinis Ferreira](https://github.com/joaodinissf) (@joaodinissf)
* [#4528](https://github.com/pmd/pmd/pull/4528): \[apex] Update to apexlink - [Kevin Jones](https://github.com/nawforce) (@nawforce)
* [#4533](https://github.com/pmd/pmd/pull/4533): \[java] Fix #4063: False-negative about try/catch block in Loop - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4537](https://github.com/pmd/pmd/pull/4537): \[java] Fix #4455: A false positive about FieldNamingConventions and UtilityClass - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4538](https://github.com/pmd/pmd/pull/4538): \[java] Fix #4456: A false positive about FinalFieldCouldBeStatic and UtilityClass - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4541](https://github.com/pmd/pmd/pull/4541): \[java] Fix #4458: A false positive about RedundantFieldInitializer and @<!-- -->Value - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4542](https://github.com/pmd/pmd/pull/4542): \[java] Fix #4510: A false positive about ConstructorCallsOverridableMethod and @<!-- -->Value - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
* [#4553](https://github.com/pmd/pmd/pull/4553): \[java] Fix #4492: GuardLogStatement gives false positive when argument is a Java method reference - [Anastasiia Koba](https://github.com/anastasiia-koba) (@anastasiia-koba)
* [#4562](https://github.com/pmd/pmd/pull/4562): \[apex] Fixes #4556 - Update Apex bind regex match for all possible combinations - [nwcm](https://github.com/nwcm) (@nwcm)
* [#4640](https://github.com/pmd/pmd/pull/4640): \[cli] Launch script fails if run via "bash pmd" - [Shai Bennathan](https://github.com/shai-bennathan) (@shai-bennathan)
* [#4649](https://github.com/pmd/pmd/pull/4649): \[apex] Add SObjectType and SObjectField to list of injectable SOQL variable types - [Richard Corfield](https://github.com/rcorfieldffdc) (@rcorfieldffdc)
* [#4664](https://github.com/pmd/pmd/pull/4664): \[cli] CPD: Fix NPE when only `--file-list` is specified - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
* [#4698](https://github.com/pmd/pmd/pull/4698): \[swift] Add macro expansion support for swift 5.9 - [Richard B.](https://github.com/kenji21) (@kenji21)
* [#4706](https://github.com/pmd/pmd/pull/4706): \[java] DetachedTestCase should not report on abstract methods - [Debamoy Datta](https://github.com/Debamoy) (@Debamoy)
* [#4719](https://github.com/pmd/pmd/pull/4719): \[java] UnnecessaryCaseChange: example doc toUpperCase() should compare to a capitalized string - [ciufudean](https://github.com/ciufudean) (@ciufudean)
* [#4738](https://github.com/pmd/pmd/pull/4738): \[doc] Added reference to the PMD extension for bld - [Erik C. Thauvin](https://github.com/ethauvin) (@ethauvin)
* [#4749](https://github.com/pmd/pmd/pull/4749): Fixes NoSuchMethodError on processing errors in pmd-compat6 - [Andreas Bergander](https://github.com/bergander) (@bergander)
* [#4825](https://github.com/pmd/pmd/pull/4825): \[plsql] Fix ignored WITH clause for SELECT INTO statements - [Laurent Bovet](https://github.com/lbovet) (@lbovet)