pmd/pmd_next_major_development.html
Travis CI (pmd-bot) 29720e131d Update documentation
TRAVIS_JOB_NUMBER=3104.2
TRAVIS_COMMIT_RANGE=56fecb5f6f2d...1f76eb062c6a
2018-11-25 13:57:22 +00:00

1539 lines
50 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.10.0</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 class="subfolders">
<a href="#">Extending PMD</a>
<ul>
<li><a href="pmd_userdocs_extending_writing_pmd_rules.html">Writing a rule</a></li>
<li><a href="pmd_userdocs_extending_writing_xpath_rules.html">Writing XPath rules</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><a href="pmd_userdocs_cpd.html">Copy-paste detection</a></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_ant.html">Ant</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_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="#">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 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>
</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>
</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="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#forloopmustusebraces"><code class="highlighter-rouge">ForLoopMustUseBraces</code></a>, <a href="pmd_rules_java_codestyle.html#ifstmtmustusebraces"><code class="highlighter-rouge">IfStmtMustUseBraces</code></a>, and <a href="pmd_rules_java_codestyle.html#ifelsestmtmustusebraces"><code class="highlighter-rouge">IfElseStmtMustUseBraces</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_codestyle.html#ncssconstructorcount"><code class="highlighter-rouge">NcssConstructorCount</code></a>, <a href="pmd_rules_java_codestyle.html#ncssmethodcount"><code class="highlighter-rouge">NcssMethodCount</code></a>, and <a href="pmd_rules_java_codestyle.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>
</ul>
<div class="tags">
</div>
</div>
<hr class="shaded"/>
<footer>
<div class="row">
<div class="col-lg-12 footer">
&copy;2018 PMD Open Source Project. All rights reserved. <br />
Site last generated: Nov 25, 2018 <br />
<p><img src="images/pmd-logo-small.png" alt="Company logo"/></p>
</div>
</div>
</footer>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
</div>
</body>
</html>