diff --git a/do-release.sh b/do-release.sh index a2a95a3893..51dcc69a1a 100755 --- a/do-release.sh +++ b/do-release.sh @@ -117,9 +117,6 @@ echo echo "* Update **pmd-apex/src/main/resources/rulesets/apex/quickstart.xml** and" echo " **pmd-java/src/main/resources/rulesets/java/quickstart.xml** with the new rules." echo -echo "* Update **docs/pages/next_major_development.md** with the API changes for" -echo " the new release based on the release notes. Also add any deprecated rules to the list." -echo echo "* Update **../pmd.github.io/_config.yml** to mention the new release" echo echo "* Update property \`pmd-designer.version\` in **pom.xml** to reference the version, that will be released" diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 886982146d..ed62a57375 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -365,567 +365,7 @@ The rules have been moved into categories with PMD 6. #### API Changes -**pmd-java** - -* Support for Java 20 preview language features have been removed. The version "20-preview" is no longer available. -* {%jdoc java::lang.java.ast.ASTPattern %}, {%jdoc java::lang.java.ast.ASTRecordPattern %}, - {%jdoc java::lang.java.ast.ASTTypePattern %}, {%jdoc java::lang.java.ast.ASTUnnamedPattern %} - - method `getParenthesisDepth()` has been removed. -* {%jdoc java::lang.java.ast.ASTTemplateFragment %}: To get the content of the template, use now - {%jdoc java::lang.java.ast.ASTTemplateFragment#getContent() %} or `@Content` instead of `getImage()`/`@Image`. -* {%jdoc java::lang.java.ast.ASTUnnamedPattern %} is not experimental anymore. The language feature - has been standardized with Java 22. - -**New API** - -The API around {%jdoc core::util.treeexport.TreeRenderer %} 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]({{ baseurl }}pmd_userdocs_extending_ast_dump.html). - -**General AST Changes to avoid `@Image`** - -See [General AST Changes to avoid @Image]({{ baseurl }}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 {% jdoc_package core::lang.rule %} - * {%jdoc core::lang.rule.Rule %} - * {%jdoc core::lang.rule.RulePriority %} - * {%jdoc core::lang.rule.RuleSet %} - * {%jdoc core::lang.rule.RuleSetFactory %} - * {%jdoc core::lang.rule.RuleSetLoader %} - * {%jdoc core::lang.rule.RuleSetLoadException %} - * {%jdoc core::lang.rule.RuleSetWriter %} - * Many types have been moved from the base package `net.sourceforge.pmd` into subpackage {% jdoc_package core::reporting %} - * {%jdoc core::reporting.Report %} - * {%jdoc core::reporting.RuleContext %} - * {%jdoc core::reporting.RuleViolation %} - * {%jdoc core::reporting.ViolationSuppressor %} - * {%jdoc core::lang.rule.xpath.XPathRule %} has been moved into subpackage {% jdoc_package core::lang.rule.xpath %}. -* pmd-html - * `net.sourceforge.pmd.lang.html.ast.HtmlCpdLexer` moved into package `cpd`: {%jdoc html::lang.html.cpd.HtmlCpdLexer %}. -* pmd-lang-test: All types have been moved under the new base package {%jdoc_package lang-test::lang.test %}: - * {%jdoc lang-test::lang.test.AbstractMetricTestRule %} (moved from `net.sourceforge.pmd.test.AbstractMetricTestRule`) - * {%jdoc lang-test::lang.test.BaseTextComparisonTest %} (moved from `net.sourceforge.pmd.test.BaseTextComparisonTest`) - * {%jdoc lang-test::lang.test.cpd.CpdTextComparisonTest %} (moved from `net.sourceforge.pmd.cpd.test.CpdTextComparisonTest`) - * {%jdoc lang-test::lang.test.ast.BaseTreeDumpTest %} (moved from `net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest`) - * Any many other types have been moved from `net.sourceforge.pmd.lang.ast.test` to `net.sourceforge.pmd.lang.test`. -* pmd-scala - * {%jdoc scala::lang.scala.cpd.ScalaCpdLexer %} (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaCpdLexer`) - * {%jdoc scala::lang.scala.cpd.ScalaTokenAdapter %} (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaTokenAdapter`) -* pmd-test - * {%jdoc test::test.lang.rule.AbstractRuleSetFactoryTest %} (moved from `net.sourceforge.pmd.lang.rule.AbstractRuleSetFactoryTest`) - * {%jdoc test::test.AbstractAntTestHelper %} (moved from `net.sourceforge.pmd.ant.AbstractAntTestHelper`) - * {%jdoc test::test.AbstractLanguageVersionTest %} (moved from `net.sourceforge.pmd.AbstractLanguageVersionTest`) - * {%jdoc test::test.PmdRuleTst %} (moved from `net.sourceforge.pmd.testframework.PmdRuleTst`) - * {%jdoc test::test.RuleTst %} (moved from `net.sourceforge.pmd.testframework.RuleTst`) - * {%jdoc test::test.SimpleAggregatorTst %} (moved from `net.sourceforge.pmd.testframework.SimpleAggregatorTst`) -* pmd-xml - * {%jdoc xml::lang.xml.pom.PomLanguageModule %} (moved from `net.sourceforge.pmd.lang.pom.PomLanguageModule`) - * {%jdoc xml::lang.xml.wsdl.WsdlLanguageModule %} (moved from `net.sourceforge.pmd.lang.wsdl.WsdlLanguageModule`) - * {%jdoc xml::lang.xml.xsl.XslLanguageModule %} (moved from `net.sourceforge.pmd.lang.xsl.XslLanguageModule`) -* pmd-visualforce - * The package `net.sourceforge.pmd.lang.vf` has been renamed to {%jdoc_package visualforce::lang.visualforce %}. - * 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 {%jdoc_package velocity::lang.velocity %}. - * 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`: - * {%jdoc velocity::lang.velocity.VtlLanguageModule %} - * {%jdoc velocity::lang.velocity.ast.VtlNode %} - * {%jdoc velocity::lang.velocity.ast.VtlParser %} - * {%jdoc velocity::lang.velocity.cpd.VtlCpdLexer %} - * {%jdoc velocity::lang.velocity.rule.AbstractVtlRule %} - -**Internalized classes and interfaces and methods** - -The following classes/methods have been marked as @InternalApi before and are now moved into a `internal` -package or made (package) private and are _not accessible_ anymore. - -* pmd-core - * `net.sourceforge.pmd.cache.AbstractAnalysisCache` (moved to internal, now package private) - * `net.sourceforge.pmd.cache.AnalysisCache` (moved to internal) - * `net.sourceforge.pmd.cache.AnalysisCacheListener` (moved to internal) - * `net.sourceforge.pmd.cache.AnalysisResult` (moved to internal) - * `net.sourceforge.pmd.cache.CachedRuleMapper` (moved to internal, now package private) - * `net.sourceforge.pmd.cache.CachedRuleViolation` (moved to internal, now package private) - * `net.sourceforge.pmd.cache.ChecksumAware` (moved to internal) - * `net.sourceforge.pmd.cache.FileAnalysisCache` (moved to internal) - * `net.sourceforge.pmd.cache.NoopAnalysisCache` (moved to internal) - * `net.sourceforge.pmd.util.ResourceLoader` (moved to internal) - * {%jdoc !!core::cpd.Tokens %} - * Constructor is now package private. - * {%jdoc !!core::lang.LanguageProcessor.AnalysisTask %} - * Constructor is now package private. - * Method `withFiles(java.util.List)` is now package private. Note: it was not previously marked with @InternalApi. - * {%jdoc !!core::lang.rule.RuleTargetSelector %} - * Method `isRuleChain()` has been removed. - * {%jdoc !!core::renderers.AbstractAccumulatingRenderer %} - * {%jdoc core::renderers.AbstractAccumulatingRenderer#renderFileReport(core::reporting.Report) %} - this method is now final - and can't be overridden anymore. - * {%jdoc !!core::reporting.Report %} - * Constructor as well as the methods `addRuleViolation`, `addConfigError`, `addError` are now private. - * {%jdoc !!core::reporting.RuleContext %} - * Method `getRule()` is now package private. - * 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 {%jdoc core::reporting.RuleViolation %}. - * {%jdoc !!core::lang.rule.RuleSet %} - * Method `applies(Rule,LanguageVersion)` is now package private. - * Method `applies(TextFile)` has been removed. - * Method `applies(FileId)` is now package private. - * {%jdoc !!core::lang.rule.RuleSetLoader %} - * Method `loadRuleSetsWithoutException(java.util.List)` is now package private. - * {%jdoc !!core::lang.rule.RuleSetLoadException %} - * All constructors are package private now. - * {%jdoc !!core::lang.ast.LexException %} - the constructor `LexException(boolean, String, int, int, String, char)` is now package private. - It is only used by JavaCC-generated token managers. - * {%jdoc !!core::PMDConfiguration %} - * Method `setAnalysisCache(AnalysisCache)` is now package private. Use {%jdoc core::PMDConfiguration#setAnalysisCacheLocation(java.lang.String) %} instead. - * Method `getAnalysisCache()` is now package private. - * {%jdoc !!core::lang.document.FileCollector %} - * Method `newCollector(LanguageVersionDiscoverer, PmdReporter)` is now package private. - * Method `newCollector(PmdReporter)` is now package private. - * In order to create a FileCollector, use {%jdoc core::PmdAnalysis#files() %} instead. - * {%jdoc !!core::lang.rule.xpath.Attribute %} - * Method `replacementIfDeprecated()` is now package private. - * `net.sourceforge.pmd.properties.PropertyTypeId` - moved in subpackage `internal`. - * {%jdoc !!core::properties.PropertyDescriptor %} - 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`. -* pmd-ant - * {%jdoc !!ant::ant.Formatter %} - * Method `getRenderer()` has been removed. - * Method `start(String)` is private now. - * Method `end(Report)` has been removed. - * Method `isNoOutputSupplied()` is now package private. - * Method `newListener(Project)` is now package private. - * {%jdoc !!ant::ant.PMDTask %} - * Method `getRelativizeRoots()` has been removed. - * `net.sourceforge.pmd.ant.ReportException` is now package private. Note: It was not marked with @InternalApi before. -* pmd-apex - * {%jdoc !!apex::ast.ApexNode %} - * Method `getNode()` has been removed. It was only deprecated before and not marked with @InternalApi. - However, it gave access to the wrapped Jorje node and was thus internal API. - * {%jdoc !!apex::ast.AbstractApexNode %} - * Method `getNode()` is now package private. - * {%jdoc !!apex::multifile.ApexMultifileAnalysis %} - * Constructor is now package private. - * `net.sourceforge.pmd.lang.apex.rule.design.AbstractNcssCountRule` (now package private) - * `net.sourceforge.pmd.lang.apex.rule.AbstractApexUnitTestRule` (moved to package `net.sourceforge.pmd.apex.rule.bestpractices`, now package private) -* pmd-java - * `net.sourceforge.pmd.lang.java.rule.AbstractIgnoredAnnotationRule` (moved to internal) - * `net.sourceforge.pmd.lang.java.types.ast.LazyTypeResolver` (moved to internal) - * {%jdoc !!java::types.JMethodSig %} - * Method `internalApi()` has been removed. - * {%jdoc !!java::types.TypeOps %} - * Method `isSameTypeInInference(JTypeMirror,JTypeMirror)` is now package private. -* pmd-jsp - * {%jdoc !!jsp::ast.JspParser %} - * Method `getTokenBehavior()` has been removed. -* pmd-modelica - * {%jdoc !!modelica::ast.InternalApiBridge %} renamed from `InternalModelicaNodeApi`. - * {%jdoc !!modelica::resolver.InternalApiBridge %} 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. -* pmd-scala - * {%jdoc !!scala::ScalaLanguageModule %} - * Method `dialectOf(LanguageVersion)` has been removed. - -**Removed classes and members (previously deprecated)** - -The annotation `@DeprecatedUntil700` has been removed. - -* pmd-core - * {%jdoc !!core::cpd.CpdLanguageProperties %}. The field `DEFAULT_SKIP_BLOCKS_PATTERN` has been removed. - * {%jdoc !!core::lang.ast.impl.antlr4.BaseAntlrNode %} - method `joinTokenText()` has been removed. - * {%jdoc !!core::lang.ast.Node %} - many methods have been removed: - * `getNthParent(int)` - Use {%jdoc core::lang.ast.Node#ancestors() %} instead, e.g. `node.ancestors().get(n-1)` - * `getFirstParentOfType(Class)` - Use {%jdoc core::lang.ast.Node#ancestors(java.lang.Class) %} instead, e.g. `node.ancestors(parentType).first()` - * `getParentsOfType(Class)` - Use {%jdoc core::lang.ast.Node#ancestors(java.lang.Class) %} instead, e.g. `node.ancestors(parentType).toList()` - * `findChildrenOfType(Class)` - Use {%jdoc core::lang.ast.Node#children(java.lang.Class) %} instead, e.g. `node.children(childType).toList()` - * `findDescendantsOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).toList()` - * `findDescendantsOfType(Class,boolean)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).crossFindBoundaries(b).toList()` - * `getFirstChildOfType(Class)` - Use {%jdoc core::lang.ast.Node#firstChild(java.lang.Class) %} instead - * `getFirstDescendantOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).first()` - * `hasDescendantOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).nonEmpty()` - * `findChildNodesWithXPath(String)` - Use the {%jdoc core::lang.ast.NodeStream %} API instead. - * {%jdoc !!core::lang.ast.impl.GenericNode %} - method `getNthParent(int)` has been removed. Use {%jdoc core::lang.ast.Node#ancestors() %} instead, e.g. `node.ancestors().get(n-1)` - * {%jdoc !!core::lang.document.FileCollector %} - method `addZipFile(java.nio.file.Path)` has been removed. Use {%jdoc core::lang.document.FileCollector#addZipFileWithContent(java.nio.file.Path) %} instead - * {%jdoc !!core::lang.document.TextDocument %} - method `readOnlyString(CharSequence,String,LanguageVersion)` has been removed. - Use {%jdoc core::lang.document.TextDocument#readOnlyString(java.lang.CharSequence,core::lang.document.FileId,core::lang.LanguageVersion) %} instead. - * {%jdoc !!core::lang.document.TextFile %} - method `dataSourceCompat(DataSource,PMDConfiguration)` has been removed. - Use {%jdoc core::lang.document.TextFile %} directly, e.g. {%jdoc core::lang.document.TextFile.forPath(java.nio.file.Path,java.nio.charset.Charset,core::lang.LanguageVersion) %} - * {%jdoc !!core::lang.rule.xpath.XPathVersion %} - * `XPATH_1_0` - * `XPATH_1_0_COMPATIBILITY` - * `XPATH_2_0` - * 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 {%jdoc core::lang.rule.xpath.XPathVersion#XPATH_3_1 %}. - * `net.sourceforge.pmd.lang.rule.AbstractDelegateRule` removed. It has been merged with {%jdoc core::lang.rule.RuleReference %}. - * {%jdoc !!core::lang.rule.AbstractRule %} - the following methods have been removed: - * `deepCopyValuesTo(AbstractRule)` - use {%jdoc core::lang.rule.AbstractRule#deepCopy() %} instead. - * `addRuleChainVisit(Class)` - override {%jdoc core::lang.rule.AbstractRule#buildTargetSelector() %} in order to register nodes for rule chain visits. - * `addViolation(...)` - use {%jdoc core::RuleContext#addViolation(core::lang.ast.Node) %} instead, e.g. via `asCtx(data).addViolation(...)`. - Note: These methods were only marked as deprected in javadoc. - * `addViolationWithMessage(...)` - use {%jdoc core::RuleContext#addViolationWithMessage(core::lang.ast.Node,java.lang.String) %} instead, e.g. via - `asCtx(data).addViolationWithMessage(...)`. Note: These methods were only marked as deprected in javadoc. - * {%jdoc !!core::lang.rule.RuleReference %} - the following methods have been removed: - * `setRuleSetReference(RuleSetReference)` - without replacement. Just construct new {%jdoc core::lang.rule.RuleReference %} instead. - * `hasOverriddenProperty(PropertyDescriptor)` - use {%jdoc core::lang.rule.RuleReference#isPropertyOverridden(core::properties.PropertyDescriptor) %} instead. - * {%jdoc !!core::lang.rule.XPathRule %} - * The constant `XPATH_DESCRIPTOR` has been made private and is not accessible anymore. - * {%jdoc !!core::lang.Language %} - method `getTerseName()` removed. Use {%jdoc core::lang.Language#getId() %} instead. - * {%jdoc !!core::lang.LanguageModuleBase %} - method `getTerseName()` removed. Use {%jdoc core::lang.LanguageModuleBase#getId() %} instead. - * {%jdoc !!core::lang.LanguageRegistry %} - the following methods have been removed: - * `getLanguage(String)` - use {%jdoc core::lang.LanguageRegistry.getLanguageByFullName(java.lang.String) %} - via {%jdoc core::lang.LanguageRegistry#PMD %} or {%jdoc core::lang.LanguageRegistry#CPD %} instead. - * `findLanguageByTerseName(String)` - use {%jdoc core::lang.LanguageRegistry#getLanguageById(java.lang.String) %} - via {%jdoc core::lang.LanguageRegistry#PMD %} or {%jdoc core::lang.LanguageRegistry#CPD %} instead. - * `findByExtension(String)` - removed without replacement. - * {%jdoc !!core::lang.LanguageVersionDiscoverer %} - method `getLanguagesForFile(java.io.File)` removed. - Use {%jdoc core::lang.LanguageVersionDiscoverer#getLanguagesForFile(java.lang.String) %} instead. - * {%jdoc !!core::properties.AbstractPropertySource %} - * field `propertyDescriptors` has been made private and is not accessible anymore. - Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead. - * field `propertyValuesByDescriptor` has been made private and is not accessible anymore. - Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %} - or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead. - * method `copyPropertyDescriptors()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead. - * method `copyPropertyValues()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %} - or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead. - * {%jdoc !!core::reporting.Reportable %} - the following methods have been removed. Use {%jdoc core::reporting.Reportable#getReportLocation() %} instead - * `getBeginLine()` - * `getBeginColumn()` - * `getEndLine()` - * `getEndColumn()` - * `net.sourceforge.pmd.util.datasource.DataSource` - use {%jdoc core::lang.document.TextFile %} instead. - * `net.sourceforge.pmd.util.datasource.FileDataSource` - * `net.sourceforge.pmd.util.datasource.ReaderDataSource` - * `net.sourceforge.pmd.util.datasource.ZipDataSource` - * {%jdoc !!core::util.CollectionUtil %} - * method `invertedMapFrom(...)` has been removed. - * method `mapFrom(...)` has been removed. - * {%jdoc !!core::AbstractConfiguration %} - the following methods have been removed: - * `setIgnoreFilePath(String)` - use {%jdoc core::AbstractConfiguration#setIgnoreFilePath(java.nio.file.Path) %} instead. - * `setInputFilePath(String)` - use {%jdoc core::AbstractConfiguration#setInputFilePath(java.nio.file.Path) %} instead. - * `setInputPaths(String)` - use {%jdoc core::AbstractConfiguration#setInputPathList(java.util.List) %} or - {%jdoc core::AbstractConfiguration#addInputPath(java.nio.file.Path) %} instead. - * `setInputUri(String)` - use {%jdoc core::AbstractConfiguration#setInputUri(java.net.URI) %} instead. - * {%jdoc !!core::PMDConfiguration %} - the following methods have been removed - * `prependClasspath(String)` - use {%jdoc core::PMDConfiguration#prependAuxClasspath(java.lang.String) %} instead. - * `getRuleSets()` - use {%jdoc core::PMDConfiguration#getRuleSetPaths() %} instead. - * `setRuleSets(String)` - use {%jdoc core::PMDConfiguration#setRuleSets(java.util.List) %} or - {%jdoc core::PMDConfiguration#addRuleSet(java.lang.String) %} instead. - * `setReportFile(String)` - use {%jdoc core::PMDConfiguration#setReportFile(java.nio.file.Path) %} instead. - * `getReportFile()` - use {%jdoc core::PMDConfiguration#getReportFilePath() %} instead. - * {%jdoc !!core::Report %} - method `merge(Report)` has been removed. Use {%jdoc core::Report#union(core::Report) %} instead. - * {%jdoc !!core::RuleSetLoader %} - method `toFactory()` has been made package private and is not accessible anymore. - * {%jdoc !!core::RuleViolation %} - the following methods have been removed: - * `getPackageName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#PACKAGE_NAME %} instead, e.g. `getAdditionalInfo().get(PACKAGE_NAME)`. - * `getClassName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#CLASS_NAME %} instead, e.g. `getAdditionalInfo().get(CLASS_NAME)`. - * `getMethodName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#METHOD_NAME %} instead, e.g. `getAdditionalInfo().get(METHOD_NAME)`. - * `getVariableName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#VARIABLE_NAME %} instead, e.g. `getAdditionalInfo().get(VARIABLE_NAME)`. -* pmd-apex - * {%jdoc apex::lang.apex.ast.ApexNode %} and {% jdoc apex::lang.apex.ast.ASTApexFile %} - * `#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. - * {%jdoc !!apex::lang.apex.ast.ApexNode %} - * method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. - * {%jdoc !!apex::lang.apex.ast.AbstractApexNode %} - method `getNode()` is now package private. - AST nodes still have access to the underlying Jorje node via the protected property `node`. - * `net.sourceforge.pmd.lang.apex.ast.ApexParserVisitor` - Use {%jdoc apex::lang.apex.ast.ApexVisitor %} or {%jdoc apex::lang.apex.ast.ApexVisitorBase %} instead. - * `net.sourceforge.pmd.lang.apex.ast.ApexParserVisitorAdapter` - * {%jdoc !!apex::lang.apex.ast.ASTAssignmentExpression %} - method `getOperator()` removed. - Use {%jdoc apex::lang.apex.ast.ASTAssignmentExpression#getOp() %} instead. - * {%jdoc !!apex::lang.apex.ast.ASTBinaryExpression %} - method `getOperator()` removed. - Use {%jdoc apex::lang.apex.ast.ASTBinaryExpression#getOp() %} instead. - * {%jdoc !!apex::lang.apex.ast.ASTBooleanExpression %} - method `getOperator()` removed. - Use {%jdoc apex::lang.apex.ast.ASTBooleanExpression#getOp() %} instead. - * {%jdoc !!apex::lang.apex.ast.ASTPostfixExpression %} - method `getOperator()` removed. - Use {%jdoc apex::lang.apex.ast.ASTPostfixExpression#getOp() %} instead. - * {%jdoc !!apex::lang.apex.ast.ASTPrefixExpression %} - method `getOperator()` removed. - Use {%jdoc apex::lang.apex.ast.ASTPrefixExpression#getOp() %} instead. - * `net.sourceforge.pmd.lang.apex.rule.security.Helper` removed. This was actually internal API. -* pmd-java - * {%jdoc !!java::lang.java.ast.AbstractPackageNameModuleDirective %} - method `getImage()` has been removed. - Use {%jdoc java::lang.java.ast.AbstractPackageNameModuleDirective#getPackageName() %} instead. - * {%jdoc !!java::lang.java.ast.AbstractTypeDeclaration %} - method `getImage()` has been removed. - Use {%jdoc java::lang.java.ast.AbstractTypeDeclaration#getSimpleName() %} instead. - * {%jdoc !!java::lang.java.ast.ASTAnnotation %} - method `getAnnotationName()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTClassType %} - * constructor `ASTClassType(java.lang.String)` has been removed. - * method `getImage()` has been removed. - * method `isReferenceToClassSameCompilationUnit()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTFieldDeclaration %} - method `getVariableName()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTLiteral %} - 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 {%jdoc java::lang.java.ast.ASTNumericLiteral#isIntLiteral() %} instead. - * `isLongLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isLongLiteral() %} instead. - * `isFloatLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isFloatLiteral() %} instead. - * `isDoubleLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isDoubleLiteral() %} instead. - * {%jdoc !!java::lang.java.ast.ASTMethodDeclaration %} - methods `getImage()` and `getMethodName()` have been removed. - Use {%jdoc java::lang.java.ast.ASTMethodDeclaration#getName() %} instead. - * {%jdoc !!java::lang.java.ast.ASTMethodReference %} - method `getImage()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTModuleName %} - method `getImage()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTPrimitiveType %} - method `getImage()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTType %} - * `getTypeImage()` has been removed. - * `getArrayDepth()` has been removed. It's only available for arrays: {%jdoc java::lang.java.ast.ASTArrayType#getArrayDepth() %}. - * `isPrimitiveType()` - use `node instanceof ASTPrimitiveType` instead. - * `isArrayType()` - use `node instanceof ASTArrayType` instead. - * `isClassOrInterfaceType()` - use `node instanceof ASTClassType` instead. - * {%jdoc !!java::lang.java.ast.ASTTypeDeclaration %} - method `getImage()` has been removed. - * {%jdoc !!java::lang.java.ast.ASTUnaryExpression %} - method `isPrefix()` has been removed. - Use {%jdoc java::lang.java.ast.ASTUnaryExpression#getOperator() %}`.isPrefix()` instead. - * {%jdoc !!java::lang.java.ast.ASTVariableId %} - methods `getImage()` and `getVariableName()` have been removed. - Use {%jdoc java::lang.java.ast.ASTVariableId#getName() %} instead. - * {%jdoc !!java::lang.java.ast.JavaComment %} - method `getImage()` has been removed. - Use {%jdoc java::lang.java.ast.JavaComment#getText() %} instead. - * {%jdoc !!java::lang.java.ast.JavaNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * `net.sourceforge.pmd.lang.java.ast.JavaParserVisitor` - Use {%jdoc java::lang.java.ast.JavaVisitor %} or {%jdoc java::lang.java.ast.JavaVisitorBase %} instead. - * `net.sourceforge.pmd.lang.java.ast.JavaParserVisitorAdapter` - * {%jdoc !!java::lang.java.ast.ModifierOwner %} - * `isFinal()` - This is still available in various subtypes, where it makes sense, e.g. {%jdoc java::lang.java.ast.ASTLocalVariableDeclaration#isFinal() %}. - * `isAbstract()` - This is still available in subtypes, e.g. {%jdoc java::lang.java.ast.ASTTypeDeclaration#isAbstract() %}. - * `isStrictfp()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(STRICTFP)`. - * `isSynchronized()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(SYNCHRONIZED)`. - * `isNative()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(NATIVE)`. - * `isStatic()` - This is still available in subtypes, e.g. {%jdoc java::lang.java.ast.ASTMethodDeclaration#isStatic() %}. - * `isVolatile()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(VOLATILE)`. - * `isTransient()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(TRANSIENT)`. - * `isPrivate()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PRIVATE`. - * `isPublic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PUBLIC`. - * `isProtected()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PROTECTED`. - * `isPackagePrivate()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PACKAGE`. - * `isSyntacticallyAbstract()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(ABSTRACT)`. - * `isSyntacticallyPublic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(PUBLIC)`. - * `isSyntacticallyStatic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(STATIC)`. - * `isSyntacticallyFinal()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(FINAL)`. - * {%jdoc !!java::lang.java.ast.TypeNode %} - method `getType()` has been removed. Use {%jdoc java::lang.java.ast.TypeNode#getTypeMirror() %} instead. -* pmd-javascript - * {%jdoc javascript::lang.ecmascript.ast.AbstractEcmascriptNode %} - method `getNode()` has been removed. - AST nodes still have access to the underlying Rhino node via the protected property `node`. - * {%jdoc javascript::lang.ecmascript.ast.ASTFunctionNode %} - method `getBody(int)` removed. - Use {%jdoc javascript::lang.ecmascript.ast.ASTFunctionNode#getBody() %} instead. - * {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement %} - * method `isCatch()` has been removed. Use {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement#hasCatch() %} instead. - * method `isFinally()` has been removed. USe {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement#hasFinally() %} instead. - * {%jdoc javascript::lang.ecmascript.ast.EcmascriptNode %} - * method `jjtAccept()` has been removed. Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. - * `net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitor` - Use {%jdoc javascript::lang.ecmascript.ast.EcmascriptVisitor %} or {%jdoc javascript::lang.ecmascript.ast.EcmascriptVisitorBase %} instead. - * `net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitorAdapter` -* pmd-jsp - * `net.sourceforge.pmd.lang.jsp.ast.JspParserVisitor` - Use {%jdoc jsp::lang.jsp.ast.JspVisitor %} or {%jdoc jsp::lang.jsp.ast.JspVisitorBase %} instead. - * `net.sourceforge.pmd.lang.jsp.ast.JspParserVisitorAdapter` - * {%jdoc !!jsp::lang.jsp.ast.JspNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. -* pmd-modelica - * `net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitor` - Use {%jdoc modelica::lang.modelica.ast.ModelicaVisitor %} or {%jdoc modelica::lang.modelica.ast.ModelicaVisitorBase %} instead. - * `net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitorAdapter` - * {%jdoc !!modelica::lang.modelica.ast.ModelicaNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * `net.sourceforge.pmd.lang.modelica.rule.AmbiguousResolutionRule` - Use {%jdoc modelica::lang.modelica.rule.bestpractices.AmbiguousResolutionRule %} instead. - * `net.sourceforge.pmd.lang.modelica.rule.ConnectUsingNonConnector` - Use {%jdoc modelica::lang.modelica.rule.bestpractices.ConnectUsingNonConnectorRule %} -* pmd-plsql - * `net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor` - Use {%jdoc plsql::lang.plsql.ast.PlsqlVisitor %} or {% jdoc plsql::lang.plsql.ast.PlsqlVisitorBase %} instead. - * `net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter` - * {%jdoc !!plsql::lang.plsql.ast.PLSQLNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. -* pmd-scala - * The maven module `pmd-scala` has been removed. Use `pmd-scala_2.13` or `pmd-scala_2.12` instead. - * {%jdoc !!scala::lang.scala.ast.ScalaNode %} - * Method `accept()` has been removed. Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * Method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. - * {%jdoc !!scala::lang.scala.ast.AbstractScalaNode %} - method `getNode()` has been removed. AST nodes still have access - to the underlying Scala node via the protected property `node`. -* pmd-visualforce - * {%jdoc !!visualforce::lang.vf.ast.VfNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * `net.sourceforge.pmd.lang.vf.ast.VfParserVisitor` - Use {%jdoc visualforce::lang.vf.ast.VfVisitor %} or {%jdoc visualforce::lang.vf.ast.VfVisitorBase %} instead. - * `net.sourceforge.pmd.lang.vf.ast.VfParserVisitorAdapter` - * {%jdoc !!visualforce::lang.vf.DataType %} - method `fromBasicType(BasicType)` has been removed. - Use {%jdoc visualforce::lang.vf.DataType#fromTypeName(java.lang.String) %} instead. -* pmd-vm - * {%jdoc !!velocity::lang.vm.ast.VmNode %} - method `jjtAccept()` has been removed. - Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. - * `net.sourceforge.pmd.lang.vm.ast.VmParserVisitor` - Use {%jdoc velocity::lang.vm.ast.VmVisitor %} or {%jdoc velocity::lang.vm.ast.VmVisitorBase %} instead. - * `net.sourceforge.pmd.lang.vm.ast.VmParserVisitorAdapter` - -**Removed classes, interfaces and methods (not previously deprecated)** - -* pmd-apex - * The method `isSynthetic()` in {%jdoc apex::lang.apex.ast.ASTMethod %} has been removed. - With the switch from Jorje to Summit AST as underlying parser, no synthetic methods are generated by the - parser anymore. This also means, that there is no XPath attribute `@Synthetic` anymore. - * The constant `STATIC_INITIALIZER_METHOD_NAME` in {%jdoc apex::lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule %} - has been removed. It was used to filter out synthetic methods, but these are not generated anymore with the - new parser. - * The method `getContext()` in {%jdoc apex::lang.apex.ast.ASTReferenceExpression %} has been removed. - It was not used and always returned `null`. - * The method `getNamespace()` in all AST nodes (defined in {%jdoc apex::lang.apex.ast.ApexNode %}) has - been removed, as it was never fully implemented. It always returned an empty string. - * The method `getNameSpace()` in {%jdoc apex::lang.apex.ast.ApexQualifiedName %} 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. {% jdoc !!java::lang.java.ast.ASTLocalVariableDeclaration#isFinal() %}. - * The method `isPackagePrivate()` in {% jdoc java::lang.java.ast.ASTClassDeclaration %} (formerly ASTClassOrInterfaceDeclaration) - has been removed. - Use {% jdoc java::lang.java.ast.ModifierOwner#hasVisibility(java::lang.java.ast.ModifierOwner.Visibility) %} instead, - which can correctly differentiate between local and package private classes. - -**Renamed classes, interfaces** - -* pmd-core - * {%jdoc core::util.log.PmdReporter %} - has been renamed from `net.sourceforge.pmd.util.log.MessageReporter` - -* pmd-java - * The interface `AccessNode` has been renamed to {% jdoc java::lang.ast.ModifierOwner %}. 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 {% jdoc java::lang.ast.ASTClassType %}. XPath rules - need to be adjusted. - * The node `ASTClassOrInterfaceDeclaration` has been renamed to {% jdoc java::lang.ast.ASTClassDeclaration %}. - XPath rules need to be adjusted. - * The interface `ASTAnyTypeDeclaration` has been renamed to {% jdoc java::lang.ast.ASTTypeDeclaration %}. - 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 - {% jdoc java::lang.ast.ASTExecutableDeclaration %}. This is only relevant for Java rules, which sue that type - directly, e.g. through downcasting. Or when using the XPath function `pmd-java:nodeIs()`. - * The node `ASTVariableDeclaratorId` has been renamed to {% jdoc java::lang.ast.ASTVariableId %}. XPath rules - need to be adjusted. - * The node `ASTClassOrInterfaceBody` has been renamed to {% jdoc java::lang.ast.ASTClassBody %}. XPath rules - need to be adjusted. -* pmd-scala - * The interface `ScalaParserVisitor` has been renamed to {%jdoc scala::lang.scala.ast.ScalaVisitor %} in order - to align the naming scheme for the different language modules. - * The class `ScalaParserVisitorAdapter` has been renamed to {%jdoc scala::lang.scala.ast.ScalaVisitorBase %} in order - to align the naming scheme for the different language modules. - -**Renamed classes and methods** - -* pmd-core - * {%jdoc_old core::lang.ast.TokenMgrError %} has been renamed to {% jdoc core::lang.ast.LexException %} - * {%jdoc_old core::cpd.Tokenizer %} has been renamed to {% jdoc core::cpd.CpdLexer %}. Along with this rename, - all the implementations have been renamed as well (`Tokenizer` -> `CpdLexer`), e.g. "CppCpdLexer", "JavaCpdLexer". - This affects all language modules. - * {%jdoc_old core::cpd.AnyTokenizer %} has been renamed to {% jdoc core::cpd.AnyCpdLexer %}. - -**Classes and methods, that are not experimental anymore** - -These were annotated with `@Experimental`, but can now be considered stable. - -* pmd-apex - * {%jdoc !!apex::lang.apex.ast.ASTCommentContainer %} - * {%jdoc !!apex::lang.apex.multifile.ApexMultifileAnalysis %} -* pmd-core - * {%jdoc !!core::cpd.CPDReport#filterMatches(java.util.function.Predicate) %} - * {%jdoc !!core::lang.ast.impl.antlr4.AntlrToken.getKind() %} - * {%jdoc !!core::lang.ast.impl.javacc.AbstractJjtreeNode %} - * {%jdoc !!core::lang.ast.impl.TokenDocument %} - * {%jdoc !!core::lang.ast.AstInfo.getSuppressionComments() %} - * {%jdoc !!core::lang.ast.AstInfo.withSuppressMap(java.util.Map) %} - * {%jdoc !!core::lang.ast.GenericToken.getKind() %} - * {%jdoc !!core::lang.document.FileCollector.addZipFileWithContent(java.nio.file.Path) %} - * {%jdoc_package core::lang.document %} - * {%jdoc !!core::lang.LanguageVersionHandler.getLanguageMetricsProvider() %} - * {%jdoc !!core::lang.LanguageVersionHandler.getDesignerBindings() %} - * {%jdoc !!core::lang.PlainTextLanguage %} - * {%jdoc !!core::properties.PropertyConstraint.getXmlConstraint() %} - * {%jdoc !!core::properties.PropertyConstraint.toOptionalConstraint() %} - * {%jdoc !!core::properties.PropertyConstraint.fromPredicate(java.util.function.Predicate,java.lang.String) %} - * {%jdoc !!core::properties.PropertyConstraint.fromPredicate(java.util.function.Predicate,java.lang.String,java.util.Map) %} - * {%jdoc !!core::renderers.AbstractRenderer.setReportFile(java.lang.String) %} - * {%jdoc !!core::renderers.Renderer.setReportFile(java.lang.String) %} - * {%jdoc !!core::util.designerbindings.DesignerBindings %} - * {%jdoc !!core::util.designerbindings.DesignerBindings.TreeIconId %} - * {%jdoc !!core::util.designerbindings.RelatedNodesSelector %} - * {%jdoc !!core::Report.filterViolations(java.util.function.Predicate) %} - * {%jdoc !!core::Report.union(core::Report) %} -* pmd-groovy - * {%jdoc !!groovy::lang.groovy.ast.impl.antlr4.GroovyToken.getKind() %} -* pmd-html - * {%jdoc_package html::lang.html %} -* pmd-java - * {%jdoc !!java::lang.java.ast.ASTExpression#getConversionContext() %} - * {%jdoc !!java::lang.java.rule.AbstractJavaRulechainRule#AbstractJavaRulechainRule(java.lang.Class,java.lang.Class...) %} - * {%jdoc !!java::lang.java.symbols.table.JSymbolTable %} - * {%jdoc !!java::lang.java.symbols.JElementSymbol %} - * {%jdoc_package java::lang.java.symbols %} - * {%jdoc !!java::lang.java.types.ast.ExprContext %} - * {%jdoc !!java::lang.java.types.JIntersectionType#getInducedClassType() %} - * {%jdoc !!java::lang.java.types.JTypeMirror#streamMethods(java.util.function.Predicate) %} - * {%jdoc !!java::lang.java.types.JTypeMirror#streamDeclaredMethods(java.util.function.Predicate) %} - * {%jdoc !!java::lang.java.types.JTypeMirror#getConstructors() %} -* pmd-kotlin - * {%jdoc !!kotlin::lang.kotlin.KotlinLanguageModule %} -* pmd-test-schema - * {%jdoc !!test-schema::test.schema.TestSchemaParser %} - -**Removed functionality** - -* 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 {% jdoc_old core::RuleSetFactoryCompatibility %} has been removed without replacement. - The different ways to enable/disable this filter in {% jdoc core::PMDConfiguration %} - (Property "RuleSetFactoryCompatibilityEnabled") and - {% jdoc ant::ant.PMDTask %} (Property "noRuleSetCompatibility") have been removed as well. -* `textcolor` renderer ({%jdoc core::renderers.TextColorRenderer %}) 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 ({%jdoc core::renderers.TextRenderer %}). +See [Detailed Release Notes for PMD 7.0.0]({{ baseurl }}pmd_release_notes_pmd7.html#7-0-0). #### External Contributions * [#4093](https://github.com/pmd/pmd/pull/4093): \[apex] Summit-AST Apex module - Part 1 - [Edward Klimoshenko](https://github.com/eklimo) (@eklimo) diff --git a/docs/pages/release_notes_pmd7.md b/docs/pages/release_notes_pmd7.md index 69a9aba87f..c231169aaa 100644 --- a/docs/pages/release_notes_pmd7.md +++ b/docs/pages/release_notes_pmd7.md @@ -324,7 +324,7 @@ Under the hood, we use two open source libraries instead: Note: This is not an official Google product. Although the parsers is completely switched, there are only little known changes to the AST. -These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast). +These are documented in the [Migration Guide for PMD 7: Apex AST](pmd_userdocs_migrating_to_pmd7.html#apex-ast). With the new Apex parser, the new language constructs like User Mode Database Operations can be parsed now. PMD should be able to parse Apex code up to version 59.0 (Winter '23). @@ -802,6 +802,568 @@ See [PR #4397](https://github.com/pmd/pmd/pull/4397) for details. ### API changes +#### 7.0.0 + +These are the changes between 7.0.0-rc4 and final 7.0.0. + +##### pmd-java + +* Support for Java 20 preview language features have been removed. The version "20-preview" is no longer available. +* {%jdoc java::lang.java.ast.ASTPattern %}, {%jdoc java::lang.java.ast.ASTRecordPattern %}, + {%jdoc java::lang.java.ast.ASTTypePattern %}, {%jdoc java::lang.java.ast.ASTUnnamedPattern %} + - method `getParenthesisDepth()` has been removed. +* {%jdoc java::lang.java.ast.ASTTemplateFragment %}: To get the content of the template, use now + {%jdoc java::lang.java.ast.ASTTemplateFragment#getContent() %} or `@Content` instead of `getImage()`/`@Image`. +* {%jdoc java::lang.java.ast.ASTUnnamedPattern %} is not experimental anymore. The language feature + has been standardized with Java 22. + +##### New API + +The API around {%jdoc core::util.treeexport.TreeRenderer %} 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 {% jdoc_package core::lang.rule %} + * {%jdoc core::lang.rule.Rule %} + * {%jdoc core::lang.rule.RulePriority %} + * {%jdoc core::lang.rule.RuleSet %} + * {%jdoc core::lang.rule.RuleSetFactory %} + * {%jdoc core::lang.rule.RuleSetLoader %} + * {%jdoc core::lang.rule.RuleSetLoadException %} + * {%jdoc core::lang.rule.RuleSetWriter %} + * Many types have been moved from the base package `net.sourceforge.pmd` into subpackage {% jdoc_package core::reporting %} + * {%jdoc core::reporting.Report %} + * {%jdoc core::reporting.RuleContext %} + * {%jdoc core::reporting.RuleViolation %} + * {%jdoc core::reporting.ViolationSuppressor %} + * {%jdoc core::lang.rule.xpath.XPathRule %} has been moved into subpackage {% jdoc_package core::lang.rule.xpath %}. +* pmd-html + * `net.sourceforge.pmd.lang.html.ast.HtmlCpdLexer` moved into package `cpd`: {%jdoc html::lang.html.cpd.HtmlCpdLexer %}. +* pmd-lang-test: All types have been moved under the new base package {%jdoc_package lang-test::lang.test %}: + * {%jdoc lang-test::lang.test.AbstractMetricTestRule %} (moved from `net.sourceforge.pmd.test.AbstractMetricTestRule`) + * {%jdoc lang-test::lang.test.BaseTextComparisonTest %} (moved from `net.sourceforge.pmd.test.BaseTextComparisonTest`) + * {%jdoc lang-test::lang.test.cpd.CpdTextComparisonTest %} (moved from `net.sourceforge.pmd.cpd.test.CpdTextComparisonTest`) + * {%jdoc lang-test::lang.test.ast.BaseTreeDumpTest %} (moved from `net.sourceforge.pmd.lang.ast.test.BaseTreeDumpTest`) + * Any many other types have been moved from `net.sourceforge.pmd.lang.ast.test` to `net.sourceforge.pmd.lang.test`. +* pmd-scala + * {%jdoc scala::lang.scala.cpd.ScalaCpdLexer %} (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaCpdLexer`) + * {%jdoc scala::lang.scala.cpd.ScalaTokenAdapter %} (moved from `net.sourceforge.pmd.lang.scala.cpd.ScalaTokenAdapter`) +* pmd-test + * {%jdoc test::test.lang.rule.AbstractRuleSetFactoryTest %} (moved from `net.sourceforge.pmd.lang.rule.AbstractRuleSetFactoryTest`) + * {%jdoc test::test.AbstractAntTestHelper %} (moved from `net.sourceforge.pmd.ant.AbstractAntTestHelper`) + * {%jdoc test::test.AbstractLanguageVersionTest %} (moved from `net.sourceforge.pmd.AbstractLanguageVersionTest`) + * {%jdoc test::test.PmdRuleTst %} (moved from `net.sourceforge.pmd.testframework.PmdRuleTst`) + * {%jdoc test::test.RuleTst %} (moved from `net.sourceforge.pmd.testframework.RuleTst`) + * {%jdoc test::test.SimpleAggregatorTst %} (moved from `net.sourceforge.pmd.testframework.SimpleAggregatorTst`) +* pmd-xml + * {%jdoc xml::lang.xml.pom.PomLanguageModule %} (moved from `net.sourceforge.pmd.lang.pom.PomLanguageModule`) + * {%jdoc xml::lang.xml.wsdl.WsdlLanguageModule %} (moved from `net.sourceforge.pmd.lang.wsdl.WsdlLanguageModule`) + * {%jdoc xml::lang.xml.xsl.XslLanguageModule %} (moved from `net.sourceforge.pmd.lang.xsl.XslLanguageModule`) +* pmd-visualforce + * The package `net.sourceforge.pmd.lang.vf` has been renamed to {%jdoc_package visualforce::lang.visualforce %}. + * 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 {%jdoc_package velocity::lang.velocity %}. + * 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`: + * {%jdoc velocity::lang.velocity.VtlLanguageModule %} + * {%jdoc velocity::lang.velocity.ast.VtlNode %} + * {%jdoc velocity::lang.velocity.ast.VtlParser %} + * {%jdoc velocity::lang.velocity.cpd.VtlCpdLexer %} + * {%jdoc velocity::lang.velocity.rule.AbstractVtlRule %} + +##### Internalized classes and interfaces and methods + +The following classes/methods have been marked as @InternalApi before and are now moved into a `internal` +package or made (package) private and are _not accessible_ anymore. + +* pmd-core + * `net.sourceforge.pmd.cache.AbstractAnalysisCache` (moved to internal, now package private) + * `net.sourceforge.pmd.cache.AnalysisCache` (moved to internal) + * `net.sourceforge.pmd.cache.AnalysisCacheListener` (moved to internal) + * `net.sourceforge.pmd.cache.AnalysisResult` (moved to internal) + * `net.sourceforge.pmd.cache.CachedRuleMapper` (moved to internal, now package private) + * `net.sourceforge.pmd.cache.CachedRuleViolation` (moved to internal, now package private) + * `net.sourceforge.pmd.cache.ChecksumAware` (moved to internal) + * `net.sourceforge.pmd.cache.FileAnalysisCache` (moved to internal) + * `net.sourceforge.pmd.cache.NoopAnalysisCache` (moved to internal) + * `net.sourceforge.pmd.util.ResourceLoader` (moved to internal) + * {%jdoc !!core::cpd.Tokens %} + * Constructor is now package private. + * {%jdoc !!core::lang.LanguageProcessor.AnalysisTask %} + * Constructor is now package private. + * Method `withFiles(java.util.List)` is now package private. Note: it was not previously marked with @InternalApi. + * {%jdoc !!core::lang.rule.RuleTargetSelector %} + * Method `isRuleChain()` has been removed. + * {%jdoc !!core::renderers.AbstractAccumulatingRenderer %} + * {%jdoc core::renderers.AbstractAccumulatingRenderer#renderFileReport(core::reporting.Report) %} - this method is now final + and can't be overridden anymore. + * {%jdoc !!core::reporting.Report %} + * Constructor as well as the methods `addRuleViolation`, `addConfigError`, `addError` are now private. + * {%jdoc !!core::reporting.RuleContext %} + * Method `getRule()` is now package private. + * 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 {%jdoc core::reporting.RuleViolation %}. + * {%jdoc !!core::lang.rule.RuleSet %} + * Method `applies(Rule,LanguageVersion)` is now package private. + * Method `applies(TextFile)` has been removed. + * Method `applies(FileId)` is now package private. + * {%jdoc !!core::lang.rule.RuleSetLoader %} + * Method `loadRuleSetsWithoutException(java.util.List)` is now package private. + * {%jdoc !!core::lang.rule.RuleSetLoadException %} + * All constructors are package private now. + * {%jdoc !!core::lang.ast.LexException %} - the constructor `LexException(boolean, String, int, int, String, char)` is now package private. + It is only used by JavaCC-generated token managers. + * {%jdoc !!core::PMDConfiguration %} + * Method `setAnalysisCache(AnalysisCache)` is now package private. Use {%jdoc core::PMDConfiguration#setAnalysisCacheLocation(java.lang.String) %} instead. + * Method `getAnalysisCache()` is now package private. + * {%jdoc !!core::lang.document.FileCollector %} + * Method `newCollector(LanguageVersionDiscoverer, PmdReporter)` is now package private. + * Method `newCollector(PmdReporter)` is now package private. + * In order to create a FileCollector, use {%jdoc core::PmdAnalysis#files() %} instead. + * {%jdoc !!core::lang.rule.xpath.Attribute %} + * Method `replacementIfDeprecated()` is now package private. + * `net.sourceforge.pmd.properties.PropertyTypeId` - moved in subpackage `internal`. + * {%jdoc !!core::properties.PropertyDescriptor %} - 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`. +* pmd-ant + * {%jdoc !!ant::ant.Formatter %} + * Method `getRenderer()` has been removed. + * Method `start(String)` is private now. + * Method `end(Report)` has been removed. + * Method `isNoOutputSupplied()` is now package private. + * Method `newListener(Project)` is now package private. + * {%jdoc !!ant::ant.PMDTask %} + * Method `getRelativizeRoots()` has been removed. + * `net.sourceforge.pmd.ant.ReportException` is now package private. Note: It was not marked with @InternalApi before. +* pmd-apex + * {%jdoc !!apex::ast.ApexNode %} + * Method `getNode()` has been removed. It was only deprecated before and not marked with @InternalApi. + However, it gave access to the wrapped Jorje node and was thus internal API. + * {%jdoc !!apex::ast.AbstractApexNode %} + * Method `getNode()` is now package private. + * {%jdoc !!apex::multifile.ApexMultifileAnalysis %} + * Constructor is now package private. + * `net.sourceforge.pmd.lang.apex.rule.design.AbstractNcssCountRule` (now package private) + * `net.sourceforge.pmd.lang.apex.rule.AbstractApexUnitTestRule` (moved to package `net.sourceforge.pmd.apex.rule.bestpractices`, now package private) +* pmd-java + * `net.sourceforge.pmd.lang.java.rule.AbstractIgnoredAnnotationRule` (moved to internal) + * `net.sourceforge.pmd.lang.java.types.ast.LazyTypeResolver` (moved to internal) + * {%jdoc !!java::types.JMethodSig %} + * Method `internalApi()` has been removed. + * {%jdoc !!java::types.TypeOps %} + * Method `isSameTypeInInference(JTypeMirror,JTypeMirror)` is now package private. +* pmd-jsp + * {%jdoc !!jsp::ast.JspParser %} + * Method `getTokenBehavior()` has been removed. +* pmd-modelica + * {%jdoc !!modelica::ast.InternalApiBridge %} renamed from `InternalModelicaNodeApi`. + * {%jdoc !!modelica::resolver.InternalApiBridge %} 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. +* pmd-scala + * {%jdoc !!scala::ScalaLanguageModule %} + * Method `dialectOf(LanguageVersion)` has been removed. + +##### Removed classes and members (previously deprecated) + +The annotation `@DeprecatedUntil700` has been removed. + +* pmd-core + * {%jdoc !!core::cpd.CpdLanguageProperties %}. The field `DEFAULT_SKIP_BLOCKS_PATTERN` has been removed. + * {%jdoc !!core::lang.ast.impl.antlr4.BaseAntlrNode %} - method `joinTokenText()` has been removed. + * {%jdoc !!core::lang.ast.Node %} - many methods have been removed: + * `getNthParent(int)` - Use {%jdoc core::lang.ast.Node#ancestors() %} instead, e.g. `node.ancestors().get(n-1)` + * `getFirstParentOfType(Class)` - Use {%jdoc core::lang.ast.Node#ancestors(java.lang.Class) %} instead, e.g. `node.ancestors(parentType).first()` + * `getParentsOfType(Class)` - Use {%jdoc core::lang.ast.Node#ancestors(java.lang.Class) %} instead, e.g. `node.ancestors(parentType).toList()` + * `findChildrenOfType(Class)` - Use {%jdoc core::lang.ast.Node#children(java.lang.Class) %} instead, e.g. `node.children(childType).toList()` + * `findDescendantsOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).toList()` + * `findDescendantsOfType(Class,boolean)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).crossFindBoundaries(b).toList()` + * `getFirstChildOfType(Class)` - Use {%jdoc core::lang.ast.Node#firstChild(java.lang.Class) %} instead + * `getFirstDescendantOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).first()` + * `hasDescendantOfType(Class)` - Use {%jdoc core::lang.ast.Node#descendants(java.lang.Class) %} instead, e.g. `node.descendants(targetType).nonEmpty()` + * `findChildNodesWithXPath(String)` - Use the {%jdoc core::lang.ast.NodeStream %} API instead. + * {%jdoc !!core::lang.ast.impl.GenericNode %} - method `getNthParent(int)` has been removed. Use {%jdoc core::lang.ast.Node#ancestors() %} instead, e.g. `node.ancestors().get(n-1)` + * {%jdoc !!core::lang.document.FileCollector %} - method `addZipFile(java.nio.file.Path)` has been removed. Use {%jdoc core::lang.document.FileCollector#addZipFileWithContent(java.nio.file.Path) %} instead + * {%jdoc !!core::lang.document.TextDocument %} - method `readOnlyString(CharSequence,String,LanguageVersion)` has been removed. + Use {%jdoc core::lang.document.TextDocument#readOnlyString(java.lang.CharSequence,core::lang.document.FileId,core::lang.LanguageVersion) %} instead. + * {%jdoc !!core::lang.document.TextFile %} - method `dataSourceCompat(DataSource,PMDConfiguration)` has been removed. + Use {%jdoc core::lang.document.TextFile %} directly, e.g. {%jdoc core::lang.document.TextFile.forPath(java.nio.file.Path,java.nio.charset.Charset,core::lang.LanguageVersion) %} + * {%jdoc !!core::lang.rule.xpath.XPathVersion %} + * `XPATH_1_0` + * `XPATH_1_0_COMPATIBILITY` + * `XPATH_2_0` + * 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 {%jdoc core::lang.rule.xpath.XPathVersion#XPATH_3_1 %}. + * `net.sourceforge.pmd.lang.rule.AbstractDelegateRule` removed. It has been merged with {%jdoc core::lang.rule.RuleReference %}. + * {%jdoc !!core::lang.rule.AbstractRule %} - the following methods have been removed: + * `deepCopyValuesTo(AbstractRule)` - use {%jdoc core::lang.rule.AbstractRule#deepCopy() %} instead. + * `addRuleChainVisit(Class)` - override {%jdoc core::lang.rule.AbstractRule#buildTargetSelector() %} in order to register nodes for rule chain visits. + * `addViolation(...)` - use {%jdoc core::RuleContext#addViolation(core::lang.ast.Node) %} instead, e.g. via `asCtx(data).addViolation(...)`. + Note: These methods were only marked as deprected in javadoc. + * `addViolationWithMessage(...)` - use {%jdoc core::RuleContext#addViolationWithMessage(core::lang.ast.Node,java.lang.String) %} instead, e.g. via + `asCtx(data).addViolationWithMessage(...)`. Note: These methods were only marked as deprected in javadoc. + * {%jdoc !!core::lang.rule.RuleReference %} - the following methods have been removed: + * `setRuleSetReference(RuleSetReference)` - without replacement. Just construct new {%jdoc core::lang.rule.RuleReference %} instead. + * `hasOverriddenProperty(PropertyDescriptor)` - use {%jdoc core::lang.rule.RuleReference#isPropertyOverridden(core::properties.PropertyDescriptor) %} instead. + * {%jdoc !!core::lang.rule.XPathRule %} + * The constant `XPATH_DESCRIPTOR` has been made private and is not accessible anymore. + * {%jdoc !!core::lang.Language %} - method `getTerseName()` removed. Use {%jdoc core::lang.Language#getId() %} instead. + * {%jdoc !!core::lang.LanguageModuleBase %} - method `getTerseName()` removed. Use {%jdoc core::lang.LanguageModuleBase#getId() %} instead. + * {%jdoc !!core::lang.LanguageRegistry %} - the following methods have been removed: + * `getLanguage(String)` - use {%jdoc core::lang.LanguageRegistry.getLanguageByFullName(java.lang.String) %} + via {%jdoc core::lang.LanguageRegistry#PMD %} or {%jdoc core::lang.LanguageRegistry#CPD %} instead. + * `findLanguageByTerseName(String)` - use {%jdoc core::lang.LanguageRegistry#getLanguageById(java.lang.String) %} + via {%jdoc core::lang.LanguageRegistry#PMD %} or {%jdoc core::lang.LanguageRegistry#CPD %} instead. + * `findByExtension(String)` - removed without replacement. + * {%jdoc !!core::lang.LanguageVersionDiscoverer %} - method `getLanguagesForFile(java.io.File)` removed. + Use {%jdoc core::lang.LanguageVersionDiscoverer#getLanguagesForFile(java.lang.String) %} instead. + * {%jdoc !!core::properties.AbstractPropertySource %} + * field `propertyDescriptors` has been made private and is not accessible anymore. + Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead. + * field `propertyValuesByDescriptor` has been made private and is not accessible anymore. + Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %} + or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead. + * method `copyPropertyDescriptors()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertyDescriptors() %} instead. + * method `copyPropertyValues()` has been removed. Use {%jdoc core::properties.AbstractPropertySource#getPropertiesByPropertyDescriptor() %} + or {%jdoc core::properties.AbstractPropertySource#getOverriddenPropertiesByPropertyDescriptor() %} instead. + * {%jdoc !!core::reporting.Reportable %} - the following methods have been removed. Use {%jdoc core::reporting.Reportable#getReportLocation() %} instead + * `getBeginLine()` + * `getBeginColumn()` + * `getEndLine()` + * `getEndColumn()` + * `net.sourceforge.pmd.util.datasource.DataSource` - use {%jdoc core::lang.document.TextFile %} instead. + * `net.sourceforge.pmd.util.datasource.FileDataSource` + * `net.sourceforge.pmd.util.datasource.ReaderDataSource` + * `net.sourceforge.pmd.util.datasource.ZipDataSource` + * {%jdoc !!core::util.CollectionUtil %} + * method `invertedMapFrom(...)` has been removed. + * method `mapFrom(...)` has been removed. + * {%jdoc !!core::AbstractConfiguration %} - the following methods have been removed: + * `setIgnoreFilePath(String)` - use {%jdoc core::AbstractConfiguration#setIgnoreFilePath(java.nio.file.Path) %} instead. + * `setInputFilePath(String)` - use {%jdoc core::AbstractConfiguration#setInputFilePath(java.nio.file.Path) %} instead. + * `setInputPaths(String)` - use {%jdoc core::AbstractConfiguration#setInputPathList(java.util.List) %} or + {%jdoc core::AbstractConfiguration#addInputPath(java.nio.file.Path) %} instead. + * `setInputUri(String)` - use {%jdoc core::AbstractConfiguration#setInputUri(java.net.URI) %} instead. + * {%jdoc !!core::PMDConfiguration %} - the following methods have been removed + * `prependClasspath(String)` - use {%jdoc core::PMDConfiguration#prependAuxClasspath(java.lang.String) %} instead. + * `getRuleSets()` - use {%jdoc core::PMDConfiguration#getRuleSetPaths() %} instead. + * `setRuleSets(String)` - use {%jdoc core::PMDConfiguration#setRuleSets(java.util.List) %} or + {%jdoc core::PMDConfiguration#addRuleSet(java.lang.String) %} instead. + * `setReportFile(String)` - use {%jdoc core::PMDConfiguration#setReportFile(java.nio.file.Path) %} instead. + * `getReportFile()` - use {%jdoc core::PMDConfiguration#getReportFilePath() %} instead. + * {%jdoc !!core::Report %} - method `merge(Report)` has been removed. Use {%jdoc core::Report#union(core::Report) %} instead. + * {%jdoc !!core::RuleSetLoader %} - method `toFactory()` has been made package private and is not accessible anymore. + * {%jdoc !!core::RuleViolation %} - the following methods have been removed: + * `getPackageName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#PACKAGE_NAME %} instead, e.g. `getAdditionalInfo().get(PACKAGE_NAME)`. + * `getClassName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#CLASS_NAME %} instead, e.g. `getAdditionalInfo().get(CLASS_NAME)`. + * `getMethodName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#METHOD_NAME %} instead, e.g. `getAdditionalInfo().get(METHOD_NAME)`. + * `getVariableName()` - use {%jdoc core::RuleViolation#getAdditionalInfo() %} with {%jdoc core::RuleViolation#VARIABLE_NAME %} instead, e.g. `getAdditionalInfo().get(VARIABLE_NAME)`. +* pmd-apex + * {%jdoc apex::lang.apex.ast.ApexNode %} and {% jdoc apex::lang.apex.ast.ASTApexFile %} + * `#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. + * {%jdoc !!apex::lang.apex.ast.ApexNode %} + * method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. + * {%jdoc !!apex::lang.apex.ast.AbstractApexNode %} - method `getNode()` is now package private. + AST nodes still have access to the underlying Jorje node via the protected property `node`. + * `net.sourceforge.pmd.lang.apex.ast.ApexParserVisitor` + Use {%jdoc apex::lang.apex.ast.ApexVisitor %} or {%jdoc apex::lang.apex.ast.ApexVisitorBase %} instead. + * `net.sourceforge.pmd.lang.apex.ast.ApexParserVisitorAdapter` + * {%jdoc !!apex::lang.apex.ast.ASTAssignmentExpression %} - method `getOperator()` removed. + Use {%jdoc apex::lang.apex.ast.ASTAssignmentExpression#getOp() %} instead. + * {%jdoc !!apex::lang.apex.ast.ASTBinaryExpression %} - method `getOperator()` removed. + Use {%jdoc apex::lang.apex.ast.ASTBinaryExpression#getOp() %} instead. + * {%jdoc !!apex::lang.apex.ast.ASTBooleanExpression %} - method `getOperator()` removed. + Use {%jdoc apex::lang.apex.ast.ASTBooleanExpression#getOp() %} instead. + * {%jdoc !!apex::lang.apex.ast.ASTPostfixExpression %} - method `getOperator()` removed. + Use {%jdoc apex::lang.apex.ast.ASTPostfixExpression#getOp() %} instead. + * {%jdoc !!apex::lang.apex.ast.ASTPrefixExpression %} - method `getOperator()` removed. + Use {%jdoc apex::lang.apex.ast.ASTPrefixExpression#getOp() %} instead. + * `net.sourceforge.pmd.lang.apex.rule.security.Helper` removed. This was actually internal API. +* pmd-java + * {%jdoc !!java::lang.java.ast.AbstractPackageNameModuleDirective %} - method `getImage()` has been removed. + Use {%jdoc java::lang.java.ast.AbstractPackageNameModuleDirective#getPackageName() %} instead. + * {%jdoc !!java::lang.java.ast.AbstractTypeDeclaration %} - method `getImage()` has been removed. + Use {%jdoc java::lang.java.ast.AbstractTypeDeclaration#getSimpleName() %} instead. + * {%jdoc !!java::lang.java.ast.ASTAnnotation %} - method `getAnnotationName()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTClassType %} + * constructor `ASTClassType(java.lang.String)` has been removed. + * method `getImage()` has been removed. + * method `isReferenceToClassSameCompilationUnit()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTFieldDeclaration %} - method `getVariableName()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTLiteral %} - 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 {%jdoc java::lang.java.ast.ASTNumericLiteral#isIntLiteral() %} instead. + * `isLongLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isLongLiteral() %} instead. + * `isFloatLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isFloatLiteral() %} instead. + * `isDoubleLiteral()` - use {%jdoc java::lang.java.ast.ASTNumericLiteral#isDoubleLiteral() %} instead. + * {%jdoc !!java::lang.java.ast.ASTMethodDeclaration %} - methods `getImage()` and `getMethodName()` have been removed. + Use {%jdoc java::lang.java.ast.ASTMethodDeclaration#getName() %} instead. + * {%jdoc !!java::lang.java.ast.ASTMethodReference %} - method `getImage()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTModuleName %} - method `getImage()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTPrimitiveType %} - method `getImage()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTType %} + * `getTypeImage()` has been removed. + * `getArrayDepth()` has been removed. It's only available for arrays: {%jdoc java::lang.java.ast.ASTArrayType#getArrayDepth() %}. + * `isPrimitiveType()` - use `node instanceof ASTPrimitiveType` instead. + * `isArrayType()` - use `node instanceof ASTArrayType` instead. + * `isClassOrInterfaceType()` - use `node instanceof ASTClassType` instead. + * {%jdoc !!java::lang.java.ast.ASTTypeDeclaration %} - method `getImage()` has been removed. + * {%jdoc !!java::lang.java.ast.ASTUnaryExpression %} - method `isPrefix()` has been removed. + Use {%jdoc java::lang.java.ast.ASTUnaryExpression#getOperator() %}`.isPrefix()` instead. + * {%jdoc !!java::lang.java.ast.ASTVariableId %} - methods `getImage()` and `getVariableName()` have been removed. + Use {%jdoc java::lang.java.ast.ASTVariableId#getName() %} instead. + * {%jdoc !!java::lang.java.ast.JavaComment %} - method `getImage()` has been removed. + Use {%jdoc java::lang.java.ast.JavaComment#getText() %} instead. + * {%jdoc !!java::lang.java.ast.JavaNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * `net.sourceforge.pmd.lang.java.ast.JavaParserVisitor` + Use {%jdoc java::lang.java.ast.JavaVisitor %} or {%jdoc java::lang.java.ast.JavaVisitorBase %} instead. + * `net.sourceforge.pmd.lang.java.ast.JavaParserVisitorAdapter` + * {%jdoc !!java::lang.java.ast.ModifierOwner %} + * `isFinal()` - This is still available in various subtypes, where it makes sense, e.g. {%jdoc java::lang.java.ast.ASTLocalVariableDeclaration#isFinal() %}. + * `isAbstract()` - This is still available in subtypes, e.g. {%jdoc java::lang.java.ast.ASTTypeDeclaration#isAbstract() %}. + * `isStrictfp()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(STRICTFP)`. + * `isSynchronized()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(SYNCHRONIZED)`. + * `isNative()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(NATIVE)`. + * `isStatic()` - This is still available in subtypes, e.g. {%jdoc java::lang.java.ast.ASTMethodDeclaration#isStatic() %}. + * `isVolatile()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(VOLATILE)`. + * `isTransient()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasModifiers(TRANSIENT)`. + * `isPrivate()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PRIVATE`. + * `isPublic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PUBLIC`. + * `isProtected()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PROTECTED`. + * `isPackagePrivate()` - Use {%jdoc java::lang.java.ast.ModifierOwner#getVisibility() %} instead, e.g. `getVisibility() == Visibility.V_PACKAGE`. + * `isSyntacticallyAbstract()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(ABSTRACT)`. + * `isSyntacticallyPublic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(PUBLIC)`. + * `isSyntacticallyStatic()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(STATIC)`. + * `isSyntacticallyFinal()` - Use {%jdoc java::lang.java.ast.ModifierOwner#hasExplicitModifiers(java::lang.java.ast.JModifier,java::lang.java.ast.JModifier...) %} instead, e.g. `hasExplicitModifiers(FINAL)`. + * {%jdoc !!java::lang.java.ast.TypeNode %} - method `getType()` has been removed. Use {%jdoc java::lang.java.ast.TypeNode#getTypeMirror() %} instead. +* pmd-javascript + * {%jdoc javascript::lang.ecmascript.ast.AbstractEcmascriptNode %} - method `getNode()` has been removed. + AST nodes still have access to the underlying Rhino node via the protected property `node`. + * {%jdoc javascript::lang.ecmascript.ast.ASTFunctionNode %} - method `getBody(int)` removed. + Use {%jdoc javascript::lang.ecmascript.ast.ASTFunctionNode#getBody() %} instead. + * {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement %} + * method `isCatch()` has been removed. Use {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement#hasCatch() %} instead. + * method `isFinally()` has been removed. USe {%jdoc javascript::lang.ecmascript.ast.ASTTryStatement#hasFinally() %} instead. + * {%jdoc javascript::lang.ecmascript.ast.EcmascriptNode %} + * method `jjtAccept()` has been removed. Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. + * `net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitor` + Use {%jdoc javascript::lang.ecmascript.ast.EcmascriptVisitor %} or {%jdoc javascript::lang.ecmascript.ast.EcmascriptVisitorBase %} instead. + * `net.sourceforge.pmd.lang.ecmascript.ast.EcmascriptParserVisitorAdapter` +* pmd-jsp + * `net.sourceforge.pmd.lang.jsp.ast.JspParserVisitor` + Use {%jdoc jsp::lang.jsp.ast.JspVisitor %} or {%jdoc jsp::lang.jsp.ast.JspVisitorBase %} instead. + * `net.sourceforge.pmd.lang.jsp.ast.JspParserVisitorAdapter` + * {%jdoc !!jsp::lang.jsp.ast.JspNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. +* pmd-modelica + * `net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitor` + Use {%jdoc modelica::lang.modelica.ast.ModelicaVisitor %} or {%jdoc modelica::lang.modelica.ast.ModelicaVisitorBase %} instead. + * `net.sourceforge.pmd.lang.modelica.ast.ModelicaParserVisitorAdapter` + * {%jdoc !!modelica::lang.modelica.ast.ModelicaNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * `net.sourceforge.pmd.lang.modelica.rule.AmbiguousResolutionRule` + Use {%jdoc modelica::lang.modelica.rule.bestpractices.AmbiguousResolutionRule %} instead. + * `net.sourceforge.pmd.lang.modelica.rule.ConnectUsingNonConnector` + Use {%jdoc modelica::lang.modelica.rule.bestpractices.ConnectUsingNonConnectorRule %} +* pmd-plsql + * `net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitor` + Use {%jdoc plsql::lang.plsql.ast.PlsqlVisitor %} or {% jdoc plsql::lang.plsql.ast.PlsqlVisitorBase %} instead. + * `net.sourceforge.pmd.lang.plsql.ast.PLSQLParserVisitorAdapter` + * {%jdoc !!plsql::lang.plsql.ast.PLSQLNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. +* pmd-scala + * The maven module `pmd-scala` has been removed. Use `pmd-scala_2.13` or `pmd-scala_2.12` instead. + * {%jdoc !!scala::lang.scala.ast.ScalaNode %} + * Method `accept()` has been removed. Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * Method `getNode()` has been removed. The underlying node is only available in AST nodes, but not in rule implementations. + * {%jdoc !!scala::lang.scala.ast.AbstractScalaNode %} - method `getNode()` has been removed. AST nodes still have access + to the underlying Scala node via the protected property `node`. +* pmd-visualforce + * {%jdoc !!visualforce::lang.vf.ast.VfNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * `net.sourceforge.pmd.lang.vf.ast.VfParserVisitor` + Use {%jdoc visualforce::lang.vf.ast.VfVisitor %} or {%jdoc visualforce::lang.vf.ast.VfVisitorBase %} instead. + * `net.sourceforge.pmd.lang.vf.ast.VfParserVisitorAdapter` + * {%jdoc !!visualforce::lang.vf.DataType %} - method `fromBasicType(BasicType)` has been removed. + Use {%jdoc visualforce::lang.vf.DataType#fromTypeName(java.lang.String) %} instead. +* pmd-vm + * {%jdoc !!velocity::lang.vm.ast.VmNode %} - method `jjtAccept()` has been removed. + Use {%jdoc core::lang.ast.Node#acceptVisitor(core::lang.ast.AstVisitor,P) %} instead. + * `net.sourceforge.pmd.lang.vm.ast.VmParserVisitor` + Use {%jdoc velocity::lang.vm.ast.VmVisitor %} or {%jdoc velocity::lang.vm.ast.VmVisitorBase %} instead. + * `net.sourceforge.pmd.lang.vm.ast.VmParserVisitorAdapter` + +##### Removed classes, interfaces and methods (not previously deprecated) + +* pmd-apex + * The method `isSynthetic()` in {%jdoc apex::lang.apex.ast.ASTMethod %} has been removed. + With the switch from Jorje to Summit AST as underlying parser, no synthetic methods are generated by the + parser anymore. This also means, that there is no XPath attribute `@Synthetic` anymore. + * The constant `STATIC_INITIALIZER_METHOD_NAME` in {%jdoc apex::lang.apex.rule.codestyle.FieldDeclarationsShouldBeAtStartRule %} + has been removed. It was used to filter out synthetic methods, but these are not generated anymore with the + new parser. + * The method `getContext()` in {%jdoc apex::lang.apex.ast.ASTReferenceExpression %} has been removed. + It was not used and always returned `null`. + * The method `getNamespace()` in all AST nodes (defined in {%jdoc apex::lang.apex.ast.ApexNode %}) has + been removed, as it was never fully implemented. It always returned an empty string. + * The method `getNameSpace()` in {%jdoc apex::lang.apex.ast.ApexQualifiedName %} 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. {% jdoc !!java::lang.java.ast.ASTLocalVariableDeclaration#isFinal() %}. + * The method `isPackagePrivate()` in {% jdoc java::lang.java.ast.ASTClassDeclaration %} (formerly ASTClassOrInterfaceDeclaration) + has been removed. + Use {% jdoc java::lang.java.ast.ModifierOwner#hasVisibility(java::lang.java.ast.ModifierOwner.Visibility) %} instead, + which can correctly differentiate between local and package private classes. + +##### Renamed classes, interfaces, methods + +* pmd-core + * {%jdoc core::util.log.PmdReporter %} - has been renamed from `net.sourceforge.pmd.util.log.MessageReporter` + * {%jdoc_old core::lang.ast.TokenMgrError %} has been renamed to {% jdoc core::lang.ast.LexException %} + * {%jdoc_old core::cpd.Tokenizer %} has been renamed to {% jdoc core::cpd.CpdLexer %}. Along with this rename, + all the implementations have been renamed as well (`Tokenizer` -> `CpdLexer`), e.g. "CppCpdLexer", "JavaCpdLexer". + This affects all language modules. + * {%jdoc_old core::cpd.AnyTokenizer %} has been renamed to {% jdoc core::cpd.AnyCpdLexer %}. + +* pmd-java + * The interface `AccessNode` has been renamed to {% jdoc java::lang.ast.ModifierOwner %}. 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 {% jdoc java::lang.ast.ASTClassType %}. XPath rules + need to be adjusted. + * The node `ASTClassOrInterfaceDeclaration` has been renamed to {% jdoc java::lang.ast.ASTClassDeclaration %}. + XPath rules need to be adjusted. + * The interface `ASTAnyTypeDeclaration` has been renamed to {% jdoc java::lang.ast.ASTTypeDeclaration %}. + 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 + {% jdoc java::lang.ast.ASTExecutableDeclaration %}. This is only relevant for Java rules, which sue that type + directly, e.g. through downcasting. Or when using the XPath function `pmd-java:nodeIs()`. + * The node `ASTVariableDeclaratorId` has been renamed to {% jdoc java::lang.ast.ASTVariableId %}. XPath rules + need to be adjusted. + * The node `ASTClassOrInterfaceBody` has been renamed to {% jdoc java::lang.ast.ASTClassBody %}. XPath rules + need to be adjusted. +* pmd-scala + * The interface `ScalaParserVisitor` has been renamed to {%jdoc scala::lang.scala.ast.ScalaVisitor %} in order + to align the naming scheme for the different language modules. + * The class `ScalaParserVisitorAdapter` has been renamed to {%jdoc scala::lang.scala.ast.ScalaVisitorBase %} in order + to align the naming scheme for the different language modules. + +##### Classes and methods, that are not experimental anymore + +These were annotated with `@Experimental`, but can now be considered stable. + +* pmd-apex + * {%jdoc !!apex::lang.apex.ast.ASTCommentContainer %} + * {%jdoc !!apex::lang.apex.multifile.ApexMultifileAnalysis %} +* pmd-core + * {%jdoc !!core::cpd.CPDReport#filterMatches(java.util.function.Predicate) %} + * {%jdoc !!core::lang.ast.impl.antlr4.AntlrToken.getKind() %} + * {%jdoc !!core::lang.ast.impl.javacc.AbstractJjtreeNode %} + * {%jdoc !!core::lang.ast.impl.TokenDocument %} + * {%jdoc !!core::lang.ast.AstInfo.getSuppressionComments() %} + * {%jdoc !!core::lang.ast.AstInfo.withSuppressMap(java.util.Map) %} + * {%jdoc !!core::lang.ast.GenericToken.getKind() %} + * {%jdoc !!core::lang.document.FileCollector.addZipFileWithContent(java.nio.file.Path) %} + * {%jdoc_package core::lang.document %} + * {%jdoc !!core::lang.LanguageVersionHandler.getLanguageMetricsProvider() %} + * {%jdoc !!core::lang.LanguageVersionHandler.getDesignerBindings() %} + * {%jdoc !!core::lang.PlainTextLanguage %} + * {%jdoc !!core::properties.PropertyConstraint.getXmlConstraint() %} + * {%jdoc !!core::properties.PropertyConstraint.toOptionalConstraint() %} + * {%jdoc !!core::properties.PropertyConstraint.fromPredicate(java.util.function.Predicate,java.lang.String) %} + * {%jdoc !!core::properties.PropertyConstraint.fromPredicate(java.util.function.Predicate,java.lang.String,java.util.Map) %} + * {%jdoc !!core::renderers.AbstractRenderer.setReportFile(java.lang.String) %} + * {%jdoc !!core::renderers.Renderer.setReportFile(java.lang.String) %} + * {%jdoc !!core::util.designerbindings.DesignerBindings %} + * {%jdoc !!core::util.designerbindings.DesignerBindings.TreeIconId %} + * {%jdoc !!core::util.designerbindings.RelatedNodesSelector %} + * {%jdoc !!core::Report.filterViolations(java.util.function.Predicate) %} + * {%jdoc !!core::Report.union(core::Report) %} +* pmd-groovy + * {%jdoc !!groovy::lang.groovy.ast.impl.antlr4.GroovyToken.getKind() %} +* pmd-html + * {%jdoc_package html::lang.html %} +* pmd-java + * {%jdoc !!java::lang.java.ast.ASTExpression#getConversionContext() %} + * {%jdoc !!java::lang.java.rule.AbstractJavaRulechainRule#AbstractJavaRulechainRule(java.lang.Class,java.lang.Class...) %} + * {%jdoc !!java::lang.java.symbols.table.JSymbolTable %} + * {%jdoc !!java::lang.java.symbols.JElementSymbol %} + * {%jdoc_package java::lang.java.symbols %} + * {%jdoc !!java::lang.java.types.ast.ExprContext %} + * {%jdoc !!java::lang.java.types.JIntersectionType#getInducedClassType() %} + * {%jdoc !!java::lang.java.types.JTypeMirror#streamMethods(java.util.function.Predicate) %} + * {%jdoc !!java::lang.java.types.JTypeMirror#streamDeclaredMethods(java.util.function.Predicate) %} + * {%jdoc !!java::lang.java.types.JTypeMirror#getConstructors() %} +* pmd-kotlin + * {%jdoc !!kotlin::lang.kotlin.KotlinLanguageModule %} +* pmd-test-schema + * {%jdoc !!test-schema::test.schema.TestSchemaParser %} + +##### Removed functionality + +* 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 {% jdoc_old core::RuleSetFactoryCompatibility %} has been removed without replacement. + The different ways to enable/disable this filter in {% jdoc core::PMDConfiguration %} + (Property "RuleSetFactoryCompatibilityEnabled") and + {% jdoc ant::ant.PMDTask %} (Property "noRuleSetCompatibility") have been removed as well. +* `textcolor` renderer ({%jdoc core::renderers.TextColorRenderer %}) 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 ({%jdoc core::renderers.TextRenderer %}). + #### 7.0.0-rc4 ##### pmd-java @@ -820,7 +1382,7 @@ See [PR #4397](https://github.com/pmd/pmd/pull/4397) for details. ##### New Programmatic API for CPD -See [Detailed Release Notes for PMD 7]({{ baseurl }}pmd_release_notes_pmd7.html#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