pmd/pmd_next_major_development.html
Travis CI (pmd-bot) 3785cb2707 Update documentation
TRAVIS_JOB_NUMBER=5265.2
TRAVIS_COMMIT_RANGE=382a1a15f62b...0cc00277d348
2020-05-18 18:55:10 +00:00

2491 lines
144 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content=" changelog, release notes, deprecation, api changes">
<title>PMD 7.0.0 development | PMD Source Code Analyzer</title>
<link rel="stylesheet" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="css/modern-business.css">
<link rel="stylesheet" href="css/lavish-bootstrap.css">
<link rel="stylesheet" href="css/customstyles.css">
<link rel="stylesheet" href="css/theme-blue.css">
<link rel="stylesheet" href="css/pmd-customstyles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="js/jquery.navgoco.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="" href="https://pmd.github.io/pmd/feed.xml">
<script>
$(document).ready(function() {
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
accordion: true,
openClass: 'active', // open
save: false, // leave false or nav highlighting doesn't work right
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 400,
easing: 'swing'
}
});
$("#collapseAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', false);
});
$("#expandAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});
});
</script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script>
$(document).ready(function() {
$("#tg-sb-link").click(function() {
$("#tg-sb-sidebar").toggle();
$("#tg-sb-content").toggleClass('col-md-9');
$("#tg-sb-content").toggleClass('col-md-12');
$("#tg-sb-icon").toggleClass('fa-toggle-on');
$("#tg-sb-icon").toggleClass('fa-toggle-off');
});
});
</script>
</head>
<body>
<!-- Content is offset by the height of the topnav bar. -->
<!-- There's already a padding-top rule in modern-business.css, but it apparently doesn't work on Firefox 60 and Chrome 67 -->
<div id="topbar-content-offset">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> PMD Source Code Analyzer Project</span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- toggle sidebar button -->
<li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li>
<!-- entries without drop-downs appear here -->
<li><a href="https://github.com/pmd/pmd/releases/latest" target="_blank">Download</a></li>
<li><a href="https://github.com/pmd/pmd" target="_blank">Fork us on github</a></li>
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<!--comment out this block if you want to hide search-->
<li>
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
</div>
<script src="js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: 'search.json',
searchResultTemplate: '<li><a href="{url}" title="PMD 7.0.0 development">{title}</a></li>',
noResultsText: 'No results found.',
limit: 10,
fuzzy: true,
})
</script>
<!--end search-->
</li>
</ul>
</div>
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<div class="col-lg-12">&nbsp;</div>
<!-- Content Row -->
<div class="row">
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
<ul id="mysidebar" class="nav">
<li class="sidebarTitle">PMD 6.24.0-SNAPSHOT</li>
<li>
<a href="#">About</a>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="pmd_release_notes.html">Release notes</a></li>
<li class="active"><a href="pmd_next_major_development.html">PMD 7.0.0 development</a></li>
<li><a href="pmd_about_help.html">Getting help</a></li>
</ul>
</li>
<li>
<a href="#">User Documentation</a>
<ul>
<li><a href="pmd_userdocs_installation.html">Installation and basic CLI usage</a></li>
<li><a href="pmd_userdocs_making_rulesets.html">Making rulesets</a></li>
<li><a href="pmd_userdocs_configuring_rules.html">Configuring rules</a></li>
<li><a href="pmd_userdocs_best_practices.html">Best practices</a></li>
<li><a href="pmd_userdocs_suppressing_warnings.html">Suppressing warnings</a></li>
<li><a href="pmd_userdocs_incremental_analysis.html">Incremental analysis</a></li>
<li><a href="pmd_userdocs_cli_reference.html">PMD CLI reference</a></li>
<li><a href="pmd_userdocs_report_formats.html">PMD Report formats</a></li>
<li class="subfolders">
<a href="#">CPD reference</a>
<ul>
<li><a href="pmd_userdocs_cpd.html">Copy-paste detection</a></li>
<li><a href="pmd_userdocs_cpd_report_formats.html">CPD Report formats</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Extending PMD</a>
<ul>
<li><a href="pmd_userdocs_extending_writing_rules_intro.html">Introduction to writing rules</a></li>
<li><a href="pmd_userdocs_extending_your_first_rule.html">Your first rule</a></li>
<li><a href="pmd_userdocs_extending_writing_xpath_rules.html">XPath rules</a></li>
<li><a href="pmd_userdocs_extending_writing_java_rules.html">Java rules</a></li>
<li><a href="pmd_userdocs_extending_designer_reference.html">Rule designer reference</a></li>
<li><a href="pmd_userdocs_extending_defining_properties.html">Defining rule properties</a></li>
<li><a href="pmd_userdocs_extending_metrics_howto.html">Using and defining code metrics</a></li>
<li><a href="pmd_userdocs_extending_rule_guidelines.html">Rule guidelines</a></li>
<li><a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Tools / Integrations</a>
<ul>
<li><a href="pmd_userdocs_tools_maven.html">Maven PMD Plugin</a></li>
<li><a href="pmd_userdocs_tools_gradle.html">Gradle</a></li>
<li><a href="pmd_userdocs_tools_ant.html">Ant</a></li>
<li><a href="pmd_userdocs_tools_java_api.html">PMD Java API</a></li>
<li><a href="pmd_userdocs_tools_ci.html">CI integrations</a></li>
<li><a href="pmd_userdocs_tools.html">Other Tools / Integrations</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Rule Reference</a>
<ul>
<li class="subfolders">
<a href="#">Apex Rules</a>
<ul>
<li><a href="pmd_rules_apex.html">Index</a></li>
<li><a href="pmd_rules_apex_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_apex_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_apex_design.html">Design</a></li>
<li><a href="pmd_rules_apex_documentation.html">Documentation</a></li>
<li><a href="pmd_rules_apex_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_apex_performance.html">Performance</a></li>
<li><a href="pmd_rules_apex_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Ecmascript Rules</a>
<ul>
<li><a href="pmd_rules_ecmascript.html">Index</a></li>
<li><a href="pmd_rules_ecmascript_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_ecmascript_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_ecmascript_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Java Rules</a>
<ul>
<li><a href="pmd_rules_java.html">Index</a></li>
<li><a href="pmd_rules_java_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_java_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_java_design.html">Design</a></li>
<li><a href="pmd_rules_java_documentation.html">Documentation</a></li>
<li><a href="pmd_rules_java_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_java_multithreading.html">Multithreading</a></li>
<li><a href="pmd_rules_java_performance.html">Performance</a></li>
<li><a href="pmd_rules_java_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Java Server Pages Rules</a>
<ul>
<li><a href="pmd_rules_jsp.html">Index</a></li>
<li><a href="pmd_rules_jsp_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_jsp_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_jsp_design.html">Design</a></li>
<li><a href="pmd_rules_jsp_errorprone.html">Error Prone</a></li>
<li><a href="pmd_rules_jsp_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Maven POM Rules</a>
<ul>
<li><a href="pmd_rules_pom.html">Index</a></li>
<li><a href="pmd_rules_pom_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Modelica Rules</a>
<ul>
<li><a href="pmd_rules_modelica.html">Index</a></li>
<li><a href="pmd_rules_modelica_bestpractices.html">Best Practices</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">PLSQL Rules</a>
<ul>
<li><a href="pmd_rules_plsql.html">Index</a></li>
<li><a href="pmd_rules_plsql_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_plsql_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_plsql_design.html">Design</a></li>
<li><a href="pmd_rules_plsql_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Salesforce VisualForce Rules</a>
<ul>
<li><a href="pmd_rules_vf.html">Index</a></li>
<li><a href="pmd_rules_vf_security.html">Security</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">VM Rules</a>
<ul>
<li><a href="pmd_rules_vm.html">Index</a></li>
<li><a href="pmd_rules_vm_bestpractices.html">Best Practices</a></li>
<li><a href="pmd_rules_vm_design.html">Design</a></li>
<li><a href="pmd_rules_vm_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">XML Rules</a>
<ul>
<li><a href="pmd_rules_xml.html">Index</a></li>
<li><a href="pmd_rules_xml_errorprone.html">Error Prone</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">XSL Rules</a>
<ul>
<li><a href="pmd_rules_xsl.html">Index</a></li>
<li><a href="pmd_rules_xsl_codestyle.html">Code Style</a></li>
<li><a href="pmd_rules_xsl_performance.html">Performance</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Language Specific Documentation</a>
<ul>
<li><a href="pmd_languages_jsp.html">JSP Support</a></li>
<li><a href="pmd_java_metrics_index.html">Java code metrics</a></li>
<li><a href="pmd_apex_metrics_index.html">Apex code metrics</a></li>
</ul>
</li>
<li>
<a href="#">Developer Documentation</a>
<ul>
<li><a href="pmd_devdocs_development.html">Developer resources</a></li>
<li><a href="pmd_devdocs_building.html">Building PMD from source</a></li>
<li><a href="https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md" target="_blank">Contributing</a></li>
<li><a href="pmd_devdocs_writing_documentation.html">Writing documentation</a></li>
<li><a href="pmd_devdocs_roadmap.html">Roadmap</a></li>
<li><a href="pmd_devdocs_how_pmd_works.html">How PMD works</a></li>
<li><a href="pmd_devdocs_pmdtester.html">Pmdtester</a></li>
<li><a href="pmd_devdocs_rule_deprecation_policy.html">Rule Deprecation Policy</a></li>
<li class="subfolders">
<a href="#">Major contributions</a>
<ul>
<li><a href="pmd_devdocs_major_adding_new_language.html">Adding a new language</a></li>
<li><a href="pmd_devdocs_major_adding_new_cpd_language.html">Adding a new CPD language</a></li>
<li><a href="pmd_devdocs_major_adding_new_metrics_framework.html">Adding metrics support to a language</a></li>
</ul>
</li>
<li class="subfolders">
<a href="#">Experimental features</a>
<ul>
<li><a href="pmd_devdocs_experimental_ast_dump.html">Creating (XML) dump of the AST</a></li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#">Project documentation</a>
<ul>
<li class="subfolders">
<a href="#">Trivia about PMD</a>
<ul>
<li><a href="pmd_projectdocs_trivia_news.html">PMD in the press</a></li>
<li><a href="pmd_projectdocs_trivia_products.html">Products & books related to PMD</a></li>
<li><a href="pmd_projectdocs_trivia_similarprojects.html">Similar projects</a></li>
<li><a href="pmd_projectdocs_trivia_meaning.html">What does 'PMD' mean?</a></li>
</ul>
</li>
<li><a href="pmd_projectdocs_faq.html">FAQ</a></li>
<li><a href="license.html">License</a></li>
<li><a href="pmd_projectdocs_credits.html">Credits</a></li>
<li><a href="pmd_release_notes_old.html">Old release notes</a></li>
<li class="subfolders">
<a href="#">Project management</a>
<ul>
<li><a href="pmd_projectdocs_committers_releasing.html">Release process</a></li>
<li><a href="pmd_projectdocs_committers_merging_pull_requests.html">Merging pull requests</a></li>
<li><a href="pmd_projectdocs_committers_main_landing_page.html">Main Landing page</a></li>
</ul>
</li>
</ul>
</li>
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
</ul>
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>
</div>
<!-- Content Column -->
<div class="col-md-9" id="tg-sb-content">
<div class="post-header">
<h1 class="post-title-main">PMD 7.0.0 development</h1>
</div>
<div class="post-content">
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
<script>
$( document ).ready(function() {
// Handler for .ready() called.
$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
});
</script>
<div id="toc"></div>
<a target="_blank" href="https://github.com/pmd/pmd/blob/master/docs/pages/next_major_development.md" class="btn btn-default githubEditButton" role="button"><i class="fa fa-github fa-lg"></i> Edit me</a>
<p>Were excited to bring you the next major version of PMD! Here are the major features and changes were working on.
To give us feedback or to suggest a new feature, drop us a line on <a href="https://gitter.im/pmd/pmd">Gitter</a>!</p>
<h2 id="new-features">New Features</h2>
<p>TODO</p>
<h2 id="java-grammar-changes">Java grammar changes</h2>
<div class="alert alert-info" role="alert"><i class="fa fa-info-circle"></i> <b>Note:</b> Current plans are listed <a href="https://github.com/pmd/pmd/labels/in%3Aast">here</a> and in particular <a href="https://github.com/pmd/pmd/issues/1019">here</a></div>
<h2 id="new-api-support-guidelines">New API support guidelines</h2>
<h3 id="whats-new">Whats new</h3>
<p>Until now, all released public members and types were implicitly considered part
of PMDs public API, including inheritance-specific members (protected members, abstract methods).
We have maintained those APIs with the goal to preserve full binary compatibility between minor releases,
only breaking those APIs infrequently, for major releases.</p>
<p>In order to allow PMD to move forward at a faster pace, this implicit contract will
be invalidated with PMD 7.0.0. We now introduce more fine-grained distinctions between
the type of compatibility support we guarantee for our libraries, and ways to make
them explicit to clients of PMD.</p>
<h4 id="internal-packages-and-internalapi-annotation"><code class="highlighter-rouge">.internal</code> packages and <code class="highlighter-rouge">@InternalApi</code> annotation</h4>
<p><em>Internal API</em> is meant for use <em>only</em> by the main PMD codebase. Internal types and methods
may be modified in any way, or even removed, at any time.</p>
<p>Any API in a package that contains an <code class="highlighter-rouge">.internal</code> segment is considered internal.
The <code class="highlighter-rouge">@InternalApi</code> annotation will be used for APIs that have to live outside of
these packages, e.g. methods of a public type that shouldnt be used outside of PMD (again,
these can be removed anytime).</p>
<h4 id="reservedsubclassing"><code class="highlighter-rouge">@ReservedSubclassing</code></h4>
<p>Types marked with the <code class="highlighter-rouge">@ReservedSubclassing</code> annotation are only meant to be subclassed
by classes within PMD. As such, we may add new abstract methods, or remove protected methods,
at any time. All published public members remain supported. The annotation is <em>not</em> inherited, which
means a reserved interface doesnt prevent its implementors to be subclassed.</p>
<h4 id="experimental"><code class="highlighter-rouge">@Experimental</code></h4>
<p>APIs marked with the <code class="highlighter-rouge">@Experimental</code> annotation at the class or method level are subject to change.
They can be modified in any way, or even removed, at any time. You should not use or rely
on them in any production code. They are purely to allow broad testing and feedback.</p>
<h4 id="deprecated"><code class="highlighter-rouge">@Deprecated</code></h4>
<p>APIs marked with the <code class="highlighter-rouge">@Deprecated</code> annotation at the class or method level will remain supported
until the next major release but it is recommended to stop using them.</p>
<h3 id="the-transition">The transition</h3>
<p><em>All currently supported APIs will remain so until 7.0.0</em>. All APIs that are to be moved to
<code class="highlighter-rouge">.internal</code> packages or hidden will be tagged <code class="highlighter-rouge">@InternalApi</code> before that major release, and
the breaking API changes will be performed in 7.0.0.</p>
<h2 id="planned-api-removals">Planned API removals</h2>
<h3 id="list-of-currently-deprecated-apis">List of currently deprecated APIs</h3>
<div class="alert alert-danger" role="alert"><i class="fa fa-exclamation-circle"></i> <b>Warning:</b> This list is not exhaustive. The ultimate reference is whether
an API is tagged as <code class="highlighter-rouge">@Deprecated</code> or not in the latest minor release. During the development of 7.0.0,
we may decide to remove some APIs that were not tagged as deprecated, though well try to avoid it.</div>
<h4 id="6230">6.23.0</h4>
<h5 id="deprecated-apis">Deprecated APIs</h5>
<h6 id="internal-api">Internal API</h6>
<p>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 <code class="highlighter-rouge">@InternalApi</code> annotation. Youll also get a deprecation warning.</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/xpath/AbstractXPathRuleQuery.html#"><code>AbstractXPathRuleQuery</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/xpath/JaxenXPathRuleQuery.html#"><code>JaxenXPathRuleQuery</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/xpath/SaxonXPathRuleQuery.html#"><code>SaxonXPathRuleQuery</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/xpath/XPathRuleQuery.html#"><code>XPathRuleQuery</code></a></li>
</ul>
<h6 id="in-asts">In ASTs</h6>
<p>As part of the changes wed 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 <strong>Apex</strong>, <strong>Javascript</strong>, <strong>PL/SQL</strong>, <strong>Scala</strong> and <strong>Visualforce</strong> ASTs:</p>
<ul>
<li>Manual instantiation of nodes. <strong>Constructors of node classes are deprecated</strong> and
marked <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</li>
<li><strong>Subclassing of abstract node classes, or usage of their type</strong>. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
<ul>
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/ast/VfNode.html#"><code>VfNode</code></a> or
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</li>
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
</ul>
</li>
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>.
We will make those setters package private with 7.0.0.</li>
<li>The implementation classes of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/Parser.html#"><code>Parser</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/VfParser.html#"><code>VfParser</code></a>) are deprecated and should not be used directly.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser(ParserOptions)"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
<li>The implementation classes of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/TokenManager.html#"><code>TokenManager</code></a> (eg <a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/VfTokenManager.html#"><code>VfTokenManager</code></a>) are deprecated and should not be used outside of our implementation.
<strong>This also affects CPD-only modules</strong>.</li>
</ul>
<p>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.</p>
<ul>
<li>Apex: <strong><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.apex.ast</code></a></strong></li>
<li>Javascript: <strong><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ecmascript/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.ecmascript.ast</code></a></strong></li>
<li>PL/SQL: <strong><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/plsql/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.plsql.ast</code></a></strong></li>
<li>Scala: <strong><a href="https://docs.pmd-code.org/apidocs/pmd-scala/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/scala/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.scala.ast</code></a></strong></li>
<li>Visualforce: <strong><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.vf.ast</code></a></strong></li>
</ul>
<p>These deprecations have already been rolled out in a previous version for the
following languages:</p>
<ul>
<li>Java: <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a></li>
<li>Java Server Pages: <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/jsp/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.jsp.ast</code></a></li>
<li>Velocity Template Language: <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.ast</code></a></li>
</ul>
<p>Outside of these packages, these changes also concern the following TokenManager
implementations, and their corresponding Parser if it exists (in the same package):</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/cpp/CppTokenManager.html#"><code>CppTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaTokenManager.html#"><code>JavaTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ecmascript5/Ecmascript5TokenManager.html#"><code>Ecmascript5TokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/jsp/JspTokenManager.html#"><code>JspTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/matlab/MatlabTokenManager.html#"><code>MatlabTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-modelica/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/modelica/ModelicaTokenManager.html#"><code>ModelicaTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.html#"><code>ObjectiveCTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/plsql/PLSQLTokenManager.html#"><code>PLSQLTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/python/PythonTokenManager.html#"><code>PythonTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/VfTokenManager.html#"><code>VfTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/VmTokenManager.html#"><code>VmTokenManager</code></a></li>
</ul>
<p>In the <strong>Java AST</strong> the following attributes are deprecated and will issue a warning when used in XPath rules:</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAdditiveExpression.html#getImage()"><code>ASTAdditiveExpression#getImage</code></a> - use <code class="highlighter-rouge">getOperator()</code> instead</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getImage()"><code>ASTVariableDeclaratorId#getImage</code></a> - use <code class="highlighter-rouge">getName()</code> instead</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#getVariableName()"><code>ASTVariableDeclaratorId#getVariableName</code></a> - use <code class="highlighter-rouge">getName()</code> instead</li>
</ul>
<h6 id="for-removal">For removal</h6>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/Parser.html#getTokenManager(java.lang.String,java.io.Reader)"><code>Parser#getTokenManager</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/TokenManager.html#setFileName(java.lang.String)"><code>TokenManager#setFileName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/AbstractTokenManager.html#setFileName(java.lang.String)"><code>AbstractTokenManager#setFileName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/AbstractTokenManager.html#getFileName(java.lang.String)"><code>AbstractTokenManager#getFileName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/cpd/token/AntlrToken.html#getType()"><code>AntlrToken#getType</code></a> - use <code class="highlighter-rouge">getKind()</code> instead.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/ImmutableLanguage.html#"><code>ImmutableLanguage</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/MockRule.html#"><code>MockRule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#getFirstParentOfAnyType(java.lang.Class[])"><code>Node#getFirstParentOfAnyType</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#getAsDocument()"><code>Node#getAsDocument</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/AbstractNode.html#hasDescendantOfAnyType(java.lang.Class[])"><code>AbstractNode#hasDescendantOfAnyType</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTRecordDeclaration.html#getComponentList()"><code>ASTRecordDeclaration#getComponentList</code></a></li>
<li>Multiple fields, constructors and methods in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/XPathRule.html#"><code>XPathRule</code></a>. See javadoc for details.</li>
</ul>
<h4 id="6220">6.22.0</h4>
<h5 id="deprecated-apis-1">Deprecated APIs</h5>
<h6 id="internal-api-1">Internal API</h6>
<p>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 <code class="highlighter-rouge">@InternalApi</code> annotation. Youll also get a deprecation warning.</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code>JavaLanguageParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code>JavaDataFlowHandler</code></a></li>
<li>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
language module, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
See javadoc of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.</li>
<li>
<p>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>.</p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a></li>
<li>Constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)"><code>getRulesetFactory</code></a></p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related <code class="highlighter-rouge">visit</code>
methods on <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.</li>
</ul>
<h6 id="for-removal-1">For removal</h6>
<ul>
<li>pmd-core
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/dfa/DFAGraphRule.html#"><code>DFAGraphRule</code></a> and its implementations</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/dfa/DFAGraphMethod.html#"><code>DFAGraphMethod</code></a></li>
<li>Many methods on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.</li>
<li>Many APIs of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/metrics/package-summary.html#"><code>net.sourceforge.pmd.lang.metrics</code></a>, though most of them were internal and
probably not used directly outside of PMD. Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/metrics/MetricsUtil.html#"><code>MetricsUtil</code></a> as
a replacement for the language-specific façades too.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/QualifiableNode.html#"><code>QualifiableNode</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/QualifiedName.html#"><code>QualifiedName</code></a></li>
</ul>
</li>
<li>pmd-java
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code>AbstractJavaParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/AbstractJavaHandler.html#"><code>AbstractJavaHandler</code></a></li>
<li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.TypeKind.html"><code class="highlighter-rouge">ASTAnyTypeDeclaration.TypeKind</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getKind()"><code>ASTAnyTypeDeclaration#getKind</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code>JavaQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code>ASTCatchStatement#getBlock</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code>ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code>JavaQualifiableNode</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code>ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code>net.sourceforge.pmd.lang.java.qname</code></a> and its contents</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/MethodLikeNode.html#"><code>MethodLikeNode</code></a>
<ul>
<li>Its methods will also be removed from its implementations,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code>ASTLambdaExpression</code></a>.</li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code>ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use <code class="highlighter-rouge">getSimpleName()</code>
instead. This affects <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code>ASTEnumDeclaration#getImage</code></a>.</li>
<li>Several methods of <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute <code class="highlighter-rouge">@Finally</code>, replace it with a test for <code class="highlighter-rouge">child::FinallyStatement</code>.</li>
<li>Several methods named <code class="highlighter-rouge">getGuardExpressionNode</code> are replaced with <code class="highlighter-rouge">getCondition</code>. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/metrics/JavaMetrics.html#"><code>JavaMetrics</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/metrics/JavaMetricsComputer.html#"><code>JavaMetricsComputer</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#getArgumentCount()"><code>ASTArguments#getArgumentCount</code></a>.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTArguments.html#size()"><code>size</code></a> instead.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFormalParameters.html#getParameterCount()"><code>ASTFormalParameters#getParameterCount</code></a>.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFormalParameters.html#size()"><code>size</code></a> instead.</li>
</ul>
</li>
<li>pmd-apex
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/metrics/ApexMetrics.html#"><code>ApexMetrics</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/metrics/ApexMetricsComputer.html#"><code>ApexMetricsComputer</code></a></li>
</ul>
</li>
</ul>
<h6 id="in-asts-jsp">In ASTs (JSP)</h6>
<p>As part of the changes wed 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 <strong>in the JSP AST</strong> (with other languages to come):</p>
<ul>
<li>Manual instantiation of nodes. <strong>Constructors of node classes are deprecated</strong> and
marked <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</li>
<li><strong>Subclassing of abstract node classes, or usage of their type</strong>. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
<ul>
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/jsp/ast/JspNode.html#"><code>JspNode</code></a> or
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</li>
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
</ul>
</li>
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>.
We will make those setters package private with 7.0.0.</li>
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/jsp/JspParser.html#"><code>JspParser</code></a> is deprecated and should not be used directly.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser(ParserOptions)"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
</ul>
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/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.</p>
<h6 id="in-asts-velocity">In ASTs (Velocity)</h6>
<p>As part of the changes wed 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 <strong>in the VM AST</strong> (with other languages to come):</p>
<ul>
<li>Manual instantiation of nodes. <strong>Constructors of node classes are deprecated</strong> and
marked <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</li>
<li><strong>Subclassing of abstract node classes, or usage of their type</strong>. The base classes are internal API
and will be hidden in version 7.0.0. You should not couple your code to them.
<ul>
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/ast/VmNode.html#"><code>VmNode</code></a> or
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package,
to refer to nodes generically.</li>
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
</ul>
</li>
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>.
We will make those setters package private with 7.0.0.</li>
<li>The package <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/directive/package-summary.html#"><code>net.sourceforge.pmd.lang.vm.directive</code></a> as well as the classes
<a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.html#"><code>DirectiveMapper</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/util/LogUtil.html#"><code>LogUtil</code></a> are deprecated
for removal. They were only used internally during parsing.</li>
<li>The class <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/VmParser.html#"><code>VmParser</code></a> is deprecated and should not be used directly.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getParser(ParserOptions)"><code>LanguageVersionHandler#getParser</code></a> instead.</li>
</ul>
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/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.</p>
<h5 id="plsql-ast">PLSQL AST</h5>
<p>The production and node <code class="highlighter-rouge">ASTCursorBody</code> was unnecessary, not used and has been removed. Cursors have been already
parsed as <code class="highlighter-rouge">ASTCursorSpecification</code>.</p>
<h4 id="6210">6.21.0</h4>
<h5 id="deprecated-apis-2">Deprecated APIs</h5>
<h6 id="internal-api-2">Internal API</h6>
<p>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 <code class="highlighter-rouge">@InternalApi</code> annotation. Youll also get a deprecation warning.</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaLanguageHandler.html#"><code>JavaLanguageHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaLanguageParser.html#"><code>JavaLanguageParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/JavaDataFlowHandler.html#"><code>JavaDataFlowHandler</code></a></li>
<li>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a> in each
language module, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/JavaRuleViolationFactory.html#"><code>JavaRuleViolationFactory</code></a>.
See javadoc of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/RuleViolationFactory.html#"><code>RuleViolationFactory</code></a>.</li>
<li>
<p>Implementations of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a> in each language module,
eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#"><code>JavaRuleViolation</code></a>. See javadoc of
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleViolation.html#"><code>RuleViolation</code></a>.</p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleFactory.html#"><code>RuleFactory</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleBuilder.html#"><code>RuleBuilder</code></a></li>
<li>Constructors of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSetFactory.html#"><code>RuleSetFactory</code></a>, use factory methods from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RulesetsFactoryUtils.html#"><code>RulesetsFactoryUtils</code></a> instead</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RulesetsFactoryUtils.html#getRulesetFactory(net.sourceforge.pmd.PMDConfiguration,net.sourceforge.pmd.util.ResourceLoader)"><code>getRulesetFactory</code></a></p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/AbstractApexNode.html#"><code>AbstractApexNode</code></a></li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/AbstractApexNodeBase.html#"><code>AbstractApexNodeBase</code></a>, and the related <code class="highlighter-rouge">visit</code>
methods on <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ApexParserVisitor.html#"><code>ApexParserVisitor</code></a> and its implementations.
Use <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/ApexNode.html#"><code>ApexNode</code></a> instead, now considers comments too.</p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/CharStream.html#"><code>CharStream</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/JavaCharStream.html#"><code>JavaCharStream</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</li>
<li>All classes generated by JavaCC, eg <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/ParseException.html#"><code>ParseException</code></a>, whose usages will be replaced
by just that superclass.</li>
</ul>
<h6 id="for-removal-2">For removal</h6>
<ul>
<li>pmd-core
<ul>
<li>Many methods on the <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a> interface
and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/AbstractNode.html#"><code>AbstractNode</code></a> base class. See their javadoc for details.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#isFindBoundary()"><code>Node#isFindBoundary</code></a> is deprecated for XPath queries.</li>
</ul>
</li>
<li>pmd-java
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/AbstractJavaParser.html#"><code>AbstractJavaParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/AbstractJavaHandler.html#"><code>AbstractJavaHandler</code></a></li>
<li><a href="https://javadoc.io/page/net.sourceforge.pmd/pmd-java/6.21.0/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.TypeKind.html"><code class="highlighter-rouge">ASTAnyTypeDeclaration.TypeKind</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getKind()"><code>ASTAnyTypeDeclaration#getKind</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaQualifiedName.html#"><code>JavaQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTCatchStatement.html#getBlock()"><code>ASTCatchStatement#getBlock</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#declarationsAreInDefaultPackage()"><code>ASTCompilationUnit#declarationsAreInDefaultPackage</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaQualifiableNode.html#"><code>JavaQualifiableNode</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getQualifiedName()"><code>ASTAnyTypeDeclaration#getQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#getQualifiedName()"><code>ASTMethodOrConstructorDeclaration#getQualifiedName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#getQualifiedName()"><code>ASTLambdaExpression#getQualifiedName</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/qname/package-summary.html#"><code>net.sourceforge.pmd.lang.java.qname</code></a> and its contents</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/MethodLikeNode.html#"><code>MethodLikeNode</code></a>
<ul>
<li>Its methods will also be removed from its implementations,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodOrConstructorDeclaration.html#"><code>ASTMethodOrConstructorDeclaration</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTLambdaExpression.html#"><code>ASTLambdaExpression</code></a>.</li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnyTypeDeclaration.html#getImage()"><code>ASTAnyTypeDeclaration#getImage</code></a> will be removed. Please use <code class="highlighter-rouge">getSimpleName()</code>
instead. This affects <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTAnnotationTypeDeclaration.html#getImage()"><code>ASTAnnotationTypeDeclaration#getImage</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTClassOrInterfaceDeclaration.html#getImage()"><code>ASTClassOrInterfaceDeclaration#getImage</code></a>, and
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTEnumDeclaration.html#getImage()"><code>ASTEnumDeclaration#getImage</code></a>.</li>
<li>Several methods of <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTTryStatement.html#"><code>ASTTryStatement</code></a>, replacements with other names
have been added. This includes the XPath attribute <code class="highlighter-rouge">@Finally</code>, replace it with a test for <code class="highlighter-rouge">child::FinallyStatement</code>.</li>
<li>Several methods named <code class="highlighter-rouge">getGuardExpressionNode</code> are replaced with <code class="highlighter-rouge">getCondition</code>. This affects the
following nodes: WhileStatement, DoStatement, ForStatement, IfStatement, AssertStatement, ConditionalExpression.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTYieldStatement.html#"><code>ASTYieldStatement</code></a> will not implement <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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.</li>
</ul>
</li>
</ul>
<h4 id="6200">6.20.0</h4>
<p>No changes.</p>
<h4 id="6190">6.19.0</h4>
<h5 id="deprecated-apis-3">Deprecated APIs</h5>
<h6 id="for-removal-3">For removal</h6>
<ul>
<li>pmd-core
<ul>
<li>All the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/dcd/package-summary.html#"><code>net.sourceforge.pmd.dcd</code></a> and its subpackages. See <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/dcd/DCD.html#"><code>DCD</code></a>.</li>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#"><code>LanguageRegistry</code></a>:
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguageVersion(List)"><code>commaSeparatedTerseNamesForLanguageVersion</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#commaSeparatedTerseNamesForLanguage(List)"><code>commaSeparatedTerseNamesForLanguage</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#findAllVersions()"><code>findAllVersions</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#findLanguageVersionByTerseName(String)"><code>findLanguageVersionByTerseName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageRegistry.html#getInstance()"><code>getInstance</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#getExcludePatterns()"><code>RuleSet#getExcludePatterns</code></a>. Use the new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#getFileExclusions()"><code>getFileExclusions</code></a> instead.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#getIncludePatterns()"><code>RuleSet#getIncludePatterns</code></a>. Use the new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#getFileInclusions()"><code>getFileInclusions</code></a> instead.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/Parser.html#canParse()"><code>Parser#canParse</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/Parser.html#getSuppressMap()"><code>Parser#getSuppressMap</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleBuilder.html#RuleBuilder(String,String,String)"><code>RuleBuilder#RuleBuilder</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/rules/RuleFactory.html#RuleFactory()"><code>RuleFactory#RuleFactory</code></a>. Use the new constructor with the correct ResourceLoader instead.</li>
</ul>
</li>
<li>pmd-java
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#isSuppressed(Node)"><code>isSuppressed</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/AbstractJavaRule.html#getDeclaringType(Node)"><code>getDeclaringType</code></a>.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/JavaRuleViolation.html#isSupressed(Node,Rule)"><code>isSupressed</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclarator.html#"><code>ASTMethodDeclarator</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getMethodName()"><code>getMethodName</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTMethodDeclaration.html#getBlock()"><code>getBlock</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTConstructorDeclaration.html#getParameterCount()"><code>getParameterCount</code></a></li>
</ul>
</li>
<li>pmd-apex
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/CanSuppressWarnings.html#"><code>CanSuppressWarnings</code></a> and its implementations</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/rule/ApexRuleViolation.html#isSupressed(Node,Rule)"><code>isSupressed</code></a></li>
</ul>
</li>
</ul>
<h6 id="internal-apis">Internal APIs</h6>
<ul>
<li>pmd-core
<ul>
<li>All the package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/util/package-summary.html#"><code>net.sourceforge.pmd.util</code></a> and its subpackages,
except <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/util/datasource/package-summary.html#"><code>net.sourceforge.pmd.util.datasource</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/util/database/package-summary.html#"><code>net.sourceforge.pmd.util.database</code></a>.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/cpd/GridBagHelper.html#"><code>GridBagHelper</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/renderers/ColumnDescriptor.html#"><code>ColumnDescriptor</code></a></li>
</ul>
</li>
</ul>
<h4 id="6180">6.18.0</h4>
<h5 id="changes-to-renderer">Changes to Renderer</h5>
<ul>
<li>
<p>Each renderer has now a new method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/renderers/Renderer.html#setUseShortNames(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
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/renderers/AbstractRenderer.html#determineFileName(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.</p>
<p>Not adjusting custom renderers will make them render always the full file names and not honoring the
CLI option “shortnames”.</p>
</li>
</ul>
<h5 id="deprecated-apis-4">Deprecated APIs</h5>
<h6 id="for-removal-4">For removal</h6>
<ul>
<li>The methods <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getImportedNameNode()"><code>getImportedNameNode</code></a> and
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTImportDeclaration.html#getPackage()"><code>getPackage</code></a> have been deprecated and
will be removed with PMD 7.0.0.</li>
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleContext.html#setSourceCodeFilename(String)"><code>RuleContext#setSourceCodeFilename</code></a> has been deprecated
and will be removed. The already existing method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleContext.html#setSourceCodeFile(File)"><code>RuleContext#setSourceCodeFile</code></a>
should be used instead. The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleContext.html#getSourceCodeFilename()"><code>RuleContext#getSourceCodeFilename</code></a> still
exists and returns just the filename without the full path.</li>
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/processor/AbstractPMDProcessor.html#filenameFrom(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.</li>
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Report.html#metrics()"><code>Report#metrics</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Report.html#"><code>Report</code></a> have
been deprecated. They were leftovers from a previous deprecation round targeting
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/stat/StatisticalRule.html#"><code>StatisticalRule</code></a>.</li>
</ul>
<h6 id="internal-apis-1">Internal APIs</h6>
<p>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 <code class="highlighter-rouge">@InternalApi</code> annotation. Youll also get a deprecation warning.</p>
<ul>
<li>pmd-core
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/cache/package-summary.html#"><code>net.sourceforge.pmd.cache</code></a></li>
</ul>
</li>
<li>pmd-java
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/typeresolution/package-summary.html#"><code>net.sourceforge.pmd.lang.java.typeresolution</code></a>: Everything, including
subpackages, except <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/typeresolution/TypeHelper.html#"><code>TypeHelper</code></a> and
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/typeresolution/typedefinition/JavaTypeDefinition.html#"><code>JavaTypeDefinition</code></a>.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTCompilationUnit.html#getClassTypeResolver()"><code>ASTCompilationUnit#getClassTypeResolver</code></a></li>
</ul>
</li>
</ul>
<h4 id="6170">6.17.0</h4>
<p>No changes.</p>
<h4 id="6160">6.16.0</h4>
<h5 id="deprecated-apis-5">Deprecated APIs</h5>
<blockquote>
<p>Reminder: Please dont use members marked with the annotation <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</p>
</blockquote>
<h6 id="in-asts-1">In ASTs</h6>
<p>As part of the changes wed 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 <strong>in the Java AST</strong> (with other languages to come):</p>
<ul>
<li>Manual instantiation of nodes. <strong>Constructors of node classes are deprecated</strong> and marked <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</li>
<li><strong>Subclassing of abstract node classes, or usage of their type</strong>. 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.
<ul>
<li>In the meantime you should use interfaces like <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaNode.html#"><code>JavaNode</code></a> or <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/Node.html#"><code>Node</code></a>, or the other published interfaces in this package, to refer to nodes generically.</li>
<li>Concrete node classes will <strong>be made final</strong> with 7.0.0.</li>
</ul>
</li>
<li>Setters found in any node class or interface. <strong>Rules should consider the AST immutable</strong>. We will make those setters package private with 7.0.0.</li>
</ul>
<p>Please look at <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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.</p>
<h4 id="6150">6.15.0</h4>
<h5 id="deprecated-apis-6">Deprecated APIs</h5>
<h6 id="for-removal-5">For removal</h6>
<ul>
<li>The <code class="highlighter-rouge">DumpFacades</code> 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.
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.apex.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.java.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-javascript/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ecmascript/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.ecmascript.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-jsp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/jsp/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.jsp.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-plsql/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/plsql/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.plsql.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-visualforce/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vf/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.vf.ast.DumpFacade</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-vm/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/vm/ast/AbstractVmNode.html#dump(String,boolean,Writer)"><code>net.sourceforge.pmd.lang.vm.ast.AbstractVmNode#dump</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-xml/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/xml/ast/DumpFacade.html#"><code>net.sourceforge.pmd.lang.xml.ast.DumpFacade</code></a></li>
</ul>
</li>
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDumpFacade(Writer,String,boolean)"><code>LanguageVersionHandler#getDumpFacade</code></a> will be
removed as well. It is deprecated, along with all its implementations in the subclasses of <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>.</li>
</ul>
<h4 id="6140">6.14.0</h4>
<p>No changes.</p>
<h4 id="6130">6.13.0</h4>
<h5 id="command-line-interface">Command Line Interface</h5>
<p>The start scripts <code class="highlighter-rouge">run.sh</code>, <code class="highlighter-rouge">pmd.bat</code> and <code class="highlighter-rouge">cpd.bat</code> support the new environment variable <code class="highlighter-rouge">PMD_JAVA_OPTS</code>.
This can be used to set arbitrary JVM options for running PMD, such as memory settings (e.g. <code class="highlighter-rouge">PMD_JAVA_OPTS=-Xmx512m</code>)
or enable preview language features (e.g. <code class="highlighter-rouge">PMD_JAVA_OPTS=--enable-preview</code>).</p>
<p>The previously available variables such as <code class="highlighter-rouge">OPTS</code> or <code class="highlighter-rouge">HEAPSIZE</code> are deprecated and will be removed with PMD 7.0.0.</p>
<h5 id="deprecated-api">Deprecated API</h5>
<ul>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://github.com/pmd/pmd/pull/1702">#1702</a> for more.</p>
</li>
<li>
<p>The Apex ruleset <code class="highlighter-rouge">rulesets/apex/ruleset.xml</code> has been deprecated and will be removed in 7.0.0. Please use the new
quickstart ruleset <code class="highlighter-rouge">rulesets/apex/quickstart.xml</code> instead.</p>
</li>
</ul>
<h4 id="6120">6.12.0</h4>
<p>No changes.</p>
<h4 id="6110">6.11.0</h4>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/stat/package-summary.html#"><code>net.sourceforge.pmd.stat</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/rule/stat/package-summary.html#"><code>net.sourceforge.pmd.lang.rule.stat</code></a>,
and also <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/rule/AbstractStatisticalJavaRule.html#"><code>AbstractStatisticalJavaRule</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-apex/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/apex/rule/AbstractStatisticalApexRule.html#"><code>AbstractStatisticalApexRule</code></a> and the like.
The methods <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Report.html#addMetric(net.sourceforge.pmd.stat.Metric)"><code>Report#addMetric</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/ThreadSafeReportListener.html#metricAdded(net.sourceforge.pmd.stat.Metric)"><code>metricAdded</code></a>
will also be removed.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertySource.html#setProperty(net.sourceforge.pmd.properties.MultiValuePropertyDescriptor,Object[])"><code>setProperty</code></a> is deprecated,
because <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> is deprecated as well</li>
</ul>
<h4 id="6100">6.10.0</h4>
<h5 id="properties-framework">Properties framework</h5>
<p>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 <a href="https://github.com/pmd/pmd/wiki/Property-framework-7-0-0">on the wiki</a></p>
<h6 id="changes-to-how-you-define-properties">Changes to how you define properties</h6>
<ul>
<li>
<p>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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/builders/package-summary.html#"><code>net.sourceforge.pmd.properties.builders</code></a>,
is being replaced by the simpler <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyBuilder.html#"><code>PropertyBuilder</code></a>. Their APIs enjoy a high degree of source compatibility.</p>
</li>
<li>
<p>Concrete property classes like <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#"><code>PropertyDescriptor</code></a>
interface, e.g. <code class="highlighter-rouge">PropertyDescriptor&lt;Integer&gt;</code> or <code class="highlighter-rouge">PropertyDescriptor&lt;List&lt;String&gt;&gt;</code>.</p>
</li>
<li>
<p>Instead of spreading properties across countless classes, the utility class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <code class="highlighter-rouge">PropertyFactory</code>:</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/IntegerProperty.html#"><code>IntegerProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#intProperty(java.lang.String)"><code>PropertyFactory#intProperty</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/IntegerMultiProperty.html#"><code>IntegerMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#intListProperty(java.lang.String)"><code>PropertyFactory#intListProperty</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/FloatProperty.html#"><code>FloatProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/DoubleProperty.html#"><code>DoubleProperty</code></a> are both replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#doubleProperty(java.lang.String)"><code>PropertyFactory#doubleProperty</code></a>.
Having a separate property for floats wasnt that useful.
<ul>
<li>Similarly, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/FloatMultiProperty.html#"><code>FloatMultiProperty</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/DoubleMultiProperty.html#"><code>DoubleMultiProperty</code></a> are replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#doubleListProperty(java.lang.String)"><code>PropertyFactory#doubleListProperty</code></a>.</li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/StringProperty.html#"><code>StringProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#stringProperty(java.lang.String)"><code>PropertyFactory#stringProperty</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/StringMultiProperty.html#"><code>StringMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#stringListProperty(java.lang.String)"><code>PropertyFactory#stringListProperty</code></a></li>
</ul>
</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/RegexProperty.html#"><code>RegexProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#regexProperty(java.lang.String)"><code>PropertyFactory#regexProperty</code></a></p>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#enumProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumProperty</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/EnumeratedProperty.html#"><code>EnumeratedProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#enumListProperty(java.lang.String,java.util.Map)"><code>PropertyFactory#enumListProperty</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/BooleanProperty.html#"><code>BooleanProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#booleanProperty(java.lang.String)"><code>PropertyFactory#booleanProperty</code></a>
<ul>
<li>Its multi-valued counterpart, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/BooleanMultiProperty.html#"><code>BooleanMultiProperty</code></a>, is not replaced, because it doesnt have a use case.</li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/CharacterProperty.html#"><code>CharacterProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#charProperty(java.lang.String)"><code>PropertyFactory#charProperty</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/CharacterMultiProperty.html#"><code>CharacterMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#charListProperty(java.lang.String)"><code>PropertyFactory#charListProperty</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/LongProperty.html#"><code>LongProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#longIntProperty(java.lang.String)"><code>PropertyFactory#longIntProperty</code></a>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/LongMultiProperty.html#"><code>LongMultiProperty</code></a> is replaced by <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyFactory.html#longIntListProperty(java.lang.String)"><code>PropertyFactory#longIntListProperty</code></a></li>
</ul>
</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/MethodProperty.html#"><code>MethodProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/FileProperty.html#"><code>FileProperty</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.
<!-- TODO complete that as we proceed. --></li>
</ul>
</li>
</ul>
<p>Heres an example:</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Before 7.0.0, these are equivalent:</span>
<span class="nc">IntegerProperty</span> <span class="n">myProperty</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">IntegerProperty</span><span class="o">(</span><span class="s">"score"</span><span class="o">,</span> <span class="s">"Top score value"</span><span class="o">,</span> <span class="mi">1</span><span class="o">,</span> <span class="mi">100</span><span class="o">,</span> <span class="mi">40</span><span class="o">,</span> <span class="mf">3.0f</span><span class="o">);</span>
<span class="nc">IntegerProperty</span> <span class="n">myProperty</span> <span class="o">=</span> <span class="nc">IntegerProperty</span><span class="o">.</span><span class="na">named</span><span class="o">(</span><span class="s">"score"</span><span class="o">).</span><span class="na">desc</span><span class="o">(</span><span class="s">"Top score value"</span><span class="o">).</span><span class="na">range</span><span class="o">(</span><span class="mi">1</span><span class="o">,</span> <span class="mi">100</span><span class="o">).</span><span class="na">defaultValue</span><span class="o">(</span><span class="mi">40</span><span class="o">).</span><span class="na">uiOrder</span><span class="o">(</span><span class="mf">3.0f</span><span class="o">);</span>
<span class="c1">// They both map to the following in 7.0.0</span>
<span class="nc">PropertyDescriptor</span><span class="o">&lt;</span><span class="nc">Integer</span><span class="o">&gt;</span> <span class="n">myProperty</span> <span class="o">=</span> <span class="nc">PropertyFactory</span><span class="o">.</span><span class="na">intProperty</span><span class="o">(</span><span class="s">"score"</span><span class="o">).</span><span class="na">desc</span><span class="o">(</span><span class="s">"Top score value"</span><span class="o">).</span><span class="na">require</span><span class="o">(</span><span class="n">inRange</span><span class="o">(</span><span class="mi">1</span><span class="o">,</span> <span class="mi">100</span><span class="o">)).</span><span class="na">defaultValue</span><span class="o">(</span><span class="mi">40</span><span class="o">);</span>
</code></pre></div></div>
<p>Youre highly encouraged to migrate to using this new API as soon as possible, to ease your migration to 7.0.0.</p>
<h6 id="architectural-simplifications">Architectural simplifications</h6>
<ul>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/EnumeratedPropertyDescriptor.html#"><code>EnumeratedPropertyDescriptor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/NumericPropertyDescriptor.html#"><code>NumericPropertyDescriptor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PackagedPropertyDescriptor.html#"><code>PackagedPropertyDescriptor</code></a>,
and the related builders (in <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/constraints/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyNumeric()"><code>PropertyTypeId#isPropertyNumeric</code></a> and
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyTypeId.html#isPropertyPackaged()"><code>PropertyTypeId#isPropertyPackaged</code></a> are also deprecated.</p>
</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/MultiValuePropertyDescriptor.html#"><code>MultiValuePropertyDescriptor</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>PropertyDescriptor#isMultiValue</code></a> will be removed
accordingly.</p>
</li>
</ul>
<h6 id="changes-to-the-propertydescriptor-interface">Changes to the PropertyDescriptor interface</h6>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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 <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#uiOrder()"><code>uiOrder</code></a> and <code class="highlighter-rouge">compareTo(PropertyDescriptor)</code> are deprecated for the
same reason. These methods mix presentation logic with business logic and are not necessary for PropertyDescriptors to work.
<code class="highlighter-rouge">PropertyDescriptor</code> will not extend <code class="highlighter-rouge">Comparable&lt;PropertyDescriptor&gt;</code> anymore come 7.0.0.</li>
<li>The method <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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. Its really just a shortcut for <code class="highlighter-rouge">prop.errorFor(rule.getProperty(prop))</code>.</li>
<li><code class="highlighter-rouge">T </code><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#valueFrom(java.lang.String)"><code>valueFrom(String)</code></a> and <code class="highlighter-rouge">String </code><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#asDelimitedString(java.lang.Object)"><code>asDelimitedString</code></a><code class="highlighter-rouge">(T)</code> 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.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#isMultiValue()"><code>isMultiValue</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#type()"><code>type</code></a> are deprecated and wont 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, <code class="highlighter-rouge">type</code> will become obsolete as it cant 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.</li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#errorFor(java.lang.Object)"><code>errorFor</code></a> is deprecated as its return type will be changed to <code class="highlighter-rouge">Optional&lt;String&gt;</code> with the shift to Java 8.</li>
</ul>
<h5 id="deprecated-apis-7">Deprecated APIs</h5>
<h6 id="for-internalization">For internalization</h6>
<ul>
<li>
<p>The implementation of the adapters for the XPath engines Saxon and Jaxen (package <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/xpath/package-summary.html#"><code>net.sourceforge.pmd.lang.ast.xpath</code></a>)
are now deprecated. Theyll be moved to an internal package come 7.0.0. Only <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ast/xpath/Attribute.html#"><code>Attribute</code></a> remains public API.</p>
</li>
<li>
<p>The classes <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptorField.html#"><code>PropertyDescriptorField</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/builders/PropertyDescriptorBuilderConversionWrapper.html#"><code>PropertyDescriptorBuilderConversionWrapper</code></a>, and the methods
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#attributeValuesById"><code>PropertyDescriptor#attributeValuesById</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/PropertyDescriptor.html#isDefinedExternally()"><code>PropertyDescriptor#isDefinedExternally</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/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.</p>
</li>
<li>
<p>The class <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/ValueParserConstants.html#"><code>ValueParserConstants</code></a> and the interface <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/ValueParser.html#"><code>ValueParser</code></a>.</p>
</li>
<li>
<p>All classes from <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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. Theyre deprecated
and will be moved into an internal package with 7.0.0. To implement your own metrics visitors,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorAdapter.html#"><code>JavaParserVisitorAdapter</code></a> should be directly subclassed.</p>
</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowHandler()"><code>LanguageVersionHandler#getDataFlowHandler()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDFAGraphRule()"><code>LanguageVersionHandler#getDFAGraphRule()</code></a></p>
</li>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/VisitorStarter.html#"><code>VisitorStarter</code></a></p>
</li>
</ul>
<h6 id="for-removal-6">For removal</h6>
<ul>
<li>
<p>All classes from <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/properties/modules/package-summary.html#"><code>net.sourceforge.pmd.properties.modules</code></a> will be removed.</p>
</li>
<li>
<p>The interface <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/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 wont be needed anymore (see <a href="https://github.com/pmd/pmd/issues/997">#997</a>).</p>
</li>
<li>
<p>Several methods from <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTLocalVariableDeclaration.html#"><code>ASTLocalVariableDeclaration</code></a> and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> have
also been deprecated:</p>
<ul>
<li>
<p><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#"><code>ASTFieldDeclaration</code></a> wont be a <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/TypeNode.html#"><code>TypeNode</code></a> come 7.0.0, so
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getType()"><code>getType</code></a> and
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTFieldDeclaration.html#getTypeDefinition()"><code>getTypeDefinition</code></a> are deprecated.</p>
</li>
<li>
<p>The method <code class="highlighter-rouge">getVariableName</code> on those two nodes will be removed, too.</p>
</li>
</ul>
<p>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 <code class="highlighter-rouge">Iterator&lt;</code><a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/ASTVariableDeclaratorId.html#"><code>ASTVariableDeclaratorId</code></a><code class="highlighter-rouge">&gt;</code>
though, so you should iterate on each declared variable. See <a href="https://github.com/pmd/pmd/issues/910">#910</a>.</p>
</li>
<li>
<p>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 didnt prove cost-effective.</p>
<ul>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/package-summary.html#"><code>net.sourceforge.pmd.lang.java.ast</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaParserDecoratedVisitor.html#"><code>JavaParserDecoratedVisitor</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitor.html#"><code>JavaParserControllessVisitor</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaParserControllessVisitorAdapter.html#"><code>JavaParserControllessVisitorAdapter</code></a>, and <a href="https://docs.pmd-code.org/apidocs/pmd-java/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/java/ast/JavaParserVisitorDecorator.html#"><code>JavaParserVisitorDecorator</code></a> are deprecated with no intended replacement.</li>
</ul>
</li>
<li>
<p>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:</p>
<ul>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/cpp/CppHandler.html#"><code>CppHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/cpp/CppLanguageModule.html#"><code>CppLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cpp/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/cpp/CppParser.html#"><code>CppParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-cs/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/cs/CsLanguageModule.html#"><code>CsLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-fortran/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/fortran/FortranLanguageModule.html#"><code>FortranLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-groovy/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/groovy/GroovyLanguageModule.html#"><code>GroovyLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/matlab/MatlabHandler.html#"><code>MatlabHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/matlab/MatlabLanguageModule.html#"><code>MatlabLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-matlab/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/matlab/MatlabParser.html#"><code>MatlabParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.html#"><code>ObjectiveCHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.html#"><code>ObjectiveCLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-objectivec/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.html#"><code>ObjectiveCParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-php/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/php/PhpLanguageModule.html#"><code>PhpLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/python/PythonHandler.html#"><code>PythonHandler</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/python/PythonLanguageModule.html#"><code>PythonLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-python/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/python/PythonParser.html#"><code>PythonParser</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-ruby/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/ruby/RubyLanguageModule.html#"><code>RubyLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-scala/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/scala/ScalaLanguageModule.html#"><code>ScalaLanguageModule</code></a></li>
<li><a href="https://docs.pmd-code.org/apidocs/pmd-swift/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/swift/SwiftLanguageModule.html#"><code>SwiftLanguageModule</code></a></li>
</ul>
</li>
<li>
<p>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 <a href="https://github.com/pmd/pmd/pull/1426">#1426</a>. Consequently, the following APIs are deprecated for
removal:</p>
<ul>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Rule.html#"><code>Rule</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Rule.html#isDfa()"><code>isDfa()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Rule.html#isTypeResolution()"><code>isTypeResolution()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/Rule.html#isMultifile()"><code>isMultifile()</code></a> and their
respective setters.</li>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#"><code>RuleSet</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSet.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a></li>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSets.html#"><code>RuleSets</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSets.html#usesDFA(net.sourceforge.pmd.lang.Language)"><code>usesDFA(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSets.html#usesTypeResolution(net.sourceforge.pmd.lang.Language)"><code>usesTypeResolution(Language)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/RuleSets.html#usesMultifile(net.sourceforge.pmd.lang.Language)"><code>usesMultifile(Language)</code></a></li>
<li>In <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#"><code>LanguageVersionHandler</code></a>: <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getDataFlowFacade()"><code>getDataFlowFacade()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade()"><code>getSymbolFacade()</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getSymbolFacade(java.lang.ClassLoader)"><code>getSymbolFacade(ClassLoader)</code></a>,
<a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getTypeResolutionFacade(java.lang.ClassLoader)"><code>getTypeResolutionFacade(ClassLoader)</code></a>, <a href="https://docs.pmd-code.org/apidocs/pmd-core/6.24.0-SNAPSHOT/net/sourceforge/pmd/lang/LanguageVersionHandler.html#getQualifiedNameResolutionFacade(java.lang.ClassLoader)"><code>getQualifiedNameResolutionFacade(ClassLoader)</code></a></li>
</ul>
</li>
</ul>
<h4 id="690">6.9.0</h4>
<p>No changes.</p>
<h4 id="680">6.8.0</h4>
<ul>
<li>
<p>A couple of methods and fields in <code class="highlighter-rouge">net.sourceforge.pmd.properties.AbstractPropertySource</code> have been
deprecated, as they are replaced by already existing functionality or expose internal implementation
details: <code class="highlighter-rouge">propertyDescriptors</code>, <code class="highlighter-rouge">propertyValuesByDescriptor</code>,
<code class="highlighter-rouge">copyPropertyDescriptors()</code>, <code class="highlighter-rouge">copyPropertyValues()</code>, <code class="highlighter-rouge">ignoredProperties()</code>, <code class="highlighter-rouge">usesDefaultValues()</code>,
<code class="highlighter-rouge">useDefaultValueFor()</code>.</p>
</li>
<li>
<p>Some methods in <code class="highlighter-rouge">net.sourceforge.pmd.properties.PropertySource</code> have been deprecated as well:
<code class="highlighter-rouge">usesDefaultValues()</code>, <code class="highlighter-rouge">useDefaultValueFor()</code>, <code class="highlighter-rouge">ignoredProperties()</code>.</p>
</li>
<li>
<p>The class <code class="highlighter-rouge">net.sourceforge.pmd.lang.rule.AbstractDelegateRule</code> has been deprecated and will
be removed with PMD 7.0.0. It is internally only in use by RuleReference.</p>
</li>
<li>
<p>The default constructor of <code class="highlighter-rouge">net.sourceforge.pmd.lang.rule.RuleReference</code> 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: <code class="highlighter-rouge">setRuleReference()</code>,
<code class="highlighter-rouge">hasOverriddenProperty()</code>, <code class="highlighter-rouge">usesDefaultValues()</code>, <code class="highlighter-rouge">useDefaultValueFor()</code>.</p>
</li>
</ul>
<h4 id="670">6.7.0</h4>
<ul>
<li>
<p>All classes in the package <code class="highlighter-rouge">net.sourceforge.pmd.lang.dfa.report</code> have been deprecated and will be removed
with PMD 7.0.0. This includes the class <code class="highlighter-rouge">net.sourceforge.pmd.lang.dfa.report.ReportTree</code>. The reason is,
that this class is very specific to Java and not suitable for other languages. It has only been used for
<code class="highlighter-rouge">YAHTMLRenderer</code>, which has been rewritten to work without these classes.</p>
</li>
<li>
<p>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 theyre not needed and
make ShiftExpression inconsistent. The operator of a ShiftExpression is now accessible through
ShiftExpression#getOperator.</p>
</li>
</ul>
<h4 id="650">6.5.0</h4>
<ul>
<li>
<p>The utility class <code class="highlighter-rouge">net.sourceforge.pmd.lang.java.ast.CommentUtil</code> 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 <code class="highlighter-rouge">FormalComment</code>, which contains as children <code class="highlighter-rouge">JavadocElement</code> nodes, which in
turn provide access to the <code class="highlighter-rouge">JavadocTag</code>.</p>
<p>All comment AST nodes (<code class="highlighter-rouge">FormalComment</code>, <code class="highlighter-rouge">MultiLineComment</code>, <code class="highlighter-rouge">SingleLineComment</code>) have a new method
<code class="highlighter-rouge">getFilteredComment()</code> which provide access to the comment text without the leading <code class="highlighter-rouge">/*</code> markers.</p>
</li>
<li>
<p>The method <code class="highlighter-rouge">AbstractCommentRule.tagsIndicesIn()</code> has been deprecated and will be removed with
PMD 7.0.0. It is not very useful, since it doesnt 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.</p>
</li>
</ul>
<h4 id="640">6.4.0</h4>
<ul>
<li>The following classes in package <code class="highlighter-rouge">net.sourceforge.pmd.benchmark</code> have been deprecated: <code class="highlighter-rouge">Benchmark</code>, <code class="highlighter-rouge">Benchmarker</code>,
<code class="highlighter-rouge">BenchmarkReport</code>, <code class="highlighter-rouge">BenchmarkResult</code>, <code class="highlighter-rouge">RuleDuration</code>, <code class="highlighter-rouge">StringBuilderCR</code> and <code class="highlighter-rouge">TextReport</code>. Their API is not supported anymore
and is disconnected from the internals of PMD. Use the newer API based around <code class="highlighter-rouge">TimeTracker</code> instead, which can be found
in the same package.</li>
<li>The class <code class="highlighter-rouge">net.sourceforge.pmd.lang.java.xpath.TypeOfFunction</code> has been deprecated. Use the newer <code class="highlighter-rouge">TypeIsFunction</code> in the same package.</li>
<li>The <code class="highlighter-rouge">typeof</code> methods in <code class="highlighter-rouge">net.sourceforge.pmd.lang.java.xpath.JavaFunctions</code> have been deprecated.
Use the newer <code class="highlighter-rouge">typeIs</code> method in the same class instead..</li>
<li>The methods <code class="highlighter-rouge">isA</code>, <code class="highlighter-rouge">isEither</code> and <code class="highlighter-rouge">isNeither</code> of <code class="highlighter-rouge">net.sourceforge.pmd.lang.java.typeresolution.TypeHelper</code>.
Use the new <code class="highlighter-rouge">isExactlyAny</code> and <code class="highlighter-rouge">isExactlyNone</code> methods in the same class instead.</li>
</ul>
<h4 id="620">6.2.0</h4>
<ul>
<li>
<p>The static method <code class="highlighter-rouge">PMDParameters.transformParametersIntoConfiguration(PMDParameters)</code> is now deprecated,
for removal in 7.0.0. The new instance method <code class="highlighter-rouge">PMDParameters.toConfiguration()</code> replaces it.</p>
</li>
<li>
<p>The method <code class="highlighter-rouge">ASTConstructorDeclaration.getParameters()</code> has been deprecated in favor of the new method
<code class="highlighter-rouge">getFormalParameters()</code>. This method is available for both <code class="highlighter-rouge">ASTConstructorDeclaration</code> and
<code class="highlighter-rouge">ASTMethodDeclaration</code>.</p>
</li>
</ul>
<h4 id="610">6.1.0</h4>
<ul>
<li>The method <code class="highlighter-rouge">getXPathNodeName</code> is added to the <code class="highlighter-rouge">Node</code> interface, which removes the
use of the <code class="highlighter-rouge">toString</code> of a node to get its XPath element name (see <a href="https://github.com/pmd/pmd/issues/569">#569</a>).
<ul>
<li>The default implementation provided in <code class="highlighter-rouge">AbstractNode</code>, will
be removed with 7.0.0</li>
<li>With 7.0.0, the <code class="highlighter-rouge">Node.toString</code> method will not necessarily provide its XPath node
name anymore.</li>
</ul>
</li>
<li>
<p>The interface <code class="highlighter-rouge">net.sourceforge.pmd.cpd.Renderer</code> has been deprecated. A new interface
<code class="highlighter-rouge">net.sourceforge.pmd.cpd.renderer.CPDRenderer</code> has been introduced to replace it. The main
difference is that the new interface is meant to render directly to a <code class="highlighter-rouge">java.io.Writer</code>
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 <code class="highlighter-rouge">OutOfMemoryError</code>s (see <a href="https://github.com/pmd/pmd/issues/795">#795</a>).</p>
<p><code class="highlighter-rouge">net.sourceforge.pmd.cpd.FileReporter</code> has also been deprecated as part of this change, as its no longer needed.</p>
</li>
</ul>
<h4 id="601">6.0.1</h4>
<ul>
<li>The constant <code class="highlighter-rouge">net.sourceforge.pmd.PMD.VERSION</code> has been deprecated and will be removed with PMD 7.0.0.
Please use <code class="highlighter-rouge">net.sourceforge.pmd.PMDVersion.VERSION</code> instead.</li>
</ul>
<h3 id="list-of-currently-deprecated-rules">List of currently deprecated rules</h3>
<ul>
<li>
<p>The Java rules <a href="pmd_rules_java_codestyle.html#variablenamingconventions"><code class="highlighter-rouge">VariableNamingConventions</code></a>, <a href="pmd_rules_java_codestyle.html#misleadingvariablename"><code class="highlighter-rouge">MIsLeadingVariableName</code></a>,
<a href="pmd_rules_java_codestyle.html#suspiciousconstantfieldname"><code class="highlighter-rouge">SuspiciousConstantFieldName</code></a>, and <a href="pmd_rules_java_codestyle.html#avoidprefixingmethodparameters"><code class="highlighter-rouge">AvoidPrefixingMethodParameters</code></a> are
now deprecated, and will be removed with version 7.0.0. They are replaced by the more general
<a href="pmd_rules_java_codestyle.html#fieldnamingconventions"><code class="highlighter-rouge">FieldNamingConventions</code></a>, <a href="pmd_rules_java_codestyle.html#formalparameternamingconventions"><code class="highlighter-rouge">FormalParameterNamingConventions</code></a>, and
<a href="pmd_rules_java_codestyle.html#localvariablenamingconventions"><code class="highlighter-rouge">LocalVariableNamingConventions</code></a>.</p>
</li>
<li>
<p>The Java rule <a href="pmd_rules_java_codestyle.html#abstractnaming"><code class="highlighter-rouge">AbstractNaming</code></a> is deprecated
in favour of <a href="pmd_rules_java_codestyle.html#classnamingconventions"><code class="highlighter-rouge">ClassNamingConventions</code></a>.</p>
</li>
<li>
<p>The Java rules <a href="pmd_rules_java_codestyle.html#whileloopsmustusebraces"><code class="highlighter-rouge">WhileLoopsMustUseBraces</code></a>, <a href="pmd_rules_java_codestyle.html#forloopsmustusebraces"><code class="highlighter-rouge">ForLoopsMustUseBraces</code></a>, <a href="pmd_rules_java_codestyle.html#ifstmtsmustusebraces"><code class="highlighter-rouge">IfStmtsMustUseBraces</code></a>, and <a href="pmd_rules_java_codestyle.html#ifelsestmtsmustusebraces"><code class="highlighter-rouge">IfElseStmtsMustUseBraces</code></a>
are deprecated. They will be replaced by the new rule <a href="pmd_rules_java_codestyle.html#controlstatementbraces"><code class="highlighter-rouge">ControlStatementBraces</code></a>.</p>
</li>
<li>
<p>The Java rules <a href="pmd_rules_java_design.html#ncssconstructorcount"><code class="highlighter-rouge">NcssConstructorCount</code></a>, <a href="pmd_rules_java_design.html#ncssmethodcount"><code class="highlighter-rouge">NcssMethodCount</code></a>, and <a href="pmd_rules_java_design.html#ncsstypecount"><code class="highlighter-rouge">NcssTypeCount</code></a> have been
deprecated. They will be replaced by the new rule <a href="pmd_rules_java_design.html#ncsscount"><code class="highlighter-rouge">NcssCount</code></a> in the category <code class="highlighter-rouge">design</code>.</p>
</li>
<li>
<p>The Java rule <code class="highlighter-rouge">LooseCoupling</code> in ruleset <code class="highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with the same name from category <code class="highlighter-rouge">bestpractices</code> instead.</p>
</li>
<li>
<p>The Java rule <code class="highlighter-rouge">CloneMethodMustImplementCloneable</code> in ruleset <code class="highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with the same name from category <code class="highlighter-rouge">errorprone</code> instead.</p>
</li>
<li>
<p>The Java rule <code class="highlighter-rouge">UnusedImports</code> in ruleset <code class="highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with
the same name from category <code class="highlighter-rouge">bestpractices</code> instead.</p>
</li>
<li>
<p>The Java rule <code class="highlighter-rouge">SignatureDeclareThrowsException</code> in ruleset <code class="highlighter-rouge">java-typeresolution</code> is deprecated. Use the rule with the same name from category <code class="highlighter-rouge">design</code> instead.</p>
</li>
<li>
<p>The Java rule <code class="highlighter-rouge">EmptyStaticInitializer</code> in ruleset <code class="highlighter-rouge">java-empty</code> is deprecated. Use the rule <a href="pmd_rules_java_errorprone.html#emptyinitializer"><code class="highlighter-rouge">EmptyInitializer</code></a>, which covers both static and non-static empty initializers.`</p>
</li>
<li>
<p>The Java rules <code class="highlighter-rouge">GuardDebugLogging</code> (ruleset <code class="highlighter-rouge">java-logging-jakarta-commons</code>) and <code class="highlighter-rouge">GuardLogStatementJavaUtil</code>
(ruleset <code class="highlighter-rouge">java-logging-java</code>) have been deprecated. Use the rule <a href="pmd_rules_java_bestpractices.html#guardlogstatement"><code class="highlighter-rouge">GuardLogStatement</code></a>, which covers all cases regardless of the logging framework.</p>
</li>
<li>
<p>The Java rule <a href="pmd_rules_java_multithreading.html#unsynchronizedstaticdateformatter"><code class="highlighter-rouge">UnsynchronizedStaticDateFormatter</code></a> has been deprecated and
will be removed with PMD 7.0.0. The rule is replaced by the more general
<a href="pmd_rules_java_multithreading.html#unsynchronizedstaticformatter"><code class="highlighter-rouge">UnsynchronizedStaticFormatter</code></a>.</p>
</li>
</ul>
<div class="tags">
</div>
</div>
<hr class="shaded"/>
<footer>
<div class="row">
<div class="col-lg-12 footer">
&copy;2020 PMD Open Source Project. All rights reserved. <br />
Site last generated: May 18, 2020 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>
</footer>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
</div>
</body>
</html>